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

Proposed by jftempo
Status: Merged
Merged at revision: 5198
Proposed branch: lp:~julie-w/unifield-server/US-5339
Merge into: lp:unifield-server
Diff against target: 72 lines (+13/-20)
2 files modified
bin/addons/msf_homere_interface/wizard/hr_payroll_import.py (+7/-14)
bin/addons/msf_profile/i18n/fr_MF.po (+6/-6)
To merge this branch: bzr merge lp:~julie-w/unifield-server/US-5339
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+360159@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_homere_interface/wizard/hr_payroll_import.py'
2--- bin/addons/msf_homere_interface/wizard/hr_payroll_import.py 2018-01-11 16:01:54 +0000
3+++ bin/addons/msf_homere_interface/wizard/hr_payroll_import.py 2018-12-06 08:13:38 +0000
4@@ -38,7 +38,6 @@
5 UF_SIDE_ROUNDING_LINE = {
6 'account_code': '67000',
7 'name': _('UF Payroll rounding'),
8- 'destination_code': 'SUP',
9
10 'eur_gap_limit': 1., # EUR amount gap limit to not reach
11
12@@ -422,18 +421,12 @@
13 if not account_ids:
14 err_account(account_code=account_code)
15
16- # get default AD values
17- # destination: from code
18- dest_ids = self.pool.get('account.analytic.account').search(cr, uid, [
19- ('category', '=', 'DEST'),
20- ('code', '=', UF_SIDE_ROUNDING_LINE['destination_code']),
21- ], context=context)
22- if not dest_ids:
23- msg = _("%s: No default destination found '%s'") % (
24- UF_SIDE_ROUNDING_LINE['name'],
25- UF_SIDE_ROUNDING_LINE['destination_code'],
26- )
27- raise osv.except_osv(_('Error'), msg)
28+ # get the default Destination to use
29+ acc_fields = ['default_destination_id', 'code', 'name']
30+ acc = self.pool.get('account.account').browse(cr, uid, account_ids[0], fields_to_fetch=acc_fields, context=context)
31+ if not acc.default_destination_id:
32+ raise osv.except_osv(_('Error'), _('The account %s - %s has no Default Destination.') % (acc.code, acc.name))
33+ dest = acc.default_destination_id
34
35 # cost center: 1st FX gain loss of instance
36 instance = self.pool.get('res.users').browse(cr, uid, [uid],
37@@ -466,7 +459,7 @@
38
39 # AD
40 'cost_center_id': cc_ids[0],
41- 'destination_id': dest_ids[0],
42+ 'destination_id': dest.id,
43 #'funding_pool_id': # default is PF
44 }, context=context)
45
46
47=== modified file 'bin/addons/msf_profile/i18n/fr_MF.po'
48--- bin/addons/msf_profile/i18n/fr_MF.po 2018-11-30 14:47:43 +0000
49+++ bin/addons/msf_profile/i18n/fr_MF.po 2018-12-06 08:13:38 +0000
50@@ -46907,12 +46907,6 @@
51 msgid "Gujarati / ગુજરાતી"
52 msgstr "Gujarati / ગુજરાતી"
53
54-#. module: msf_homere_interface
55-#: code:addons/msf_homere_interface/wizard/hr_payroll_import.py:432
56-#, python-format
57-msgid "%s: No default destination found '%s'"
58-msgstr "%s: No default destination found '%s'"
59-
60 #. module: msf_partner
61 #: code:addons/msf_partner/partner.py:573
62 #, python-format
63@@ -103778,3 +103772,9 @@
64 #, python-format
65 msgid "Source Location %s is inactive"
66 msgstr "La Zone Source %s est inactive"
67+
68+#. module: msf_homere_interface
69+#: code:addons/msf_homere_interface/wizard/hr_payroll_import.py:428
70+#, python-format
71+msgid "The account %s - %s has no Default Destination."
72+msgstr "Le compte %s - %s n'a pas de Destination par défaut."

Subscribers

People subscribed via source and target branches