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

Proposed by jftempo
Status: Merged
Merged at revision: 5128
Proposed branch: lp:~julie-w/unifield-server/US-5192
Merge into: lp:unifield-server
Diff against target: 30 lines (+5/-6)
1 file modified
bin/addons/analytic_distribution/account_move_line.py (+5/-6)
To merge this branch: bzr merge lp:~julie-w/unifield-server/US-5192
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+356814@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/analytic_distribution/account_move_line.py'
2--- bin/addons/analytic_distribution/account_move_line.py 2018-04-09 12:09:32 +0000
3+++ bin/addons/analytic_distribution/account_move_line.py 2018-10-16 13:04:33 +0000
4@@ -396,11 +396,13 @@
5 context = {}
6 if isinstance(ids, (int, long)):
7 ids = [ids]
8- if context.get('from_je_import', False):
9+ aml_duplication = '__copy_data_seen' in context and 'account.move.line' in context['__copy_data_seen'] or False
10+ from_duplication = context.get('copy', False) or aml_duplication
11+ if context.get('from_je_import', False) or from_duplication:
12 return True
13 for l in self.browse(cr, uid, ids):
14- # Next line if this one comes from a non-manual move (journal entry)
15- if l.move_id.status != 'manu':
16+ # Next line if this one comes from a non-manual move (journal entry) or an imported one
17+ if l.move_id.status != 'manu' or l.move_id.imported:
18 continue
19 # Do not continue if no employee or no cost center (could not be invented)
20 if not l.employee_id or not l.employee_id.cost_center_id:
21@@ -487,9 +489,6 @@
22 # Add account_id because of an error with account_activable module for checking date
23 if not 'account_id' in vals and 'date' in vals:
24 vals.update({'account_id': ml.account_id and ml.account_id.id or False})
25- check = self._check_employee_analytic_distribution(cr, uid, [ml.id], context={'from_write': True})
26- if check and isinstance(check, dict):
27- vals.update(check)
28 tmp_res = super(account_move_line, self).write(cr, uid, [ml.id], vals, context, False, False)
29 res.append(tmp_res)
30 return res

Subscribers

People subscribed via source and target branches