Merge lp:~unifield-team/unifield-server/us-792-v2 into lp:unifield-server
- us-792-v2
- Merge into trunk
Proposed by
jftempo
Status: | Merged |
---|---|
Merged at revision: | 3929 |
Proposed branch: | lp:~unifield-team/unifield-server/us-792-v2 |
Merge into: | lp:unifield-server |
Diff against target: |
1814 lines (+1610/-5) (has conflicts) 15 files modified
bin/addons/base/ir/ir_translation.py (+1/-0) bin/addons/msf_doc_import/__openerp__.py (+2/-1) bin/addons/msf_doc_import/doc_import_report.xml (+11/-0) bin/addons/msf_doc_import/report/__init__.py (+2/-0) bin/addons/msf_doc_import/report/import_generic_template.mako (+104/-0) bin/addons/msf_doc_import/report/import_generic_template.py (+30/-0) bin/addons/msf_doc_import/wizard/__init__.py (+3/-0) bin/addons/msf_doc_import/wizard/abstract_wizard_import.py (+457/-0) bin/addons/msf_doc_import/wizard/wizard_import_batch.py (+303/-0) bin/addons/msf_doc_import/wizard/wizard_import_batch_view.xml (+83/-0) bin/addons/msf_profile/i18n/en_MF.po (+30/-0) bin/addons/msf_profile/i18n/fr_MF.po (+562/-2) bin/addons/purchase_override/purchase.py (+1/-1) bin/addons/report_webkit/webkit_report.py (+18/-1) bin/addons/spreadsheet_xml/spreadsheet_xml.py (+3/-0) Text conflict in bin/addons/msf_profile/i18n/fr_MF.po |
To merge this branch: | bzr merge lp:~unifield-team/unifield-server/us-792-v2 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
UniField Reviewer Team | Pending | ||
Review via email: mp+303276@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/base/ir/ir_translation.py' |
2 | --- bin/addons/base/ir/ir_translation.py 2016-01-25 10:54:33 +0000 |
3 | +++ bin/addons/base/ir/ir_translation.py 2016-08-18 14:00:36 +0000 |
4 | @@ -182,6 +182,7 @@ |
5 | return u'' |
6 | if isinstance(types, basestring): |
7 | types = (types,) |
8 | + |
9 | if source: |
10 | query = """SELECT value |
11 | FROM ir_translation |
12 | |
13 | === modified file 'bin/addons/msf_doc_import/__openerp__.py' |
14 | --- bin/addons/msf_doc_import/__openerp__.py 2016-05-17 12:05:25 +0000 |
15 | +++ bin/addons/msf_doc_import/__openerp__.py 2016-08-18 14:00:36 +0000 |
16 | @@ -74,7 +74,8 @@ |
17 | 'workflow/sale_workflow.xml', |
18 | 'workflow/tender_flow_workflow.xml', |
19 | 'workflow/procurement_request_workflow.xml', |
20 | - 'doc_import_report.xml' |
21 | + 'doc_import_report.xml', |
22 | + 'wizard/wizard_import_batch_view.xml', |
23 | ], |
24 | "demo_xml": [], |
25 | "test": [ |
26 | |
27 | === modified file 'bin/addons/msf_doc_import/doc_import_report.xml' |
28 | --- bin/addons/msf_doc_import/doc_import_report.xml 2014-01-15 10:47:43 +0000 |
29 | +++ bin/addons/msf_doc_import/doc_import_report.xml 2016-08-18 14:00:36 +0000 |
30 | @@ -34,5 +34,16 @@ |
31 | auto="False" |
32 | string="PO Simulation screen" /> |
33 | |
34 | + <report |
35 | + id="report_wizard_import_generic_template" |
36 | + model="abstract.wizard.import" |
37 | + name="wizard.import.generic.template" |
38 | + file="msf_doc_import/report/import_generic_template.mako" |
39 | + report_type="webkit" |
40 | + header="False" |
41 | + menu="False" |
42 | + auto="False" |
43 | + string="Import Generic template" /> |
44 | + |
45 | </data> |
46 | </openerp> |
47 | |
48 | === modified file 'bin/addons/msf_doc_import/report/__init__.py' |
49 | --- bin/addons/msf_doc_import/report/__init__.py 2014-01-15 10:47:43 +0000 |
50 | +++ bin/addons/msf_doc_import/report/__init__.py 2016-08-18 14:00:36 +0000 |
51 | @@ -22,3 +22,5 @@ |
52 | import in_simulation_screen_report_xls |
53 | import po_simulation_screen_report |
54 | import po_simulation_screen_report_xls |
55 | + |
56 | +import import_generic_template |
57 | \ No newline at end of file |
58 | |
59 | === added file 'bin/addons/msf_doc_import/report/import_generic_template.mako' |
60 | --- bin/addons/msf_doc_import/report/import_generic_template.mako 1970-01-01 00:00:00 +0000 |
61 | +++ bin/addons/msf_doc_import/report/import_generic_template.mako 2016-08-18 14:00:36 +0000 |
62 | @@ -0,0 +1,104 @@ |
63 | +<?xml version="1.0"?> |
64 | +<?mso-application progid="Excel.Sheet"?> |
65 | +<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" |
66 | + xmlns:o="urn:schemas-microsoft-com:office:office" |
67 | + xmlns:x="urn:schemas-microsoft-com:office:excel" |
68 | + xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" |
69 | + xmlns:html="http://www.w3.org/TR/REC-html40"> |
70 | + |
71 | + <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office"> |
72 | + <Author>MSFUser</Author> |
73 | + <LastAuthor>MSFUser</LastAuthor> |
74 | + <Created>2012-06-18T15:46:09Z</Created> |
75 | + <Company>Medecins Sans Frontieres</Company> |
76 | + <Version>11.9999</Version> |
77 | + </DocumentProperties> |
78 | + |
79 | + <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel"> |
80 | + <WindowHeight>13170</WindowHeight> |
81 | + <WindowWidth>19020</WindowWidth> |
82 | + <WindowTopX>120</WindowTopX> |
83 | + <WindowTopY>60</WindowTopY> |
84 | + <ProtectStructure>False</ProtectStructure> |
85 | + <ProtectWindows>False</ProtectWindows> |
86 | + </ExcelWorkbook> |
87 | + |
88 | + <Styles> |
89 | + <Style ss:ID="header"> |
90 | + <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/> |
91 | + <Interior ss:Color="#ffcc99" ss:Pattern="Solid"/> |
92 | + <Font ss:Bold="1" ss:Color="#000000" /> |
93 | + <Borders> |
94 | + <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> |
95 | + <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> |
96 | + <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> |
97 | + <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> |
98 | + </Borders> |
99 | + <Protection /> |
100 | + </Style> |
101 | + <Style ss:ID="String"> |
102 | + <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/> |
103 | + <Borders> |
104 | + <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> |
105 | + <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> |
106 | + <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> |
107 | + <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> |
108 | + </Borders> |
109 | + <Protection ss:Protected="0" /> |
110 | + </Style> |
111 | + <Style ss:ID="Number"> |
112 | + <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/> |
113 | + <Borders> |
114 | + <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> |
115 | + <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> |
116 | + <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> |
117 | + <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> |
118 | + </Borders> |
119 | + <NumberFormat ss:Format="Fixed" /> |
120 | + <Protection ss:Protected="0" /> |
121 | + </Style> |
122 | + <Style ss:ID="DateTime"> |
123 | + <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/> |
124 | + <Borders> |
125 | + <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> |
126 | + <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/> |
127 | + <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/> |
128 | + <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/> |
129 | + </Borders> |
130 | + <NumberFormat ss:Format="Short Date" /> |
131 | + <Protection ss:Protected="0" /> |
132 | + </Style> |
133 | + </Styles> |
134 | + |
135 | + <ss:Worksheet ss:Name="${data.get('model_name', _('Sheet 1'))|x}" ss:Protected="0"> |
136 | + |
137 | + <Table x:FullColumns="1" x:FullRows="1"> |
138 | + |
139 | + % for col in data.get('header_columns', []): |
140 | + <Column ss:AutoFitWidth="1" ss:Width="${col[2] or 70|x}" ss:StyleID="${col[1]|x}" /> |
141 | + % endfor |
142 | + |
143 | + <Row> |
144 | + % for col in data.get('header_columns', []): |
145 | + <Cell ss:StyleID="header"> |
146 | + <Data ss:Type="String">${col[0]}</Data> |
147 | + </Cell> |
148 | + % endfor |
149 | + </Row> |
150 | + |
151 | + <Row> |
152 | + % for col in data.get('header_columns', []): |
153 | + <Cell ss:StyleID="${col[1]|x}" /> |
154 | + % endfor |
155 | + </Row> |
156 | + </Table> |
157 | + |
158 | + <x:WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel"> |
159 | + <ProtectScenarios>False</ProtectScenarios> |
160 | + <EnableSelection>UnlockedCells</EnableSelection> |
161 | + <AllowInsertRows /> |
162 | + </x:WorksheetOptions> |
163 | + |
164 | + </ss:Worksheet> |
165 | + |
166 | +</Workbook> |
167 | |
168 | === added file 'bin/addons/msf_doc_import/report/import_generic_template.py' |
169 | --- bin/addons/msf_doc_import/report/import_generic_template.py 1970-01-01 00:00:00 +0000 |
170 | +++ bin/addons/msf_doc_import/report/import_generic_template.py 2016-08-18 14:00:36 +0000 |
171 | @@ -0,0 +1,30 @@ |
172 | +# -*- coding: utf-8 -*- |
173 | +############################################################################## |
174 | +# |
175 | +# OpenERP, Open Source Management Solution |
176 | +# Copyright (C) 2011 MSF, TeMPO Consulting |
177 | +# |
178 | +# This program is free software: you can redistribute it and/or modify |
179 | +# it under the terms of the GNU Affero General Public License as |
180 | +# published by the Free Software Foundation, either version 3 of the |
181 | +# License, or (at your option) any later version. |
182 | +# |
183 | +# This program is distributed in the hope that it will be useful, |
184 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
185 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
186 | +# GNU Affero General Public License for more details. |
187 | +# |
188 | +# You should have received a copy of the GNU Affero General Public License |
189 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
190 | +# |
191 | +############################################################################## |
192 | + |
193 | +from report_webkit.webkit_report import XlsWebKitParser |
194 | + |
195 | +XlsWebKitParser( |
196 | + 'report.wizard.import.generic.template', |
197 | + 'abstract.wizard.import', |
198 | + 'addons/msf_doc_import/report/import_generic_template.mako', |
199 | +) |
200 | + |
201 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
202 | |
203 | === modified file 'bin/addons/msf_doc_import/wizard/__init__.py' |
204 | --- bin/addons/msf_doc_import/wizard/__init__.py 2016-05-17 12:05:25 +0000 |
205 | +++ bin/addons/msf_doc_import/wizard/__init__.py 2016-08-18 14:00:36 +0000 |
206 | @@ -137,3 +137,6 @@ |
207 | import wizard_import_supplier_catalogue |
208 | import wizard_po_simulation_screen |
209 | import wizard_in_simulation_screen |
210 | + |
211 | +import abstract_wizard_import |
212 | +import wizard_import_batch |
213 | |
214 | === added file 'bin/addons/msf_doc_import/wizard/abstract_wizard_import.py' |
215 | --- bin/addons/msf_doc_import/wizard/abstract_wizard_import.py 1970-01-01 00:00:00 +0000 |
216 | +++ bin/addons/msf_doc_import/wizard/abstract_wizard_import.py 2016-08-18 14:00:36 +0000 |
217 | @@ -0,0 +1,457 @@ |
218 | +# -*- coding: utf-8 -*- |
219 | +############################################################################## |
220 | +# |
221 | +# OpenERP, Open Source Management Solution |
222 | +# Copyright (C) 2011 MSF, TeMPO Consulting. |
223 | +# |
224 | +# This program is free software: you can redistribute it and/or modify |
225 | +# it under the terms of the GNU Affero General Public License as |
226 | +# published by the Free Software Foundation, either version 3 of the |
227 | +# License, or (at your option) any later version. |
228 | +# |
229 | +# This program is distributed in the hope that it will be useful, |
230 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
231 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
232 | +# GNU Affero General Public License for more details. |
233 | +# |
234 | +# You should have received a copy of the GNU Affero General Public License |
235 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
236 | +# |
237 | +############################################################################## |
238 | + |
239 | +import base64 |
240 | +import string |
241 | + |
242 | +from mx import DateTime |
243 | + |
244 | +from osv import osv |
245 | +from osv import fields |
246 | +from tools.translate import _ |
247 | + |
248 | +from spreadsheet_xml.spreadsheet_xml import SpreadsheetXML |
249 | + |
250 | + |
251 | +class UnifieldImportException(Exception): |
252 | + pass |
253 | + |
254 | + |
255 | +class ImportHeader(object): |
256 | + """ |
257 | + Class used to export Header template. |
258 | + """ |
259 | + type_ok = ['String', 'Number', 'DateTime'] |
260 | + |
261 | + def __new__(cls, name, ftype='String', size=70, tech_name=None, required=False): |
262 | + """ |
263 | + Initialize a header column for template export. |
264 | + :param name: Name of the field |
265 | + :param ftype: Type of the field |
266 | + :param size: Displayed size on Excel file |
267 | + :param tech_name: Technical name of the field to compute |
268 | + :param required: Is the field should be set or not ? |
269 | + """ |
270 | + if ftype not in ImportHeader.type_ok: |
271 | + err_msg = _('''Defined type of header \'%s\' is not in the list of possible type: %s - Please contact |
272 | +your support team and give us this message. |
273 | + ''') % ( |
274 | + name, ', '.join(t for t in ImportHeader.type_ok) |
275 | + ) |
276 | + raise osv.except_osv( |
277 | + _('Error'), |
278 | + err_msg, |
279 | + ) |
280 | + |
281 | + return _(name), ftype, size, tech_name, required |
282 | + |
283 | + @classmethod |
284 | + def get_date_from_str(cls, date_value): |
285 | + """ |
286 | + Try to construct a date from a string and return a formatted string date |
287 | + :param date_value: String value to compute |
288 | + :return: A datetime instance or False |
289 | + """ |
290 | + date_format = [ |
291 | + '%Y-%m-%d', |
292 | + '%Y-%m/%d', |
293 | + '%d-%m-%Y', |
294 | + '%d/%m/%Y', |
295 | + '%d-%b-%Y', |
296 | + '%d/%b-%Y', |
297 | + ] |
298 | + |
299 | + d = False |
300 | + for dformat in date_format: |
301 | + try: |
302 | + d = str(DateTime.strptime(date_value, dformat)) |
303 | + except ValueError: |
304 | + continue |
305 | + |
306 | + return d |
307 | + |
308 | + @classmethod |
309 | + def check_value(cls, header, value, vtype, context=None): |
310 | + """ |
311 | + Check the value of the column according to header |
312 | + :param header: Header used to check if value is required or not |
313 | + :param value: Value to check |
314 | + :param vtype: Type of the data given |
315 | + :return: A tuple with the result of the check, the formatted value and the error message if any |
316 | + """ |
317 | + if not value and header[4]: |
318 | + return (-1, value, _('The column \'%s\' is required') % header[0]) |
319 | + elif not value: |
320 | + return (0, value, None) |
321 | + elif header[1] == 'String': |
322 | + if vtype == 'str': |
323 | + return (0, value, None) |
324 | + else: |
325 | + try: |
326 | + return (0, str(value), None) |
327 | + except Exception as e: |
328 | + return (-1, value, e) |
329 | + elif header[1] == 'DateTime': |
330 | + if vtype == 'datetime': |
331 | + return (0, value, None) |
332 | + elif vtype == 'str': |
333 | + d = ImportHeader.get_date_from_str(value) |
334 | + if d: |
335 | + return (0, d, None) |
336 | + else: |
337 | + return (-1, value, _('The date format was not correct')) |
338 | + else: |
339 | + return (-1, value, _('The date format was not correct')) |
340 | + elif header[1] == 'Integer': |
341 | + if vtype == 'number': |
342 | + return (0, value, None) |
343 | + else: |
344 | + try: |
345 | + return (0, int(value), None) |
346 | + except Exception as e: |
347 | + return (-1, value, e) |
348 | + elif header[1] == 'Float': |
349 | + if vtype == 'number': |
350 | + return (0, value, None) |
351 | + else: |
352 | + try: |
353 | + return (0, float(value), None) |
354 | + except Exception as e: |
355 | + return (-1, value, e) |
356 | + |
357 | + return (0, value, None) |
358 | + |
359 | + |
360 | +class abstract_wizard_import(osv.osv_memory): |
361 | + _name = 'abstract.wizard.import' |
362 | + _description = 'Generic import wizard' |
363 | + _auto = False |
364 | + _order = 'start_date' |
365 | + |
366 | + def _get_progression(self, cr, uid, ids, field_name, args, context=None): |
367 | + """ |
368 | + Return the percentage of progression |
369 | + """ |
370 | + if context is None: |
371 | + context = {} |
372 | + |
373 | + if isinstance(ids, (int, long)): |
374 | + ids = [ids] |
375 | + |
376 | + res = {} |
377 | + |
378 | + for wiz in self.browse(cr, uid, ids, context=context): |
379 | + if wiz.state == 'done': |
380 | + res[wiz.id] = 100.00 |
381 | + elif wiz.state == 'draft': |
382 | + res[wiz.id] = 0.00 |
383 | + else: |
384 | + res[wiz.id] = float(wiz.total_lines_imported) / float(wiz.total_lines_to_import) * 100 |
385 | + |
386 | + return res |
387 | + |
388 | + _columns = { |
389 | + 'model_name': fields.char( |
390 | + size=64, |
391 | + string='Model to import', |
392 | + required=True, |
393 | + readonly=True, |
394 | + ), |
395 | + 'parent_model_name': fields.char( |
396 | + size=64, |
397 | + string='Model of the parent', |
398 | + readonly=True, |
399 | + help="To go back to the parent when the window is closed", |
400 | + ), |
401 | + 'parent_record_id': fields.integer( |
402 | + string='ID of the parent record', |
403 | + readonly=True, |
404 | + ), |
405 | + 'template_file': fields.binary( |
406 | + string='Template file', |
407 | + readonly=True, |
408 | + ), |
409 | + 'template_filename': fields.char( |
410 | + size=64, |
411 | + string='Template filename', |
412 | + readonly=True, |
413 | + ), |
414 | + 'import_file': fields.binary( |
415 | + string='File to import', |
416 | + ), |
417 | + 'info_message': fields.text( |
418 | + string='Information', |
419 | + readonly=True, |
420 | + ), |
421 | + 'error_message': fields.text( |
422 | + string='Errors', |
423 | + readonly=True, |
424 | + ), |
425 | + 'show_error': fields.boolean( |
426 | + string='Show error message ?', |
427 | + readonly=True, |
428 | + ), |
429 | + 'warning_message': fields.text( |
430 | + string='Warnings', |
431 | + readonly=True, |
432 | + ), |
433 | + 'show_warning': fields.boolean( |
434 | + string='Show warning message ?', |
435 | + readonly=True, |
436 | + ), |
437 | + 'total_lines_to_import': fields.integer( |
438 | + string='# of lines to import', |
439 | + readonly=True, |
440 | + ), |
441 | + 'total_lines_imported': fields.integer( |
442 | + string='# of lines imported', |
443 | + readonly=True, |
444 | + ), |
445 | + 'progression': fields.function( |
446 | + _get_progression, |
447 | + method=True, |
448 | + type='float', |
449 | + digits=(16, 2), |
450 | + string='Progression', |
451 | + store=False, |
452 | + readonly=False, |
453 | + ), |
454 | + 'state': fields.selection( |
455 | + selection=[ |
456 | + ('draft', 'Not started'), |
457 | + ('progress', 'In progress'), |
458 | + ('done', 'Done'), |
459 | + ], |
460 | + string='State', |
461 | + readonly=True, |
462 | + ), |
463 | + 'start_date': fields.datetime( |
464 | + string='Start date', |
465 | + readonly=True, |
466 | + ), |
467 | + 'end_date': fields.datetime( |
468 | + string='End date', |
469 | + readonly=True, |
470 | + ), |
471 | + } |
472 | + |
473 | + def default_get(self, cr, uid, fields, context=None): |
474 | + """ |
475 | + Return default values for some fields |
476 | + :param cr: Cursor to the database |
477 | + :param uid: ID of the res.users that calls this method |
478 | + :param fields: Technical name of the fields on which system must put a default value |
479 | + :param context: Context of the call |
480 | + :return: A dictionary with field names as keys |
481 | + """ |
482 | + res = super(abstract_wizard_import, self).default_get(cr, uid, fields, context=context) |
483 | + res.update({ |
484 | + 'total_lines_to_import': 0, |
485 | + 'total_lines_imported': 0, |
486 | + 'state': 'draft', |
487 | + 'info_message': _('Select a file to import and click on \'Run import\' button.'), |
488 | + }) |
489 | + return res |
490 | + |
491 | + def update(self, cr, uid, ids, context=None): |
492 | + return { |
493 | + 'type': 'ir.actions.act_window', |
494 | + 'res_model': self._name, |
495 | + 'res_id': ids[0], |
496 | + 'view_type': 'form', |
497 | + 'view_mode': 'form,tree', |
498 | + 'target': 'keep_same', # Just to keep reload of the page |
499 | + 'context': context, |
500 | + } |
501 | + |
502 | + def exists(self, cr, uid, ids, context=None): |
503 | + if self._name != 'abstract.wizard.import': |
504 | + return super(abstract_wizard_import, self).exists(cr, uid, ids, context=context) |
505 | + return False |
506 | + |
507 | + def _get_template_file_data(self, context=None): |
508 | + """ |
509 | + Return values for the import template file report generation |
510 | + """ |
511 | + return { |
512 | + 'model': self._name, |
513 | + 'model_name': self._description, |
514 | + 'header_columns': [], |
515 | + } |
516 | + |
517 | + def copy(self, cr, uid, old_id, defaults=None, context=None): |
518 | + """ |
519 | + Don't allow copy method |
520 | + """ |
521 | + raise osv.except_osv( |
522 | + _('Not allowed'), |
523 | + _('You cannot duplicate a %s document!') % self._description, |
524 | + ) |
525 | + |
526 | + def download_template_file(self, cr, uid, ids, context=None): |
527 | + """ |
528 | + Download the template file |
529 | + """ |
530 | + return { |
531 | + 'type': 'ir.actions.report.xml', |
532 | + 'report_name': 'wizard.import.generic.template', |
533 | + 'datas': self._get_template_file_data(context=context), |
534 | + } |
535 | + |
536 | + def run_import(self, cr, uid, ids, context=None): |
537 | + raise osv.except_osv( |
538 | + _('Error'), |
539 | + _('No \'run_import\' action is defined for the object \'%s\'!') % self._name, |
540 | + ) |
541 | + |
542 | + def check_utf8_encoding(self, import_file, base='base64'): |
543 | + """ |
544 | + Check if the given file is an good UTF-8 file |
545 | + """ |
546 | + if base == 'base64': |
547 | + import_file = base64.decodestring(import_file) |
548 | + |
549 | + try: |
550 | + import_file.decode('utf-8') |
551 | + return True |
552 | + except UnicodeError: |
553 | + return False |
554 | + |
555 | + def read_file(self, wizard_brw, context=None): |
556 | + """ |
557 | + Open the Spreadsheet XML file |
558 | + :param wizard_brw: browse_record of an import wizard |
559 | + :return: An iterator on the rows of the file |
560 | + """ |
561 | + if not wizard_brw.import_file: |
562 | + raise osv.except_osv( |
563 | + _('Error'), |
564 | + _('No file to import. Please select a file or download the template file and fill it.'), |
565 | + ) |
566 | + |
567 | + if wizard_brw.state != 'draft': |
568 | + raise osv.except_osv( |
569 | + _('Error'), |
570 | + _('Import can be run only on draft wizard.'), |
571 | + ) |
572 | + |
573 | + if not self.check_utf8_encoding(wizard_brw.import_file): |
574 | + raise osv.except_osv( |
575 | + _('Error'), |
576 | + _('The given file seems not to be encoding in UTF-8. Please check the encoding of the file and re-try.') |
577 | + ) |
578 | + |
579 | + file_obj = SpreadsheetXML(xmlstring=base64.decodestring(wizard_brw.import_file)) |
580 | + |
581 | + file_obj.getNbRows() |
582 | + # iterator on rows |
583 | + return file_obj.getRows(), file_obj.getNbRows() |
584 | + |
585 | + def check_headers(self, headers_row, headers_title, context=None): |
586 | + """ |
587 | + Check if the header in the first row of the file are the same as the expected headers |
588 | + :param headers_row: Row that contains the header on the Excel file |
589 | + :param headers_title: List of expected headers |
590 | + :return: True or raise an error |
591 | + """ |
592 | + if len(headers_row) != len(headers_title): |
593 | + raise osv.except_osv( |
594 | + _('Error'), |
595 | + _('The number of columns in the Excel file (%s) is different than the expected number '\ |
596 | + 'of columns (%s).\nColumns should be in this order: %s') % ( |
597 | + len(headers_row), |
598 | + len(headers_title), |
599 | + '\n * '.join(h[0] for h in headers_title), |
600 | + ), |
601 | + ) |
602 | + |
603 | + errors = [] |
604 | + headers_title_up = [_(x[0]).upper() for x in headers_title] |
605 | + headers_row_up = [_(headers_row[i].data).upper() for i in range(0, len(headers_row))] |
606 | + for h_index, h in enumerate(headers_title_up): |
607 | + if h not in headers_row_up: |
608 | + errors.append( |
609 | + _('The column \'%s\' is not present in the file.') % _(headers_title[h_index][0]) |
610 | + ) |
611 | + elif headers_row_up[h_index] != h: |
612 | + errors.append( |
613 | + _('The column \'%s\' of the Excel file should be \'%s\', not \'%s\'.') % ( |
614 | + string.uppercase[h_index], |
615 | + _(headers_title[h_index][0]), |
616 | + _(headers_row[h_index]), |
617 | + ) |
618 | + ) |
619 | + if errors: |
620 | + raise osv.except_osv( |
621 | + _('Error'), |
622 | + '\n'.join(err for err in errors), |
623 | + ) |
624 | + |
625 | + return True |
626 | + |
627 | + def check_error_and_format_row(self, wizard_id, row, headers, context=None): |
628 | + """ |
629 | + Check if the required cells are set and if this the data are well formatted |
630 | + :param wizard_id: ID of the import wizard |
631 | + :param row: Row of the Excel file |
632 | + :param headers: Required headers |
633 | + :return: True |
634 | + """ |
635 | + try: |
636 | + line_content = row.cells |
637 | + except ValueError as e: |
638 | + return (-1, _('Line is empty')) |
639 | + |
640 | + if len(line_content) > len(headers): |
641 | + return (-1, _('Number of columns (%s) in the line are larger than expected (%s).') % ( |
642 | + len(line_content), len(headers) |
643 | + )) |
644 | + |
645 | + data = [] |
646 | + errors = [] |
647 | + for col_index, col_value in enumerate(line_content): |
648 | + # Check data values according to expected type |
649 | + chk_res = ImportHeader.check_value(headers[col_index], col_value.data, col_value.type, context=context) |
650 | + data.append(chk_res[1]) |
651 | + if chk_res[0] < 0: |
652 | + errors.append(chk_res[2]) |
653 | + |
654 | + return (len(errors) and -1 or 0, errors, data) |
655 | + |
656 | + def get_product_by_default_code(self, cr, uid, default_code, context=None): |
657 | + """ |
658 | + Return the ID of the product.product related to the default_code parameter |
659 | + :param cr: Cursor to the database |
660 | + :param uid: ID of the res.users that calls this method |
661 | + :param default_code: Code of the product to find |
662 | + :param context: Context of the call |
663 | + :return: The ID of the product.product |
664 | + """ |
665 | + p_obj = self.pool.get('product.product') |
666 | + p_ids = p_obj.search(cr, uid, [ |
667 | + ('default_code', '=', default_code), |
668 | + ], limit=1, order='NO_ORDER', context=context) |
669 | + if not p_ids: |
670 | + raise UnifieldImportException(_('No product found for the code \'%s\'') % default_code) |
671 | + |
672 | + return p_ids[0] |
673 | + |
674 | +abstract_wizard_import() |
675 | \ No newline at end of file |
676 | |
677 | === added file 'bin/addons/msf_doc_import/wizard/wizard_import_batch.py' |
678 | --- bin/addons/msf_doc_import/wizard/wizard_import_batch.py 1970-01-01 00:00:00 +0000 |
679 | +++ bin/addons/msf_doc_import/wizard/wizard_import_batch.py 2016-08-18 14:00:36 +0000 |
680 | @@ -0,0 +1,303 @@ |
681 | +# -*- coding: utf-8 -*- |
682 | +############################################################################## |
683 | +# |
684 | +# OpenERP, Open Source Management Solution |
685 | +# Copyright (C) 2011 MSF, TeMPO Consulting. |
686 | +# |
687 | +# This 7ogram is free software: you can redistribute it and/or modify |
688 | +# it under the terms of the GNU Affero General Public License as |
689 | +# published by the Free Software Foundation, either version 3 of the |
690 | +# License, or (at your option) any later version. |
691 | +# |
692 | +# This program is distributed in the hope that it will be useful, |
693 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
694 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
695 | +# GNU Affero General Public License for more details. |
696 | +# |
697 | +# You should have received a copy of the GNU Affero General Public License |
698 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
699 | +# |
700 | +############################################################################## |
701 | + |
702 | +import threading |
703 | +import time |
704 | + |
705 | +import pooler |
706 | + |
707 | +from osv import osv |
708 | +from tools.translate import _ |
709 | + |
710 | +from msf_doc_import.wizard.abstract_wizard_import import ImportHeader |
711 | +from msf_doc_import.wizard.abstract_wizard_import import UnifieldImportException |
712 | + |
713 | + |
714 | +def get_import_batch_headers(context=None): |
715 | + return [ |
716 | + ImportHeader(name=_('get_import_batch_headers_name'), ftype='String', size=80, tech_name='name', required=False), |
717 | + ImportHeader(name=_('get_import_batch_headers_type'), ftype='String', size=80, tech_name='type', required=True), |
718 | + ImportHeader(name=_('get_import_batch_headers_life_date'), ftype='DateTime', size=60, tech_name='life_date', required=True), |
719 | + ImportHeader(name=_('get_import_batch_headers_product_code'), ftype='String', size=80, tech_name='product_id', required=True), |
720 | + ImportHeader(name=_('get_import_batch_headers_product_desc'), ftype='String', size=120, required=True), |
721 | + ] |
722 | + |
723 | +# Get header list and information |
724 | +header_index_by_name = {} |
725 | +for i, h in enumerate(get_import_batch_headers()): |
726 | + header_index_by_name[h[3]] = i |
727 | + |
728 | + |
729 | +def get_cell(line_data, field): |
730 | + cell_data = line_data[header_index_by_name[field]] |
731 | + if cell_data: |
732 | + return cell_data |
733 | + return None |
734 | + |
735 | + |
736 | +class wizard_import_batch(osv.osv_memory): |
737 | + _name = 'wizard.import.batch' |
738 | + _description = 'Import batch numbers' |
739 | + _inherit = 'abstract.wizard.import' |
740 | + _auto = True |
741 | + |
742 | + _defaults = { |
743 | + 'model_name': 'stock.production.lot', |
744 | + 'template_filename': 'Import_batch_number_tpl.csv', |
745 | + } |
746 | + |
747 | + def _get_template_file_data(self, context=None): |
748 | + """ |
749 | + Return values for the import template file report generation |
750 | + """ |
751 | + return { |
752 | + 'model': 'stock.production.lot', |
753 | + 'model_name': _('Batch numbers'), |
754 | + 'header_columns': get_import_batch_headers(context=context), |
755 | + } |
756 | + |
757 | + def run_import(self, cr, uid, ids, context=None): |
758 | + """ |
759 | + Make checks on file to import and run the import in background. |
760 | + :param cr: Cursor to the database |
761 | + :param uid: ID of the res.users that calls this method |
762 | + :param ids: List of ID of wizard.import.patch on which import should be made |
763 | + :param context: Context of the call |
764 | + :return: True |
765 | + """ |
766 | + if context is None: |
767 | + context = {} |
768 | + |
769 | + if isinstance(ids, (int, long)): |
770 | + ids = [ids] |
771 | + |
772 | + expected_headers = get_import_batch_headers(context=context) |
773 | + |
774 | + for wiz in self.browse(cr, uid, ids, context=context): |
775 | + rows, nb_rows = self.read_file(wiz, context=context) |
776 | + |
777 | + head = rows.next() |
778 | + self.check_headers(head, expected_headers, context=context) |
779 | + |
780 | + self.write(cr, uid, [wiz.id], { |
781 | + 'total_lines_to_import': nb_rows, |
782 | + 'state': 'progress', |
783 | + 'start_date': time.strftime('%Y-%m-%d %H:%M:%S'), |
784 | + 'info_message': _('Import in progress, please leave this window open and press the button \'Update\' ' |
785 | + 'to show the progression of the import. Otherwise, you can continue tu use Unifield'), |
786 | + }, context=context) |
787 | + wiz.total_lines_to_import = nb_rows |
788 | + |
789 | + thread = threading.Thread( |
790 | + target=self.bg_import, |
791 | + args=(cr.dbname, uid, wiz, expected_headers, rows, context), |
792 | + ) |
793 | + thread.start() |
794 | + |
795 | + return True |
796 | + |
797 | + def bg_import(self, dbname, uid, import_brw, headers, rows, context=None): |
798 | + """ |
799 | + Run the import of lines in background |
800 | + :param dbname: Name of the database |
801 | + :param uid: ID of the res.users that calls this method |
802 | + :param import_brw: browse_record of a wizard.import.batch |
803 | + :param headers: List of expected headers |
804 | + :param rows: Iterator on file rows |
805 | + :param context: Context of the call |
806 | + :return: True |
807 | + """ |
808 | + prodlot_obj = self.pool.get('stock.production.lot') |
809 | + product_obj = self.pool.get('product.product') |
810 | + sequence_obj = self.pool.get('ir.sequence') |
811 | + |
812 | + if context is None: |
813 | + context = {} |
814 | + |
815 | + cr = pooler.get_db(dbname).cursor() |
816 | + nb_imported_lines = 0 |
817 | + |
818 | + # Manage errors |
819 | + import_errors = {} |
820 | + |
821 | + def save_error(errors): |
822 | + if not isinstance(errors, list): |
823 | + errors = [errors] |
824 | + import_errors.setdefault(row_index+2, []) |
825 | + import_errors[row_index+2].extend(errors) |
826 | + |
827 | + # Manage warnings |
828 | + import_warnings = {} |
829 | + |
830 | + def save_warnings(warnings): |
831 | + if not isinstance(warnings, list): |
832 | + warnings = [warnings] |
833 | + import_warnings.setdefault(row_index+2, []) |
834 | + import_warnings[row_index+2].extend(warnings) |
835 | + |
836 | + start_time = time.time() |
837 | + nb_lines_ok = 0 |
838 | + for row_index, row in enumerate(rows): |
839 | + res, errors, line_data = self.check_error_and_format_row(import_brw.id, row, headers, context=context) |
840 | + if res < 0: |
841 | + save_error(errors) |
842 | + continue |
843 | + |
844 | + # Product |
845 | + product_id = None |
846 | + try: |
847 | + product_id = self.get_product_by_default_code(cr, uid, get_cell(line_data, 'product_id'), |
848 | + context=context) |
849 | + except UnifieldImportException as e: |
850 | + save_error(e) |
851 | + |
852 | + # Batch number type |
853 | + batch_type = get_cell(line_data, 'type') |
854 | + if batch_type.upper() not in (_('Standard').upper(), _('Internal').upper()): |
855 | + save_error( |
856 | + _('The Type of the batch number should be \'Standard\' or \'Internal\''), |
857 | + ) |
858 | + batch_type = None |
859 | + elif batch_type.upper() == _('Standard').upper(): |
860 | + batch_type = 'standard' |
861 | + elif batch_type.upper() == _('Internal').upper(): |
862 | + batch_type = 'internal' |
863 | + |
864 | + # Go to next line if all base data are not set |
865 | + if not (product_id and batch_type): |
866 | + continue |
867 | + |
868 | + # Make consistency checks |
869 | + name = get_cell(line_data, 'name') |
870 | + life_date = get_cell(line_data, 'life_date') |
871 | + product_brw = product_obj.read(cr, uid, product_id, ['batch_management', 'perishable'], context=context) |
872 | + |
873 | + if not product_brw['batch_management'] and not product_brw['perishable']: |
874 | + save_error( |
875 | + _('You cannot create a batch number for a product that is not \'Perishable\'' |
876 | + ' nor \'Batch mandatory\'') |
877 | + ) |
878 | + continue |
879 | + elif product_brw['batch_management'] and batch_type == 'internal': |
880 | + save_error( |
881 | + _('You cannot create an \'Internal\' batch number for a \'Batch mandatory\' product') |
882 | + ) |
883 | + continue |
884 | + elif not product_brw['batch_management'] and product_brw['perishable'] and batch_type == 'standard': |
885 | + save_error( |
886 | + _('You cannot create a \'Standard\' batch number for a non \'Batch mandatory\' product') |
887 | + ) |
888 | + continue |
889 | + elif product_brw['batch_management'] and not name: |
890 | + save_error( |
891 | + _('For a \'Standard\' batch number, you have to define value in the \'Name\' column') |
892 | + ) |
893 | + continue |
894 | + |
895 | + # Check no duplicate |
896 | + prodlot_domain = [ |
897 | + ('product_id', '=', product_id), |
898 | + ('type', '=', batch_type), |
899 | + ('life_date', '=', life_date), |
900 | + ] |
901 | + if product_brw['batch_management']: |
902 | + prodlot_domain.append(('name', '=', name)) |
903 | + |
904 | + prodlot_id = prodlot_obj.search(cr, uid, prodlot_domain, limit=1, order='NO_ORDER', context=context) |
905 | + if prodlot_id: |
906 | + save_error( |
907 | + _('A batch number with the same parameters already exists in the system') |
908 | + ) |
909 | + continue |
910 | + |
911 | + if batch_type == 'internal': |
912 | + if name: |
913 | + save_warnings( |
914 | + _('Name of the batch will be ignored because the batch is \'Internal\' so ' |
915 | + 'name is created by the system') |
916 | + ) |
917 | + name = sequence_obj.get(cr, uid, 'stock.lot.serial') |
918 | + |
919 | + create_vals = { |
920 | + 'name': name, |
921 | + 'product_id': product_id, |
922 | + 'life_date': life_date, |
923 | + 'type': batch_type, |
924 | + } |
925 | + try: |
926 | + prodlot_obj.create(cr, uid, create_vals, context=context) |
927 | + nb_lines_ok += 1 |
928 | + except Exception as e: |
929 | + save_error(e) |
930 | + cr.rollback() |
931 | + |
932 | + nb_imported_lines += 1 |
933 | + self.write(cr, uid, [import_brw.id], {'total_lines_imported': nb_imported_lines}, context=context) |
934 | + |
935 | + warn_msg = '' |
936 | + for lnum, warnings in import_warnings.iteritems(): |
937 | + for warn in warnings: |
938 | + warn_msg += _('Line %s: %s') % (lnum, warn) |
939 | + warn_msg += '\n' |
940 | + |
941 | + err_msg = '' |
942 | + for lnum, errors in import_errors.iteritems(): |
943 | + for err in errors: |
944 | + err_msg += _('Line %s: %s') % (lnum, err) |
945 | + err_msg += '\n' |
946 | + |
947 | + if err_msg: |
948 | + cr.rollback() |
949 | + |
950 | + info_msg = _('''Processing of file completed in %s second(s)! |
951 | +- Total lines to import: %s |
952 | +- Total lines %s: %s %s |
953 | +- Total lines with errors: %s %s |
954 | +%s |
955 | + ''') % ( |
956 | + str(round(time.time() - start_time)), |
957 | + import_brw.total_lines_to_import-1, |
958 | + err_msg and _('without errors') or _('imported'), |
959 | + nb_lines_ok, |
960 | + warn_msg and _('(%s line(s) with warning - see warning messages below)') % ( |
961 | + len(import_warnings.keys()) or '', |
962 | + ), |
963 | + err_msg and len(import_errors.keys()) or 0, |
964 | + err_msg and _('(see error messages below)'), |
965 | + err_msg and _("no data will be imported until all the error messages are corrected") or '', |
966 | + ) |
967 | + |
968 | + self.write(cr, uid, [import_brw.id], { |
969 | + 'error_message': err_msg, |
970 | + 'show_error': err_msg and True or False, |
971 | + 'warning_message': warn_msg, |
972 | + 'show_warning': warn_msg and True or False, |
973 | + 'info_message': info_msg, |
974 | + 'state': 'done', |
975 | + 'end_date': time.strftime('%Y-%m-%d %H:%M:%S'), |
976 | + }, context=context) |
977 | + |
978 | + cr.commit() |
979 | + cr.close() |
980 | + |
981 | + return True |
982 | + |
983 | +wizard_import_batch() |
984 | |
985 | === added file 'bin/addons/msf_doc_import/wizard/wizard_import_batch_view.xml' |
986 | --- bin/addons/msf_doc_import/wizard/wizard_import_batch_view.xml 1970-01-01 00:00:00 +0000 |
987 | +++ bin/addons/msf_doc_import/wizard/wizard_import_batch_view.xml 2016-08-18 14:00:36 +0000 |
988 | @@ -0,0 +1,83 @@ |
989 | +<?xml version="1.0" encoding="utf-8"?> |
990 | +<openerp> |
991 | + <data> |
992 | + |
993 | + <record id="wizard_import_batch_tree_view" model="ir.ui.view"> |
994 | + <field name="name">Import Batch Numbers</field> |
995 | + <field name="model">wizard.import.batch</field> |
996 | + <field name="type">tree</field> |
997 | + <field name="arch" type="xml"> |
998 | + <tree string="Import Batch Numbers" noteditable="True"> |
999 | + <field name="start_date" /> |
1000 | + <field name="end_date" /> |
1001 | + <field name="progression" widget="progressbar" /> |
1002 | + <field name="state" /> |
1003 | + </tree> |
1004 | + </field> |
1005 | + </record> |
1006 | + |
1007 | + <record id="view_wizard_import_batch" model="ir.ui.view"> |
1008 | + <field name="name">Import Batch Numbers</field> |
1009 | + <field name="model">wizard.import.batch</field> |
1010 | + <field name="type">form</field> |
1011 | + <field name="arch" type="xml"> |
1012 | + <form string="Import Batch Number" hide_duplicate_button="1"> |
1013 | + <field name="show_error" invisible="1" /> |
1014 | + <field name="show_warning" invisible="1" /> |
1015 | + |
1016 | + <group colspan="4" col="6"> |
1017 | + <label string="Select a file to import: " align="1.0" /> |
1018 | + <field name="import_file" nolabel="True" colspan="1" /> |
1019 | + <label colspan="2" string="" /> |
1020 | + <field name="start_date" /> |
1021 | + <newline /> |
1022 | + <label string="Or download a template: " align="1.0" /> |
1023 | + <button name="download_template_file" string="" icon="gtk-save" help="Download template file" type="object" /> |
1024 | + <label colspan="2" string="" /> |
1025 | + <field name="end_date" /> |
1026 | + <group colspan="6" col="4"> |
1027 | + <field name="state" /> |
1028 | + <field name="progression" widget="progressbar" /> |
1029 | + </group> |
1030 | + </group> |
1031 | + |
1032 | + <separator colspan="4" string="Information" /> |
1033 | + <field name="info_message" colspan="4" nolabel="1" /> |
1034 | + |
1035 | + <group colspan="4" attrs="{'invisible': [('state', '=', 'done')]}"> |
1036 | + <separator colspan="4" string="Actions" /> |
1037 | + <button name="run_import" type="object" string="Run import" icon="gtk-execute" attrs="{'invisible': [('state', '!=', 'draft')]}" /> |
1038 | + <button name="update" type="object" string="Update" icon="gtk-execute" attrs="{'invisible': [('state', '!=', 'progress')]}" /> |
1039 | + </group> |
1040 | + |
1041 | + <group colspan="4" attrs="{'invisible': [('show_warning', '=', False)]}"> |
1042 | + <separator colspan="4" string="Warning messages" /> |
1043 | + <field name="warning_message" nolabel="1" colspan="4" /> |
1044 | + </group> |
1045 | + |
1046 | + <group colspan="4" attrs="{'invisible': [('show_error', '=', False)]}"> |
1047 | + <separator colspan="4" string="Error messages" /> |
1048 | + <field name="error_message" nolabel="1" colspan="4" /> |
1049 | + </group> |
1050 | + </form> |
1051 | + </field> |
1052 | + </record> |
1053 | + |
1054 | + <act_window |
1055 | + name="Import Batch Numbers" |
1056 | + res_model="wizard.import.batch" |
1057 | + src_model="wizard.import.batch" |
1058 | + view_mode="tree,form" |
1059 | + target="current" |
1060 | + key2="False" |
1061 | + id="action_wizard_import_batch" /> |
1062 | + |
1063 | + <menuitem |
1064 | + action="action_wizard_import_batch" |
1065 | + sequence="5" |
1066 | + name="Import Batch Numbers" |
1067 | + parent="stock.menu_action_production_lot_form" |
1068 | + id="menu_action_wizard_import_batch" /> |
1069 | + |
1070 | + </data> |
1071 | +</openerp> |
1072 | |
1073 | === modified file 'bin/addons/msf_profile/i18n/en_MF.po' |
1074 | --- bin/addons/msf_profile/i18n/en_MF.po 2013-01-31 13:07:22 +0000 |
1075 | +++ bin/addons/msf_profile/i18n/en_MF.po 2016-08-18 14:00:36 +0000 |
1076 | @@ -799,3 +799,33 @@ |
1077 | #: view:purchase.order:0 |
1078 | msgid "Delivery & Invoicing" |
1079 | msgstr "Delivery" |
1080 | + |
1081 | +#. module: msf_doc_import |
1082 | +#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:36 |
1083 | +#, python-format |
1084 | +msgid "get_import_batch_headers_name" |
1085 | +msgstr "Batch number" |
1086 | + |
1087 | +#. module: msf_doc_import |
1088 | +#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:37 |
1089 | +#, python-format |
1090 | +msgid "get_import_batch_headers_product_code" |
1091 | +msgstr "Product Code" |
1092 | + |
1093 | +#. module: msf_doc_import |
1094 | +#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:38 |
1095 | +#, python-format |
1096 | +msgid "get_import_batch_headers_product_desc" |
1097 | +msgstr "Product Description" |
1098 | + |
1099 | +#. module: msf_doc_import |
1100 | +#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:39 |
1101 | +#, python-format |
1102 | +msgid "get_import_batch_headers_life_date" |
1103 | +msgstr "Expiry date" |
1104 | + |
1105 | +#. module: msf_doc_import |
1106 | +#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:40 |
1107 | +#, python-format |
1108 | +msgid "get_import_batch_headers_type" |
1109 | +msgstr "Type" |
1110 | |
1111 | === modified file 'bin/addons/msf_profile/i18n/fr_MF.po' |
1112 | --- bin/addons/msf_profile/i18n/fr_MF.po 2016-08-09 15:31:52 +0000 |
1113 | +++ bin/addons/msf_profile/i18n/fr_MF.po 2016-08-18 14:00:36 +0000 |
1114 | @@ -14574,6 +14574,8 @@ |
1115 | #. modules: msf_doc_import, register_accounting |
1116 | #: field:msf.doc.import.accounting,progression:0 |
1117 | #: field:wizard.register.import,progression:0 |
1118 | +#: field:abstract.wizard.import,progression:0 |
1119 | +#: field:wizard.import.batch,progression:0 |
1120 | msgid "Progression" |
1121 | msgstr "Progression" |
1122 | |
1123 | @@ -23497,6 +23499,54 @@ |
1124 | #: code:addons/purchase_msf/purchase_msf.py:55 |
1125 | #: code:addons/purchase_msf/purchase_msf.py:87 |
1126 | #: field:stock.move,inactive_error:0 |
1127 | +#: code:addons/msf_doc_import/account.py:72 |
1128 | +#: code:addons/msf_doc_import/account.py:201 |
1129 | +#: code:addons/msf_doc_import/account.py:234 |
1130 | +#: code:addons/msf_doc_import/account.py:480 |
1131 | +#: code:addons/msf_doc_import/stock_picking.py:60 |
1132 | +#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:60 |
1133 | +#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:296 |
1134 | +#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:321 |
1135 | +#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:327 |
1136 | +#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:333 |
1137 | +#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:352 |
1138 | +#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:379 |
1139 | +#: code:addons/msf_doc_import/wizard/stock_partial_picking.py:77 |
1140 | +#: code:addons/msf_doc_import/wizard/stock_partial_picking.py:254 |
1141 | +#: code:addons/msf_doc_import/wizard/stock_partial_picking.py:258 |
1142 | +#: code:addons/msf_doc_import/wizard/stock_partial_picking.py:785 |
1143 | +#: code:addons/msf_doc_import/wizard/stock_partial_picking.py:788 |
1144 | +#: code:addons/msf_doc_import/wizard/wizard_delete_lines.py:78 |
1145 | +#: code:addons/msf_doc_import/wizard/wizard_delete_lines.py:612 |
1146 | +#: code:addons/msf_doc_import/wizard/wizard_import_auto_supply_line.py:140 |
1147 | +#: code:addons/msf_doc_import/wizard/wizard_import_auto_supply_line.py:157 |
1148 | +#: code:addons/msf_doc_import/wizard/wizard_import_order_cycle_line.py:141 |
1149 | +#: code:addons/msf_doc_import/wizard/wizard_import_order_cycle_line.py:154 |
1150 | +#: code:addons/msf_doc_import/wizard/wizard_import_picking_line.py:165 |
1151 | +#: code:addons/msf_doc_import/wizard/wizard_import_picking_line.py:174 |
1152 | +#: code:addons/msf_doc_import/wizard/wizard_import_picking_line.py:183 |
1153 | +#: code:addons/msf_doc_import/wizard/wizard_import_product_list.py:81 |
1154 | +#: code:addons/msf_doc_import/wizard/wizard_import_stock_warehouse_order_point_line.py:162 |
1155 | +#: code:addons/msf_doc_import/wizard/wizard_import_stock_warehouse_order_point_line.py:170 |
1156 | +#: code:addons/msf_doc_import/wizard/wizard_import_supplier_catalogue.py:164 |
1157 | +#: code:addons/msf_doc_import/wizard/wizard_import_threshold_value_line.py:145 |
1158 | +#: code:addons/msf_doc_import/wizard/wizard_import_threshold_value_line.py:153 |
1159 | +#: code:addons/msf_doc_import/wizard/wizard_in_simulation_screen.py:263 |
1160 | +#: code:addons/msf_doc_import/wizard/wizard_in_simulation_screen.py:270 |
1161 | +#: code:addons/msf_doc_import/wizard/wizard_in_simulation_screen.py:275 |
1162 | +#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:341 |
1163 | +#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:346 |
1164 | +#: selection:msf.doc.import.accounting,state:0 |
1165 | +#: field:purchase.import.xml.line,error_list:0 |
1166 | +#: field:purchase.line.import.xml.line,error_list:0 |
1167 | +#: view:sale.order:0 |
1168 | +#: view:sale.order.line:0 |
1169 | +#: field:tender.line,inactive_error:0 |
1170 | +#: selection:wizard.import.in.line.simulation.screen,type_change:0 |
1171 | +#: selection:wizard.import.in.simulation.screen,state:0 |
1172 | +#: selection:wizard.import.po.simulation.screen,state:0 |
1173 | +#: selection:wizard.import.po.simulation.screen.line,type_change:0 |
1174 | +#: selection:wizard.simu.import.po.line,change_type:0 |
1175 | #, python-format |
1176 | msgid "Error" |
1177 | msgstr "Error" |
1178 | @@ -31105,6 +31155,16 @@ |
1179 | #: model:ir.ui.menu,name:sync_client.update_menu |
1180 | #: view:sync.client.update_entity:0 |
1181 | #: view:wizard.register.import:0 |
1182 | +#: view:wizard.import.auto.supply.line:0 |
1183 | +#: view:wizard.import.batch:0 |
1184 | +#: view:wizard.import.in.simulation.screen:0 |
1185 | +#: view:wizard.import.order.cycle.line:0 |
1186 | +#: view:wizard.import.pick.line:0 |
1187 | +#: view:wizard.import.po.simulation.screen:0 |
1188 | +#: view:wizard.import.product.list:0 |
1189 | +#: view:wizard.import.stock.warehouse.orderpoint.line:0 |
1190 | +#: view:wizard.import.supplier.catalogue:0 |
1191 | +#: view:wizard.import.threshold.value.line:0 |
1192 | msgid "Update" |
1193 | msgstr "Mettre à jour" |
1194 | |
1195 | @@ -40101,16 +40161,20 @@ |
1196 | msgid "End Period" |
1197 | msgstr "Période de fin" |
1198 | |
1199 | -#. module: account |
1200 | +#. modules: account, msf_doc_import |
1201 | #: report:pl.account.horizontal:0 |
1202 | #: report:pl.account:0 |
1203 | +#: field:abstract.wizard.import,start_date:0 |
1204 | +#: field:wizard.import.batch,start_date:0 |
1205 | #, python-format |
1206 | msgid "Start Date" |
1207 | msgstr "Date de début" |
1208 | |
1209 | -#. module: account |
1210 | +#. modules: account, msf_doc_import |
1211 | #: report:pl.account.horizontal:0 |
1212 | #: report:pl.account:0 |
1213 | +#: field:abstract.wizard.import,end_date:0 |
1214 | +#: field:wizard.import.batch,end_date:0 |
1215 | #, python-format |
1216 | msgid "End Date" |
1217 | msgstr "Date de fin" |
1218 | @@ -43796,6 +43860,17 @@ |
1219 | #: field:real.average.consumption,state:0 |
1220 | #: field:msf.doc.import.accounting,state:0 |
1221 | #: field:wizard.import.po,state:0 |
1222 | +#: field:abstract.wizard.import,state:0 |
1223 | +#: field:wizard.import.auto.supply.line,state:0 |
1224 | +#: field:wizard.import.batch,state:0 |
1225 | +#: field:wizard.import.in.simulation.screen,state:0 |
1226 | +#: field:wizard.import.order.cycle.line,state:0 |
1227 | +#: field:wizard.import.pick.line,state:0 |
1228 | +#: field:wizard.import.po.simulation.screen,state:0 |
1229 | +#: field:wizard.import.product.list,state:0 |
1230 | +#: field:wizard.import.stock.warehouse.orderpoint.line,state:0 |
1231 | +#: field:wizard.import.supplier.catalogue,state:0 |
1232 | +#: field:wizard.import.threshold.value.line,state:0 |
1233 | msgid "State" |
1234 | msgstr "État" |
1235 | |
1236 | @@ -54493,6 +54568,54 @@ |
1237 | #: code:addons/register_accounting/wizard/wizard_register_import.py:258 |
1238 | #: code:addons/register_accounting/wizard/wizard_register_import.py:265 |
1239 | #: selection:wizard.register.import,state:0 |
1240 | +#: code:addons/msf_doc_import/account.py:72 |
1241 | +#: code:addons/msf_doc_import/account.py:201 |
1242 | +#: code:addons/msf_doc_import/account.py:234 |
1243 | +#: code:addons/msf_doc_import/account.py:480 |
1244 | +#: code:addons/msf_doc_import/stock_picking.py:60 |
1245 | +#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:60 |
1246 | +#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:296 |
1247 | +#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:321 |
1248 | +#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:327 |
1249 | +#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:333 |
1250 | +#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:352 |
1251 | +#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:379 |
1252 | +#: code:addons/msf_doc_import/wizard/stock_partial_picking.py:77 |
1253 | +#: code:addons/msf_doc_import/wizard/stock_partial_picking.py:254 |
1254 | +#: code:addons/msf_doc_import/wizard/stock_partial_picking.py:258 |
1255 | +#: code:addons/msf_doc_import/wizard/stock_partial_picking.py:785 |
1256 | +#: code:addons/msf_doc_import/wizard/stock_partial_picking.py:788 |
1257 | +#: code:addons/msf_doc_import/wizard/wizard_delete_lines.py:78 |
1258 | +#: code:addons/msf_doc_import/wizard/wizard_delete_lines.py:612 |
1259 | +#: code:addons/msf_doc_import/wizard/wizard_import_auto_supply_line.py:140 |
1260 | +#: code:addons/msf_doc_import/wizard/wizard_import_auto_supply_line.py:157 |
1261 | +#: code:addons/msf_doc_import/wizard/wizard_import_order_cycle_line.py:141 |
1262 | +#: code:addons/msf_doc_import/wizard/wizard_import_order_cycle_line.py:154 |
1263 | +#: code:addons/msf_doc_import/wizard/wizard_import_picking_line.py:165 |
1264 | +#: code:addons/msf_doc_import/wizard/wizard_import_picking_line.py:174 |
1265 | +#: code:addons/msf_doc_import/wizard/wizard_import_picking_line.py:183 |
1266 | +#: code:addons/msf_doc_import/wizard/wizard_import_product_list.py:81 |
1267 | +#: code:addons/msf_doc_import/wizard/wizard_import_stock_warehouse_order_point_line.py:162 |
1268 | +#: code:addons/msf_doc_import/wizard/wizard_import_stock_warehouse_order_point_line.py:170 |
1269 | +#: code:addons/msf_doc_import/wizard/wizard_import_supplier_catalogue.py:164 |
1270 | +#: code:addons/msf_doc_import/wizard/wizard_import_threshold_value_line.py:145 |
1271 | +#: code:addons/msf_doc_import/wizard/wizard_import_threshold_value_line.py:153 |
1272 | +#: code:addons/msf_doc_import/wizard/wizard_in_simulation_screen.py:263 |
1273 | +#: code:addons/msf_doc_import/wizard/wizard_in_simulation_screen.py:270 |
1274 | +#: code:addons/msf_doc_import/wizard/wizard_in_simulation_screen.py:275 |
1275 | +#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:341 |
1276 | +#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:346 |
1277 | +#: selection:msf.doc.import.accounting,state:0 |
1278 | +#: field:purchase.import.xml.line,error_list:0 |
1279 | +#: field:purchase.line.import.xml.line,error_list:0 |
1280 | +#: view:sale.order:0 |
1281 | +#: view:sale.order.line:0 |
1282 | +#: field:tender.line,inactive_error:0 |
1283 | +#: selection:wizard.import.in.line.simulation.screen,type_change:0 |
1284 | +#: selection:wizard.import.in.simulation.screen,state:0 |
1285 | +#: selection:wizard.import.po.simulation.screen,state:0 |
1286 | +#: selection:wizard.import.po.simulation.screen.line,type_change:0 |
1287 | +#: selection:wizard.simu.import.po.line,change_type:0 |
1288 | #, python-format |
1289 | msgid "Error" |
1290 | msgstr "Erreur" |
1291 | @@ -61471,6 +61594,13 @@ |
1292 | msgid "Information" |
1293 | msgstr "Information" |
1294 | |
1295 | +#. module: msf_doc_import |
1296 | +#: field:abstract.wizard.import,info_message:0 |
1297 | +#: view:wizard.import.batch:0 |
1298 | +#: field:wizard.import.batch,info_message:0 |
1299 | +msgid "Information" |
1300 | +msgstr "Informations" |
1301 | + |
1302 | #. module: base |
1303 | #: code:addons/base/module/wizard/base_language_install.py:55 |
1304 | #, python-format |
1305 | @@ -64599,6 +64729,11 @@ |
1306 | #: field:wizard.import.stock.warehouse.orderpoint.line,file:0 |
1307 | #: view:wizard.import.threshold.value.line:0 |
1308 | #: field:wizard.import.threshold.value.line,file:0 |
1309 | +#: field:abstract.wizard.import,import_file:0 |
1310 | +#: field:wizard.import.batch,import_file:0 |
1311 | +#: field:wizard.import.in.simulation.screen,file_to_import:0 |
1312 | +#: view:wizard.import.supplier.catalogue:0 |
1313 | +#: field:wizard.import.supplier.catalogue,file:0 |
1314 | msgid "File to import" |
1315 | msgstr "Fichier à importer" |
1316 | |
1317 | @@ -73821,6 +73956,7 @@ |
1318 | #, python-format |
1319 | msgid "Not Created" |
1320 | msgstr "Non Créé" |
1321 | +<<<<<<< TREE |
1322 | |
1323 | #. module: account |
1324 | #: code:addons/account/wizard/account_subscription_generate.py:0 |
1325 | @@ -73859,3 +73995,427 @@ |
1326 | #, python-format |
1327 | msgid "PatchFailed: A script during upgrade has failed. Synchronization is forbidden. Please contact your administrator" |
1328 | msgstr "PatchFailed: Un script a échoué pendant la mise à jour. La synchronizsation est désactivée. Veuillez contacter votre administrateur" |
1329 | +======= |
1330 | + |
1331 | +#. module: msf_doc_import |
1332 | +#: model:ir.actions.act_window,name:msf_doc_import.action_wizard_import_batch |
1333 | +#: model:ir.ui.menu,name:msf_doc_import.menu_action_wizard_import_batch |
1334 | +#: view:wizard.import.batch:0 |
1335 | +msgid "Import Batch Numbers" |
1336 | +msgstr "Importer Numéros de Lot" |
1337 | + |
1338 | +#. module: msf_doc_import |
1339 | +#: view:wizard.import.batch:0 |
1340 | +msgid "Select a file to import: " |
1341 | +msgstr "Sélectionnez un fichier à importer: " |
1342 | + |
1343 | +#. module: msf_doc_import |
1344 | +#: view:wizard.import.batch:0 |
1345 | +msgid "Or download a template: " |
1346 | +msgstr "Ou téléchargez le modèle: " |
1347 | + |
1348 | +#. module: msf_doc_import |
1349 | +#: view:wizard.import.batch:0 |
1350 | +msgid "Run import" |
1351 | +msgstr "Démarrer l'import" |
1352 | + |
1353 | +#. module: msf_doc_import |
1354 | +#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:336 |
1355 | +#, python-format |
1356 | +msgid "No file to import. Please select a file or download the template file and fill it." |
1357 | +msgstr "Aucun fichier à importer. Veuillez sélectionner un fichier ou télécharger le modèle et le remplir." |
1358 | + |
1359 | +#. module: msf_doc_import |
1360 | +#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:168 |
1361 | +#, python-format |
1362 | +msgid "The Type of the batch number should be 'Standard' or 'Internal'" |
1363 | +msgstr "Le type du numéro de lot doit être 'Standard' ou 'Interne'" |
1364 | + |
1365 | +#. module: msf_doc_import |
1366 | +#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:166 |
1367 | +#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:171 |
1368 | +#, python-format |
1369 | +msgid "Standard" |
1370 | +msgstr "Standard" |
1371 | + |
1372 | +#. module: msf_doc_import |
1373 | +#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:166 |
1374 | +#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:173 |
1375 | +#, python-format |
1376 | +msgid "Internal" |
1377 | +msgstr "Interne" |
1378 | + |
1379 | +#. module: msf_doc_import |
1380 | +#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:187 |
1381 | +#, python-format |
1382 | +msgid "You cannot create a batch number for a product that is not 'Perishable' nor 'Batch mandatory'" |
1383 | +msgstr "Vous ne pouvez pas créer un numéro de lot pour un produit dont le numéro de lot ni la date d'expiration ne sont obligatoires" |
1384 | + |
1385 | +#. module: msf_doc_import |
1386 | +#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:192 |
1387 | +#, python-format |
1388 | +msgid "You cannot create an 'Internal' batch number for a 'Batch mandatory' product" |
1389 | +msgstr "Vous ne pouvez pas créer un numéro de lot 'Interne' pour un produit dont le numéro de lot n'est pas obligatoire" |
1390 | + |
1391 | +#. module: msf_doc_import |
1392 | +#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:197 |
1393 | +#, python-format |
1394 | +msgid "You cannot create a 'Standard' batch number for a non 'Batch mandatory' product" |
1395 | +msgstr "Vous ne pouvez pas créer un numéro de lot 'Standard' pour un produit dont le numéro de lot n'est pas obligatoire" |
1396 | + |
1397 | +#. module: msf_doc_import |
1398 | +#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:202 |
1399 | +#, python-format |
1400 | +msgid "For a 'Standard' batch number, you have to define value in the 'Name' column" |
1401 | +msgstr "Pour un numéro de lot 'Standard', vous devez définir une valeur dans la colonne 'Nom'" |
1402 | + |
1403 | +#. module: msf_doc_import |
1404 | +#: code:addons/msf_doc_import/wizard/wizard_in_simulation_screen.py:1147 |
1405 | +#: code:addons/msf_doc_import/wizard/wizard_in_simulation_screen.py:1222 |
1406 | +#, python-format |
1407 | +msgid "A batch is defined on the imported file but the product doesn't require batch number - Batch ignored" |
1408 | +msgstr "Un numéro de lot est défini dans le fichier importé mais le produit ne requiert pas de numéro de lot - Numéro de lot ignoré" |
1409 | + |
1410 | +#. module: msf_doc_import |
1411 | +#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:225 |
1412 | +#, python-format |
1413 | +msgid "Name of the batch will be ignored because the batch is 'Internal' so name is created by the system" |
1414 | +msgstr "Le nom du numéro de lot sera ignoré car le numéro de lot est 'Interne' danc le nom est créé par le système" |
1415 | + |
1416 | +#. module: msf_doc_import |
1417 | +#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:218 |
1418 | +#, python-format |
1419 | +msgid "A batch number with the same parameters already exists in the system" |
1420 | +msgstr "Un numéro de lot avec les mêmes paramèters existe déjà dans le système" |
1421 | + |
1422 | +#. module: msf_doc_import |
1423 | +#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:258 |
1424 | +#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:264 |
1425 | +#, python-format |
1426 | +msgid "Line %s: %s" |
1427 | +msgstr "Ligne %s : %s" |
1428 | + |
1429 | +#. module: msf_doc_import |
1430 | +#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:54 |
1431 | +#, python-format |
1432 | +msgid "Defined type of header '%s' is not in the list of possible type: %s - Please contact\n" |
1433 | +"your support team and give us this message.\n" |
1434 | +" " |
1435 | +msgstr "Le type d'en-tête \'%s\' n'est pas dans la liste des types possibles : %s - Veuillez contacter\n" |
1436 | +"votre équipe de support et leur indiquer ce message.\n" |
1437 | +" " |
1438 | + |
1439 | +#. module: msf_doc_import |
1440 | +#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:100 |
1441 | +#, python-format |
1442 | +msgid "The column '%s' is required" |
1443 | +msgstr "La colonne '%s' est obligatoire" |
1444 | + |
1445 | +#. module: msf_doc_import |
1446 | +#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:120 |
1447 | +#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:122 |
1448 | +#, python-format |
1449 | +msgid "The date format was not correct" |
1450 | +msgstr "Le format de date n'est pas correct" |
1451 | + |
1452 | +#. module: msf_doc_import |
1453 | +#: field:abstract.wizard.import,model_name:0 |
1454 | +#: field:wizard.import.batch,model_name:0 |
1455 | +msgid "Model to import" |
1456 | +msgstr "Modèle à importer" |
1457 | + |
1458 | +#. module: msf_doc_import |
1459 | +#: field:abstract.wizard.import,parent_model_name:0 |
1460 | +#: field:wizard.import.batch,parent_model_name:0 |
1461 | +msgid "Model of the parent" |
1462 | +msgstr "Nodèle du parent" |
1463 | + |
1464 | +#. module: msf_doc_import |
1465 | +#: help:abstract.wizard.import,parent_model_name:0 |
1466 | +#: help:wizard.import.batch,parent_model_name:0 |
1467 | +msgid "To go back to the parent when the window is closed" |
1468 | +msgstr "Pour revenir au parent quand la fenêtre est fermée" |
1469 | + |
1470 | +#. module: msf_doc_import |
1471 | +#: field:abstract.wizard.import,parent_record_id:0 |
1472 | +#: field:wizard.import.batch,parent_record_id:0 |
1473 | +msgid "ID of the parent record" |
1474 | +msgstr "ID de l'enregistrement parent" |
1475 | + |
1476 | +#. module: msf_doc_import |
1477 | +#: field:abstract.wizard.import,template_file:0 |
1478 | +#: field:wizard.import.batch,template_file:0 |
1479 | +msgid "Template file" |
1480 | +msgstr "Fichier modèle" |
1481 | + |
1482 | +#. module: msf_doc_import |
1483 | +#: field:abstract.wizard.import,template_filename:0 |
1484 | +#: field:wizard.import.batch,template_filename:0 |
1485 | +msgid "Template filename" |
1486 | +msgstr "Nom du fichier modèle" |
1487 | + |
1488 | +#. module: msf_doc_import |
1489 | +#: field:abstract.wizard.import,error_message:0 |
1490 | +#: field:msf.doc.import.accounting,error_ids:0 |
1491 | +#: field:wizard.import.batch,error_message:0 |
1492 | +msgid "Errors" |
1493 | +msgstr "Erreurs" |
1494 | + |
1495 | +#. module: msf_doc_import |
1496 | +#: field:abstract.wizard.import,warning_message:0 |
1497 | +#: field:wizard.import.batch,warning_message:0 |
1498 | +msgid "Warnings" |
1499 | +msgstr "Avertissements" |
1500 | + |
1501 | +#. module: msf_doc_import |
1502 | +#: field:abstract.wizard.import,total_lines_to_import:0 |
1503 | +#: field:wizard.import.batch,total_lines_to_import:0 |
1504 | +msgid "# of lines to import" |
1505 | +msgstr "# de ligens à importer" |
1506 | + |
1507 | +#. module: msf_doc_import |
1508 | +#: field:abstract.wizard.import,total_lines_imported:0 |
1509 | +#: field:wizard.import.batch,total_lines_imported:0 |
1510 | +msgid "# of lines imported" |
1511 | +msgstr "# de lignes importées" |
1512 | + |
1513 | +#. module: msf_doc_import |
1514 | +#: selection:abstract.wizard.import,state:0 |
1515 | +#: selection:wizard.import.batch,state:0 |
1516 | +msgid "Not started" |
1517 | +msgstr "Non démarré" |
1518 | + |
1519 | +#. module: msf_doc_import |
1520 | +#: selection:wizard.import.auto.supply.line,state:0 |
1521 | +#: selection:wizard.import.order.cycle.line,state:0 |
1522 | +#: selection:wizard.import.pick.line,state:0 |
1523 | +#: selection:wizard.import.product.list,state:0 |
1524 | +#: selection:wizard.import.stock.warehouse.orderpoint.line,state:0 |
1525 | +#: selection:wizard.import.supplier.catalogue,state:0 |
1526 | +#: selection:wizard.import.threshold.value.line,state:0 |
1527 | +msgid "In Progress" |
1528 | +msgstr "En cours" |
1529 | + |
1530 | +#. module: msf_doc_import |
1531 | +#: selection:abstract.wizard.import,state:0 |
1532 | +#: selection:wizard.import.auto.supply.line,state:0 |
1533 | +#: selection:wizard.import.batch,state:0 |
1534 | +#: selection:wizard.import.in.simulation.screen,state:0 |
1535 | +#: selection:wizard.import.order.cycle.line,state:0 |
1536 | +#: selection:wizard.import.pick.line,state:0 |
1537 | +#: selection:wizard.import.po.simulation.screen,state:0 |
1538 | +#: selection:wizard.import.product.list,state:0 |
1539 | +#: selection:wizard.import.stock.warehouse.orderpoint.line,state:0 |
1540 | +#: selection:wizard.import.supplier.catalogue,state:0 |
1541 | +#: selection:wizard.import.threshold.value.line,state:0 |
1542 | +msgid "Done" |
1543 | +msgstr "Terminé" |
1544 | + |
1545 | +#. module: msf_doc_import |
1546 | +#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:280 |
1547 | +#, python-format |
1548 | +msgid "Not allowed" |
1549 | +msgstr "Non autorisé" |
1550 | + |
1551 | +#. module: msf_doc_import |
1552 | +#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:281 |
1553 | +#, python-format |
1554 | +msgid "You cannot duplicate a %s document!" |
1555 | +msgstr "Vous ne pouvez pas dupliquer un document %s !" |
1556 | + |
1557 | +#. module: msf_doc_import |
1558 | +#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:297 |
1559 | +#, python-format |
1560 | +msgid "No 'run_import' action is defined for the object '%s'!" |
1561 | +msgstr "Aucune action 'run_import' n'est définie pour l'objet '%s'!" |
1562 | + |
1563 | +#. module: msf_doc_import |
1564 | +#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:328 |
1565 | +#, python-format |
1566 | +msgid "Import can be run only on draft wizard." |
1567 | +msgstr "L'important ne peut être effectué que sur des assistants en état 'Non démarré'" |
1568 | + |
1569 | +#. module: msf_doc_import |
1570 | +#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:334 |
1571 | +#, python-format |
1572 | +msgid "The given file seems not to be encoding in UTF-8. Please check the encoding of the file and re-try." |
1573 | +msgstr "Le fichier donnée ne semble pas être encodé en UTF-8. Veuillez vérifier l'encodage du fichie et réessayez." |
1574 | + |
1575 | +#. module: msf_doc_import |
1576 | +#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:396 |
1577 | +#, python-format |
1578 | +msgid "Line is empty" |
1579 | +msgstr "La ligne est vide" |
1580 | + |
1581 | +#. module: msf_doc_import |
1582 | +#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:399 |
1583 | +#, python-format |
1584 | +msgid "Number of columns (%s) in the line are larger than expected (%s)." |
1585 | +msgstr "Le nombre de colonnes (%s) de la ligne est plus grand qu'attendu (%s)." |
1586 | + |
1587 | +#. module: msf_doc_import |
1588 | +#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:428 |
1589 | +#, python-format |
1590 | +msgid "No product found for the code '%s'" |
1591 | +msgstr "Aucun produit trouvé pour le code '%s'" |
1592 | + |
1593 | +#. module: msf_doc_import |
1594 | +#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:36 |
1595 | +#, python-format |
1596 | +msgid "get_import_batch_headers_name" |
1597 | +msgstr "Numéro de lot" |
1598 | + |
1599 | +#. module: msf_doc_import |
1600 | +#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:37 |
1601 | +#, python-format |
1602 | +msgid "get_import_batch_headers_product_code" |
1603 | +msgstr "Code du produit" |
1604 | + |
1605 | +#. module: msf_doc_import |
1606 | +#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:38 |
1607 | +#, python-format |
1608 | +msgid "get_import_batch_headers_product_desc" |
1609 | +msgstr "Description du produit" |
1610 | + |
1611 | +#. module: msf_doc_import |
1612 | +#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:39 |
1613 | +#, python-format |
1614 | +msgid "get_import_batch_headers_life_date" |
1615 | +msgstr "Date d'expiration" |
1616 | + |
1617 | +#. module: msf_doc_import |
1618 | +#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:40 |
1619 | +#, python-format |
1620 | +msgid "get_import_batch_headers_type" |
1621 | +msgstr "Type" |
1622 | + |
1623 | +#. module: msf_doc_import |
1624 | +#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:285 |
1625 | +#, python-format |
1626 | +msgid "no data will be imported until all the error messages are corrected" |
1627 | +msgstr "aucune donnée ne sera importée tant que toutes les erreurs ne seront pas corrigées" |
1628 | + |
1629 | +#. module: msf_doc_import |
1630 | +#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:37 |
1631 | +#: code:addons/msf_doc_import/wizard/wizard_in_simulation_screen.py:54 |
1632 | +#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:57 |
1633 | +#: field:wizard.simu.import.po.line,import_product_code:0 |
1634 | +#: field:wizard.simu.import.po.line,initial_product_code:0 |
1635 | +#, python-format |
1636 | +msgid "Product Code" |
1637 | +msgstr "Code du produit" |
1638 | + |
1639 | +#. module: msf_doc_import |
1640 | +#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:38 |
1641 | +#: code:addons/msf_doc_import/wizard/wizard_in_simulation_screen.py:55 |
1642 | +#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:58 |
1643 | +#: field:wizard.simu.import.po.line,import_product_name:0 |
1644 | +#: field:wizard.simu.import.po.line,initial_product_name:0 |
1645 | +#, python-format |
1646 | +msgid "Product Description" |
1647 | +msgstr "Description du produit" |
1648 | + |
1649 | +#. module: msf_doc_import |
1650 | +#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:39 |
1651 | +#, python-format |
1652 | +msgid "Life Date" |
1653 | +msgstr "Date d'expiration" |
1654 | + |
1655 | +#. module: msf_doc_import |
1656 | +#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:40 |
1657 | +#, python-format |
1658 | +msgid "Type" |
1659 | +msgstr "Type" |
1660 | + |
1661 | +#. module: msf_doc_import |
1662 | +#: field:abstract.wizard.import,show_error:0 |
1663 | +#: field:wizard.import.batch,show_error:0 |
1664 | +msgid "Show error message ?" |
1665 | +msgstr "Voir les messages d'erreurs ?" |
1666 | + |
1667 | +#. module: msf_doc_import |
1668 | +#: field:abstract.wizard.import,show_warning:0 |
1669 | +#: field:wizard.import.batch,show_warning:0 |
1670 | +msgid "Show warning message ?" |
1671 | +msgstr "Voir les avertissements ?" |
1672 | + |
1673 | +#. module: msf_doc_import |
1674 | +#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:260 |
1675 | +#, python-format |
1676 | +msgid "Select a file to import and click on 'Run import' button." |
1677 | +msgstr "Sélectionnez un fichier à importer et cliquez sur le bouton 'Démarrer l'import'." |
1678 | + |
1679 | +#. module: msf_doc_import |
1680 | +#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:276 |
1681 | +#, python-format |
1682 | +msgid "imported" |
1683 | +msgstr "importées" |
1684 | + |
1685 | +#. module: msf_doc_import |
1686 | +#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:276 |
1687 | +#, python-format |
1688 | +msgid "without errors" |
1689 | +msgstr "sans erreurs" |
1690 | + |
1691 | +#. module: msf_doc_import |
1692 | +#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:269 |
1693 | +#, python-format |
1694 | +msgid "Processing of file completed in %s second(s)!\n" |
1695 | +"- Total lines to import: %s\n" |
1696 | +"- Total lines %s: %s %s\n" |
1697 | +"- Total lines with errors: %s %s\n" |
1698 | +"%s\n" |
1699 | +" " |
1700 | +msgstr "Traitement du fichier terminé en %s seconde(s) !\n" |
1701 | +"- Nombre de lignes à importer : %s\n" |
1702 | +"- Nombre de lignes %s : %s %s\n" |
1703 | +"- Nombre de lignes avec erreurs : %s %s\n" |
1704 | +"%s\n" |
1705 | +" " |
1706 | + |
1707 | +#. module: msf_doc_import |
1708 | +#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:279 |
1709 | +#, python-format |
1710 | +msgid "(%s line(s) with warning - see warning messages below)" |
1711 | +msgstr "(%s ligne(s) avec des avertissements - voir les avertissements ci-dessous)" |
1712 | + |
1713 | +#. module: msf_doc_import |
1714 | +#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:283 |
1715 | +#, python-format |
1716 | +msgid "(see error messages below)" |
1717 | +msgstr "(voir les erreurs ci-dessous)" |
1718 | + |
1719 | +#. module: msf_doc_import |
1720 | +#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:234 |
1721 | +#, python-format |
1722 | +msgid "Name of the batch will be ignored because the batch is 'Internal' so name is created by the system" |
1723 | +msgstr "Le nom du batch sera ignoré car le batch est 'Interne' donc son nom sera créé par le système" |
1724 | + |
1725 | +#. module: msf_doc_import |
1726 | +#: view:wizard.import.batch:0 |
1727 | +msgid "Warning messages" |
1728 | +msgstr "Messages d'avertissement" |
1729 | + |
1730 | +#. module: msf_doc_import |
1731 | +#: view:wizard.import.batch:0 |
1732 | +msgid "Error messages" |
1733 | +msgstr "Messages d'erreur" |
1734 | + |
1735 | +#. module: msf_doc_import |
1736 | +#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:104 |
1737 | +#, python-format |
1738 | +msgid "Import in progress, please leave this window open and press the button 'Update' to show the progression of the import. Otherwise, you can continue tu use Unifield" |
1739 | +msgstr "Traitement en cours, veuillez laisser cette fenêtre ouverte et cliquez sur le bouton 'Mettre à jour' pour voir la progression de l'import. Sinon, vous pouvez continuer d'utiliser Unifield" |
1740 | + |
1741 | +#. module: msf_doc_import |
1742 | +#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:385 |
1743 | +#, python-format |
1744 | +msgid "The column '%s' of the Excel file should be '%s', not '%s'." |
1745 | +msgstr "La colonne '%s' du fichier Excel doit être '%s', pas '%s'." |
1746 | + |
1747 | +#. module: msf_doc_import |
1748 | +#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:381 |
1749 | +#, python-format |
1750 | +msgid "The column '%s' is not present in the file." |
1751 | +msgstr "La colonne '%s' n'est pas présente dans le fichier." |
1752 | +>>>>>>> MERGE-SOURCE |
1753 | |
1754 | === modified file 'bin/addons/purchase_override/purchase.py' |
1755 | --- bin/addons/purchase_override/purchase.py 2016-08-03 16:06:05 +0000 |
1756 | +++ bin/addons/purchase_override/purchase.py 2016-08-18 14:00:36 +0000 |
1757 | @@ -2617,8 +2617,8 @@ |
1758 | help='Header level dates has to be populated by default with the possibility of manual updates'), |
1759 | 'name': fields.function(_get_name, method=True, type='char', string='Name', store=False), |
1760 | } |
1761 | + def create(self, cr, uid, vals, context=None): |
1762 | |
1763 | - def create(self, cr, uid, vals, context=None): |
1764 | ''' |
1765 | Set the line number to 0 |
1766 | ''' |
1767 | |
1768 | === modified file 'bin/addons/report_webkit/webkit_report.py' |
1769 | --- bin/addons/report_webkit/webkit_report.py 2016-02-16 15:18:57 +0000 |
1770 | +++ bin/addons/report_webkit/webkit_report.py 2016-08-18 14:00:36 +0000 |
1771 | @@ -41,7 +41,9 @@ |
1772 | import netsvc |
1773 | import pooler |
1774 | from report_helper import WebKitHelper |
1775 | -from report.report_sxw import report_sxw, report_rml, _int_format, _float_format, _date_format, _dttime_format, browse_record_list |
1776 | +from report.report_sxw import report_sxw, report_rml, _int_format, \ |
1777 | + _float_format, _date_format, _dttime_format, browse_record_list, \ |
1778 | + rml_parse |
1779 | import addons |
1780 | import tools |
1781 | from tools.translate import _ |
1782 | @@ -412,3 +414,18 @@ |
1783 | if not result: |
1784 | return (False,False) |
1785 | return result |
1786 | + |
1787 | + |
1788 | +class XlsWebKitParser(WebKitParser): |
1789 | + def __init__(self, name, table, rml=False, parser=rml_parse, header='external', store=False): |
1790 | + WebKitParser.__init__(self, name, table, rml=rml, parser=parser, header=header, store=store) |
1791 | + |
1792 | + def create_single_pdf(self, cr, uid, ids, data, report_xml, context=None): |
1793 | + report_xml.webkit_debug = 1 |
1794 | + report_xml.header = " " |
1795 | + report_xml.webkit_header.html = "${_debug or ''|n}" |
1796 | + return super(XlsWebKitParser, self).create_single_pdf(cr, uid, ids, data, report_xml, context) |
1797 | + |
1798 | + def create(self, cr, uid, ids, data, context=None): |
1799 | + a = super(XlsWebKitParser, self).create(cr, uid, ids, data, context) |
1800 | + return (a[0], 'xls') |
1801 | |
1802 | === modified file 'bin/addons/spreadsheet_xml/spreadsheet_xml.py' |
1803 | --- bin/addons/spreadsheet_xml/spreadsheet_xml.py 2014-11-05 08:06:06 +0000 |
1804 | +++ bin/addons/spreadsheet_xml/spreadsheet_xml.py 2016-08-18 14:00:36 +0000 |
1805 | @@ -130,6 +130,9 @@ |
1806 | ret.append(self.get(wb, 'Name')) |
1807 | return ret |
1808 | |
1809 | + def getNbRows(self,worksheet=1): |
1810 | + return len(self.xmlobj.xpath('//ss:Worksheet[%d]/ss:Table[1]/ss:Row' % (worksheet,), **self.xa)) |
1811 | + |
1812 | def getRows(self,worksheet=1): |
1813 | table = self.xmlobj.xpath('//ss:Worksheet[%d]/ss:Table[1]'%(worksheet, ), **self.xa) |
1814 | return SpreadsheetRow(table[0].getiterator(etree.QName(self.defaultns, 'Row'))) |