changeset a5996117b08e in modules/account:default
details: https://hg.tryton.org/modules/account?cmd=changeset&node=a5996117b08e
description:
        Do not open deferral move if there is none

        issue11116
        review370571002
diffstat:

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

diffs (15 lines):

diff -r f748b75e32c8 -r a5996117b08e fiscalyear.py
--- a/fiscalyear.py     Tue Jan 04 22:24:20 2022 +0100
+++ b/fiscalyear.py     Thu Jan 20 18:56:17 2022 +0100
@@ -462,8 +462,9 @@
 
     def do_balance(self, action):
         move = self.create_move()
-        action['views'].reverse()
-        return action, {'res_id': move.id}
+        if move:
+            action['views'].reverse()
+        return action, {'res_id': move.id if move else None}
 
 
 class CreatePeriodsStart(ModelView):

Reply via email to