changeset b87019684063 in modules/account_invoice:5.8
details: 
https://hg.tryton.org/modules/account_invoice?cmd=changeset&node=b87019684063
description:
        Add missing fields to copy when credit invoice and line

        issue10260
        review334301002
        (grafted from d3f53891fe7289521b585a44caa8cb8f7203fd85)
diffstat:

 invoice.py |  13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diffs (30 lines):

diff -r ac32f9929dbd -r b87019684063 invoice.py
--- a/invoice.py        Fri Apr 30 13:31:23 2021 +0200
+++ b/invoice.py        Sun May 02 11:00:49 2021 +0200
@@ -1386,9 +1386,10 @@
         '''
         credit = self.__class__(**values)
 
-        for field in ('company', 'party', 'invoice_address', 'currency',
-               'journal', 'account', 'payment_term', 'description',
-               'comment', 'type'):
+        for field in [
+                'company', 'tax_identifier', 'party', 'party_tax_identifier',
+                'invoice_address', 'currency', 'journal', 'account',
+                'payment_term', 'description', 'comment', 'type']:
             setattr(credit, field, getattr(self, field))
 
         credit.lines = [line._credit() for line in self.lines]
@@ -2290,8 +2291,10 @@
         else:
             line.quantity = self.quantity
 
-        for field in ('sequence', 'type', 'invoice_type', 'unit_price',
-                'description', 'unit', 'product', 'account'):
+        for field in [
+                'sequence', 'type', 'invoice_type', 'party', 'currency',
+                'company', 'unit_price', 'description', 'unit', 'product',
+                'account']:
             setattr(line, field, getattr(self, field))
         line.taxes_date = self.tax_date
         line.taxes = self.taxes

Reply via email to