Merge lp:~unifield-team/unifield-server/US-5343-5790-6099 into lp:unifield-server
- US-5343-5790-6099
- Merge into trunk
Proposed by
jftempo
Status: | Merged |
---|---|
Merged at revision: | 5432 |
Proposed branch: | lp:~unifield-team/unifield-server/US-5343-5790-6099 |
Merge into: | lp:unifield-server |
Diff against target: |
585 lines (+194/-62) (has conflicts) 8 files modified
bin/addons/msf_doc_import/purchase_order.py (+3/-4) bin/addons/msf_doc_import/report/po_simulation_screen_xls_report.mako (+1/-1) bin/addons/msf_doc_import/wizard/wizard_po_simulation_screen.py (+97/-33) bin/addons/msf_doc_import/wizard/wizard_po_simulation_screen_view.xml (+2/-2) bin/addons/msf_profile/i18n/fr_MF.po (+79/-12) bin/addons/msf_supply_doc_export/report/report_validated_purchase_order_xml.mako (+10/-2) bin/addons/msf_tools/automated_export_job.py (+1/-4) bin/addons/msf_tools/automated_import_job.py (+1/-4) Text conflict in bin/addons/msf_profile/i18n/fr_MF.po |
To merge this branch: | bzr merge lp:~unifield-team/unifield-server/US-5343-5790-6099 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
UniField Reviewer Team | Pending | ||
Review via email: mp+368521@code.launchpad.net |
Commit message
Description of the change
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_doc_import/purchase_order.py' |
2 | --- bin/addons/msf_doc_import/purchase_order.py 2019-05-17 09:46:15 +0000 |
3 | +++ bin/addons/msf_doc_import/purchase_order.py 2019-06-07 07:31:09 +0000 |
4 | @@ -427,19 +427,18 @@ |
5 | # create tmp file |
6 | tmp_file = tempfile.NamedTemporaryFile(mode='w', delete=False) |
7 | tmp_file.write(base64.decodestring(file_res['result'])) |
8 | + tmpname = tmp_file.name |
9 | tmp_file.close() |
10 | - new_tmp_file_name = os.path.join(os.path.dirname(tmp_file.name), filename) |
11 | - os.rename(tmp_file.name, new_tmp_file_name) |
12 | |
13 | # transfer tmp file on SFTP server |
14 | try: |
15 | with sftp.cd(export_wiz.dest_path): |
16 | - sftp.put(new_tmp_file_name, preserve_mtime=True) |
17 | + sftp.put(tmpname, filename, preserve_mtime=True) |
18 | except: |
19 | raise osv.except_osv(_('Error'), _('Unable to write on SFTP server at location %s') % export_wiz.dest_path) |
20 | |
21 | # now we can remove tmp file |
22 | - os.remove(new_tmp_file_name) |
23 | + os.remove(tmpname) |
24 | else: |
25 | # write export in local file |
26 | with open(path_to_file, 'w') as fich: |
27 | |
28 | === modified file 'bin/addons/msf_doc_import/report/po_simulation_screen_xls_report.mako' |
29 | --- bin/addons/msf_doc_import/report/po_simulation_screen_xls_report.mako 2018-08-10 09:51:23 +0000 |
30 | +++ bin/addons/msf_doc_import/report/po_simulation_screen_xls_report.mako 2019-06-07 07:31:09 +0000 |
31 | @@ -323,7 +323,7 @@ |
32 | |
33 | <Row> |
34 | <Cell ss:StyleID="header" ><Data ss:Type="String">${_('Information (Line numbers refer to the line numbers of the PO confirmation import file)')}</Data></Cell> |
35 | - <Cell ss:StyleID="line" MergeAcross="3" ><Data ss:Type="String">${(o.message or '')|x}</Data></Cell> |
36 | + <Cell ss:StyleID="line" ss:MergeAcross="2" ><Data ss:Type="String">${(o.message or '')|x}</Data></Cell> |
37 | </Row> |
38 | |
39 | </Table> |
40 | |
41 | === modified file 'bin/addons/msf_doc_import/wizard/wizard_po_simulation_screen.py' |
42 | --- bin/addons/msf_doc_import/wizard/wizard_po_simulation_screen.py 2019-05-28 07:30:48 +0000 |
43 | +++ bin/addons/msf_doc_import/wizard/wizard_po_simulation_screen.py 2019-06-07 07:31:09 +0000 |
44 | @@ -734,7 +734,9 @@ |
45 | lines_to_ignored = [] # Bad formatting lines |
46 | file_format_errors = [] |
47 | values_header_errors = [] |
48 | + values_header_warnings = [] |
49 | values_line_errors = [] |
50 | + values_line_warnings = [] |
51 | message = '' |
52 | header_values = {} |
53 | |
54 | @@ -803,10 +805,10 @@ |
55 | message = '''## IMPORT STOPPED ## |
56 | |
57 | LINE 1 OF THE IMPORTED FILE: THE ORDER REFERENCE \ |
58 | - IN THE FILE IS NOT THE SAME AS THE ORDER REFERENCE OF THE SIMULATION SCREEN.\ |
59 | +IN THE FILE IS NOT THE SAME AS THE ORDER REFERENCE OF THE SIMULATION SCREEN. \ |
60 | |
61 | - YOU SHOULD IMPORT A FILE THAT HAS THE SAME ORDER REFERENCE THAN THE SIMULATION\ |
62 | - SCREEN !''' |
63 | + YOU SHOULD IMPORT A FILE THAT HAS THE SAME ORDER REFERENCE THAN THE SIMULATION \ |
64 | +SCREEN !''' |
65 | self.write(cr, uid, [wiz.id], {'message': message, 'state': 'error'}, context) |
66 | res = self.go_to_simulation(cr, uid, [wiz.id], context=context) |
67 | cr.commit() |
68 | @@ -941,7 +943,10 @@ |
69 | for manda_field in LINES_COLUMNS: |
70 | if manda_field[2] == 'mandatory' and not values.get(x, [])[manda_field[0]]: |
71 | not_ok = True |
72 | - err1 = _('The column \'%s\' mustn\'t be empty%s') % (manda_field[1], manda_field[0] == 0 and ' - Line not imported' or '') |
73 | + if manda_field[0] == 4: # Product Qty |
74 | + err1 = _('You can not have an order line with a negative or zero quantity. Updated quantity is ignored') |
75 | + else: |
76 | + err1 = _('The column \'%s\' mustn\'t be empty%s') % (manda_field[1], manda_field[0] == 0 and ' - Line not imported' or '') |
77 | err = _('Line %s of the PO: %s') % (line_number, err1) |
78 | values_line_errors.append(err) |
79 | file_line_error.append(err1) |
80 | @@ -976,9 +981,6 @@ |
81 | if not ext_ref and line_number and line_number in EXT_REF_BY_LN[wiz.id].keys(): |
82 | ext_ref = EXT_REF_BY_LN[wiz.id][line_number][0] |
83 | |
84 | - if not_ok: |
85 | - not_ok_file_lines[x] = ' - '.join(err for err in file_line_error) |
86 | - |
87 | # if not line_number and not ext_ref: |
88 | # continue |
89 | |
90 | @@ -1005,12 +1007,20 @@ |
91 | uom_id = uom_ids[0] |
92 | UOM_NAME_ID.setdefault(vals[5], uom_id) |
93 | # Qty |
94 | + qty = 0 |
95 | if vals[4]: |
96 | - qty = float(vals[4]) |
97 | + try: |
98 | + qty = float(vals[4]) |
99 | + except Exception: |
100 | + qty = 0 |
101 | |
102 | # AD on line |
103 | file_lines[x] = (line_number, product_id, uom_id, qty, ext_ref, vals[20:]) |
104 | |
105 | + # If error(s) |
106 | + if not_ok: |
107 | + not_ok_file_lines[x] = ' - '.join(err for err in file_line_error) |
108 | + |
109 | ''' |
110 | Get the best matching line : |
111 | 1/ Within lines with same line number, same product, same UoM and same qty |
112 | @@ -1117,7 +1127,7 @@ |
113 | 'percent_completed': percent_completed}, context=context) |
114 | vals = values.get(file_line[0], []) |
115 | if file_line[1] == 'match': |
116 | - err_msg = wl_obj.import_line(cr, uid, po_line, vals, cc_cache, context=context) |
117 | + err_msg, warn_msg = wl_obj.import_line(cr, uid, po_line, vals, cc_cache, context=context) |
118 | if file_line[0] in not_ok_file_lines: |
119 | wl_obj.write(cr, uid, [po_line], {'type_change': 'error', 'error_msg': not_ok_file_lines[file_line[0]]}, context=context) |
120 | elif file_line[1] == 'split': |
121 | @@ -1127,7 +1137,7 @@ |
122 | 'parent_line_id': po_line, |
123 | 'imp_dcd': False, |
124 | 'po_line_id': False}, context=context) |
125 | - err_msg = wl_obj.import_line(cr, uid, new_wl_id, vals, cc_cache, context=context) |
126 | + err_msg, warn_msg = wl_obj.import_line(cr, uid, new_wl_id, vals, cc_cache, context=context) |
127 | if file_line[0] in not_ok_file_lines: |
128 | wl_obj.write(cr, uid, [new_wl_id], {'type_change': 'error', 'error_msg': not_ok_file_lines[file_line[0]]}, context=context) |
129 | # Commit modifications |
130 | @@ -1135,8 +1145,12 @@ |
131 | |
132 | if err_msg: |
133 | for err in err_msg: |
134 | - err = 'Line %s of the PO: %s' % (file_line[2], err) |
135 | + err = _('Line %s of the PO: %s') % (file_line[2], err) |
136 | values_line_errors.append(err) |
137 | + if warn_msg: |
138 | + for warn in warn_msg: |
139 | + warn = _('Line %s of the PO: %s') % (file_line[2], warn) |
140 | + values_line_errors.append(warn) |
141 | |
142 | |
143 | # Create new lines |
144 | @@ -1153,7 +1167,7 @@ |
145 | 'in_line_number': values.get(po_line, [])[0] and int(values.get(po_line, [])[0]) or False, |
146 | 'in_ext_ref': values.get(po_line, [])[1] or False, |
147 | 'simu_id': wiz.id}, context=context) |
148 | - err_msg = wl_obj.import_line(cr, uid, new_wl_id, vals, cc_cache, context=context) |
149 | + err_msg, warn_msg = wl_obj.import_line(cr, uid, new_wl_id, vals, cc_cache, context=context) |
150 | if po_line in not_ok_file_lines: |
151 | wl_obj.write(cr, uid, [new_wl_id], {'type_change': 'error', 'error_msg': not_ok_file_lines[po_line]}, context=context) |
152 | |
153 | @@ -1161,10 +1175,17 @@ |
154 | if err_msg: |
155 | for err in err_msg: |
156 | if line_n: |
157 | - err = 'Line %s of the PO: %s' % (line_n, err) |
158 | + err = _('Line %s of the PO: %s') % (line_n, err) |
159 | else: |
160 | - err = 'Line %s of the file: %s' % (po_line, err) |
161 | + err = _('Line %s of the file: %s') % (po_line, err) |
162 | values_line_errors.append(err) |
163 | + if warn_msg: |
164 | + for warn in warn_msg: |
165 | + if line_n: |
166 | + warn = _('Line %s of the PO: %s') % (line_n, warn) |
167 | + else: |
168 | + warn = _('Line %s of the file: %s') % (po_line, warn) |
169 | + values_line_warnings.append(warn) |
170 | # Commit modifications |
171 | cr.commit() |
172 | |
173 | @@ -1176,27 +1197,41 @@ |
174 | |
175 | ''' |
176 | We generate the message which will be displayed on the simulation |
177 | - screen. This message is a merge between all errors. |
178 | + screen. This message is a merge between all errors and warnings. |
179 | ''' |
180 | # Generate the message |
181 | import_error_ok = False |
182 | + import_warning_ok = False |
183 | if len(values_header_errors): |
184 | import_error_ok = True |
185 | - message += '\n## Error on header values ##\n\n' |
186 | + message += _('\n## Error on header values ##\n\n') |
187 | for err in values_header_errors: |
188 | message += '%s\n' % err |
189 | |
190 | + if len(values_header_warnings): |
191 | + import_warning_ok = True |
192 | + message += _('\n## Warning on header values ##\n\n') |
193 | + for warn in values_header_warnings: |
194 | + message += '%s\n' % warn |
195 | + |
196 | if len(values_line_errors): |
197 | import_error_ok = True |
198 | - message += '\n## Error on line values ##\n\n' |
199 | + message += _('\n## Error on line values ##\n\n') |
200 | for err in values_line_errors: |
201 | message += '%s\n' % err |
202 | |
203 | + if len(values_line_warnings): |
204 | + import_warning_ok = True |
205 | + message += _('\n## Warning on line values ##\n\n') |
206 | + for warn in values_line_warnings: |
207 | + message += '%s\n' % warn |
208 | + |
209 | header_values.update({ |
210 | 'message': message, |
211 | 'state': 'simu_done', |
212 | 'percent_completed': 100.0, |
213 | 'import_error_ok': import_error_ok, |
214 | + 'import_warning_ok': import_warning_ok, |
215 | }) |
216 | self.write(cr, uid, [wiz.id], header_values, context=context) |
217 | |
218 | @@ -1504,6 +1539,7 @@ |
219 | 'change_ok': fields.function(_get_line_info, method=True, multi='line', |
220 | type='boolean', string='Change', store=False), |
221 | 'error_msg': fields.text(string='Error message', readonly=True), |
222 | + 'warning_msg': fields.text(string='Warning message', readonly=True), |
223 | 'parent_line_id': fields.many2one('wizard.import.po.simulation.screen.line', |
224 | string='Parent line id', |
225 | help='Use to split the good PO line', |
226 | @@ -1522,6 +1558,19 @@ |
227 | |
228 | for line in self.browse(cr, uid, ids, context=context): |
229 | if line.error_msg: |
230 | + raise osv.except_osv(_('Error'), line.error_msg) |
231 | + |
232 | + return True |
233 | + |
234 | + def get_warning_msg(self, cr, uid, ids, context=None): |
235 | + ''' |
236 | + Display the warning message |
237 | + ''' |
238 | + if isinstance(ids, (int, long)): |
239 | + ids = [ids] |
240 | + |
241 | + for line in self.browse(cr, uid, ids, context=context): |
242 | + if line.error_msg: |
243 | raise osv.except_osv(_('Warning'), line.error_msg) |
244 | |
245 | return True |
246 | @@ -1538,6 +1587,7 @@ |
247 | ids = [ids] |
248 | |
249 | errors = [] |
250 | + warnings = [] |
251 | |
252 | for line in self.browse(cr, uid, ids, context=context): |
253 | write_vals = {} |
254 | @@ -1545,10 +1595,9 @@ |
255 | # Comment |
256 | write_vals['imp_comment'] = values[15] and values[15].strip() |
257 | |
258 | - if line.po_line_id.state in ('confirmed', 'done') or ( line.po_line_id.state in ('cancel', 'cancel_r') and write_vals['imp_comment'] != '[DELETE]'): |
259 | - write_vals['type_change'] = 'error' |
260 | - errors.append(_('PO line has been confirmed or cancelled and consequently is not editable')) |
261 | - |
262 | + if line.po_line_id.state in ('confirmed', 'done') or (line.po_line_id.state in ('cancel', 'cancel_r') and write_vals['imp_comment'] != '[DELETE]'): |
263 | + write_vals['type_change'] = 'warning' |
264 | + warnings.append(_('PO line has been confirmed or cancelled and consequently is not editable')) |
265 | |
266 | # External Ref. |
267 | write_vals['imp_external_ref'] = values[1] |
268 | @@ -1556,17 +1605,17 @@ |
269 | if line.in_line_number: |
270 | pol_ids = self.pool.get('purchase.order.line').search(cr, uid, [('order_id', '=', line.simu_id.order_id.id), ('line_number', '=', line.in_line_number)], context=context) |
271 | if not pol_ids and not (write_vals['imp_comment'] and write_vals['imp_comment'] == '[DELETE]'): |
272 | - errors.append(_('Line no is not consistent with validated PO.')) |
273 | + warnings.append(_('Line no is not consistent with validated PO.')) |
274 | write_vals['in_line_number'] = False |
275 | write_vals['type_change'] = 'warning' |
276 | |
277 | - if (write_vals['imp_comment'] and write_vals['imp_comment'] == '[DELETE]'): |
278 | + if write_vals['imp_comment'] and write_vals['imp_comment'] == '[DELETE]': |
279 | if not pol_ids: |
280 | write_vals['type_change'] = 'warning' |
281 | if line.in_line_number: |
282 | - errors.append(_('The import file is inconsistent. Line no. %s is not existing or was previously deleted') % line.in_line_number) |
283 | + warnings.append(_('The import file is inconsistent. Line no. %s is not existing or was previously deleted') % line.in_line_number) |
284 | else: |
285 | - errors.append(_('The import file is inconsistent. The matching line is not existing or was previously deleted')) |
286 | + warnings.append(_('The import file is inconsistent. The matching line is not existing or was previously deleted')) |
287 | else: |
288 | if line.po_line_id.state in ('validated', 'validated_n'): |
289 | write_vals['type_change'] = 'del' |
290 | @@ -1617,12 +1666,19 @@ |
291 | write_vals['ad_info'] = ad_info |
292 | |
293 | # Qty |
294 | - err_msg = _('Incorrect float value for field \'Product Qty\'') |
295 | - try: |
296 | - qty = float(values[4]) |
297 | - write_vals['imp_qty'] = qty |
298 | - except Exception: |
299 | - errors.append(err_msg) |
300 | + if values[4]: |
301 | + try: |
302 | + qty = float(values[4]) |
303 | + write_vals['imp_qty'] = qty |
304 | + if qty <= 0: |
305 | + errors.append(_('You can not have an order line with a negative or zero quantity. Updated quantity is ignored')) |
306 | + write_vals['type_change'] = 'error' |
307 | + write_vals['imp_qty'] = 0.00 |
308 | + except Exception: |
309 | + errors.append(_('Incorrect float value for field \'Product Qty\'')) |
310 | + write_vals['type_change'] = 'error' |
311 | + write_vals['imp_qty'] = 0.00 |
312 | + else: |
313 | write_vals['type_change'] = 'error' |
314 | write_vals['imp_qty'] = 0.00 |
315 | |
316 | @@ -1776,18 +1832,26 @@ |
317 | |
318 | if line.error_msg: |
319 | write_vals['type_change'] = 'error' |
320 | + if line.warning_msg and write_vals.get('type_change') != 'error': |
321 | + write_vals['type_change'] = 'warning' |
322 | |
323 | - if write_vals.get('type_change') in ['error', 'warning']: |
324 | + if write_vals.get('type_change') in ['warning', 'error']: |
325 | err_msg = line.error_msg or '' |
326 | for err in errors: |
327 | if err_msg: |
328 | err_msg += ' - ' |
329 | err_msg += err |
330 | write_vals['error_msg'] = err_msg |
331 | + warn_msg = line.error_msg or '' |
332 | + for warn in warnings: |
333 | + if warn_msg: |
334 | + warn_msg += ' - ' |
335 | + warn_msg += warn |
336 | + write_vals['warn_msg'] = warn_msg |
337 | |
338 | self.write(cr, uid, [line.id], write_vals, context=context) |
339 | |
340 | - return errors |
341 | + return errors, warnings |
342 | |
343 | def update_po_line(self, cr, uid, ids, context=None): |
344 | ''' |
345 | |
346 | === modified file 'bin/addons/msf_doc_import/wizard/wizard_po_simulation_screen_view.xml' |
347 | --- bin/addons/msf_doc_import/wizard/wizard_po_simulation_screen_view.xml 2019-03-29 17:02:16 +0000 |
348 | +++ bin/addons/msf_doc_import/wizard/wizard_po_simulation_screen_view.xml 2019-06-07 07:31:09 +0000 |
349 | @@ -33,7 +33,7 @@ |
350 | <button name="print_simulation_report" string="Print report" icon="gtk-print" type="object" states="simu_done,import_progress,done" /> |
351 | </group> |
352 | <notebook colspan="4"> |
353 | - <page string="Error" attrs="{'invisible': [('import_error_ok', '=', False), ('state', '!=', 'error')]}"> |
354 | + <page string="Errors/Warnings" attrs="{'invisible': [('import_error_ok', '=', False), ('state', '!=', 'error')]}"> |
355 | <field name="message" nolabel="1" colspan="4" readonly="1" widget="full_text" /> |
356 | </page> |
357 | <page string="Purchase Order"> |
358 | @@ -80,7 +80,7 @@ |
359 | <page string="Details"> |
360 | <!-- LINES --> |
361 | <field name="simu_line_ids" nolabel="1" colspan="4"> |
362 | - <tree string="Lines" colors="grey: type_change == 'del'; red: type_change in ('warning', 'error'); orange: change_ok==True and type_change not in ('del', 'ignore', 'error', 'warning'); blue: type_change=='split'; green: type_change=='new'"> |
363 | + <tree string="Lines" colors="grey: type_change == 'del'; red: type_change == 'error'; orange: type_change == 'warning'; darkgreen: change_ok==True and type_change not in ('del', 'ignore', 'error', 'warning'); green:type_change=='new'; blue: type_change=='split'"> |
364 | <field name="in_product_id" /> |
365 | <field name="in_nomen" /> |
366 | <field name="in_comment" /> |
367 | |
368 | === modified file 'bin/addons/msf_profile/i18n/fr_MF.po' |
369 | --- bin/addons/msf_profile/i18n/fr_MF.po 2019-06-04 19:13:17 +0000 |
370 | +++ bin/addons/msf_profile/i18n/fr_MF.po 2019-06-07 07:31:09 +0000 |
371 | @@ -28224,11 +28224,11 @@ |
372 | msgstr "Chercher champs" |
373 | |
374 | #. module: msf_doc_import |
375 | -#: code:addons/msf_doc_import/wizard/wizard_in_simulation_screen.py:690 |
376 | -#: code:addons/msf_doc_import/wizard/wizard_in_simulation_screen.py:698 |
377 | -#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:810 |
378 | -#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:820 |
379 | -#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:827 |
380 | +#: code:addons/msf_doc_import/wizard/wizard_in_simulation_screen.py:728 |
381 | +#: code:addons/msf_doc_import/wizard/wizard_in_simulation_screen.py:736 |
382 | +#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:964 |
383 | +#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:1172 |
384 | +#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:1179 |
385 | #, python-format |
386 | msgid "Line %s of the file: %s" |
387 | msgstr "Ligne %s du fichier: %s" |
388 | @@ -28386,12 +28386,13 @@ |
389 | msgid "Determines the percentage which will be applied on field price from the product form." |
390 | msgstr "Détermine le pourcentage qui sera appliqué sur le champ du prix à partir du formulaire de produits." |
391 | |
392 | -#. modules: stock_override, kit |
393 | +#. modules: stock_override, kit, msf_doc_import |
394 | #: field:kit.mass.import,warning_import:0 |
395 | #: field:kit.mass.import,warning_message:0 |
396 | +#: field:wizard.import.po.simulation.screen.line,warning_msg:0 |
397 | #: field:change.dest.location,warn_msg:0 |
398 | msgid "Warning message" |
399 | -msgstr "Warning message" |
400 | +msgstr "Message d'avertissement" |
401 | |
402 | #. modules: product_attributes, product |
403 | #: selection:product.price.type,field:0 |
404 | @@ -41986,10 +41987,10 @@ |
405 | msgstr "Nom de modèle facultatif des objets pour lesquels cette action doit être visible" |
406 | |
407 | #. module: msf_doc_import |
408 | -#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:1381 |
409 | +#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:1600 |
410 | #, python-format |
411 | msgid "Line no is not consistent with validated PO." |
412 | -msgstr "Line no is not consistent with validated PO." |
413 | +msgstr "Le num de ligne n'est pas cohérent avec le BC validé." |
414 | |
415 | #. module: unifield_setup |
416 | #: view:field.orders.setup:0 |
417 | @@ -74683,7 +74684,6 @@ |
418 | #: code:addons/msf_doc_import/wizard/wizard_import_po_line.py:329 |
419 | #: code:addons/msf_doc_import/wizard/wizard_import_po_line.py:331 |
420 | #: view:wizard.import.in.simulation.screen:0 |
421 | -#: view:wizard.import.po.simulation.screen:0 |
422 | #: code:addons/msf_instance/account.py:57 |
423 | #: code:addons/msf_instance/account.py:60 |
424 | #: code:addons/msf_instance/add_instance.py:590 |
425 | @@ -101894,8 +101894,12 @@ |
426 | msgstr "Vous ne pouvez avoir qu'une seule Expédition en brouillon pour la même adresse, veuillez vérifier %s " |
427 | |
428 | #. module: msf_doc_import |
429 | -#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:811 |
430 | -#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:827 |
431 | +#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:947 |
432 | +#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:971 |
433 | +#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:1140 |
434 | +#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:1144 |
435 | +#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:1170 |
436 | +#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:1177 |
437 | #, python-format |
438 | msgid "Line %s of the PO: %s" |
439 | msgstr "Ligne %s du BC: %s" |
440 | @@ -106784,6 +106788,59 @@ |
441 | msgstr "Montant Estimé:" |
442 | |
443 | #. module: msf_doc_import |
444 | +#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:1199 |
445 | +#, python-format |
446 | +msgid "\n" |
447 | +"## Error on header values ##\n" |
448 | +"\n" |
449 | +"" |
450 | +msgstr "\n" |
451 | +"## Erreur sur les valeurs de l'entête ##\n" |
452 | +"\n" |
453 | +"" |
454 | + |
455 | +#. module: msf_doc_import |
456 | +#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:1205 |
457 | +#, python-format |
458 | +msgid "\n" |
459 | +"## Warning on header values ##\n" |
460 | +"\n" |
461 | +"" |
462 | +msgstr "\n" |
463 | +"## Avertissement sur les valeurs de l'entete ##\n" |
464 | +"\n" |
465 | +"" |
466 | + |
467 | +#. module: msf_doc_import |
468 | +#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:1211 |
469 | +#, python-format |
470 | +msgid "\n" |
471 | +"## Error on line values ##\n" |
472 | +"\n" |
473 | +"" |
474 | +msgstr "\n" |
475 | +"## Erreur sur les valeurs des lignes ##\n" |
476 | +"\n" |
477 | +"" |
478 | + |
479 | +#. module: msf_doc_import |
480 | +#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:1217 |
481 | +#, python-format |
482 | +msgid "\n" |
483 | +"## Warning on line values ##\n" |
484 | +"\n" |
485 | +"" |
486 | +msgstr "\n" |
487 | +"## Avertissement sur les valeurs des lignes ##\n" |
488 | +"\n" |
489 | +"" |
490 | + |
491 | +#. module: msf_doc_import |
492 | +#: view:wizard.import.po.simulation.screen:0 |
493 | +msgid "Errors/Warnings" |
494 | +msgstr "Erreurs/Avertissements" |
495 | + |
496 | +#. module: msf_doc_import |
497 | #: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:1705 |
498 | #, python-format |
499 | msgid "A PO with a Loan, Donation before expiry, Standard donation or In Kind Donation Order Type can't have an Source Document in its lines" |
500 | @@ -106795,6 +106852,7 @@ |
501 | #, python-format |
502 | msgid "You can't change the Order Type to Loan, Donation before expiry, Standard donation or In Kind Donation if a line has a Source Document" |
503 | msgstr "Vous ne pouvez pas changer le Type de Commande en Prêt, Donation avant expiration, Donation normale ou Donation en Nature si une des lignes a un Document d'Origine" |
504 | +<<<<<<< TREE |
505 | |
506 | #. module: stock |
507 | #: report:addons/stock/report/products_situation_report_xls.mako:217 |
508 | @@ -106827,3 +106885,12 @@ |
509 | msgid "Stop report" |
510 | msgstr "Arrêter le rapport" |
511 | |
512 | +======= |
513 | + |
514 | +#. module: msf_doc_import |
515 | +#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:947 |
516 | +#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:1674 |
517 | +#, python-format |
518 | +msgid "You can not have an order line with a negative or zero quantity. Updated quantity is ignored" |
519 | +msgstr "Vous ne pouvez pas avoir de ligne de commande avec une quantité négative ou nulle. La quantité mise à jour est ignorée" |
520 | +>>>>>>> MERGE-SOURCE |
521 | |
522 | === modified file 'bin/addons/msf_supply_doc_export/report/report_validated_purchase_order_xml.mako' |
523 | --- bin/addons/msf_supply_doc_export/report/report_validated_purchase_order_xml.mako 2018-08-10 10:21:43 +0000 |
524 | +++ bin/addons/msf_supply_doc_export/report/report_validated_purchase_order_xml.mako 2019-06-07 07:31:09 +0000 |
525 | @@ -12,7 +12,11 @@ |
526 | % endif |
527 | <field name="partner_ref">${o.partner_ref or ''|x}</field> |
528 | <field name="details">${o.details or ''|x}</field> |
529 | - <field name="stock_take_date">${o.stock_take_date or ''|x}</field> |
530 | + % if o.stock_take_date and o.stock_take_date not in (False, 'False'): |
531 | + <field name="stock_take_date">${o.stock_take_date|n}</field> |
532 | + % else: |
533 | + <field name="stock_take_date"></field> |
534 | + % endif |
535 | % if o.delivery_requested_date and o.delivery_requested_date not in (False, 'False'): |
536 | <field name="delivery_requested_date">${o.delivery_requested_date or ''|n}</field> |
537 | % else: |
538 | @@ -77,7 +81,11 @@ |
539 | <field name="name">${l.currency_id and l.currency_id.name or ''|x}</field> |
540 | </field> |
541 | <field name="origin">${l.origin or ''|x}</field> |
542 | - <field name="stock_take_date">${l.stock_take_date or ''|x}</field> |
543 | + % if l.stock_take_date and l.stock_take_date not in (False, 'False'): |
544 | + <field name="stock_take_date">${l.stock_take_date|n}</field> |
545 | + % else: |
546 | + <field name="stock_take_date"></field> |
547 | + % endif |
548 | % if l.date_planned and l.date_planned not in (False, 'False'): |
549 | <field name="date_planned">${l.date_planned|n}</field> |
550 | % else: |
551 | |
552 | === modified file 'bin/addons/msf_tools/automated_export_job.py' |
553 | --- bin/addons/msf_tools/automated_export_job.py 2019-03-21 11:29:45 +0000 |
554 | +++ bin/addons/msf_tools/automated_export_job.py 2019-06-07 07:31:09 +0000 |
555 | @@ -242,12 +242,9 @@ |
556 | if not rep.startswith('2'): |
557 | raise osv.except_osv(_('Error'), _('Unable to write report on FTP server')) |
558 | elif on_ftp and job_brw.export_id.ftp_protocol == 'sftp': |
559 | - new_tmp_file_name = os.path.join(os.path.dirname(temp_path), filename) |
560 | - os.rename(temp_path, new_tmp_file_name) |
561 | - temp_path = new_tmp_file_name |
562 | try: |
563 | with sftp.cd(job_brw.export_id.report_path): |
564 | - sftp.put(new_tmp_file_name, preserve_mtime=True) |
565 | + sftp.put(temp_path, filename, preserve_mtime=True) |
566 | except: |
567 | raise osv.except_osv(_('Error'), _('Unable to write report on SFTP server')) |
568 | |
569 | |
570 | === modified file 'bin/addons/msf_tools/automated_import_job.py' |
571 | --- bin/addons/msf_tools/automated_import_job.py 2019-04-15 12:49:45 +0000 |
572 | +++ bin/addons/msf_tools/automated_import_job.py 2019-06-07 07:31:09 +0000 |
573 | @@ -622,12 +622,9 @@ |
574 | if not rep.startswith('2'): |
575 | raise osv.except_osv(_('Error'), _('Unable to write report on FTP server')) |
576 | elif on_ftp and job_brw.import_id.ftp_protocol == 'sftp': |
577 | - new_tmp_file_name = os.path.join(os.path.dirname(temp_path), filename) |
578 | - os.rename(temp_path, new_tmp_file_name) |
579 | - temp_path = new_tmp_file_name |
580 | try: |
581 | with sftp.cd(job_brw.import_id.report_path): |
582 | - sftp.put(new_tmp_file_name, preserve_mtime=True) |
583 | + sftp.put(temp_path, filename, preserve_mtime=True) |
584 | except: |
585 | raise osv.except_osv(_('Error'), _('Unable to write report on SFTP server')) |
586 |