Merge lp:~mukunde/unifield-server/US-9752 into lp:unifield-server

Proposed by jftempo
Status: Needs review
Proposed branch: lp:~mukunde/unifield-server/US-9752
Merge into: lp:unifield-server
Diff against target: 22 lines (+3/-2)
1 file modified
bin/addons/register_accounting/account_bank_statement.py (+3/-2)
To merge this branch: bzr merge lp:~mukunde/unifield-server/US-9752
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+424504@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/register_accounting/account_bank_statement.py'
2--- bin/addons/register_accounting/account_bank_statement.py 2022-04-25 14:50:59 +0000
3+++ bin/addons/register_accounting/account_bank_statement.py 2022-06-13 12:48:05 +0000
4@@ -1780,7 +1780,7 @@
5 try:
6 # Optimization: Do not check line because of account_move.write() method at the end of this method
7 acc_move_line_obj.write(cr, uid, [other_line.get('id')], move_line_values, context=context, check=False, update_check=False)
8- except osv.except_osv, e:
9+ except osv.except_osv as e:
10 msg = e.value
11 if 'account_id' in values and st_line.state == 'temp' and other_line.get('analytic_distribution_state') == 'invalid':
12 msg = _('The account modification required makes the analytic distribution previously defined invalid; please perform the account modification through the analytic distribution wizard')
13@@ -2209,7 +2209,8 @@
14 old_distrib = line.get('analytic_distribution_id')[0]
15
16 # US-427: Do not update the AD from Employee/Third party if it comes from sync, only use the one provided by sync
17- if not context.get('sync_update_execution'):
18+ # US-9752: Keep AD that is applied on the entry when we correct info on the entry in temp state
19+ if not context.get('sync_update_execution') and state != 'temp':
20 values = self.update_employee_analytic_distribution(cr, uid, values) # this should only be done at local instance
21
22 tmp = super(account_bank_statement_line, self).write(cr, uid, line.get('id'), values, context=context)

Subscribers

People subscribed via source and target branches