changeset 9ddefc4227bf in modules/account_statement:default
details: 
https://hg.tryton.org/modules/account_statement?cmd=changeset;node=9ddefc4227bf
description:
        Require fresh session to post a statement

        issue8392
        review273411003
diffstat:

 CHANGELOG    |  2 ++
 statement.py |  5 +++++
 2 files changed, 7 insertions(+), 0 deletions(-)

diffs (31 lines):

diff -r b9a6b7d730a8 -r 9ddefc4227bf CHANGELOG
--- a/CHANGELOG Sat Sep 28 23:59:08 2019 +0200
+++ b/CHANGELOG Fri Oct 11 20:45:22 2019 +0200
@@ -1,3 +1,5 @@
+* Require fresh session to post a statement
+
 Version 5.2.0 - 2019-05-06
 * Bug fixes (see mercurial logs for details)
 * Use invoice amount to pay as line amount when creating lines from origins
diff -r b9a6b7d730a8 -r 9ddefc4227bf statement.py
--- a/statement.py      Sat Sep 28 23:59:08 2019 +0200
+++ b/statement.py      Fri Oct 11 20:45:22 2019 +0200
@@ -16,6 +16,7 @@
 from trytond.pyson import Eval, If, Bool
 from trytond.transaction import Transaction
 from trytond.pool import Pool
+from trytond.rpc import RPC
 from trytond.wizard import Wizard, StateView, StateAction, Button
 from trytond.modules.company import CompanyReport
 
@@ -174,6 +175,10 @@
                     'depends': ['state', 'to_reconcile'],
                     },
                 })
+        cls.__rpc__.update({
+                'post': RPC(
+                    readonly=False, instantiate=0, fresh_session=True),
+                })
 
     @classmethod
     def __register__(cls, module_name):

Reply via email to