changeset 0b6f7d52ee99 in modules/account_invoice:default
details: 
https://hg.tryton.org/modules/account_invoice?cmd=changeset;node=0b6f7d52ee99
description:
        Prevent assign unknown attributes on Model

        by adding __slots__ on PoolMeta

        issue8567
        review254091002
diffstat:

 invoice.py |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (13 lines):

diff -r 6597f33e51d2 -r 0b6f7d52ee99 invoice.py
--- a/invoice.py        Fri Aug 09 16:33:39 2019 +0200
+++ b/invoice.py        Sat Sep 07 23:45:08 2019 +0200
@@ -520,7 +520,8 @@
         for key in computed_taxes:
             if key not in tax_keys:
                 self.tax_amount += computed_taxes[key]['amount']
-                value = InvoiceTax.default_get(list(InvoiceTax._fields.keys()))
+                value = InvoiceTax.default_get(
+                    list(InvoiceTax._fields.keys()), with_rec_name=False)
                 value.update(computed_taxes[key])
                 invoice_tax = InvoiceTax(**value)
                 if invoice_tax.tax:

Reply via email to