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

Proposed by jftempo
Status: Merged
Merged at revision: 5320
Proposed branch: lp:~dorian-kemps/unifield-server/US-5664
Merge into: lp:unifield-server
Diff against target: 757 lines (+386/-68)
7 files modified
bin/addons/msf_supply_doc_export/msf_supply_doc_export.py (+12/-10)
bin/addons/msf_supply_doc_export/report/report_po_follow_up_xls.mako (+110/-6)
bin/addons/msf_supply_doc_export/wizard/po_follow_up.py (+11/-5)
bin/addons/sales_followup/report/ir_follow_up_location_report.py (+3/-3)
bin/addons/sales_followup/report/ir_follow_up_location_report_xls.mako (+114/-17)
bin/addons/sales_followup/report/sale_follow_up_multi_report_xls.mako (+133/-24)
bin/addons/sales_followup/report/sale_follow_up_report_multi.py (+3/-3)
To merge this branch: bzr merge lp:~dorian-kemps/unifield-server/US-5664
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+365220@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_supply_doc_export/msf_supply_doc_export.py'
2--- bin/addons/msf_supply_doc_export/msf_supply_doc_export.py 2019-02-11 09:38:43 +0000
3+++ bin/addons/msf_supply_doc_export/msf_supply_doc_export.py 2019-04-12 06:44:21 +0000
4@@ -756,9 +756,9 @@
5 if not same_product_same_uom:
6 report_line = {
7 'order_ref': order.name or '',
8- 'order_created': self.format_date(order.date_order),
9- 'order_confirmed_date': self.format_date(line.confirmed_delivery_date),
10- 'delivery_requested_date': self.format_date(line.date_planned),
11+ 'order_created': order.date_order,
12+ 'order_confirmed_date': line.confirmed_delivery_date,
13+ 'delivery_requested_date': line.date_planned,
14 'raw_state': line.state,
15 'line_status': get_sel(self.cr, self.uid, 'purchase.order.line', 'state', line.state, {}) or '',
16 'state': line.state_to_display or '',
17@@ -793,9 +793,9 @@
18 for spsul in sorted(same_product_same_uom, key=lambda spsu: spsu.get('backorder_id'), reverse=True):
19 report_line = {
20 'order_ref': order.name or '',
21- 'order_created': self.format_date(order.date_order),
22- 'order_confirmed_date': self.format_date(line.confirmed_delivery_date or order.delivery_confirmed_date),
23- 'delivery_requested_date': self.format_date(line.date_planned),
24+ 'order_created': order.date_order,
25+ 'order_confirmed_date': line.confirmed_delivery_date or order.delivery_confirmed_date,
26+ 'delivery_requested_date': line.date_planned,
27 'raw_state': line.state,
28 'order_status': self._get_states().get(order.state, ''),
29 'line_status': first_line and get_sel(self.cr, self.uid, 'purchase.order.line', 'state', line.state, {}) or '',
30@@ -840,9 +840,9 @@
31 for spl in sorted(same_product, key=lambda spsu: spsu.get('backorder_id'), reverse=True):
32 report_line = {
33 'order_ref': order.name or '',
34- 'order_created': self.format_date(order.date_order),
35- 'order_confirmed_date': self.format_date(line.confirmed_delivery_date or order.delivery_confirmed_date),
36- 'delivery_requested_date': self.format_date(line.date_planned),
37+ 'order_created': order.date_order,
38+ 'order_confirmed_date': line.confirmed_delivery_date or order.delivery_confirmed_date,
39+ 'delivery_requested_date': line.date_planned,
40 'raw_state': line.state,
41 'order_status': self._get_states().get(order.state, ''),
42 'line_status': first_line and get_sel(self.cr, self.uid, 'purchase.order.line', 'state', line.state, {}) or '',
43@@ -1004,6 +1004,7 @@
44 super(parser_po_follow_up_xls, self).__init__(cr, uid, name, context=context)
45 self.localcontext.update({
46 'time': time,
47+ 'getLang': self._get_lang,
48 'getHeaderLine': self.getHeaderLine,
49 'getHeaderLine2': self.getHeaderLine2,
50 'getReportHeaderLine1': self.getReportHeaderLine1,
51@@ -1015,7 +1016,8 @@
52 'getLineStyle': self.getLineStyle,
53 })
54
55-
56+ def _get_lang(self):
57+ return self.localcontext.get('lang', 'en_MF')
58
59
60 class po_follow_up_report_xls(SpreadsheetReport):
61
62=== modified file 'bin/addons/msf_supply_doc_export/report/report_po_follow_up_xls.mako'
63--- bin/addons/msf_supply_doc_export/report/report_po_follow_up_xls.mako 2018-11-08 14:36:58 +0000
64+++ bin/addons/msf_supply_doc_export/report/report_po_follow_up_xls.mako 2019-04-12 06:44:21 +0000
65@@ -84,6 +84,38 @@
66 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
67 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
68 </Borders>
69+ <NumberFormat ss:Format="[$-40C]d\-mmm\-yyyy;@"/>
70+ </Style>
71+ <Style ss:ID="short_date_grey">
72+ <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/>
73+ <Borders>
74+ <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
75+ <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
76+ <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
77+ <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
78+ </Borders>
79+ <Font ss:Color="#747474"/>
80+ <NumberFormat ss:Format="[$-40C]d\-mmm\-yyyy;@"/>
81+ </Style>
82+ <Style ss:ID="short_date_fr">
83+ <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/>
84+ <Borders>
85+ <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
86+ <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
87+ <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
88+ <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
89+ </Borders>
90+ <NumberFormat ss:Format="Short Date"/>
91+ </Style>
92+ <Style ss:ID="short_date_grey_fr">
93+ <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/>
94+ <Borders>
95+ <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
96+ <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
97+ <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
98+ <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
99+ </Borders>
100+ <Font ss:Color="#747474"/>
101 <NumberFormat ss:Format="Short Date"/>
102 </Style>
103 </Styles>
104@@ -147,15 +179,39 @@
105 </Row>
106 <Row ss:AutoFitHeight="1">
107 <Cell ss:MergeAcross="1" ss:StyleID="poheader"><Data ss:Type="String">Report run date</Data></Cell>
108- <Cell ss:StyleID="line"><Data ss:Type="String">${getRunParms()['run_date'] or '' |x}</Data></Cell>
109+ % if getRunParms()['run_date'] and isDate(getRunParms()['run_date']):
110+ % if getLang() == 'fr_MF':
111+ <Cell ss:StyleID="short_date_fr"><Data ss:Type="DateTime">${getRunParms()['run_date']|n}T00:00:00.000</Data></Cell>
112+ % else:
113+ <Cell ss:StyleID="short_date"><Data ss:Type="DateTime">${getRunParms()['run_date']|n}T00:00:00.000</Data></Cell>
114+ % endif
115+ % else:
116+ <Cell ss:StyleID="line"><Data ss:Type="String"></Data></Cell>
117+ % endif
118 </Row>
119 <Row ss:AutoFitHeight="1">
120 <Cell ss:MergeAcross="1" ss:StyleID="poheader"><Data ss:Type="String">PO date from</Data></Cell>
121- <Cell ss:StyleID="line"><Data ss:Type="String">${getRunParms()['date_from'] or ''|x}</Data></Cell>
122+ % if getRunParms()['date_from'] and isDate(getRunParms()['date_from']):
123+ % if getLang() == 'fr_MF':
124+ <Cell ss:StyleID="short_date_fr"><Data ss:Type="DateTime">${getRunParms()['date_from']|n}T00:00:00.000</Data></Cell>
125+ % else:
126+ <Cell ss:StyleID="short_date"><Data ss:Type="DateTime">${getRunParms()['date_from']|n}T00:00:00.000</Data></Cell>
127+ % endif
128+ % else:
129+ <Cell ss:StyleID="line"><Data ss:Type="String"></Data></Cell>
130+ % endif
131 </Row>
132 <Row ss:AutoFitHeight="1">
133 <Cell ss:MergeAcross="1" ss:StyleID="poheader"><Data ss:Type="String">PO date to</Data></Cell>
134- <Cell ss:StyleID="line"><Data ss:Type="String">${getRunParms()['date_thru'] or '' |x}</Data></Cell>
135+ % if getRunParms()['date_thru'] and isDate(getRunParms()['date_thru']):
136+ % if getLang() == 'fr_MF':
137+ <Cell ss:StyleID="short_date_fr"><Data ss:Type="DateTime">${getRunParms()['date_thru']|n}T00:00:00.000</Data></Cell>
138+ % else:
139+ <Cell ss:StyleID="short_date"><Data ss:Type="DateTime">${getRunParms()['date_thru']|n}T00:00:00.000</Data></Cell>
140+ % endif
141+ % else:
142+ <Cell ss:StyleID="line"><Data ss:Type="String"></Data></Cell>
143+ % endif
144 </Row>
145
146 <Row ss:AutoFitHeight="1" >
147@@ -183,9 +239,57 @@
148 <Cell ss:StyleID="${getLineStyle(line)|x}"><Data ss:Type="String">${(line['currency'])|x}</Data></Cell>
149 <Cell ss:StyleID="${getLineStyle(line)|x}"><Data ss:Type="Number">${(line['total_currency'])|x}</Data></Cell>
150 <Cell ss:StyleID="${getLineStyle(line)|x}"><Data ss:Type="Number">${(line['total_func_currency'])|x}</Data></Cell>
151- <Cell ss:StyleID="${getLineStyle(line)|x}"><Data ss:Type="String">${(line['order_created'])|x}</Data></Cell>
152- <Cell ss:StyleID="${getLineStyle(line)|x}"><Data ss:Type="String">${(line['delivery_requested_date'])|x}</Data></Cell>
153- <Cell ss:StyleID="${getLineStyle(line)|x}"><Data ss:Type="String">${(line['order_confirmed_date'])|x}</Data></Cell>
154+ % if line['order_created'] and isDate(line['order_created']):
155+ % if line['raw_state'] in ['cancel', 'cancel_r']:
156+ % if getLang() == 'fr_MF':
157+ <Cell ss:StyleID="short_date_grey_fr"><Data ss:Type="DateTime">${line['order_created']|n}T00:00:00.000</Data></Cell>
158+ % else:
159+ <Cell ss:StyleID="short_date_grey"><Data ss:Type="DateTime">${line['order_created']|n}T00:00:00.000</Data></Cell>
160+ % endif
161+ % else:
162+ % if getLang() == 'fr_MF':
163+ <Cell ss:StyleID="short_date_fr"><Data ss:Type="DateTime">${line['order_created']|n}T00:00:00.000</Data></Cell>
164+ % else:
165+ <Cell ss:StyleID="short_date"><Data ss:Type="DateTime">${line['order_created']|n}T00:00:00.000</Data></Cell>
166+ % endif
167+ % endif
168+ % else:
169+ <Cell ss:StyleID="${getLineStyle(line)|x}"><Data ss:Type="String"></Data></Cell>
170+ % endif
171+ % if line['delivery_requested_date'] and isDate(line['delivery_requested_date']):
172+ % if line['raw_state'] in ['cancel', 'cancel_r']:
173+ % if getLang() == 'fr_MF':
174+ <Cell ss:StyleID="short_date_grey_fr"><Data ss:Type="DateTime">${line['delivery_requested_date']|n}T00:00:00.000</Data></Cell>
175+ % else:
176+ <Cell ss:StyleID="short_date_grey"><Data ss:Type="DateTime">${line['delivery_requested_date']|n}T00:00:00.000</Data></Cell>
177+ % endif
178+ % else:
179+ % if getLang() == 'fr_MF':
180+ <Cell ss:StyleID="short_date_fr"><Data ss:Type="DateTime">${line['delivery_requested_date']|n}T00:00:00.000</Data></Cell>
181+ % else:
182+ <Cell ss:StyleID="short_date"><Data ss:Type="DateTime">${line['delivery_requested_date']|n}T00:00:00.000</Data></Cell>
183+ % endif
184+ % endif
185+ % else:
186+ <Cell ss:StyleID="${getLineStyle(line)|x}"><Data ss:Type="String"></Data></Cell>
187+ % endif
188+ % if line['order_confirmed_date'] and isDate(line['order_confirmed_date']):
189+ % if line['raw_state'] in ['cancel', 'cancel_r']:
190+ % if getLang() == 'fr_MF':
191+ <Cell ss:StyleID="short_date_grey_fr"><Data ss:Type="DateTime">${line['order_confirmed_date']|n}T00:00:00.000</Data></Cell>
192+ % else:
193+ <Cell ss:StyleID="short_date_grey"><Data ss:Type="DateTime">${line['order_confirmed_date']|n}T00:00:00.000</Data></Cell>
194+ % endif
195+ % else:
196+ % if getLang() == 'fr_MF':
197+ <Cell ss:StyleID="short_date_fr"><Data ss:Type="DateTime">${line['order_confirmed_date']|n}T00:00:00.000</Data></Cell>
198+ % else:
199+ <Cell ss:StyleID="short_date"><Data ss:Type="DateTime">${line['order_confirmed_date']|n}T00:00:00.000</Data></Cell>
200+ % endif
201+ % endif
202+ % else:
203+ <Cell ss:StyleID="${getLineStyle(line)|x}"><Data ss:Type="String"></Data></Cell>
204+ % endif
205 <Cell ss:StyleID="${getLineStyle(line)|x}"><Data ss:Type="String">${(line['state'])|x}</Data></Cell>
206 <Cell ss:StyleID="${getLineStyle(line)|x}"><Data ss:Type="String">${(line['order_status'])|x}</Data></Cell>
207 <Cell ss:StyleID="${getLineStyle(line)|x}"><Data ss:Type="String">${(line['customer'])|x}</Data></Cell>
208
209=== modified file 'bin/addons/msf_supply_doc_export/wizard/po_follow_up.py'
210--- bin/addons/msf_supply_doc_export/wizard/po_follow_up.py 2018-11-09 15:03:59 +0000
211+++ bin/addons/msf_supply_doc_export/wizard/po_follow_up.py 2019-04-12 06:44:21 +0000
212@@ -56,7 +56,7 @@
213 states[state_val] = state_string
214 report_parms = {
215 'title': 'PO Follow Up per Supplier',
216- 'run_date': time.strftime("%d.%m.%Y"),
217+ 'run_date': wiz.export_format == 'xls' and time.strftime("%Y-%m-%d") or time.strftime("%d.%m.%Y"),
218 'date_from': '',
219 'date_thru': '',
220 'state': '',
221@@ -75,13 +75,19 @@
222 # Dates
223 if wiz.po_date_from:
224 domain.append(('date_order', '>=', wiz.po_date_from))
225- tmp = datetime.strptime(wiz.po_date_from, "%Y-%m-%d")
226- report_parms['date_from'] = tmp.strftime("%d.%m.%Y")
227+ if wiz.export_format == 'xls':
228+ report_parms['date_from'] = wiz.po_date_from
229+ else:
230+ tmp = datetime.strptime(wiz.po_date_from, "%Y-%m-%d")
231+ report_parms['date_from'] = tmp.strftime("%d.%m.%Y")
232
233 if wiz.po_date_thru:
234 domain.append(('date_order', '<=', wiz.po_date_thru))
235- tmp = datetime.strptime(wiz.po_date_thru, "%Y-%m-%d")
236- report_parms['date_thru'] = tmp.strftime("%d.%m.%Y")
237+ if wiz.export_format == 'xls':
238+ report_parms['date_thru'] = wiz.po_date_thru
239+ else:
240+ tmp = datetime.strptime(wiz.po_date_thru, "%Y-%m-%d")
241+ report_parms['date_thru'] = tmp.strftime("%d.%m.%Y")
242
243 # Supplier
244 if wiz.partner_id:
245
246=== modified file 'bin/addons/sales_followup/report/ir_follow_up_location_report.py'
247--- bin/addons/sales_followup/report/ir_follow_up_location_report.py 2019-02-11 16:18:09 +0000
248+++ bin/addons/sales_followup/report/ir_follow_up_location_report.py 2019-04-12 06:44:21 +0000
249@@ -35,13 +35,13 @@
250 super(ir_follow_up_location_report_parser, self).__init__(cr, uid, name, context=context)
251 self.localcontext.update({
252 'time': time,
253+ 'getLang': self._get_lang,
254 'parse_date_xls': self._parse_date_xls,
255 'upper': self._upper,
256 'getLines': self._get_lines,
257 'getOrders': self._get_orders,
258 'getProducts': self._get_products,
259 'getIrAmountEstimated': self._get_ir_amount_estimated,
260- 'saleUstr': self._sale_ustr,
261 })
262 self._order_iterator = 0
263 self._nb_orders = 0
264@@ -53,8 +53,8 @@
265 else:
266 self.back_browse = None
267
268- def _sale_ustr(self, string):
269- return tools.ustr(string)
270+ def _get_lang(self):
271+ return self.localcontext.get('lang', 'en_MF')
272
273 def _get_orders(self, report, only_bo=False):
274 orders = []
275
276=== modified file 'bin/addons/sales_followup/report/ir_follow_up_location_report_xls.mako'
277--- bin/addons/sales_followup/report/ir_follow_up_location_report_xls.mako 2018-06-08 10:34:15 +0000
278+++ bin/addons/sales_followup/report/ir_follow_up_location_report_xls.mako 2019-04-12 06:44:21 +0000
279@@ -96,6 +96,17 @@
280 </Style>
281 <Style ss:ID="line_left_date">
282 <Alignment ss:Horizontal="Right" ss:Vertical="Bottom"/>
283+ <NumberFormat ss:Format="[$-40C]d\-mmm\-yyyy;@" />
284+ <Borders>
285+ <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
286+ <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
287+ <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
288+ <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
289+ </Borders>
290+ <Font ss:Size="8" ss:Color="#0000FF"/>
291+ </Style>
292+ <Style ss:ID="line_left_date_fr">
293+ <Alignment ss:Horizontal="Right" ss:Vertical="Bottom"/>
294 <NumberFormat ss:Format="Short Date" />
295 <Borders>
296 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
297@@ -107,8 +118,13 @@
298 </Style>
299 <Style ss:ID="short_date">
300 <Alignment ss:Horizontal="Left" ss:Vertical="Center" ss:WrapText="1" />
301+ <NumberFormat ss:Format="[$-40C]d\-mmm\-yyyy;@" />
302+ <Font ss:Size="8" ss:Color="#0000FF" />
303+ </Style>
304+ <Style ss:ID="short_date_fr">
305+ <Alignment ss:Horizontal="Left" ss:Vertical="Center" ss:WrapText="1" />
306 <NumberFormat ss:Format="Short Date" />
307- <Font ss:Color="#0000FF" />
308+ <Font ss:Size="8" ss:Color="#0000FF" />
309 </Style>
310
311 <Style ss:ID="line_left_grey">
312@@ -145,7 +161,7 @@
313 </Style>
314 <Style ss:ID="line_left_date_grey">
315 <Alignment ss:Horizontal="Right" ss:Vertical="Bottom"/>
316- <NumberFormat ss:Format="Short Date" />
317+ <NumberFormat ss:Format="[$-40C]d\-mmm\-yyyy;@" />
318 <Borders>
319 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
320 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
321@@ -154,11 +170,16 @@
322 </Borders>
323 <Font ss:Size="8" ss:Color="#747474"/>
324 </Style>
325-
326- <Style ss:ID="short_date_grey">
327- <Alignment ss:Horizontal="Left" ss:Vertical="Center" ss:WrapText="1" />
328+ <Style ss:ID="line_left_date_grey_fr">
329+ <Alignment ss:Horizontal="Right" ss:Vertical="Bottom"/>
330 <NumberFormat ss:Format="Short Date" />
331- <Font ss:Color="#747474" />
332+ <Borders>
333+ <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
334+ <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
335+ <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
336+ <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
337+ </Borders>
338+ <Font ss:Size="8" ss:Color="#747474"/>
339 </Style>
340 </Styles>
341
342@@ -234,7 +255,11 @@
343 <Cell ss:StyleID="ssCell"><Data ss:Type="String"></Data></Cell>
344 <Cell ss:StyleID="ssCell" ss:MergeAcross="1"><Data ss:Type="String">${_('Date start:')|x}</Data></Cell>
345 % if isDate(r.start_date):
346- <Cell ss:StyleID="short_date" ss:MergeAcross="2"><Data ss:Type="DateTime">${r.start_date|n}T00:00:00.000</Data></Cell>
347+ % if getLang() == 'fr_MF':
348+ <Cell ss:StyleID="short_date_fr" ss:MergeAcross="2"><Data ss:Type="DateTime">${r.start_date|n}T00:00:00.000</Data></Cell>
349+ % else:
350+ <Cell ss:StyleID="short_date" ss:MergeAcross="2"><Data ss:Type="DateTime">${r.start_date|n}T00:00:00.000</Data></Cell>
351+ % endif
352 % else:
353 <Cell ss:StyleID="ssCell" ss:MergeAcross="2"><Data ss:Type="String"></Data></Cell>
354 % endif
355@@ -245,7 +270,11 @@
356 <Cell ss:StyleID="ssCell"><Data ss:Type="String"></Data></Cell>
357 <Cell ss:StyleID="ssCell" ss:MergeAcross="1"><Data ss:Type="String">${_('Date end:')|x}</Data></Cell>
358 % if isDate(r.end_date):
359- <Cell ss:StyleID="short_date" ss:MergeAcross="2"><Data ss:Type="DateTime">${r.end_date|n}T00:00:00.000</Data></Cell>
360+ % if getLang() == 'fr_MF':
361+ <Cell ss:StyleID="short_date_fr" ss:MergeAcross="2"><Data ss:Type="DateTime">${r.end_date|n}T00:00:00.000</Data></Cell>
362+ % else:
363+ <Cell ss:StyleID="short_date" ss:MergeAcross="2"><Data ss:Type="DateTime">${r.end_date|n}T00:00:00.000</Data></Cell>
364+ % endif
365 % else:
366 <Cell ss:StyleID="ssCell" ss:MergeAcross="2"><Data ss:Type="String"></Data></Cell>
367 % endif
368@@ -256,7 +285,11 @@
369 <Cell ss:StyleID="ssCell"><Data ss:Type="String"></Data></Cell>
370 <Cell ss:StyleID="ssCell" ss:MergeAcross="1"><Data ss:Type="String">${_('Date of the request:')|x}</Data></Cell>
371 % if r.report_date and isDateTime(r.report_date):
372- <Cell ss:StyleID="short_date" ss:MergeAcross="2"><Data ss:Type="DateTime">${r.report_date[0:10]|n}T${r.report_date[11:19]|n}.000</Data></Cell>
373+ % if getLang() == 'fr_MF':
374+ <Cell ss:StyleID="short_date_fr" ss:MergeAcross="2"><Data ss:Type="DateTime">${r.report_date[0:10]|n}T${r.report_date[11:19]|n}.000</Data></Cell>
375+ % else:
376+ <Cell ss:StyleID="short_date" ss:MergeAcross="2"><Data ss:Type="DateTime">${r.report_date[0:10]|n}T${r.report_date[11:19]|n}.000</Data></Cell>
377+ % endif
378 % else:
379 <Cell ss:StyleID="ssCell" ss:MergeAcross="2"><Data ss:Type="String"></Data></Cell>
380 % endif
381@@ -314,8 +347,24 @@
382 <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('po_name', '')|x}</Data></Cell>
383 <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${getSel(o, 'state')|x}</Data></Cell>
384 <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('state_display', '-')|x}</Data></Cell>
385- <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${saleUstr(formatLang(o.date_order, date=True))|x}</Data></Cell>
386- <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${o.delivery_requested_date and saleUstr(formatLang(o.delivery_requested_date, date=True)) or ''|x}</Data></Cell>
387+ % if o.date_order and isDate(o.date_order):
388+ % if getLang() == 'fr_MF':
389+ <Cell ss:StyleID="line_left_date_grey_fr"><Data ss:Type="DateTime">${o.date_order|n}T00:00:00.000</Data></Cell>
390+ % else:
391+ <Cell ss:StyleID="line_left_date_grey"><Data ss:Type="DateTime">${o.date_order|n}T00:00:00.000</Data></Cell>
392+ % endif
393+ % else:
394+ <Cell ss:StyleID="line_left_grey"><Data ss:Type="String"></Data></Cell>
395+ % endif
396+ % if o.delivery_requested_date and isDate(o.delivery_requested_date):
397+ % if getLang() == 'fr_MF':
398+ <Cell ss:StyleID="line_left_date_grey_fr"><Data ss:Type="DateTime">${o.delivery_requested_date|n}T00:00:00.000</Data></Cell>
399+ % else:
400+ <Cell ss:StyleID="line_left_date_grey"><Data ss:Type="DateTime">${o.delivery_requested_date|n}T00:00:00.000</Data></Cell>
401+ % endif
402+ % else:
403+ <Cell ss:StyleID="line_left_grey"><Data ss:Type="String"></Data></Cell>
404+ % endif
405 <Cell ss:StyleID="line_center_grey"><Data ss:Type="String">${line.get('line_number', '-')|x}</Data></Cell>
406 <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('product_code', '-') or ''|x}</Data></Cell>
407 <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('product_name', '-') or ''|x}</Data></Cell>
408@@ -334,8 +383,24 @@
409 <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('delivered_uom', '')|x}</Data></Cell>
410 <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('delivery_order', '')|x}</Data></Cell>
411 <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">-</Data></Cell>
412- <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('cdd', False) not in (False, 'False') and saleUstr(formatLang(line.get('cdd'), date=True)) or ''|x}</Data></Cell>
413- <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('rts', False) not in (False, 'False') and saleUstr(formatLang(line.get('rts'), date=True)) or ''|x}</Data></Cell>
414+ % if line.get('cdd') and isDate(line['cdd']):
415+ % if getLang() == 'fr_MF':
416+ <Cell ss:StyleID="line_left_date_grey_fr"><Data ss:Type="DateTime">${line['cdd']|n}T00:00:00.000</Data></Cell>
417+ % else:
418+ <Cell ss:StyleID="line_left_date_grey"><Data ss:Type="DateTime">${line['cdd']|n}T00:00:00.000</Data></Cell>
419+ % endif
420+ % else:
421+ <Cell ss:StyleID="line_left_grey"><Data ss:Type="String"></Data></Cell>
422+ % endif
423+ % if line.get('rts') and isDate(line['rts']):
424+ % if getLang() == 'fr_MF':
425+ <Cell ss:StyleID="line_left_date_grey_fr"><Data ss:Type="DateTime">${line['rts']|n}T00:00:00.000</Data></Cell>
426+ % else:
427+ <Cell ss:StyleID="line_left_date_grey"><Data ss:Type="DateTime">${line['rts']|n}T00:00:00.000</Data></Cell>
428+ % endif
429+ % else:
430+ <Cell ss:StyleID="line_left_grey"><Data ss:Type="String"></Data></Cell>
431+ % endif
432 % else:
433 <Cell ss:StyleID="line_left"><Data ss:Type="String">${o.name|x}</Data></Cell>
434 <Cell ss:StyleID="line_left"><Data ss:Type="String">${o.location_requestor_id.name|x}</Data></Cell>
435@@ -344,8 +409,24 @@
436 <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('po_name', '')|x}</Data></Cell>
437 <Cell ss:StyleID="line_left"><Data ss:Type="String">${getSel(o, 'state')|x}</Data></Cell>
438 <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('state_display', '-')|x}</Data></Cell>
439- <Cell ss:StyleID="line_left"><Data ss:Type="String">${saleUstr(formatLang(o.date_order, date=True))|x}</Data></Cell>
440- <Cell ss:StyleID="line_left"><Data ss:Type="String">${o.delivery_requested_date and saleUstr(formatLang(o.delivery_requested_date, date=True)) or ''|x}</Data></Cell>
441+ % if o.date_order and isDate(o.date_order):
442+ % if getLang() == 'fr_MF':
443+ <Cell ss:StyleID="line_left_date_fr"><Data ss:Type="DateTime">${o.date_order|n}T00:00:00.000</Data></Cell>
444+ % else:
445+ <Cell ss:StyleID="line_left_date"><Data ss:Type="DateTime">${o.date_order|n}T00:00:00.000</Data></Cell>
446+ % endif
447+ % else:
448+ <Cell ss:StyleID="line_left"><Data ss:Type="String"></Data></Cell>
449+ % endif
450+ % if o.delivery_requested_date and isDate(o.delivery_requested_date):
451+ % if getLang() == 'fr_MF':
452+ <Cell ss:StyleID="line_left_date_fr"><Data ss:Type="DateTime">${o.delivery_requested_date|n}T00:00:00.000</Data></Cell>
453+ % else:
454+ <Cell ss:StyleID="line_left_date"><Data ss:Type="DateTime">${o.delivery_requested_date|n}T00:00:00.000</Data></Cell>
455+ % endif
456+ % else:
457+ <Cell ss:StyleID="line_left"><Data ss:Type="String"></Data></Cell>
458+ % endif
459 <Cell ss:StyleID="line_center"><Data ss:Type="String">${line.get('line_number', '-')|x}</Data></Cell>
460 <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('product_code', '-') or ''|x}</Data></Cell>
461 <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('product_name', '-') or ''|x}</Data></Cell>
462@@ -368,8 +449,24 @@
463 % else:
464 <Cell ss:StyleID="line_right"><Data ss:Type="Number">${line.get('backordered_qty')}</Data></Cell>
465 % endif
466- <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('cdd', False) not in (False, 'False') and saleUstr(formatLang(line.get('cdd'), date=True)) or ''|x}</Data></Cell>
467- <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('rts', False) not in (False, 'False') and saleUstr(formatLang(line.get('rts'), date=True)) or ''|x}</Data></Cell>
468+ % if line.get('cdd') and isDate(line['cdd']):
469+ % if getLang() == 'fr_MF':
470+ <Cell ss:StyleID="line_left_date_fr"><Data ss:Type="DateTime">${line['cdd']|n}T00:00:00.000</Data></Cell>
471+ % else:
472+ <Cell ss:StyleID="line_left_date"><Data ss:Type="DateTime">${line['cdd']|n}T00:00:00.000</Data></Cell>
473+ % endif
474+ % else:
475+ <Cell ss:StyleID="line_left"><Data ss:Type="String"></Data></Cell>
476+ % endif
477+ % if line.get('rts') and isDate(line['rts']):
478+ % if getLang() == 'fr_MF':
479+ <Cell ss:StyleID="line_left_date_fr"><Data ss:Type="DateTime">${line['rts']|n}T00:00:00.000</Data></Cell>
480+ % else:
481+ <Cell ss:StyleID="line_left_date"><Data ss:Type="DateTime">${line['rts']|n}T00:00:00.000</Data></Cell>
482+ % endif
483+ % else:
484+ <Cell ss:StyleID="line_left"><Data ss:Type="String"></Data></Cell>
485+ % endif
486 % endif
487 </Row>
488 % endfor
489
490=== modified file 'bin/addons/sales_followup/report/sale_follow_up_multi_report_xls.mako'
491--- bin/addons/sales_followup/report/sale_follow_up_multi_report_xls.mako 2018-09-24 15:01:54 +0000
492+++ bin/addons/sales_followup/report/sale_follow_up_multi_report_xls.mako 2019-04-12 06:44:21 +0000
493@@ -96,6 +96,17 @@
494 </Style>
495 <Style ss:ID="line_left_date">
496 <Alignment ss:Horizontal="Right" ss:Vertical="Bottom"/>
497+ <NumberFormat ss:Format="[$-40C]d\-mmm\-yyyy;@" />
498+ <Borders>
499+ <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
500+ <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
501+ <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
502+ <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
503+ </Borders>
504+ <Font ss:Size="8" ss:Color="#0000FF"/>
505+ </Style>
506+ <Style ss:ID="line_left_date_fr">
507+ <Alignment ss:Horizontal="Right" ss:Vertical="Bottom"/>
508 <NumberFormat ss:Format="Short Date" />
509 <Borders>
510 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
511@@ -108,8 +119,13 @@
512
513 <Style ss:ID="short_date">
514 <Alignment ss:Horizontal="Left" ss:Vertical="Center" ss:WrapText="1" />
515+ <NumberFormat ss:Format="[$-40C]d\-mmm\-yyyy;@" />
516+ <Font ss:Size="8" ss:Color="#0000FF" />
517+ </Style>
518+ <Style ss:ID="short_date_fr">
519+ <Alignment ss:Horizontal="Left" ss:Vertical="Center" ss:WrapText="1" />
520 <NumberFormat ss:Format="Short Date" />
521- <Font ss:Color="#0000FF" />
522+ <Font ss:Size="8" ss:Color="#0000FF" />
523 </Style>
524
525 <Style ss:ID="line_left_grey">
526@@ -146,7 +162,7 @@
527 </Style>
528 <Style ss:ID="line_left_date_grey">
529 <Alignment ss:Horizontal="Right" ss:Vertical="Bottom"/>
530- <NumberFormat ss:Format="Short Date" />
531+ <NumberFormat ss:Format="[$-40C]d\-mmm\-yyyy;@" />
532 <Borders>
533 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
534 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
535@@ -155,11 +171,16 @@
536 </Borders>
537 <Font ss:Size="8" ss:Color="#747474"/>
538 </Style>
539-
540- <Style ss:ID="short_date_grey">
541- <Alignment ss:Horizontal="Left" ss:Vertical="Center" ss:WrapText="1" />
542+ <Style ss:ID="line_left_date_grey_fr">
543+ <Alignment ss:Horizontal="Right" ss:Vertical="Bottom"/>
544 <NumberFormat ss:Format="Short Date" />
545- <Font ss:Color="#747474" />
546+ <Borders>
547+ <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
548+ <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
549+ <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
550+ <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
551+ </Borders>
552+ <Font ss:Size="8" ss:Color="#747474"/>
553 </Style>
554 </Styles>
555
556@@ -237,7 +258,11 @@
557 <Cell ss:StyleID="ssCell"><Data ss:Type="String"></Data></Cell>
558 <Cell ss:StyleID="ssCell" ss:MergeAcross="1"><Data ss:Type="String">${_('Date start:')|x}</Data></Cell>
559 % if isDate(r.start_date):
560- <Cell ss:StyleID="short_date" ss:MergeAcross="2"><Data ss:Type="DateTime">${r.start_date|n}T00:00:00.000</Data></Cell>
561+ % if getLang() == 'fr_MF':
562+ <Cell ss:StyleID="short_date_fr" ss:MergeAcross="2"><Data ss:Type="DateTime">${r.start_date|n}T00:00:00.000</Data></Cell>
563+ % else:
564+ <Cell ss:StyleID="short_date" ss:MergeAcross="2"><Data ss:Type="DateTime">${r.start_date|n}T00:00:00.000</Data></Cell>
565+ % endif
566 % else:
567 <Cell ss:StyleID="ssCell" ss:MergeAcross="2"><Data ss:Type="String"></Data></Cell>
568 % endif
569@@ -248,7 +273,11 @@
570 <Cell ss:StyleID="ssCell"><Data ss:Type="String"></Data></Cell>
571 <Cell ss:StyleID="ssCell" ss:MergeAcross="1"><Data ss:Type="String">${_('Date end:')|x}</Data></Cell>
572 % if isDate(r.end_date):
573- <Cell ss:StyleID="short_date" ss:MergeAcross="2"><Data ss:Type="DateTime">${r.end_date|n}T00:00:00.000</Data></Cell>
574+ % if getLang() == 'fr_MF':
575+ <Cell ss:StyleID="short_date_fr" ss:MergeAcross="2"><Data ss:Type="DateTime">${r.end_date|n}T00:00:00.000</Data></Cell>
576+ % else:
577+ <Cell ss:StyleID="short_date" ss:MergeAcross="2"><Data ss:Type="DateTime">${r.end_date|n}T00:00:00.000</Data></Cell>
578+ % endif
579 % else:
580 <Cell ss:StyleID="ssCell" ss:MergeAcross="2"><Data ss:Type="String"></Data></Cell>
581 % endif
582@@ -259,7 +288,11 @@
583 <Cell ss:StyleID="ssCell"><Data ss:Type="String"></Data></Cell>
584 <Cell ss:StyleID="ssCell" ss:MergeAcross="1"><Data ss:Type="String">${_('Date of the request:')|x}</Data></Cell>
585 % if r.report_date and isDateTime(r.report_date):
586- <Cell ss:StyleID="short_date" ss:MergeAcross="2"><Data ss:Type="DateTime">${r.report_date[0:10]|n}T${r.report_date[11:19]|n}.000</Data></Cell>
587+ % if getLang() == 'fr_MF':
588+ <Cell ss:StyleID="short_date_fr" ss:MergeAcross="2"><Data ss:Type="DateTime">${r.report_date[0:10]|n}T${r.report_date[11:19]|n}.000</Data></Cell>
589+ % else:
590+ <Cell ss:StyleID="short_date" ss:MergeAcross="2"><Data ss:Type="DateTime">${r.report_date[0:10]|n}T${r.report_date[11:19]|n}.000</Data></Cell>
591+ % endif
592 % else:
593 <Cell ss:StyleID="ssCell" ss:MergeAcross="2"><Data ss:Type="String"></Data></Cell>
594 % endif
595@@ -317,8 +350,24 @@
596 <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('supplier_name', '')|x}</Data></Cell>
597 <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${getSel(o, 'state')|x}</Data></Cell>
598 <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('state_display', '-')|x}</Data></Cell>
599- <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${saleUstr(formatLang(o.date_order, date=True))|x}</Data></Cell>
600- <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${o.delivery_requested_date and saleUstr(formatLang(o.delivery_requested_date, date=True)) or ''|x}</Data></Cell>
601+ % if o.date_order and isDate(o.date_order):
602+ % if getLang() == 'fr_MF':
603+ <Cell ss:StyleID="line_left_date_grey_fr"><Data ss:Type="DateTime">${o.date_order|n}T00:00:00.000</Data></Cell>
604+ % else:
605+ <Cell ss:StyleID="line_left_date_grey"><Data ss:Type="DateTime">${o.date_order|n}T00:00:00.000</Data></Cell>
606+ % endif
607+ % else:
608+ <Cell ss:StyleID="line_left_grey"><Data ss:Type="String"></Data></Cell>
609+ % endif
610+ % if o.delivery_requested_date and isDate(o.delivery_requested_date):
611+ % if getLang() == 'fr_MF':
612+ <Cell ss:StyleID="line_left_date_grey_fr"><Data ss:Type="DateTime">${o.delivery_requested_date|n}T00:00:00.000</Data></Cell>
613+ % else:
614+ <Cell ss:StyleID="line_left_date_grey"><Data ss:Type="DateTime">${o.delivery_requested_date|n}T00:00:00.000</Data></Cell>
615+ % endif
616+ % else:
617+ <Cell ss:StyleID="line_left_grey"><Data ss:Type="String"></Data></Cell>
618+ % endif
619 <Cell ss:StyleID="line_center_grey"><Data ss:Type="String">${line.get('line_number', '-')|x}</Data></Cell>
620 <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('product_code', '-') or ''|x}</Data></Cell>
621 <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('product_name', '-') or ''|x}</Data></Cell>
622@@ -341,14 +390,34 @@
623 % else:
624 <Cell ss:StyleID="line_left_grey"><Data ss:Type="String"></Data></Cell>
625 % endif
626- % if line.get('is_delivered'):
627- <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('shipment', '')|x}</Data></Cell>
628- % else:
629- <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('shipment', '')|x}</Data></Cell>
630- % endif
631- <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('cdd', False) not in (False, 'False') and saleUstr(formatLang(line.get('cdd'), date=True)) or ''|x}</Data></Cell>
632- <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('eta', False) not in (False, 'False') and saleUstr(formatLang(line.get('eta'), date=True)) or ''|x}</Data></Cell>
633- <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('rts', False) not in (False, 'False') and saleUstr(formatLang(line.get('rts'), date=True)) or ''|x}</Data></Cell>
634+ <Cell ss:StyleID="line_left_grey"><Data ss:Type="String">${line.get('shipment', '')|x}</Data></Cell>
635+ % if line.get('cdd') and isDate(line['cdd']):
636+ % if getLang() == 'fr_MF':
637+ <Cell ss:StyleID="line_left_date_grey_fr"><Data ss:Type="DateTime">${line['cdd']|n}T00:00:00.000</Data></Cell>
638+ % else:
639+ <Cell ss:StyleID="line_left_date_grey"><Data ss:Type="DateTime">${line['cdd']|n}T00:00:00.000</Data></Cell>
640+ % endif
641+ % else:
642+ <Cell ss:StyleID="line_left_grey"><Data ss:Type="String"></Data></Cell>
643+ % endif
644+ % if line.get('eta') and isDate(line['eta']):
645+ % if getLang() == 'fr_MF':
646+ <Cell ss:StyleID="line_left_date_grey_fr"><Data ss:Type="DateTime">${line['eta']|n}T00:00:00.000</Data></Cell>
647+ % else:
648+ <Cell ss:StyleID="line_left_date_grey"><Data ss:Type="DateTime">${line['eta']|n}T00:00:00.000</Data></Cell>
649+ % endif
650+ % else:
651+ <Cell ss:StyleID="line_left_grey"><Data ss:Type="String"></Data></Cell>
652+ % endif
653+ % if line.get('rts') and isDate(line['rts']):
654+ % if getLang() == 'fr_MF':
655+ <Cell ss:StyleID="line_left_date_grey_fr"><Data ss:Type="DateTime">${line['rts']|n}T00:00:00.000</Data></Cell>
656+ % else:
657+ <Cell ss:StyleID="line_left_date_grey"><Data ss:Type="DateTime">${line['rts']|n}T00:00:00.000</Data></Cell>
658+ % endif
659+ % else:
660+ <Cell ss:StyleID="line_left_grey"><Data ss:Type="String"></Data></Cell>
661+ % endif
662 % else:
663 <Cell ss:StyleID="line_left"><Data ss:Type="String">${o.name|x}</Data></Cell>
664 <Cell ss:StyleID="line_left"><Data ss:Type="String">${o.client_order_ref or ''|x}</Data></Cell>
665@@ -356,8 +425,24 @@
666 <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('supplier_name', '')|x}</Data></Cell>
667 <Cell ss:StyleID="line_left"><Data ss:Type="String">${getSel(o, 'state')|x}</Data></Cell>
668 <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('state_display', '-')|x}</Data></Cell>
669- <Cell ss:StyleID="line_left"><Data ss:Type="String">${saleUstr(formatLang(o.date_order, date=True))|x}</Data></Cell>
670- <Cell ss:StyleID="line_left"><Data ss:Type="String">${o.delivery_requested_date and saleUstr(formatLang(o.delivery_requested_date, date=True)) or ''|x}</Data></Cell>
671+ % if o.date_order and isDate(o.date_order):
672+ % if getLang() == 'fr_MF':
673+ <Cell ss:StyleID="line_left_date_fr"><Data ss:Type="DateTime">${o.date_order|n}T00:00:00.000</Data></Cell>
674+ % else:
675+ <Cell ss:StyleID="line_left_date"><Data ss:Type="DateTime">${o.date_order|n}T00:00:00.000</Data></Cell>
676+ % endif
677+ % else:
678+ <Cell ss:StyleID="line_left"><Data ss:Type="String"></Data></Cell>
679+ % endif
680+ % if o.delivery_requested_date and isDate(o.delivery_requested_date):
681+ % if getLang() == 'fr_MF':
682+ <Cell ss:StyleID="line_left_date_fr"><Data ss:Type="DateTime">${o.delivery_requested_date|n}T00:00:00.000</Data></Cell>
683+ % else:
684+ <Cell ss:StyleID="line_left_date"><Data ss:Type="DateTime">${o.delivery_requested_date|n}T00:00:00.000</Data></Cell>
685+ % endif
686+ % else:
687+ <Cell ss:StyleID="line_left"><Data ss:Type="String"></Data></Cell>
688+ % endif
689 <Cell ss:StyleID="line_center"><Data ss:Type="String">${line.get('line_number', '-')|x}</Data></Cell>
690 <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('product_code', '-') or ''|x}</Data></Cell>
691 <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('product_name', '-') or ''|x}</Data></Cell>
692@@ -389,9 +474,33 @@
693 % else:
694 <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('shipment', '')|x}</Data></Cell>
695 % endif
696- <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('cdd', False) not in (False, 'False') and saleUstr(formatLang(line.get('cdd'), date=True)) or ''|x}</Data></Cell>
697- <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('eta', False) not in (False, 'False') and saleUstr(formatLang(line.get('eta'), date=True)) or ''|x}</Data></Cell>
698- <Cell ss:StyleID="line_left"><Data ss:Type="String">${line.get('rts', False) not in (False, 'False') and saleUstr(formatLang(line.get('rts'), date=True)) or ''|x}</Data></Cell>
699+ % if line.get('cdd') and isDate(line['cdd']):
700+ % if getLang() == 'fr_MF':
701+ <Cell ss:StyleID="line_left_date_fr"><Data ss:Type="DateTime">${line['cdd']|n}T00:00:00.000</Data></Cell>
702+ % else:
703+ <Cell ss:StyleID="line_left_date"><Data ss:Type="DateTime">${line['cdd']|n}T00:00:00.000</Data></Cell>
704+ % endif
705+ % else:
706+ <Cell ss:StyleID="line_left"><Data ss:Type="String"></Data></Cell>
707+ % endif
708+ % if line.get('eta') and isDate(line['eta']):
709+ % if getLang() == 'fr_MF':
710+ <Cell ss:StyleID="line_left_date_fr"><Data ss:Type="DateTime">${line['eta']|n}T00:00:00.000</Data></Cell>
711+ % else:
712+ <Cell ss:StyleID="line_left_date"><Data ss:Type="DateTime">${line['eta']|n}T00:00:00.000</Data></Cell>
713+ % endif
714+ % else:
715+ <Cell ss:StyleID="line_left"><Data ss:Type="String"></Data></Cell>
716+ % endif
717+ % if line.get('rts') and isDate(line['rts']):
718+ % if getLang() == 'fr_MF':
719+ <Cell ss:StyleID="line_left_date_fr"><Data ss:Type="DateTime">${line['rts']|n}T00:00:00.000</Data></Cell>
720+ % else:
721+ <Cell ss:StyleID="line_left_date"><Data ss:Type="DateTime">${line['rts']|n}T00:00:00.000</Data></Cell>
722+ % endif
723+ % else:
724+ <Cell ss:StyleID="line_left"><Data ss:Type="String"></Data></Cell>
725+ % endif
726 % endif
727 </Row>
728 % endfor
729
730=== modified file 'bin/addons/sales_followup/report/sale_follow_up_report_multi.py'
731--- bin/addons/sales_followup/report/sale_follow_up_report_multi.py 2018-09-24 15:01:54 +0000
732+++ bin/addons/sales_followup/report/sale_follow_up_report_multi.py 2019-04-12 06:44:21 +0000
733@@ -35,12 +35,12 @@
734 super(sale_follow_up_multi_report_parser, self).__init__(cr, uid, name, context=context)
735 self.localcontext.update({
736 'time': time,
737+ 'getLang': self._get_lang,
738 'parse_date_xls': self._parse_date_xls,
739 'upper': self._upper,
740 'getLines': self._get_lines,
741 'getOrders': self._get_orders,
742 'getProducts': self._get_products,
743- 'saleUstr': self._sale_ustr,
744 })
745 self._order_iterator = 0
746 self._nb_orders = 0
747@@ -52,8 +52,8 @@
748 else:
749 self.back_browse = None
750
751- def _sale_ustr(self, string):
752- return tools.ustr(string)
753+ def _get_lang(self):
754+ return self.localcontext.get('lang', 'en_MF')
755
756 def _get_orders(self, report, grouped=False, only_bo=False):
757 orders = []

Subscribers

People subscribed via source and target branches