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

Proposed by jftempo
Status: Merged
Merged at revision: 6383
Proposed branch: lp:~mukunde/unifield-server/US-9724
Merge into: lp:unifield-server
Diff against target: 96 lines (+52/-4) (has conflicts)
2 files modified
bin/addons/analytic_override/analytic_line.py (+19/-4)
bin/addons/msf_profile/i18n/fr_MF.po (+33/-0)
Text conflict in bin/addons/msf_profile/i18n/fr_MF.po
To merge this branch: bzr merge lp:~mukunde/unifield-server/US-9724
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+430438@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_override/analytic_line.py'
2--- bin/addons/analytic_override/analytic_line.py 2022-01-05 15:03:32 +0000
3+++ bin/addons/analytic_override/analytic_line.py 2022-09-26 07:25:14 +0000
4@@ -170,7 +170,8 @@
5 # FIXME: refactoring of next code
6 if document_date < account.date_start or (account.date != False and document_date >= account.date):
7 if 'from' not in context or context.get('from') != 'mass_reallocation':
8- raise osv.except_osv(_('Error'), _("The analytic account selected '%s' is not active.") % (account.name or '',))
9+ entry_name = self.get_entry_name(cr, uid, vals, context=context)
10+ raise osv.except_osv(_('Error'), _("The analytic account '%s' %s is not active.") % (account.name or '', entry_name))
11 if 'date' in vals and vals['date'] is not False:
12 date = vals['date']
13 dest = False
14@@ -179,17 +180,31 @@
15 cc = account_obj.browse(cr, uid, vals['cost_center_id'], context=context)
16 if date < cc.date_start or (cc.date != False and date >= cc.date):
17 if 'from' not in context or context.get('from') != 'mass_reallocation':
18- raise osv.except_osv(_('Error'), _("The analytic account selected '%s' is not active.") % (cc.name or '',))
19+ # US-9724
20+ entry_name = self.get_entry_name(cr, uid, vals, context=context)
21+ raise osv.except_osv(_('Error'),_("The analytic account '%s' %s is inactive.") % (cc.name or '', entry_name))
22 if vals.get('destination_id', False):
23 dest = account_obj.browse(cr, uid, vals['destination_id'], context=context)
24 if date < dest.date_start or (dest.date != False and date >= dest.date):
25 if 'from' not in context or context.get('from') != 'mass_reallocation':
26- raise osv.except_osv(_('Error'), _("The analytic account selected '%s' is not active.") % (dest.name or '',))
27+ entry_name = self.get_entry_name(cr, uid, vals, context=context)
28+ raise osv.except_osv(_('Error'), _("The analytic account '%s' %s is not active.") % (dest.name or '', entry_name))
29 if context.get('from') != 'mass_reallocation' and dest and cc and \
30 dest_cc_link_obj.is_inactive_dcl(cr, uid, dest.id, cc.id, date, context=context):
31- raise osv.except_osv(_('Error'), _("The combination \"%s - %s\" is not active.") % (dest.code or '', cc.code or ''))
32+ entry_name = self.get_entry_name(cr, uid, vals, context=context)
33+ raise osv.except_osv(_('Error'), _("The combination \"%s - %s\" %s is not active.") % (dest.code or '', cc.code or '', entry_name))
34 return True
35
36+ def get_entry_name(self, cr, uid, vals, context):
37+ """
38+ Return the sequence entry name
39+ """
40+ acc_move_obj = self.pool.get('account.move.line')
41+ if vals.get('move_id'):
42+ name = acc_move_obj.browse(cr, uid, vals['move_id'], fields_to_fetch=['move_id'], context=context).move_id.name
43+ return _(' selected in this entry %s ') % (name or '')
44+ return ''
45+
46 def _check_document_date(self, cr, uid, ids):
47 """
48 Check that document's date is done BEFORE posting date
49
50=== modified file 'bin/addons/msf_profile/i18n/fr_MF.po'
51--- bin/addons/msf_profile/i18n/fr_MF.po 2022-08-23 13:15:58 +0000
52+++ bin/addons/msf_profile/i18n/fr_MF.po 2022-09-26 07:25:14 +0000
53@@ -114991,6 +114991,7 @@
54 #: field:sync.version.instance.monitor,platform:0
55 msgid "Platform"
56 msgstr "Plate-forme"
57+<<<<<<< TREE
58
59 #. module: msf_doc_import
60 #: code:addons/msf_doc_import/check_line.py:345
61@@ -115817,3 +115818,35 @@
62 msgid "Force Date and time of next execution"
63 msgstr "Date et heure forcée de la prochiane exécution plannifiée"
64
65+=======
66+
67+#. module: analytic_override
68+#: code:addons/analytic_override/analytic_line.py:205
69+#, python-format
70+msgid " selected in this entry %s "
71+msgstr "selectionné dans cette entrée %s "
72+
73+#. module: analytic_override
74+#: code:addons/analytic_override/analytic_line.py:185
75+#, python-format
76+msgid "The analytic account '%s' %s is inactive."
77+msgstr "Le compte analytique '%s' %s n'est pas actif."
78+
79+#. module: analytic_override
80+#: code:addons/analytic_override/analytic_line.py:174
81+#: code:addons/analytic_override/analytic_line.py:191
82+#, python-format
83+msgid "The analytic account '%s' %s is not active."
84+msgstr "Le compte analytique '%s' %s n'est pas actif."
85+
86+#. module: analytic_override
87+#: code:addons/analytic_override/analytic_line.py:195
88+#, python-format
89+msgid "The combination \"%s - %s\" %s is not active."
90+msgstr "La combinaison \"%s - %s\" %s n'est pas active."
91+
92+#. module: analytic_override
93+#: model:ir.model,name:analytic_override.model_multiple_cc_selection_wizard
94+msgid "multiple.cc.selection.wizard"
95+msgstr ""
96+>>>>>>> MERGE-SOURCE

Subscribers

People subscribed via source and target branches