Merge lp:~dorian-kemps/unifield-server/US-11473 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 6510
Proposed branch: lp:~dorian-kemps/unifield-server/US-11473
Merge into: lp:unifield-server
Diff against target: 255 lines (+76/-15)
4 files modified
bin/addons/msf_profile/i18n/fr_MF.po (+40/-8)
bin/addons/procurement_cycle/replenishment_report.xml (+7/-5)
bin/addons/procurement_cycle/report_doc/replenishment_order_calc.mako (+2/-2)
bin/addons/procurement_cycle/report_doc/replenishment_order_calc.py (+27/-0)
To merge this branch: bzr merge lp:~dorian-kemps/unifield-server/US-11473
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+445614@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_profile/i18n/fr_MF.po'
2--- bin/addons/msf_profile/i18n/fr_MF.po 2023-06-28 11:38:35 +0000
3+++ bin/addons/msf_profile/i18n/fr_MF.po 2023-06-29 07:06:42 +0000
4@@ -108948,15 +108948,34 @@
5
6 #. module: procurement_cycle
7 #: model:ir.actions.report.xml,name:procurement_cycle.report_replenishment_order_calc_xls
8+#: code:addons/procurement_cycle/report_doc/replenishment_order_calc.py:15
9 msgid "Order Calc Excel Export"
10 msgstr "Export Excel du Calcul de Commande"
11
12 #. module: procurement_cycle
13+#: code:ir.actions.report.xml:name:procurement_cycle.report_replenishment_order_calc_xls
14+#, python-format
15+msgid "Order_Calc_Excel_Export"
16+msgstr "Export_Excel_Calcul_de_Commande"
17+
18+#. module: procurement_cycle
19 #: model:ir.actions.report.xml,name:procurement_cycle.report_replenishment_order_calc_warning_xls
20 msgid "Order Calc Excel Export (only lines with warning)"
21 msgstr "Export Excel des Calculs (uniquement les avertissements)"
22
23 #. module: procurement_cycle
24+#: code:addons/procurement_cycle/report_doc/replenishment_order_calc.py:17
25+#, python-format
26+msgid "Order Calc With Warning"
27+msgstr "Calculs Avec Avertissements"
28+
29+#. module: procurement_cycle
30+#: code:ir.actions.report.xml:name:procurement_cycle.report_replenishment_order_calc_warning_xls
31+#, python-format
32+msgid "Order_Calc_only_lines_with_warning"
33+msgstr "Calculs_de_Commande_uniquement_avec_avertissements"
34+
35+#. module: procurement_cycle
36 #: field:replenishment.order_calc,generation_date:0
37 msgid "Order Calc generation date"
38 msgstr "Date génération du Calcul de Commande"
39@@ -108968,7 +108987,6 @@
40 msgstr "Calcul de Commande"
41
42 #. module: procurement_cycle
43-#: report:addons/procurement_cycle/report_doc/replenishment_order_calc.mako:320
44 #: model:ir.actions.act_window,name:procurement_cycle.replenishment_order_calc_action
45 #: model:ir.model,name:procurement_cycle.model_replenishment_order_calc
46 #: model:ir.ui.menu,name:procurement_cycle.replenishment_order_calc_menu
47@@ -112418,22 +112436,36 @@
48 msgstr "Tampon / Stock Sécurité"
49
50 #. module: procurement_cycle
51-#: report:addons/procurement_cycle/report_doc/replenishment_order_calc.mako:449
52-msgid "Consolidated"
53-msgstr "Consolidé"
54-
55-#. module: procurement_cycle
56 #: model:ir.actions.report.xml,name:procurement_cycle.report_replenishment_order_calc_consolidated_xls
57 msgid "Consolidated OC Lines - All Statuses"
58-msgstr "Lignes CC Consolidées - Tous les Status"
59+msgstr "Lignes CC Consolidées - Tous les Statuts"
60+
61+#. module: procurement_cycle
62+#: code:ir.actions.report.xml:name:procurement_cycle.report_replenishment_order_calc_consolidated_xls
63+#, python-format
64+msgid "Export_Consolidated_OC_all_status"
65+msgstr "Export_Lignes_CC_Consolidées_Tous_les_Statuts"
66+
67+#. module: procurement_cycle
68+#: code:addons/procurement_cycle/report_doc/replenishment_order_calc.py:20
69+#, python-format
70+msgid "All Consolidated OC Lines"
71+msgstr "Toutes les Lignes CC Consolidées"
72
73 #. module: procurement_cycle
74 #: model:ir.actions.report.xml,name:procurement_cycle.report_replenishment_order_calc_draft_consolidated_xls
75 #: model:ir.actions.server,name:procurement_cycle.action_replenishment_order_calc_draft_consolidated
76-msgid "Draft Consolidated OC lines"
77+#: code:addons/procurement_cycle/report_doc/replenishment_order_calc.py:22
78+msgid "Draft Consolidated OC Lines"
79 msgstr "Lignes CC Consolidées Brouillon"
80
81 #. module: procurement_cycle
82+#: code:ir.actions.report.xml:name:procurement_cycle.report_replenishment_order_calc_draft_consolidated_xls
83+#, python-format
84+msgid "Export_Draft_Consolidated_OC_Lines"
85+msgstr "Export_Lignes_CC_Consolidées_Brouillon"
86+
87+#. module: procurement_cycle
88 #: view:replenishment.parent.segment:0
89 #: field:replenishment.parent.segment,external_lt:0
90 #: view:replenishment.segment:0
91
92=== modified file 'bin/addons/procurement_cycle/replenishment_report.xml'
93--- bin/addons/procurement_cycle/replenishment_report.xml 2023-03-24 15:18:54 +0000
94+++ bin/addons/procurement_cycle/replenishment_report.xml 2023-06-29 07:06:42 +0000
95@@ -29,6 +29,7 @@
96 model="replenishment.order_calc"
97 name="report_replenishment_order_calc_xls"
98 file="procurement_cycle/report_doc/replenishment_order_calc.mako"
99+ target_filename="${_('Order_Calc_Excel_Export')}"
100 report_type="webkit"
101 menu="True"
102 sequence="1"
103@@ -40,6 +41,7 @@
104 model="replenishment.order_calc"
105 name="report_replenishment_order_calc_warning_xls"
106 file="procurement_cycle/report_doc/replenishment_order_calc.mako"
107+ target_filename="${_('Order_Calc_only_lines_with_warning')}"
108 report_type="webkit"
109 menu="True"
110 sequence="2"
111@@ -47,16 +49,16 @@
112
113 <report
114 id="report_replenishment_order_calc_draft_consolidated_xls"
115- string="Draft Consolidated OC lines"
116+ string="Draft Consolidated OC Lines"
117 model="replenishment.order_calc"
118 name="report_replenishment_order_calc_draft_consolidated_xls"
119 file="procurement_cycle/report_doc/replenishment_order_calc.mako"
120- target_filename="OC_Draft_Consolidated_%(year)s_%(month)s_%(day)s"
121+ target_filename="${_('Export_Draft_Consolidated_OC_Lines')}"
122 report_type="webkit"
123 menu="False"
124 />
125 <record id="action_replenishment_order_calc_draft_consolidated" model="ir.actions.server">
126- <field name="name">Draft Consolidated OC lines</field>
127+ <field name="name">Draft Consolidated OC Lines</field>
128 <field name="model_id" ref="model_replenishment_order_calc"/>
129 <field name="state">code</field>
130 <field name="code">action = obj.check_draft_consolidated(context=context)</field>
131@@ -64,7 +66,7 @@
132 <record id="ir_replenishment_order_calc_draft_consolidated" model="ir.values">
133 <field name="key2">client_print_multi</field>
134 <field name="model">replenishment.order_calc</field>
135- <field name="name">Draft Consolidated OC lines</field>
136+ <field name="name">Draft Consolidated OC Lines</field>
137 <field eval="'ir.actions.server,%d'%action_replenishment_order_calc_draft_consolidated" name="value"/>
138 <field eval="True" name="object"/>
139 <field name="sequence">3</field>
140@@ -76,7 +78,7 @@
141 model="replenishment.order_calc"
142 name="report_replenishment_order_calc_consolidated_xls"
143 file="procurement_cycle/report_doc/replenishment_order_calc.mako"
144- target_filename="OC_All_status_Consolidated_%(year)s_%(month)s_%(day)s"
145+ target_filename="${_('Export_Consolidated_OC_all_status')}"
146 report_type="webkit"
147 menu="True"
148 sequence="4"
149
150=== modified file 'bin/addons/procurement_cycle/report_doc/replenishment_order_calc.mako'
151--- bin/addons/procurement_cycle/report_doc/replenishment_order_calc.mako 2020-10-16 16:09:35 +0000
152+++ bin/addons/procurement_cycle/report_doc/replenishment_order_calc.mako 2023-06-29 07:06:42 +0000
153@@ -399,7 +399,7 @@
154 </Style>
155
156 </Styles>
157- <Worksheet ss:Name="Order Calculation" ss:Protected="1">
158+ <Worksheet ss:Name="${get_export_title()|x}" ss:Protected="1">
159 <Names>
160 <NamedRange ss:Name="_FilterDatabase" ss:RefersTo="=Segment!R8C1:R14C4"
161 ss:Hidden="1"/>
162@@ -446,7 +446,7 @@
163 <Column ss:AutoFitWidth="0" ss:Width="300" /> <!-- qty comment -->
164 <Column ss:AutoFitWidth="0" ss:Width="300" /> <!-- warning -->
165 <Row ss:AutoFitHeight="0" ss:Height="31.5">
166- <Cell ss:MergeAcross="9" ss:StyleID="s64"><Data ss:Type="String">${_('Order Calculation')|x} ${(_('Consolidated') if is_multi() else '')|x}</Data><NamedCell ss:Name="Print_Area"/></Cell>
167+ <Cell ss:MergeAcross="9" ss:StyleID="s64"><Data ss:Type="String">${get_export_title()|x}</Data><NamedCell ss:Name="Print_Area"/></Cell>
168 </Row>
169 <Row ss:AutoFitHeight="0" ss:Height="18.75" ss:StyleID="s65">
170 <Cell ss:StyleID="s66"><NamedCell
171
172=== modified file 'bin/addons/procurement_cycle/report_doc/replenishment_order_calc.py'
173--- bin/addons/procurement_cycle/report_doc/replenishment_order_calc.py 2022-01-07 10:15:05 +0000
174+++ bin/addons/procurement_cycle/report_doc/replenishment_order_calc.py 2023-06-29 07:06:42 +0000
175@@ -1,6 +1,8 @@
176 # -*- coding: utf-8 -*-
177 from report import report_sxw
178 from spreadsheet_xml.spreadsheet_xml_write import SpreadsheetReport
179+from tools.translate import _
180+
181
182 def get_lines(self, objects):
183 if not self.localcontext['is_multi']:
184@@ -8,6 +10,20 @@
185 else:
186 return sorted([x for y in objects for x in y.order_calc_line_ids], key=lambda line: line.product_id.default_code)
187
188+
189+def get_export_title(self):
190+ title = _('Order Calc Excel Export')
191+ if self.localcontext['only_warning']():
192+ title = _('Order Calc With Warning')
193+ elif self.localcontext['is_multi']():
194+ if self.localcontext['with_state']():
195+ title = _('All Consolidated OC Lines')
196+ else:
197+ title = _('Draft Consolidated OC Lines')
198+
199+ return title
200+
201+
202 class order_calc_parser(report_sxw.rml_parse):
203
204 def __init__(self, cr, uid, name, context):
205@@ -17,10 +33,13 @@
206 'is_multi': lambda *a : False,
207 'with_state': lambda *a : False,
208 'get_lines': lambda *a: get_lines(self, *a),
209+ 'get_export_title': lambda *a: get_export_title(self),
210 })
211
212+
213 SpreadsheetReport('report.report_replenishment_order_calc_xls', 'replenishment.order_calc', 'addons/procurement_cycle/report_doc/replenishment_order_calc.mako', parser=order_calc_parser)
214
215+
216 class order_calc_warning_parser(report_sxw.rml_parse):
217
218 def __init__(self, cr, uid, name, context):
219@@ -30,10 +49,13 @@
220 'is_multi': lambda *a : False,
221 'with_state': lambda *a : False,
222 'get_lines': lambda *a: get_lines(self, *a),
223+ 'get_export_title': lambda *a: get_export_title(self),
224 })
225
226+
227 SpreadsheetReport('report.report_replenishment_order_calc_warning_xls', 'replenishment.order_calc', 'addons/procurement_cycle/report_doc/replenishment_order_calc.mako', parser=order_calc_warning_parser)
228
229+
230 class order_calc_draft_consolidated_parser(report_sxw.rml_parse):
231
232 def __init__(self, cr, uid, name, context):
233@@ -43,10 +65,13 @@
234 'is_multi': lambda *a : True,
235 'with_state': lambda *a : False,
236 'get_lines': lambda *a: get_lines(self, *a),
237+ 'get_export_title': lambda *a: get_export_title(self),
238 })
239
240+
241 SpreadsheetReport('report.report_replenishment_order_calc_draft_consolidated_xls', 'replenishment.order_calc', 'addons/procurement_cycle/report_doc/replenishment_order_calc.mako', parser=order_calc_draft_consolidated_parser)
242
243+
244 class order_calc_all_consolidated_parser(report_sxw.rml_parse):
245
246 def __init__(self, cr, uid, name, context):
247@@ -56,6 +81,8 @@
248 'is_multi': lambda *a : True,
249 'with_state': lambda *a : True,
250 'get_lines': lambda *a: get_lines(self, *a),
251+ 'get_export_title': lambda *a: get_export_title(self),
252 })
253
254+
255 SpreadsheetReport('report.report_replenishment_order_calc_consolidated_xls', 'replenishment.order_calc', 'addons/procurement_cycle/report_doc/replenishment_order_calc.mako', parser=order_calc_all_consolidated_parser)

Subscribers

People subscribed via source and target branches