Merge lp:~jfb-tempo-consulting/unifield-server/us-4890 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 5144
Proposed branch: lp:~jfb-tempo-consulting/unifield-server/us-4890
Merge into: lp:unifield-server
Diff against target: 59 lines (+19/-1) (has conflicts)
2 files modified
bin/addons/analytic_distribution/wizard/mass_reallocation_wizard.py (+9/-1)
bin/addons/msf_profile/i18n/fr_MF.po (+10/-0)
Text conflict in bin/addons/msf_profile/i18n/fr_MF.po
To merge this branch: bzr merge lp:~jfb-tempo-consulting/unifield-server/us-4890
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+356044@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/wizard/mass_reallocation_wizard.py'
2--- bin/addons/analytic_distribution/wizard/mass_reallocation_wizard.py 2018-06-22 09:57:41 +0000
3+++ bin/addons/analytic_distribution/wizard/mass_reallocation_wizard.py 2018-10-03 10:08:55 +0000
4@@ -29,6 +29,7 @@
5 from lxml import etree
6 import threading
7 import pooler
8+from msf_field_access_rights.osv_override import _get_instance_level
9
10 class mass_reallocation_verification_wizard(osv.osv_memory):
11 _name = 'mass.reallocation.verification.wizard'
12@@ -193,7 +194,10 @@
13 if isinstance(ids, (int, long)):
14 ids = [ids]
15 first_line = self.pool.get('account.analytic.line').browse(cr, uid, ids)[0]
16- domain = "[('category', 'in', ['OC', 'FUNDING', 'DEST']), ('type', '!=', 'view')]"
17+ if _get_instance_level(self, cr, uid) == 'hq':
18+ domain = "[('category', '=', 'FUNDING'), ('type', '!=', 'view')]"
19+ else:
20+ domain = "[('category', 'in', ['OC', 'FUNDING', 'DEST']), ('type', '!=', 'view')]"
21 for free in ['FREE1', 'FREE2']:
22 if first_line.account_id and first_line.account_id.category == free:
23 domain = "[('category', '=', '" + free + "'), ('type', '!=', 'view')]"
24@@ -352,6 +356,10 @@
25 account_field_name = 'account_id'
26 if wiz.account_id.category == 'OC':
27 account_field_name = 'cost_center_id'
28+
29+ if _get_instance_level(self, cr, uid) == 'hq' and wiz.account_id.category in ['OC', 'DEST']:
30+ raise osv.except_osv(_('Error'), _('At HQ level you can only mass reallocate FP !'))
31+
32 not_ad_correctable_acc_ids = gl_acc_obj.search(cr, uid, [('is_not_ad_correctable', '=', True)],
33 order='NO_ORDER', context=context)
34 search_args = [
35
36=== modified file 'bin/addons/msf_profile/i18n/fr_MF.po'
37--- bin/addons/msf_profile/i18n/fr_MF.po 2018-09-27 16:17:57 +0000
38+++ bin/addons/msf_profile/i18n/fr_MF.po 2018-10-03 10:08:55 +0000
39@@ -101850,6 +101850,7 @@
40 #, python-format
41 msgid " goods products, please refer to the appropriate procedures"
42 msgstr " veuillez vous référer aux procédures adéquates."
43+<<<<<<< TREE
44
45 #. module: account_override
46 #: code:addons/account_override/account.py:517
47@@ -101935,3 +101936,12 @@
48 #: field:account.commitment.line,commit_number:0
49 msgid "Commitment Voucher Number"
50 msgstr "Numéro du Bon d'Engagement"
51+=======
52+
53+#. module: analytic_distribution
54+#: code:addons/analytic_distribution/wizard/mass_reallocation_wizard.py:361
55+#, python-format
56+msgid "At HQ level you can only mass reallocate FP !"
57+msgstr "Au niveau HQ vous ne pouvez que réallouer des FP !""
58+
59+>>>>>>> MERGE-SOURCE

Subscribers

People subscribed via source and target branches