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

Proposed by jftempo
Status: Merged
Merged at revision: 4539
Proposed branch: lp:~julie-w/unifield-server/US-3148
Merge into: lp:unifield-server
Diff against target: 26 lines (+3/-2)
2 files modified
bin/addons/analytic_distribution/account_move_line.py (+1/-1)
bin/addons/msf_doc_import/account.py (+2/-1)
To merge this branch: bzr merge lp:~julie-w/unifield-server/US-3148
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+331323@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 2017-08-18 13:37:32 +0000
3+++ bin/addons/analytic_distribution/account_move_line.py 2017-10-09 15:58:53 +0000
4@@ -398,7 +398,7 @@
5 vals.update({'destination_id': l.account_id.default_destination_id.id})
6 if l.employee_id.funding_pool_id:
7 vals.update({'analytic_id': l.employee_id.funding_pool_id.id})
8- if vals.get('cost_center_id') not in l.employee_id.funding_pool_id.cost_center_ids:
9+ if vals.get('cost_center_id') not in [cc.id for cc in l.employee_id.funding_pool_id.cost_center_ids]:
10 # Fetch default funding pool: MSF Private Fund
11 try:
12 msf_fp_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'analytic_distribution', 'analytic_account_msf_private_funds')[1]
13
14=== modified file 'bin/addons/msf_doc_import/account.py'
15--- bin/addons/msf_doc_import/account.py 2017-08-18 13:25:59 +0000
16+++ bin/addons/msf_doc_import/account.py 2017-10-09 15:58:53 +0000
17@@ -345,7 +345,8 @@
18 else:
19 r_partner = tp_ids[0]
20 if line[cols['Employee']]:
21- tp_ids = self.pool.get('hr.employee').search(cr, uid, [('name', '=', line[cols['Employee']])])
22+ tp_ids = self.pool.get('hr.employee').search(cr, uid, [('name', '=', line[cols['Employee']])],
23+ order='active desc, id', limit=1)
24 if not tp_ids:
25 tp_label = _('Employee')
26 tp_content = line[cols['Employee']]

Subscribers

People subscribed via source and target branches