changeset 5de559e6a83f in modules/account:5.4
details: https://hg.tryton.org/modules/account?cmd=changeset;node=5de559e6a83f
description:
        Re-browse account updated to get inactive context

        issue9473
        review307941002
        (grafted from c6b5ef51242be93986e36236870ddcf826ae8bce)
diffstat:

 account.py |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (21 lines):

diff -r d98ea6d48197 -r 5de559e6a83f account.py
--- a/account.py        Fri May 15 21:50:24 2020 +0200
+++ b/account.py        Fri Jul 24 09:55:35 2020 +0200
@@ -2375,6 +2375,7 @@
     @inactive_records
     def transition_update(self):
         pool = Pool()
+        Account = pool.get('account.account')
         TaxCode = pool.get('account.tax.code')
         TaxCodeTemplate = pool.get('account.tax.code.template')
         TaxCodeLine = pool.get('account.tax.code.line')
@@ -2387,7 +2388,8 @@
         TaxRuleLineTemplate = \
             pool.get('account.tax.rule.line.template')
 
-        account = self.start.account
+        # re-browse to have inactive context
+        account = Account(self.start.account.id)
         company = account.company
 
         # Update account types

Reply via email to