changeset aab5e079ba53 in modules/sale_subscription:default
details: 
https://hg.tryton.org/modules/sale_subscription?cmd=changeset&node=aab5e079ba53
description:
        Always fill invoice date

        issue10675
        review363731003
diffstat:

 CHANGELOG                            |  2 ++
 subscription.py                      |  1 +
 tests/scenario_sale_subscription.rst |  2 ++
 3 files changed, 5 insertions(+), 0 deletions(-)

diffs (32 lines):

diff -r 948fdc92306b -r aab5e079ba53 CHANGELOG
--- a/CHANGELOG Mon Oct 04 18:52:01 2021 +0200
+++ b/CHANGELOG Tue Oct 05 13:33:42 2021 +0200
@@ -1,3 +1,5 @@
+* Always fill invoice date
+
 Version 6.0.0 - 2021-05-03
 * Bug fixes (see mercurial logs for details)
 
diff -r 948fdc92306b -r aab5e079ba53 subscription.py
--- a/subscription.py   Mon Oct 04 18:52:01 2021 +0200
+++ b/subscription.py   Tue Oct 05 13:33:42 2021 +0200
@@ -445,6 +445,7 @@
             currency=self.currency,
             account=party.account_receivable_used,
             )
+        invoice.invoice_date = self.next_invoice_date
         invoice.on_change_type()
         invoice.payment_term = self.payment_term
         return invoice
diff -r 948fdc92306b -r aab5e079ba53 tests/scenario_sale_subscription.rst
--- a/tests/scenario_sale_subscription.rst      Mon Oct 04 18:52:01 2021 +0200
+++ b/tests/scenario_sale_subscription.rst      Tue Oct 05 13:33:42 2021 +0200
@@ -151,6 +151,8 @@
     >>> create_invoice.execute('create_')
 
     >>> invoice, = Invoice.find([])
+    >>> invoice.invoice_date
+    datetime.date(2016, 2, 1)
     >>> line, = invoice.lines
     >>> line.quantity
     310.0

Reply via email to