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

Proposed by jftempo
Status: Merged
Merged at revision: 5048
Proposed branch: lp:~julie-w/unifield-server/US-4199
Merge into: lp:unifield-server
Diff against target: 113 lines (+9/-28)
3 files modified
bin/addons/msf_currency_revaluation/wizard/wizard_currency_revaluation.py (+5/-18)
bin/addons/msf_currency_revaluation/wizard/wizard_currency_revaluation_view.xml (+1/-2)
bin/addons/msf_profile/i18n/fr_MF.po (+3/-8)
To merge this branch: bzr merge lp:~julie-w/unifield-server/US-4199
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+349154@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_currency_revaluation/wizard/wizard_currency_revaluation.py'
2--- bin/addons/msf_currency_revaluation/wizard/wizard_currency_revaluation.py 2017-08-18 13:15:14 +0000
3+++ bin/addons/msf_currency_revaluation/wizard/wizard_currency_revaluation.py 2018-07-09 08:36:24 +0000
4@@ -55,8 +55,6 @@
5 domain="[('fiscalyear_id', '=', fiscalyear_id), ('state', '!=', 'created')]"),
6 'result_period_internal_id': fields.many2one(
7 'account.period', string=_(u"Entry period"), invisible=True),
8- 'result_period_yearly_editable': fields.boolean(
9- 'Yearly revaluation applied ?', invisible=True),
10 'posting_date': fields.date(
11 _('Entry date'), readonly=True,
12 help=_("Revaluation entry date (document and posting date)")),
13@@ -91,7 +89,6 @@
14 'label': "%(currency)s %(account)s %(rate)s",
15 'revaluation_method': lambda *args: 'liquidity_month',
16 'fiscalyear_id': _get_default_fiscalyear_id,
17- 'result_period_yearly_editable': True,
18 }
19
20 def _get_last_yearly_reval_period_id(self, cr, uid, fy_id, context=None):
21@@ -279,7 +276,6 @@
22 return res
23
24 value = {
25- 'result_period_yearly_editable': True,
26 'msg': False,
27 }
28 warning = {}
29@@ -331,24 +327,15 @@
30 last_reval_period = self._get_last_yearly_reval_period_id(
31 cr, uid, fiscalyear_id)
32 if last_reval_period:
33- # US-816: liquidity or BS can be processed in any order
34- # but the 2nd should always use the same period
35 period_number = last_reval_period.number
36- value['result_period_id'] = last_reval_period.id
37- value['result_period_yearly_editable'] = False
38- value['msg'] = _('One of the year-end revaluations has' \
39- ' already been processed. The next one will be' \
40- ' processed on the same period: %s.') % (
41- last_reval_period.name, )
42+ value['msg'] = _('One of the year-end revaluations has already been processed in the period "%s". '
43+ 'The next one will be processed in the selected period.') % (last_reval_period.name,)
44
45 # check period opened
46 check_period_res = self._check_period_opened(cr, uid,
47 fiscalyear.id, period_number)
48- if check_period_res[1]:
49- value['result_period_id'] = check_period_res[1]
50- else:
51- value['result_period_id'] = False
52 if not check_period_res[0] and check_period_res[2]:
53+ # non-blocking warning
54 warning = {
55 'title': _('Warning!'),
56 'message': check_period_res[2]
57@@ -358,8 +345,8 @@
58 ('number', '>', 12),
59 ('number', '<', 16),
60 ]
61- value['result_period_id'] = check_period_res[0] and \
62- check_period_res[1] or False
63+ # pre-select the period if it is opened
64+ value['result_period_id'] = check_period_res[0] and check_period_res[1] or False
65 else:
66 if period_id:
67 period = period_obj.browse(cr, uid, period_id)
68
69=== modified file 'bin/addons/msf_currency_revaluation/wizard/wizard_currency_revaluation_view.xml'
70--- bin/addons/msf_currency_revaluation/wizard/wizard_currency_revaluation_view.xml 2016-06-08 09:53:49 +0000
71+++ bin/addons/msf_currency_revaluation/wizard/wizard_currency_revaluation_view.xml 2018-07-09 08:36:24 +0000
72@@ -25,10 +25,9 @@
73 'required': [('revaluation_method', 'in', ['liquidity_year', 'other_bs'])]}"/>
74 <newline/>
75 <separator string="" colspan="6"/>
76- <field name="result_period_yearly_editable" />
77 <field name="result_period_internal_id" />
78 <field name="result_period_id"
79- attrs="{'readonly': ['|', ('revaluation_method', '=', 'liquidity_month'), ('result_period_yearly_editable', '=', False)]}"
80+ attrs="{'readonly': [('revaluation_method', '=', 'liquidity_month')]}"
81 on_change="on_change_result_period_id(result_period_id)"/>
82 <newline/>
83 <field name="posting_date"/>
84
85=== modified file 'bin/addons/msf_profile/i18n/fr_MF.po'
86--- bin/addons/msf_profile/i18n/fr_MF.po 2018-06-15 12:30:42 +0000
87+++ bin/addons/msf_profile/i18n/fr_MF.po 2018-07-09 08:36:24 +0000
88@@ -46521,10 +46521,10 @@
89 msgstr "La Séquence Principale doit être différente de la séquence en cours !"
90
91 #. module: msf_currency_revaluation
92-#: code:addons/msf_currency_revaluation/wizard/wizard_currency_revaluation.py:339
93+#: code:addons/msf_currency_revaluation/wizard/wizard_currency_revaluation.py:330
94 #, python-format
95-msgid "One of the year-end revaluations has already been processed. The next one will be processed on the same period: %s."
96-msgstr "One of the year-end revaluations has already been processed. The next one will be processed on the same period: %s."
97+msgid "One of the year-end revaluations has already been processed in the period \"%s\". The next one will be processed in the selected period."
98+msgstr "L'une des réévaluations annuelles a déjà été effectuée dans la période \"%s\". La prochaine sera effectuée dans la période sélectionnée."
99
100 #. module: msf_tools
101 #: code:addons/msf_tools/automated_export.py:260
102@@ -76217,11 +76217,6 @@
103 msgid "State of Move Line"
104 msgstr "Statut de la Ligne de Transaction"
105
106-#. module: msf_currency_revaluation
107-#: field:wizard.currency.revaluation,result_period_yearly_editable:0
108-msgid "Yearly revaluation applied ?"
109-msgstr "Yearly revaluation applied ?"
110-
111 #. modules: account, msf_instance, account_override, msf_audittrail, sync_so, account_period_closing_level
112 #: model:ir.model,name:account.model_account_period
113 #: model:ir.model,name:account_override.model_account_period

Subscribers

People subscribed via source and target branches