Merge lp:~julie-w/unifield-server/US-4828 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 5000
Proposed branch: lp:~julie-w/unifield-server/US-4828
Merge into: lp:unifield-server
Diff against target: 22 lines (+3/-2)
1 file modified
bin/addons/msf_instance/add_instance.py (+3/-2)
To merge this branch: bzr merge lp:~julie-w/unifield-server/US-4828
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+349809@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/addons/msf_instance/add_instance.py'
2--- bin/addons/msf_instance/add_instance.py 2018-06-20 13:17:44 +0000
3+++ bin/addons/msf_instance/add_instance.py 2018-07-18 13:17:48 +0000
4@@ -435,7 +435,7 @@
5 # if the End-of-the-Month Balance has already been confirmed for a register, ignore changes on fields that
6 # should be read-only in that case (cover the use case of concurrent changes by 2 users)
7 newvals = vals.copy()
8- if reg.closing_balance_frozen:
9+ if reg.closing_balance_frozen and not context.get('sync_update_execution', False):
10 # remove the values for each register with a confirmed balance
11 # Note: at Cashbox closing the balance_end_real is set to the reg.balance_end value: keep this change
12 if 'balance_end_real' in newvals and not context.get('from_cash_statement_equal_balance', False):
13@@ -527,8 +527,9 @@
14 if isinstance(ids, (int, long)):
15 ids = [ids]
16 res = True
17+ from_synchro = context.get('sync_update_execution', False)
18 for line in self.browse(cr, uid, ids, fields_to_fetch=['ending_id'], context=context):
19- if not line.ending_id or not line.ending_id.closing_balance_frozen:
20+ if from_synchro or not line.ending_id or not line.ending_id.closing_balance_frozen:
21 res = res and super(account_cashbox_line, self).unlink(cr, uid, [line.id], context=context)
22 return res
23

Subscribers

People subscribed via source and target branches