Merge lp:~unifield-team/unifield-server/us-792-v2 into lp:unifield-server

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
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+303276@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/addons/base/ir/ir_translation.py'
--- bin/addons/base/ir/ir_translation.py 2016-01-25 10:54:33 +0000
+++ bin/addons/base/ir/ir_translation.py 2016-08-18 14:00:36 +0000
@@ -182,6 +182,7 @@
182 return u''182 return u''
183 if isinstance(types, basestring):183 if isinstance(types, basestring):
184 types = (types,)184 types = (types,)
185
185 if source:186 if source:
186 query = """SELECT value187 query = """SELECT value
187 FROM ir_translation188 FROM ir_translation
188189
=== modified file 'bin/addons/msf_doc_import/__openerp__.py'
--- bin/addons/msf_doc_import/__openerp__.py 2016-05-17 12:05:25 +0000
+++ bin/addons/msf_doc_import/__openerp__.py 2016-08-18 14:00:36 +0000
@@ -74,7 +74,8 @@
74 'workflow/sale_workflow.xml',74 'workflow/sale_workflow.xml',
75 'workflow/tender_flow_workflow.xml',75 'workflow/tender_flow_workflow.xml',
76 'workflow/procurement_request_workflow.xml',76 'workflow/procurement_request_workflow.xml',
77 'doc_import_report.xml'77 'doc_import_report.xml',
78 'wizard/wizard_import_batch_view.xml',
78 ],79 ],
79 "demo_xml": [],80 "demo_xml": [],
80 "test": [81 "test": [
8182
=== modified file 'bin/addons/msf_doc_import/doc_import_report.xml'
--- bin/addons/msf_doc_import/doc_import_report.xml 2014-01-15 10:47:43 +0000
+++ bin/addons/msf_doc_import/doc_import_report.xml 2016-08-18 14:00:36 +0000
@@ -34,5 +34,16 @@
34 auto="False"34 auto="False"
35 string="PO Simulation screen" />35 string="PO Simulation screen" />
3636
37 <report
38 id="report_wizard_import_generic_template"
39 model="abstract.wizard.import"
40 name="wizard.import.generic.template"
41 file="msf_doc_import/report/import_generic_template.mako"
42 report_type="webkit"
43 header="False"
44 menu="False"
45 auto="False"
46 string="Import Generic template" />
47
37 </data>48 </data>
38</openerp>49</openerp>
3950
=== modified file 'bin/addons/msf_doc_import/report/__init__.py'
--- bin/addons/msf_doc_import/report/__init__.py 2014-01-15 10:47:43 +0000
+++ bin/addons/msf_doc_import/report/__init__.py 2016-08-18 14:00:36 +0000
@@ -22,3 +22,5 @@
22import in_simulation_screen_report_xls22import in_simulation_screen_report_xls
23import po_simulation_screen_report23import po_simulation_screen_report
24import po_simulation_screen_report_xls24import po_simulation_screen_report_xls
25
26import import_generic_template
25\ No newline at end of file27\ No newline at end of file
2628
=== added file 'bin/addons/msf_doc_import/report/import_generic_template.mako'
--- bin/addons/msf_doc_import/report/import_generic_template.mako 1970-01-01 00:00:00 +0000
+++ bin/addons/msf_doc_import/report/import_generic_template.mako 2016-08-18 14:00:36 +0000
@@ -0,0 +1,104 @@
1<?xml version="1.0"?>
2<?mso-application progid="Excel.Sheet"?>
3<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
4 xmlns:o="urn:schemas-microsoft-com:office:office"
5 xmlns:x="urn:schemas-microsoft-com:office:excel"
6 xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
7 xmlns:html="http://www.w3.org/TR/REC-html40">
8
9 <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office">
10 <Author>MSFUser</Author>
11 <LastAuthor>MSFUser</LastAuthor>
12 <Created>2012-06-18T15:46:09Z</Created>
13 <Company>Medecins Sans Frontieres</Company>
14 <Version>11.9999</Version>
15 </DocumentProperties>
16
17 <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">
18 <WindowHeight>13170</WindowHeight>
19 <WindowWidth>19020</WindowWidth>
20 <WindowTopX>120</WindowTopX>
21 <WindowTopY>60</WindowTopY>
22 <ProtectStructure>False</ProtectStructure>
23 <ProtectWindows>False</ProtectWindows>
24 </ExcelWorkbook>
25
26 <Styles>
27 <Style ss:ID="header">
28 <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/>
29 <Interior ss:Color="#ffcc99" ss:Pattern="Solid"/>
30 <Font ss:Bold="1" ss:Color="#000000" />
31 <Borders>
32 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
33 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
34 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
35 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
36 </Borders>
37 <Protection />
38 </Style>
39 <Style ss:ID="String">
40 <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/>
41 <Borders>
42 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
43 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
44 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
45 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
46 </Borders>
47 <Protection ss:Protected="0" />
48 </Style>
49 <Style ss:ID="Number">
50 <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/>
51 <Borders>
52 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" />
53 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" />
54 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" />
55 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" />
56 </Borders>
57 <NumberFormat ss:Format="Fixed" />
58 <Protection ss:Protected="0" />
59 </Style>
60 <Style ss:ID="DateTime">
61 <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/>
62 <Borders>
63 <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/>
64 <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/>
65 <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/>
66 <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/>
67 </Borders>
68 <NumberFormat ss:Format="Short Date" />
69 <Protection ss:Protected="0" />
70 </Style>
71 </Styles>
72
73 <ss:Worksheet ss:Name="${data.get('model_name', _('Sheet 1'))|x}" ss:Protected="0">
74
75 <Table x:FullColumns="1" x:FullRows="1">
76
77 % for col in data.get('header_columns', []):
78 <Column ss:AutoFitWidth="1" ss:Width="${col[2] or 70|x}" ss:StyleID="${col[1]|x}" />
79 % endfor
80
81 <Row>
82 % for col in data.get('header_columns', []):
83 <Cell ss:StyleID="header">
84 <Data ss:Type="String">${col[0]}</Data>
85 </Cell>
86 % endfor
87 </Row>
88
89 <Row>
90 % for col in data.get('header_columns', []):
91 <Cell ss:StyleID="${col[1]|x}" />
92 % endfor
93 </Row>
94 </Table>
95
96 <x:WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel">
97 <ProtectScenarios>False</ProtectScenarios>
98 <EnableSelection>UnlockedCells</EnableSelection>
99 <AllowInsertRows />
100 </x:WorksheetOptions>
101
102 </ss:Worksheet>
103
104</Workbook>
0105
=== added file 'bin/addons/msf_doc_import/report/import_generic_template.py'
--- bin/addons/msf_doc_import/report/import_generic_template.py 1970-01-01 00:00:00 +0000
+++ bin/addons/msf_doc_import/report/import_generic_template.py 2016-08-18 14:00:36 +0000
@@ -0,0 +1,30 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2011 MSF, TeMPO Consulting
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22from report_webkit.webkit_report import XlsWebKitParser
23
24XlsWebKitParser(
25 'report.wizard.import.generic.template',
26 'abstract.wizard.import',
27 'addons/msf_doc_import/report/import_generic_template.mako',
28)
29
30# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
031
=== modified file 'bin/addons/msf_doc_import/wizard/__init__.py'
--- bin/addons/msf_doc_import/wizard/__init__.py 2016-05-17 12:05:25 +0000
+++ bin/addons/msf_doc_import/wizard/__init__.py 2016-08-18 14:00:36 +0000
@@ -137,3 +137,6 @@
137import wizard_import_supplier_catalogue137import wizard_import_supplier_catalogue
138import wizard_po_simulation_screen138import wizard_po_simulation_screen
139import wizard_in_simulation_screen139import wizard_in_simulation_screen
140
141import abstract_wizard_import
142import wizard_import_batch
140143
=== added file 'bin/addons/msf_doc_import/wizard/abstract_wizard_import.py'
--- bin/addons/msf_doc_import/wizard/abstract_wizard_import.py 1970-01-01 00:00:00 +0000
+++ bin/addons/msf_doc_import/wizard/abstract_wizard_import.py 2016-08-18 14:00:36 +0000
@@ -0,0 +1,457 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2011 MSF, TeMPO Consulting.
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import base64
23import string
24
25from mx import DateTime
26
27from osv import osv
28from osv import fields
29from tools.translate import _
30
31from spreadsheet_xml.spreadsheet_xml import SpreadsheetXML
32
33
34class UnifieldImportException(Exception):
35 pass
36
37
38class ImportHeader(object):
39 """
40 Class used to export Header template.
41 """
42 type_ok = ['String', 'Number', 'DateTime']
43
44 def __new__(cls, name, ftype='String', size=70, tech_name=None, required=False):
45 """
46 Initialize a header column for template export.
47 :param name: Name of the field
48 :param ftype: Type of the field
49 :param size: Displayed size on Excel file
50 :param tech_name: Technical name of the field to compute
51 :param required: Is the field should be set or not ?
52 """
53 if ftype not in ImportHeader.type_ok:
54 err_msg = _('''Defined type of header \'%s\' is not in the list of possible type: %s - Please contact
55your support team and give us this message.
56 ''') % (
57 name, ', '.join(t for t in ImportHeader.type_ok)
58 )
59 raise osv.except_osv(
60 _('Error'),
61 err_msg,
62 )
63
64 return _(name), ftype, size, tech_name, required
65
66 @classmethod
67 def get_date_from_str(cls, date_value):
68 """
69 Try to construct a date from a string and return a formatted string date
70 :param date_value: String value to compute
71 :return: A datetime instance or False
72 """
73 date_format = [
74 '%Y-%m-%d',
75 '%Y-%m/%d',
76 '%d-%m-%Y',
77 '%d/%m/%Y',
78 '%d-%b-%Y',
79 '%d/%b-%Y',
80 ]
81
82 d = False
83 for dformat in date_format:
84 try:
85 d = str(DateTime.strptime(date_value, dformat))
86 except ValueError:
87 continue
88
89 return d
90
91 @classmethod
92 def check_value(cls, header, value, vtype, context=None):
93 """
94 Check the value of the column according to header
95 :param header: Header used to check if value is required or not
96 :param value: Value to check
97 :param vtype: Type of the data given
98 :return: A tuple with the result of the check, the formatted value and the error message if any
99 """
100 if not value and header[4]:
101 return (-1, value, _('The column \'%s\' is required') % header[0])
102 elif not value:
103 return (0, value, None)
104 elif header[1] == 'String':
105 if vtype == 'str':
106 return (0, value, None)
107 else:
108 try:
109 return (0, str(value), None)
110 except Exception as e:
111 return (-1, value, e)
112 elif header[1] == 'DateTime':
113 if vtype == 'datetime':
114 return (0, value, None)
115 elif vtype == 'str':
116 d = ImportHeader.get_date_from_str(value)
117 if d:
118 return (0, d, None)
119 else:
120 return (-1, value, _('The date format was not correct'))
121 else:
122 return (-1, value, _('The date format was not correct'))
123 elif header[1] == 'Integer':
124 if vtype == 'number':
125 return (0, value, None)
126 else:
127 try:
128 return (0, int(value), None)
129 except Exception as e:
130 return (-1, value, e)
131 elif header[1] == 'Float':
132 if vtype == 'number':
133 return (0, value, None)
134 else:
135 try:
136 return (0, float(value), None)
137 except Exception as e:
138 return (-1, value, e)
139
140 return (0, value, None)
141
142
143class abstract_wizard_import(osv.osv_memory):
144 _name = 'abstract.wizard.import'
145 _description = 'Generic import wizard'
146 _auto = False
147 _order = 'start_date'
148
149 def _get_progression(self, cr, uid, ids, field_name, args, context=None):
150 """
151 Return the percentage of progression
152 """
153 if context is None:
154 context = {}
155
156 if isinstance(ids, (int, long)):
157 ids = [ids]
158
159 res = {}
160
161 for wiz in self.browse(cr, uid, ids, context=context):
162 if wiz.state == 'done':
163 res[wiz.id] = 100.00
164 elif wiz.state == 'draft':
165 res[wiz.id] = 0.00
166 else:
167 res[wiz.id] = float(wiz.total_lines_imported) / float(wiz.total_lines_to_import) * 100
168
169 return res
170
171 _columns = {
172 'model_name': fields.char(
173 size=64,
174 string='Model to import',
175 required=True,
176 readonly=True,
177 ),
178 'parent_model_name': fields.char(
179 size=64,
180 string='Model of the parent',
181 readonly=True,
182 help="To go back to the parent when the window is closed",
183 ),
184 'parent_record_id': fields.integer(
185 string='ID of the parent record',
186 readonly=True,
187 ),
188 'template_file': fields.binary(
189 string='Template file',
190 readonly=True,
191 ),
192 'template_filename': fields.char(
193 size=64,
194 string='Template filename',
195 readonly=True,
196 ),
197 'import_file': fields.binary(
198 string='File to import',
199 ),
200 'info_message': fields.text(
201 string='Information',
202 readonly=True,
203 ),
204 'error_message': fields.text(
205 string='Errors',
206 readonly=True,
207 ),
208 'show_error': fields.boolean(
209 string='Show error message ?',
210 readonly=True,
211 ),
212 'warning_message': fields.text(
213 string='Warnings',
214 readonly=True,
215 ),
216 'show_warning': fields.boolean(
217 string='Show warning message ?',
218 readonly=True,
219 ),
220 'total_lines_to_import': fields.integer(
221 string='# of lines to import',
222 readonly=True,
223 ),
224 'total_lines_imported': fields.integer(
225 string='# of lines imported',
226 readonly=True,
227 ),
228 'progression': fields.function(
229 _get_progression,
230 method=True,
231 type='float',
232 digits=(16, 2),
233 string='Progression',
234 store=False,
235 readonly=False,
236 ),
237 'state': fields.selection(
238 selection=[
239 ('draft', 'Not started'),
240 ('progress', 'In progress'),
241 ('done', 'Done'),
242 ],
243 string='State',
244 readonly=True,
245 ),
246 'start_date': fields.datetime(
247 string='Start date',
248 readonly=True,
249 ),
250 'end_date': fields.datetime(
251 string='End date',
252 readonly=True,
253 ),
254 }
255
256 def default_get(self, cr, uid, fields, context=None):
257 """
258 Return default values for some fields
259 :param cr: Cursor to the database
260 :param uid: ID of the res.users that calls this method
261 :param fields: Technical name of the fields on which system must put a default value
262 :param context: Context of the call
263 :return: A dictionary with field names as keys
264 """
265 res = super(abstract_wizard_import, self).default_get(cr, uid, fields, context=context)
266 res.update({
267 'total_lines_to_import': 0,
268 'total_lines_imported': 0,
269 'state': 'draft',
270 'info_message': _('Select a file to import and click on \'Run import\' button.'),
271 })
272 return res
273
274 def update(self, cr, uid, ids, context=None):
275 return {
276 'type': 'ir.actions.act_window',
277 'res_model': self._name,
278 'res_id': ids[0],
279 'view_type': 'form',
280 'view_mode': 'form,tree',
281 'target': 'keep_same', # Just to keep reload of the page
282 'context': context,
283 }
284
285 def exists(self, cr, uid, ids, context=None):
286 if self._name != 'abstract.wizard.import':
287 return super(abstract_wizard_import, self).exists(cr, uid, ids, context=context)
288 return False
289
290 def _get_template_file_data(self, context=None):
291 """
292 Return values for the import template file report generation
293 """
294 return {
295 'model': self._name,
296 'model_name': self._description,
297 'header_columns': [],
298 }
299
300 def copy(self, cr, uid, old_id, defaults=None, context=None):
301 """
302 Don't allow copy method
303 """
304 raise osv.except_osv(
305 _('Not allowed'),
306 _('You cannot duplicate a %s document!') % self._description,
307 )
308
309 def download_template_file(self, cr, uid, ids, context=None):
310 """
311 Download the template file
312 """
313 return {
314 'type': 'ir.actions.report.xml',
315 'report_name': 'wizard.import.generic.template',
316 'datas': self._get_template_file_data(context=context),
317 }
318
319 def run_import(self, cr, uid, ids, context=None):
320 raise osv.except_osv(
321 _('Error'),
322 _('No \'run_import\' action is defined for the object \'%s\'!') % self._name,
323 )
324
325 def check_utf8_encoding(self, import_file, base='base64'):
326 """
327 Check if the given file is an good UTF-8 file
328 """
329 if base == 'base64':
330 import_file = base64.decodestring(import_file)
331
332 try:
333 import_file.decode('utf-8')
334 return True
335 except UnicodeError:
336 return False
337
338 def read_file(self, wizard_brw, context=None):
339 """
340 Open the Spreadsheet XML file
341 :param wizard_brw: browse_record of an import wizard
342 :return: An iterator on the rows of the file
343 """
344 if not wizard_brw.import_file:
345 raise osv.except_osv(
346 _('Error'),
347 _('No file to import. Please select a file or download the template file and fill it.'),
348 )
349
350 if wizard_brw.state != 'draft':
351 raise osv.except_osv(
352 _('Error'),
353 _('Import can be run only on draft wizard.'),
354 )
355
356 if not self.check_utf8_encoding(wizard_brw.import_file):
357 raise osv.except_osv(
358 _('Error'),
359 _('The given file seems not to be encoding in UTF-8. Please check the encoding of the file and re-try.')
360 )
361
362 file_obj = SpreadsheetXML(xmlstring=base64.decodestring(wizard_brw.import_file))
363
364 file_obj.getNbRows()
365 # iterator on rows
366 return file_obj.getRows(), file_obj.getNbRows()
367
368 def check_headers(self, headers_row, headers_title, context=None):
369 """
370 Check if the header in the first row of the file are the same as the expected headers
371 :param headers_row: Row that contains the header on the Excel file
372 :param headers_title: List of expected headers
373 :return: True or raise an error
374 """
375 if len(headers_row) != len(headers_title):
376 raise osv.except_osv(
377 _('Error'),
378 _('The number of columns in the Excel file (%s) is different than the expected number '\
379 'of columns (%s).\nColumns should be in this order: %s') % (
380 len(headers_row),
381 len(headers_title),
382 '\n * '.join(h[0] for h in headers_title),
383 ),
384 )
385
386 errors = []
387 headers_title_up = [_(x[0]).upper() for x in headers_title]
388 headers_row_up = [_(headers_row[i].data).upper() for i in range(0, len(headers_row))]
389 for h_index, h in enumerate(headers_title_up):
390 if h not in headers_row_up:
391 errors.append(
392 _('The column \'%s\' is not present in the file.') % _(headers_title[h_index][0])
393 )
394 elif headers_row_up[h_index] != h:
395 errors.append(
396 _('The column \'%s\' of the Excel file should be \'%s\', not \'%s\'.') % (
397 string.uppercase[h_index],
398 _(headers_title[h_index][0]),
399 _(headers_row[h_index]),
400 )
401 )
402 if errors:
403 raise osv.except_osv(
404 _('Error'),
405 '\n'.join(err for err in errors),
406 )
407
408 return True
409
410 def check_error_and_format_row(self, wizard_id, row, headers, context=None):
411 """
412 Check if the required cells are set and if this the data are well formatted
413 :param wizard_id: ID of the import wizard
414 :param row: Row of the Excel file
415 :param headers: Required headers
416 :return: True
417 """
418 try:
419 line_content = row.cells
420 except ValueError as e:
421 return (-1, _('Line is empty'))
422
423 if len(line_content) > len(headers):
424 return (-1, _('Number of columns (%s) in the line are larger than expected (%s).') % (
425 len(line_content), len(headers)
426 ))
427
428 data = []
429 errors = []
430 for col_index, col_value in enumerate(line_content):
431 # Check data values according to expected type
432 chk_res = ImportHeader.check_value(headers[col_index], col_value.data, col_value.type, context=context)
433 data.append(chk_res[1])
434 if chk_res[0] < 0:
435 errors.append(chk_res[2])
436
437 return (len(errors) and -1 or 0, errors, data)
438
439 def get_product_by_default_code(self, cr, uid, default_code, context=None):
440 """
441 Return the ID of the product.product related to the default_code parameter
442 :param cr: Cursor to the database
443 :param uid: ID of the res.users that calls this method
444 :param default_code: Code of the product to find
445 :param context: Context of the call
446 :return: The ID of the product.product
447 """
448 p_obj = self.pool.get('product.product')
449 p_ids = p_obj.search(cr, uid, [
450 ('default_code', '=', default_code),
451 ], limit=1, order='NO_ORDER', context=context)
452 if not p_ids:
453 raise UnifieldImportException(_('No product found for the code \'%s\'') % default_code)
454
455 return p_ids[0]
456
457abstract_wizard_import()
0\ No newline at end of file458\ No newline at end of file
1459
=== added file 'bin/addons/msf_doc_import/wizard/wizard_import_batch.py'
--- bin/addons/msf_doc_import/wizard/wizard_import_batch.py 1970-01-01 00:00:00 +0000
+++ bin/addons/msf_doc_import/wizard/wizard_import_batch.py 2016-08-18 14:00:36 +0000
@@ -0,0 +1,303 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2011 MSF, TeMPO Consulting.
6#
7# This 7ogram is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import threading
23import time
24
25import pooler
26
27from osv import osv
28from tools.translate import _
29
30from msf_doc_import.wizard.abstract_wizard_import import ImportHeader
31from msf_doc_import.wizard.abstract_wizard_import import UnifieldImportException
32
33
34def get_import_batch_headers(context=None):
35 return [
36 ImportHeader(name=_('get_import_batch_headers_name'), ftype='String', size=80, tech_name='name', required=False),
37 ImportHeader(name=_('get_import_batch_headers_type'), ftype='String', size=80, tech_name='type', required=True),
38 ImportHeader(name=_('get_import_batch_headers_life_date'), ftype='DateTime', size=60, tech_name='life_date', required=True),
39 ImportHeader(name=_('get_import_batch_headers_product_code'), ftype='String', size=80, tech_name='product_id', required=True),
40 ImportHeader(name=_('get_import_batch_headers_product_desc'), ftype='String', size=120, required=True),
41 ]
42
43# Get header list and information
44header_index_by_name = {}
45for i, h in enumerate(get_import_batch_headers()):
46 header_index_by_name[h[3]] = i
47
48
49def get_cell(line_data, field):
50 cell_data = line_data[header_index_by_name[field]]
51 if cell_data:
52 return cell_data
53 return None
54
55
56class wizard_import_batch(osv.osv_memory):
57 _name = 'wizard.import.batch'
58 _description = 'Import batch numbers'
59 _inherit = 'abstract.wizard.import'
60 _auto = True
61
62 _defaults = {
63 'model_name': 'stock.production.lot',
64 'template_filename': 'Import_batch_number_tpl.csv',
65 }
66
67 def _get_template_file_data(self, context=None):
68 """
69 Return values for the import template file report generation
70 """
71 return {
72 'model': 'stock.production.lot',
73 'model_name': _('Batch numbers'),
74 'header_columns': get_import_batch_headers(context=context),
75 }
76
77 def run_import(self, cr, uid, ids, context=None):
78 """
79 Make checks on file to import and run the import in background.
80 :param cr: Cursor to the database
81 :param uid: ID of the res.users that calls this method
82 :param ids: List of ID of wizard.import.patch on which import should be made
83 :param context: Context of the call
84 :return: True
85 """
86 if context is None:
87 context = {}
88
89 if isinstance(ids, (int, long)):
90 ids = [ids]
91
92 expected_headers = get_import_batch_headers(context=context)
93
94 for wiz in self.browse(cr, uid, ids, context=context):
95 rows, nb_rows = self.read_file(wiz, context=context)
96
97 head = rows.next()
98 self.check_headers(head, expected_headers, context=context)
99
100 self.write(cr, uid, [wiz.id], {
101 'total_lines_to_import': nb_rows,
102 'state': 'progress',
103 'start_date': time.strftime('%Y-%m-%d %H:%M:%S'),
104 'info_message': _('Import in progress, please leave this window open and press the button \'Update\' '
105 'to show the progression of the import. Otherwise, you can continue tu use Unifield'),
106 }, context=context)
107 wiz.total_lines_to_import = nb_rows
108
109 thread = threading.Thread(
110 target=self.bg_import,
111 args=(cr.dbname, uid, wiz, expected_headers, rows, context),
112 )
113 thread.start()
114
115 return True
116
117 def bg_import(self, dbname, uid, import_brw, headers, rows, context=None):
118 """
119 Run the import of lines in background
120 :param dbname: Name of the database
121 :param uid: ID of the res.users that calls this method
122 :param import_brw: browse_record of a wizard.import.batch
123 :param headers: List of expected headers
124 :param rows: Iterator on file rows
125 :param context: Context of the call
126 :return: True
127 """
128 prodlot_obj = self.pool.get('stock.production.lot')
129 product_obj = self.pool.get('product.product')
130 sequence_obj = self.pool.get('ir.sequence')
131
132 if context is None:
133 context = {}
134
135 cr = pooler.get_db(dbname).cursor()
136 nb_imported_lines = 0
137
138 # Manage errors
139 import_errors = {}
140
141 def save_error(errors):
142 if not isinstance(errors, list):
143 errors = [errors]
144 import_errors.setdefault(row_index+2, [])
145 import_errors[row_index+2].extend(errors)
146
147 # Manage warnings
148 import_warnings = {}
149
150 def save_warnings(warnings):
151 if not isinstance(warnings, list):
152 warnings = [warnings]
153 import_warnings.setdefault(row_index+2, [])
154 import_warnings[row_index+2].extend(warnings)
155
156 start_time = time.time()
157 nb_lines_ok = 0
158 for row_index, row in enumerate(rows):
159 res, errors, line_data = self.check_error_and_format_row(import_brw.id, row, headers, context=context)
160 if res < 0:
161 save_error(errors)
162 continue
163
164 # Product
165 product_id = None
166 try:
167 product_id = self.get_product_by_default_code(cr, uid, get_cell(line_data, 'product_id'),
168 context=context)
169 except UnifieldImportException as e:
170 save_error(e)
171
172 # Batch number type
173 batch_type = get_cell(line_data, 'type')
174 if batch_type.upper() not in (_('Standard').upper(), _('Internal').upper()):
175 save_error(
176 _('The Type of the batch number should be \'Standard\' or \'Internal\''),
177 )
178 batch_type = None
179 elif batch_type.upper() == _('Standard').upper():
180 batch_type = 'standard'
181 elif batch_type.upper() == _('Internal').upper():
182 batch_type = 'internal'
183
184 # Go to next line if all base data are not set
185 if not (product_id and batch_type):
186 continue
187
188 # Make consistency checks
189 name = get_cell(line_data, 'name')
190 life_date = get_cell(line_data, 'life_date')
191 product_brw = product_obj.read(cr, uid, product_id, ['batch_management', 'perishable'], context=context)
192
193 if not product_brw['batch_management'] and not product_brw['perishable']:
194 save_error(
195 _('You cannot create a batch number for a product that is not \'Perishable\''
196 ' nor \'Batch mandatory\'')
197 )
198 continue
199 elif product_brw['batch_management'] and batch_type == 'internal':
200 save_error(
201 _('You cannot create an \'Internal\' batch number for a \'Batch mandatory\' product')
202 )
203 continue
204 elif not product_brw['batch_management'] and product_brw['perishable'] and batch_type == 'standard':
205 save_error(
206 _('You cannot create a \'Standard\' batch number for a non \'Batch mandatory\' product')
207 )
208 continue
209 elif product_brw['batch_management'] and not name:
210 save_error(
211 _('For a \'Standard\' batch number, you have to define value in the \'Name\' column')
212 )
213 continue
214
215 # Check no duplicate
216 prodlot_domain = [
217 ('product_id', '=', product_id),
218 ('type', '=', batch_type),
219 ('life_date', '=', life_date),
220 ]
221 if product_brw['batch_management']:
222 prodlot_domain.append(('name', '=', name))
223
224 prodlot_id = prodlot_obj.search(cr, uid, prodlot_domain, limit=1, order='NO_ORDER', context=context)
225 if prodlot_id:
226 save_error(
227 _('A batch number with the same parameters already exists in the system')
228 )
229 continue
230
231 if batch_type == 'internal':
232 if name:
233 save_warnings(
234 _('Name of the batch will be ignored because the batch is \'Internal\' so '
235 'name is created by the system')
236 )
237 name = sequence_obj.get(cr, uid, 'stock.lot.serial')
238
239 create_vals = {
240 'name': name,
241 'product_id': product_id,
242 'life_date': life_date,
243 'type': batch_type,
244 }
245 try:
246 prodlot_obj.create(cr, uid, create_vals, context=context)
247 nb_lines_ok += 1
248 except Exception as e:
249 save_error(e)
250 cr.rollback()
251
252 nb_imported_lines += 1
253 self.write(cr, uid, [import_brw.id], {'total_lines_imported': nb_imported_lines}, context=context)
254
255 warn_msg = ''
256 for lnum, warnings in import_warnings.iteritems():
257 for warn in warnings:
258 warn_msg += _('Line %s: %s') % (lnum, warn)
259 warn_msg += '\n'
260
261 err_msg = ''
262 for lnum, errors in import_errors.iteritems():
263 for err in errors:
264 err_msg += _('Line %s: %s') % (lnum, err)
265 err_msg += '\n'
266
267 if err_msg:
268 cr.rollback()
269
270 info_msg = _('''Processing of file completed in %s second(s)!
271- Total lines to import: %s
272- Total lines %s: %s %s
273- Total lines with errors: %s %s
274%s
275 ''') % (
276 str(round(time.time() - start_time)),
277 import_brw.total_lines_to_import-1,
278 err_msg and _('without errors') or _('imported'),
279 nb_lines_ok,
280 warn_msg and _('(%s line(s) with warning - see warning messages below)') % (
281 len(import_warnings.keys()) or '',
282 ),
283 err_msg and len(import_errors.keys()) or 0,
284 err_msg and _('(see error messages below)'),
285 err_msg and _("no data will be imported until all the error messages are corrected") or '',
286 )
287
288 self.write(cr, uid, [import_brw.id], {
289 'error_message': err_msg,
290 'show_error': err_msg and True or False,
291 'warning_message': warn_msg,
292 'show_warning': warn_msg and True or False,
293 'info_message': info_msg,
294 'state': 'done',
295 'end_date': time.strftime('%Y-%m-%d %H:%M:%S'),
296 }, context=context)
297
298 cr.commit()
299 cr.close()
300
301 return True
302
303wizard_import_batch()
0304
=== added file 'bin/addons/msf_doc_import/wizard/wizard_import_batch_view.xml'
--- bin/addons/msf_doc_import/wizard/wizard_import_batch_view.xml 1970-01-01 00:00:00 +0000
+++ bin/addons/msf_doc_import/wizard/wizard_import_batch_view.xml 2016-08-18 14:00:36 +0000
@@ -0,0 +1,83 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data>
4
5 <record id="wizard_import_batch_tree_view" model="ir.ui.view">
6 <field name="name">Import Batch Numbers</field>
7 <field name="model">wizard.import.batch</field>
8 <field name="type">tree</field>
9 <field name="arch" type="xml">
10 <tree string="Import Batch Numbers" noteditable="True">
11 <field name="start_date" />
12 <field name="end_date" />
13 <field name="progression" widget="progressbar" />
14 <field name="state" />
15 </tree>
16 </field>
17 </record>
18
19 <record id="view_wizard_import_batch" model="ir.ui.view">
20 <field name="name">Import Batch Numbers</field>
21 <field name="model">wizard.import.batch</field>
22 <field name="type">form</field>
23 <field name="arch" type="xml">
24 <form string="Import Batch Number" hide_duplicate_button="1">
25 <field name="show_error" invisible="1" />
26 <field name="show_warning" invisible="1" />
27
28 <group colspan="4" col="6">
29 <label string="Select a file to import: " align="1.0" />
30 <field name="import_file" nolabel="True" colspan="1" />
31 <label colspan="2" string="" />
32 <field name="start_date" />
33 <newline />
34 <label string="Or download a template: " align="1.0" />
35 <button name="download_template_file" string="" icon="gtk-save" help="Download template file" type="object" />
36 <label colspan="2" string="" />
37 <field name="end_date" />
38 <group colspan="6" col="4">
39 <field name="state" />
40 <field name="progression" widget="progressbar" />
41 </group>
42 </group>
43
44 <separator colspan="4" string="Information" />
45 <field name="info_message" colspan="4" nolabel="1" />
46
47 <group colspan="4" attrs="{'invisible': [('state', '=', 'done')]}">
48 <separator colspan="4" string="Actions" />
49 <button name="run_import" type="object" string="Run import" icon="gtk-execute" attrs="{'invisible': [('state', '!=', 'draft')]}" />
50 <button name="update" type="object" string="Update" icon="gtk-execute" attrs="{'invisible': [('state', '!=', 'progress')]}" />
51 </group>
52
53 <group colspan="4" attrs="{'invisible': [('show_warning', '=', False)]}">
54 <separator colspan="4" string="Warning messages" />
55 <field name="warning_message" nolabel="1" colspan="4" />
56 </group>
57
58 <group colspan="4" attrs="{'invisible': [('show_error', '=', False)]}">
59 <separator colspan="4" string="Error messages" />
60 <field name="error_message" nolabel="1" colspan="4" />
61 </group>
62 </form>
63 </field>
64 </record>
65
66 <act_window
67 name="Import Batch Numbers"
68 res_model="wizard.import.batch"
69 src_model="wizard.import.batch"
70 view_mode="tree,form"
71 target="current"
72 key2="False"
73 id="action_wizard_import_batch" />
74
75 <menuitem
76 action="action_wizard_import_batch"
77 sequence="5"
78 name="Import Batch Numbers"
79 parent="stock.menu_action_production_lot_form"
80 id="menu_action_wizard_import_batch" />
81
82 </data>
83</openerp>
084
=== modified file 'bin/addons/msf_profile/i18n/en_MF.po'
--- bin/addons/msf_profile/i18n/en_MF.po 2013-01-31 13:07:22 +0000
+++ bin/addons/msf_profile/i18n/en_MF.po 2016-08-18 14:00:36 +0000
@@ -799,3 +799,33 @@
799#: view:purchase.order:0799#: view:purchase.order:0
800msgid "Delivery & Invoicing"800msgid "Delivery & Invoicing"
801msgstr "Delivery"801msgstr "Delivery"
802
803#. module: msf_doc_import
804#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:36
805#, python-format
806msgid "get_import_batch_headers_name"
807msgstr "Batch number"
808
809#. module: msf_doc_import
810#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:37
811#, python-format
812msgid "get_import_batch_headers_product_code"
813msgstr "Product Code"
814
815#. module: msf_doc_import
816#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:38
817#, python-format
818msgid "get_import_batch_headers_product_desc"
819msgstr "Product Description"
820
821#. module: msf_doc_import
822#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:39
823#, python-format
824msgid "get_import_batch_headers_life_date"
825msgstr "Expiry date"
826
827#. module: msf_doc_import
828#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:40
829#, python-format
830msgid "get_import_batch_headers_type"
831msgstr "Type"
802832
=== modified file 'bin/addons/msf_profile/i18n/fr_MF.po'
--- bin/addons/msf_profile/i18n/fr_MF.po 2016-08-09 15:31:52 +0000
+++ bin/addons/msf_profile/i18n/fr_MF.po 2016-08-18 14:00:36 +0000
@@ -14574,6 +14574,8 @@
14574#. modules: msf_doc_import, register_accounting14574#. modules: msf_doc_import, register_accounting
14575#: field:msf.doc.import.accounting,progression:014575#: field:msf.doc.import.accounting,progression:0
14576#: field:wizard.register.import,progression:014576#: field:wizard.register.import,progression:0
14577#: field:abstract.wizard.import,progression:0
14578#: field:wizard.import.batch,progression:0
14577msgid "Progression"14579msgid "Progression"
14578msgstr "Progression"14580msgstr "Progression"
1457914581
@@ -23497,6 +23499,54 @@
23497#: code:addons/purchase_msf/purchase_msf.py:5523499#: code:addons/purchase_msf/purchase_msf.py:55
23498#: code:addons/purchase_msf/purchase_msf.py:8723500#: code:addons/purchase_msf/purchase_msf.py:87
23499#: field:stock.move,inactive_error:023501#: field:stock.move,inactive_error:0
23502#: code:addons/msf_doc_import/account.py:72
23503#: code:addons/msf_doc_import/account.py:201
23504#: code:addons/msf_doc_import/account.py:234
23505#: code:addons/msf_doc_import/account.py:480
23506#: code:addons/msf_doc_import/stock_picking.py:60
23507#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:60
23508#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:296
23509#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:321
23510#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:327
23511#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:333
23512#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:352
23513#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:379
23514#: code:addons/msf_doc_import/wizard/stock_partial_picking.py:77
23515#: code:addons/msf_doc_import/wizard/stock_partial_picking.py:254
23516#: code:addons/msf_doc_import/wizard/stock_partial_picking.py:258
23517#: code:addons/msf_doc_import/wizard/stock_partial_picking.py:785
23518#: code:addons/msf_doc_import/wizard/stock_partial_picking.py:788
23519#: code:addons/msf_doc_import/wizard/wizard_delete_lines.py:78
23520#: code:addons/msf_doc_import/wizard/wizard_delete_lines.py:612
23521#: code:addons/msf_doc_import/wizard/wizard_import_auto_supply_line.py:140
23522#: code:addons/msf_doc_import/wizard/wizard_import_auto_supply_line.py:157
23523#: code:addons/msf_doc_import/wizard/wizard_import_order_cycle_line.py:141
23524#: code:addons/msf_doc_import/wizard/wizard_import_order_cycle_line.py:154
23525#: code:addons/msf_doc_import/wizard/wizard_import_picking_line.py:165
23526#: code:addons/msf_doc_import/wizard/wizard_import_picking_line.py:174
23527#: code:addons/msf_doc_import/wizard/wizard_import_picking_line.py:183
23528#: code:addons/msf_doc_import/wizard/wizard_import_product_list.py:81
23529#: code:addons/msf_doc_import/wizard/wizard_import_stock_warehouse_order_point_line.py:162
23530#: code:addons/msf_doc_import/wizard/wizard_import_stock_warehouse_order_point_line.py:170
23531#: code:addons/msf_doc_import/wizard/wizard_import_supplier_catalogue.py:164
23532#: code:addons/msf_doc_import/wizard/wizard_import_threshold_value_line.py:145
23533#: code:addons/msf_doc_import/wizard/wizard_import_threshold_value_line.py:153
23534#: code:addons/msf_doc_import/wizard/wizard_in_simulation_screen.py:263
23535#: code:addons/msf_doc_import/wizard/wizard_in_simulation_screen.py:270
23536#: code:addons/msf_doc_import/wizard/wizard_in_simulation_screen.py:275
23537#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:341
23538#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:346
23539#: selection:msf.doc.import.accounting,state:0
23540#: field:purchase.import.xml.line,error_list:0
23541#: field:purchase.line.import.xml.line,error_list:0
23542#: view:sale.order:0
23543#: view:sale.order.line:0
23544#: field:tender.line,inactive_error:0
23545#: selection:wizard.import.in.line.simulation.screen,type_change:0
23546#: selection:wizard.import.in.simulation.screen,state:0
23547#: selection:wizard.import.po.simulation.screen,state:0
23548#: selection:wizard.import.po.simulation.screen.line,type_change:0
23549#: selection:wizard.simu.import.po.line,change_type:0
23500#, python-format23550#, python-format
23501msgid "Error"23551msgid "Error"
23502msgstr "Error"23552msgstr "Error"
@@ -31105,6 +31155,16 @@
31105#: model:ir.ui.menu,name:sync_client.update_menu31155#: model:ir.ui.menu,name:sync_client.update_menu
31106#: view:sync.client.update_entity:031156#: view:sync.client.update_entity:0
31107#: view:wizard.register.import:031157#: view:wizard.register.import:0
31158#: view:wizard.import.auto.supply.line:0
31159#: view:wizard.import.batch:0
31160#: view:wizard.import.in.simulation.screen:0
31161#: view:wizard.import.order.cycle.line:0
31162#: view:wizard.import.pick.line:0
31163#: view:wizard.import.po.simulation.screen:0
31164#: view:wizard.import.product.list:0
31165#: view:wizard.import.stock.warehouse.orderpoint.line:0
31166#: view:wizard.import.supplier.catalogue:0
31167#: view:wizard.import.threshold.value.line:0
31108msgid "Update"31168msgid "Update"
31109msgstr "Mettre à jour"31169msgstr "Mettre à jour"
3111031170
@@ -40101,16 +40161,20 @@
40101msgid "End Period"40161msgid "End Period"
40102msgstr "Période de fin"40162msgstr "Période de fin"
4010340163
40104#. module: account40164#. modules: account, msf_doc_import
40105#: report:pl.account.horizontal:040165#: report:pl.account.horizontal:0
40106#: report:pl.account:040166#: report:pl.account:0
40167#: field:abstract.wizard.import,start_date:0
40168#: field:wizard.import.batch,start_date:0
40107#, python-format40169#, python-format
40108msgid "Start Date"40170msgid "Start Date"
40109msgstr "Date de début"40171msgstr "Date de début"
4011040172
40111#. module: account40173#. modules: account, msf_doc_import
40112#: report:pl.account.horizontal:040174#: report:pl.account.horizontal:0
40113#: report:pl.account:040175#: report:pl.account:0
40176#: field:abstract.wizard.import,end_date:0
40177#: field:wizard.import.batch,end_date:0
40114#, python-format40178#, python-format
40115msgid "End Date"40179msgid "End Date"
40116msgstr "Date de fin"40180msgstr "Date de fin"
@@ -43796,6 +43860,17 @@
43796#: field:real.average.consumption,state:043860#: field:real.average.consumption,state:0
43797#: field:msf.doc.import.accounting,state:043861#: field:msf.doc.import.accounting,state:0
43798#: field:wizard.import.po,state:043862#: field:wizard.import.po,state:0
43863#: field:abstract.wizard.import,state:0
43864#: field:wizard.import.auto.supply.line,state:0
43865#: field:wizard.import.batch,state:0
43866#: field:wizard.import.in.simulation.screen,state:0
43867#: field:wizard.import.order.cycle.line,state:0
43868#: field:wizard.import.pick.line,state:0
43869#: field:wizard.import.po.simulation.screen,state:0
43870#: field:wizard.import.product.list,state:0
43871#: field:wizard.import.stock.warehouse.orderpoint.line,state:0
43872#: field:wizard.import.supplier.catalogue,state:0
43873#: field:wizard.import.threshold.value.line,state:0
43799msgid "State"43874msgid "State"
43800msgstr "État"43875msgstr "État"
4380143876
@@ -54493,6 +54568,54 @@
54493#: code:addons/register_accounting/wizard/wizard_register_import.py:25854568#: code:addons/register_accounting/wizard/wizard_register_import.py:258
54494#: code:addons/register_accounting/wizard/wizard_register_import.py:26554569#: code:addons/register_accounting/wizard/wizard_register_import.py:265
54495#: selection:wizard.register.import,state:054570#: selection:wizard.register.import,state:0
54571#: code:addons/msf_doc_import/account.py:72
54572#: code:addons/msf_doc_import/account.py:201
54573#: code:addons/msf_doc_import/account.py:234
54574#: code:addons/msf_doc_import/account.py:480
54575#: code:addons/msf_doc_import/stock_picking.py:60
54576#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:60
54577#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:296
54578#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:321
54579#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:327
54580#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:333
54581#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:352
54582#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:379
54583#: code:addons/msf_doc_import/wizard/stock_partial_picking.py:77
54584#: code:addons/msf_doc_import/wizard/stock_partial_picking.py:254
54585#: code:addons/msf_doc_import/wizard/stock_partial_picking.py:258
54586#: code:addons/msf_doc_import/wizard/stock_partial_picking.py:785
54587#: code:addons/msf_doc_import/wizard/stock_partial_picking.py:788
54588#: code:addons/msf_doc_import/wizard/wizard_delete_lines.py:78
54589#: code:addons/msf_doc_import/wizard/wizard_delete_lines.py:612
54590#: code:addons/msf_doc_import/wizard/wizard_import_auto_supply_line.py:140
54591#: code:addons/msf_doc_import/wizard/wizard_import_auto_supply_line.py:157
54592#: code:addons/msf_doc_import/wizard/wizard_import_order_cycle_line.py:141
54593#: code:addons/msf_doc_import/wizard/wizard_import_order_cycle_line.py:154
54594#: code:addons/msf_doc_import/wizard/wizard_import_picking_line.py:165
54595#: code:addons/msf_doc_import/wizard/wizard_import_picking_line.py:174
54596#: code:addons/msf_doc_import/wizard/wizard_import_picking_line.py:183
54597#: code:addons/msf_doc_import/wizard/wizard_import_product_list.py:81
54598#: code:addons/msf_doc_import/wizard/wizard_import_stock_warehouse_order_point_line.py:162
54599#: code:addons/msf_doc_import/wizard/wizard_import_stock_warehouse_order_point_line.py:170
54600#: code:addons/msf_doc_import/wizard/wizard_import_supplier_catalogue.py:164
54601#: code:addons/msf_doc_import/wizard/wizard_import_threshold_value_line.py:145
54602#: code:addons/msf_doc_import/wizard/wizard_import_threshold_value_line.py:153
54603#: code:addons/msf_doc_import/wizard/wizard_in_simulation_screen.py:263
54604#: code:addons/msf_doc_import/wizard/wizard_in_simulation_screen.py:270
54605#: code:addons/msf_doc_import/wizard/wizard_in_simulation_screen.py:275
54606#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:341
54607#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:346
54608#: selection:msf.doc.import.accounting,state:0
54609#: field:purchase.import.xml.line,error_list:0
54610#: field:purchase.line.import.xml.line,error_list:0
54611#: view:sale.order:0
54612#: view:sale.order.line:0
54613#: field:tender.line,inactive_error:0
54614#: selection:wizard.import.in.line.simulation.screen,type_change:0
54615#: selection:wizard.import.in.simulation.screen,state:0
54616#: selection:wizard.import.po.simulation.screen,state:0
54617#: selection:wizard.import.po.simulation.screen.line,type_change:0
54618#: selection:wizard.simu.import.po.line,change_type:0
54496#, python-format54619#, python-format
54497msgid "Error"54620msgid "Error"
54498msgstr "Erreur"54621msgstr "Erreur"
@@ -61471,6 +61594,13 @@
61471msgid "Information"61594msgid "Information"
61472msgstr "Information"61595msgstr "Information"
6147361596
61597#. module: msf_doc_import
61598#: field:abstract.wizard.import,info_message:0
61599#: view:wizard.import.batch:0
61600#: field:wizard.import.batch,info_message:0
61601msgid "Information"
61602msgstr "Informations"
61603
61474#. module: base61604#. module: base
61475#: code:addons/base/module/wizard/base_language_install.py:5561605#: code:addons/base/module/wizard/base_language_install.py:55
61476#, python-format61606#, python-format
@@ -64599,6 +64729,11 @@
64599#: field:wizard.import.stock.warehouse.orderpoint.line,file:064729#: field:wizard.import.stock.warehouse.orderpoint.line,file:0
64600#: view:wizard.import.threshold.value.line:064730#: view:wizard.import.threshold.value.line:0
64601#: field:wizard.import.threshold.value.line,file:064731#: field:wizard.import.threshold.value.line,file:0
64732#: field:abstract.wizard.import,import_file:0
64733#: field:wizard.import.batch,import_file:0
64734#: field:wizard.import.in.simulation.screen,file_to_import:0
64735#: view:wizard.import.supplier.catalogue:0
64736#: field:wizard.import.supplier.catalogue,file:0
64602msgid "File to import"64737msgid "File to import"
64603msgstr "Fichier à importer"64738msgstr "Fichier à importer"
6460464739
@@ -73821,6 +73956,7 @@
73821#, python-format73956#, python-format
73822msgid "Not Created"73957msgid "Not Created"
73823msgstr "Non Créé"73958msgstr "Non Créé"
73959<<<<<<< TREE
7382473960
73825#. module: account73961#. module: account
73826#: code:addons/account/wizard/account_subscription_generate.py:073962#: code:addons/account/wizard/account_subscription_generate.py:0
@@ -73859,3 +73995,427 @@
73859#, python-format73995#, python-format
73860msgid "PatchFailed: A script during upgrade has failed. Synchronization is forbidden. Please contact your administrator"73996msgid "PatchFailed: A script during upgrade has failed. Synchronization is forbidden. Please contact your administrator"
73861msgstr "PatchFailed: Un script a échoué pendant la mise à jour. La synchronizsation est désactivée. Veuillez contacter votre administrateur"73997msgstr "PatchFailed: Un script a échoué pendant la mise à jour. La synchronizsation est désactivée. Veuillez contacter votre administrateur"
73998=======
73999
74000#. module: msf_doc_import
74001#: model:ir.actions.act_window,name:msf_doc_import.action_wizard_import_batch
74002#: model:ir.ui.menu,name:msf_doc_import.menu_action_wizard_import_batch
74003#: view:wizard.import.batch:0
74004msgid "Import Batch Numbers"
74005msgstr "Importer Numéros de Lot"
74006
74007#. module: msf_doc_import
74008#: view:wizard.import.batch:0
74009msgid "Select a file to import: "
74010msgstr "Sélectionnez un fichier à importer: "
74011
74012#. module: msf_doc_import
74013#: view:wizard.import.batch:0
74014msgid "Or download a template: "
74015msgstr "Ou téléchargez le modèle: "
74016
74017#. module: msf_doc_import
74018#: view:wizard.import.batch:0
74019msgid "Run import"
74020msgstr "Démarrer l'import"
74021
74022#. module: msf_doc_import
74023#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:336
74024#, python-format
74025msgid "No file to import. Please select a file or download the template file and fill it."
74026msgstr "Aucun fichier à importer. Veuillez sélectionner un fichier ou télécharger le modèle et le remplir."
74027
74028#. module: msf_doc_import
74029#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:168
74030#, python-format
74031msgid "The Type of the batch number should be 'Standard' or 'Internal'"
74032msgstr "Le type du numéro de lot doit être 'Standard' ou 'Interne'"
74033
74034#. module: msf_doc_import
74035#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:166
74036#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:171
74037#, python-format
74038msgid "Standard"
74039msgstr "Standard"
74040
74041#. module: msf_doc_import
74042#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:166
74043#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:173
74044#, python-format
74045msgid "Internal"
74046msgstr "Interne"
74047
74048#. module: msf_doc_import
74049#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:187
74050#, python-format
74051msgid "You cannot create a batch number for a product that is not 'Perishable' nor 'Batch mandatory'"
74052msgstr "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"
74053
74054#. module: msf_doc_import
74055#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:192
74056#, python-format
74057msgid "You cannot create an 'Internal' batch number for a 'Batch mandatory' product"
74058msgstr "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"
74059
74060#. module: msf_doc_import
74061#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:197
74062#, python-format
74063msgid "You cannot create a 'Standard' batch number for a non 'Batch mandatory' product"
74064msgstr "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"
74065
74066#. module: msf_doc_import
74067#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:202
74068#, python-format
74069msgid "For a 'Standard' batch number, you have to define value in the 'Name' column"
74070msgstr "Pour un numéro de lot 'Standard', vous devez définir une valeur dans la colonne 'Nom'"
74071
74072#. module: msf_doc_import
74073#: code:addons/msf_doc_import/wizard/wizard_in_simulation_screen.py:1147
74074#: code:addons/msf_doc_import/wizard/wizard_in_simulation_screen.py:1222
74075#, python-format
74076msgid "A batch is defined on the imported file but the product doesn't require batch number - Batch ignored"
74077msgstr "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é"
74078
74079#. module: msf_doc_import
74080#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:225
74081#, python-format
74082msgid "Name of the batch will be ignored because the batch is 'Internal' so name is created by the system"
74083msgstr "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"
74084
74085#. module: msf_doc_import
74086#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:218
74087#, python-format
74088msgid "A batch number with the same parameters already exists in the system"
74089msgstr "Un numéro de lot avec les mêmes paramèters existe déjà dans le système"
74090
74091#. module: msf_doc_import
74092#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:258
74093#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:264
74094#, python-format
74095msgid "Line %s: %s"
74096msgstr "Ligne %s : %s"
74097
74098#. module: msf_doc_import
74099#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:54
74100#, python-format
74101msgid "Defined type of header '%s' is not in the list of possible type: %s - Please contact\n"
74102"your support team and give us this message.\n"
74103" "
74104msgstr "Le type d'en-tête \'%s\' n'est pas dans la liste des types possibles : %s - Veuillez contacter\n"
74105"votre équipe de support et leur indiquer ce message.\n"
74106" "
74107
74108#. module: msf_doc_import
74109#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:100
74110#, python-format
74111msgid "The column '%s' is required"
74112msgstr "La colonne '%s' est obligatoire"
74113
74114#. module: msf_doc_import
74115#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:120
74116#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:122
74117#, python-format
74118msgid "The date format was not correct"
74119msgstr "Le format de date n'est pas correct"
74120
74121#. module: msf_doc_import
74122#: field:abstract.wizard.import,model_name:0
74123#: field:wizard.import.batch,model_name:0
74124msgid "Model to import"
74125msgstr "Modèle à importer"
74126
74127#. module: msf_doc_import
74128#: field:abstract.wizard.import,parent_model_name:0
74129#: field:wizard.import.batch,parent_model_name:0
74130msgid "Model of the parent"
74131msgstr "Nodèle du parent"
74132
74133#. module: msf_doc_import
74134#: help:abstract.wizard.import,parent_model_name:0
74135#: help:wizard.import.batch,parent_model_name:0
74136msgid "To go back to the parent when the window is closed"
74137msgstr "Pour revenir au parent quand la fenêtre est fermée"
74138
74139#. module: msf_doc_import
74140#: field:abstract.wizard.import,parent_record_id:0
74141#: field:wizard.import.batch,parent_record_id:0
74142msgid "ID of the parent record"
74143msgstr "ID de l'enregistrement parent"
74144
74145#. module: msf_doc_import
74146#: field:abstract.wizard.import,template_file:0
74147#: field:wizard.import.batch,template_file:0
74148msgid "Template file"
74149msgstr "Fichier modèle"
74150
74151#. module: msf_doc_import
74152#: field:abstract.wizard.import,template_filename:0
74153#: field:wizard.import.batch,template_filename:0
74154msgid "Template filename"
74155msgstr "Nom du fichier modèle"
74156
74157#. module: msf_doc_import
74158#: field:abstract.wizard.import,error_message:0
74159#: field:msf.doc.import.accounting,error_ids:0
74160#: field:wizard.import.batch,error_message:0
74161msgid "Errors"
74162msgstr "Erreurs"
74163
74164#. module: msf_doc_import
74165#: field:abstract.wizard.import,warning_message:0
74166#: field:wizard.import.batch,warning_message:0
74167msgid "Warnings"
74168msgstr "Avertissements"
74169
74170#. module: msf_doc_import
74171#: field:abstract.wizard.import,total_lines_to_import:0
74172#: field:wizard.import.batch,total_lines_to_import:0
74173msgid "# of lines to import"
74174msgstr "# de ligens à importer"
74175
74176#. module: msf_doc_import
74177#: field:abstract.wizard.import,total_lines_imported:0
74178#: field:wizard.import.batch,total_lines_imported:0
74179msgid "# of lines imported"
74180msgstr "# de lignes importées"
74181
74182#. module: msf_doc_import
74183#: selection:abstract.wizard.import,state:0
74184#: selection:wizard.import.batch,state:0
74185msgid "Not started"
74186msgstr "Non démarré"
74187
74188#. module: msf_doc_import
74189#: selection:wizard.import.auto.supply.line,state:0
74190#: selection:wizard.import.order.cycle.line,state:0
74191#: selection:wizard.import.pick.line,state:0
74192#: selection:wizard.import.product.list,state:0
74193#: selection:wizard.import.stock.warehouse.orderpoint.line,state:0
74194#: selection:wizard.import.supplier.catalogue,state:0
74195#: selection:wizard.import.threshold.value.line,state:0
74196msgid "In Progress"
74197msgstr "En cours"
74198
74199#. module: msf_doc_import
74200#: selection:abstract.wizard.import,state:0
74201#: selection:wizard.import.auto.supply.line,state:0
74202#: selection:wizard.import.batch,state:0
74203#: selection:wizard.import.in.simulation.screen,state:0
74204#: selection:wizard.import.order.cycle.line,state:0
74205#: selection:wizard.import.pick.line,state:0
74206#: selection:wizard.import.po.simulation.screen,state:0
74207#: selection:wizard.import.product.list,state:0
74208#: selection:wizard.import.stock.warehouse.orderpoint.line,state:0
74209#: selection:wizard.import.supplier.catalogue,state:0
74210#: selection:wizard.import.threshold.value.line,state:0
74211msgid "Done"
74212msgstr "Terminé"
74213
74214#. module: msf_doc_import
74215#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:280
74216#, python-format
74217msgid "Not allowed"
74218msgstr "Non autorisé"
74219
74220#. module: msf_doc_import
74221#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:281
74222#, python-format
74223msgid "You cannot duplicate a %s document!"
74224msgstr "Vous ne pouvez pas dupliquer un document %s !"
74225
74226#. module: msf_doc_import
74227#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:297
74228#, python-format
74229msgid "No 'run_import' action is defined for the object '%s'!"
74230msgstr "Aucune action 'run_import' n'est définie pour l'objet '%s'!"
74231
74232#. module: msf_doc_import
74233#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:328
74234#, python-format
74235msgid "Import can be run only on draft wizard."
74236msgstr "L'important ne peut être effectué que sur des assistants en état 'Non démarré'"
74237
74238#. module: msf_doc_import
74239#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:334
74240#, python-format
74241msgid "The given file seems not to be encoding in UTF-8. Please check the encoding of the file and re-try."
74242msgstr "Le fichier donnée ne semble pas être encodé en UTF-8. Veuillez vérifier l'encodage du fichie et réessayez."
74243
74244#. module: msf_doc_import
74245#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:396
74246#, python-format
74247msgid "Line is empty"
74248msgstr "La ligne est vide"
74249
74250#. module: msf_doc_import
74251#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:399
74252#, python-format
74253msgid "Number of columns (%s) in the line are larger than expected (%s)."
74254msgstr "Le nombre de colonnes (%s) de la ligne est plus grand qu'attendu (%s)."
74255
74256#. module: msf_doc_import
74257#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:428
74258#, python-format
74259msgid "No product found for the code '%s'"
74260msgstr "Aucun produit trouvé pour le code '%s'"
74261
74262#. module: msf_doc_import
74263#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:36
74264#, python-format
74265msgid "get_import_batch_headers_name"
74266msgstr "Numéro de lot"
74267
74268#. module: msf_doc_import
74269#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:37
74270#, python-format
74271msgid "get_import_batch_headers_product_code"
74272msgstr "Code du produit"
74273
74274#. module: msf_doc_import
74275#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:38
74276#, python-format
74277msgid "get_import_batch_headers_product_desc"
74278msgstr "Description du produit"
74279
74280#. module: msf_doc_import
74281#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:39
74282#, python-format
74283msgid "get_import_batch_headers_life_date"
74284msgstr "Date d'expiration"
74285
74286#. module: msf_doc_import
74287#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:40
74288#, python-format
74289msgid "get_import_batch_headers_type"
74290msgstr "Type"
74291
74292#. module: msf_doc_import
74293#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:285
74294#, python-format
74295msgid "no data will be imported until all the error messages are corrected"
74296msgstr "aucune donnée ne sera importée tant que toutes les erreurs ne seront pas corrigées"
74297
74298#. module: msf_doc_import
74299#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:37
74300#: code:addons/msf_doc_import/wizard/wizard_in_simulation_screen.py:54
74301#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:57
74302#: field:wizard.simu.import.po.line,import_product_code:0
74303#: field:wizard.simu.import.po.line,initial_product_code:0
74304#, python-format
74305msgid "Product Code"
74306msgstr "Code du produit"
74307
74308#. module: msf_doc_import
74309#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:38
74310#: code:addons/msf_doc_import/wizard/wizard_in_simulation_screen.py:55
74311#: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:58
74312#: field:wizard.simu.import.po.line,import_product_name:0
74313#: field:wizard.simu.import.po.line,initial_product_name:0
74314#, python-format
74315msgid "Product Description"
74316msgstr "Description du produit"
74317
74318#. module: msf_doc_import
74319#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:39
74320#, python-format
74321msgid "Life Date"
74322msgstr "Date d'expiration"
74323
74324#. module: msf_doc_import
74325#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:40
74326#, python-format
74327msgid "Type"
74328msgstr "Type"
74329
74330#. module: msf_doc_import
74331#: field:abstract.wizard.import,show_error:0
74332#: field:wizard.import.batch,show_error:0
74333msgid "Show error message ?"
74334msgstr "Voir les messages d'erreurs ?"
74335
74336#. module: msf_doc_import
74337#: field:abstract.wizard.import,show_warning:0
74338#: field:wizard.import.batch,show_warning:0
74339msgid "Show warning message ?"
74340msgstr "Voir les avertissements ?"
74341
74342#. module: msf_doc_import
74343#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:260
74344#, python-format
74345msgid "Select a file to import and click on 'Run import' button."
74346msgstr "Sélectionnez un fichier à importer et cliquez sur le bouton 'Démarrer l'import'."
74347
74348#. module: msf_doc_import
74349#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:276
74350#, python-format
74351msgid "imported"
74352msgstr "importées"
74353
74354#. module: msf_doc_import
74355#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:276
74356#, python-format
74357msgid "without errors"
74358msgstr "sans erreurs"
74359
74360#. module: msf_doc_import
74361#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:269
74362#, python-format
74363msgid "Processing of file completed in %s second(s)!\n"
74364"- Total lines to import: %s\n"
74365"- Total lines %s: %s %s\n"
74366"- Total lines with errors: %s %s\n"
74367"%s\n"
74368" "
74369msgstr "Traitement du fichier terminé en %s seconde(s) !\n"
74370"- Nombre de lignes à importer : %s\n"
74371"- Nombre de lignes %s : %s %s\n"
74372"- Nombre de lignes avec erreurs : %s %s\n"
74373"%s\n"
74374" "
74375
74376#. module: msf_doc_import
74377#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:279
74378#, python-format
74379msgid "(%s line(s) with warning - see warning messages below)"
74380msgstr "(%s ligne(s) avec des avertissements - voir les avertissements ci-dessous)"
74381
74382#. module: msf_doc_import
74383#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:283
74384#, python-format
74385msgid "(see error messages below)"
74386msgstr "(voir les erreurs ci-dessous)"
74387
74388#. module: msf_doc_import
74389#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:234
74390#, python-format
74391msgid "Name of the batch will be ignored because the batch is 'Internal' so name is created by the system"
74392msgstr "Le nom du batch sera ignoré car le batch est 'Interne' donc son nom sera créé par le système"
74393
74394#. module: msf_doc_import
74395#: view:wizard.import.batch:0
74396msgid "Warning messages"
74397msgstr "Messages d'avertissement"
74398
74399#. module: msf_doc_import
74400#: view:wizard.import.batch:0
74401msgid "Error messages"
74402msgstr "Messages d'erreur"
74403
74404#. module: msf_doc_import
74405#: code:addons/msf_doc_import/wizard/wizard_import_batch.py:104
74406#, python-format
74407msgid "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"
74408msgstr "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"
74409
74410#. module: msf_doc_import
74411#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:385
74412#, python-format
74413msgid "The column '%s' of the Excel file should be '%s', not '%s'."
74414msgstr "La colonne '%s' du fichier Excel doit être '%s', pas '%s'."
74415
74416#. module: msf_doc_import
74417#: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:381
74418#, python-format
74419msgid "The column '%s' is not present in the file."
74420msgstr "La colonne '%s' n'est pas présente dans le fichier."
74421>>>>>>> MERGE-SOURCE
7386274422
=== modified file 'bin/addons/purchase_override/purchase.py'
--- bin/addons/purchase_override/purchase.py 2016-08-03 16:06:05 +0000
+++ bin/addons/purchase_override/purchase.py 2016-08-18 14:00:36 +0000
@@ -2617,8 +2617,8 @@
2617 help='Header level dates has to be populated by default with the possibility of manual updates'),2617 help='Header level dates has to be populated by default with the possibility of manual updates'),
2618 'name': fields.function(_get_name, method=True, type='char', string='Name', store=False),2618 'name': fields.function(_get_name, method=True, type='char', string='Name', store=False),
2619 }2619 }
2620 def create(self, cr, uid, vals, context=None):
26202621
2621 def create(self, cr, uid, vals, context=None):
2622 '''2622 '''
2623 Set the line number to 02623 Set the line number to 0
2624 '''2624 '''
26252625
=== modified file 'bin/addons/report_webkit/webkit_report.py'
--- bin/addons/report_webkit/webkit_report.py 2016-02-16 15:18:57 +0000
+++ bin/addons/report_webkit/webkit_report.py 2016-08-18 14:00:36 +0000
@@ -41,7 +41,9 @@
41import netsvc41import netsvc
42import pooler42import pooler
43from report_helper import WebKitHelper43from report_helper import WebKitHelper
44from report.report_sxw import report_sxw, report_rml, _int_format, _float_format, _date_format, _dttime_format, browse_record_list44from report.report_sxw import report_sxw, report_rml, _int_format, \
45 _float_format, _date_format, _dttime_format, browse_record_list, \
46 rml_parse
45import addons47import addons
46import tools48import tools
47from tools.translate import _49from tools.translate import _
@@ -412,3 +414,18 @@
412 if not result:414 if not result:
413 return (False,False)415 return (False,False)
414 return result416 return result
417
418
419class XlsWebKitParser(WebKitParser):
420 def __init__(self, name, table, rml=False, parser=rml_parse, header='external', store=False):
421 WebKitParser.__init__(self, name, table, rml=rml, parser=parser, header=header, store=store)
422
423 def create_single_pdf(self, cr, uid, ids, data, report_xml, context=None):
424 report_xml.webkit_debug = 1
425 report_xml.header = " "
426 report_xml.webkit_header.html = "${_debug or ''|n}"
427 return super(XlsWebKitParser, self).create_single_pdf(cr, uid, ids, data, report_xml, context)
428
429 def create(self, cr, uid, ids, data, context=None):
430 a = super(XlsWebKitParser, self).create(cr, uid, ids, data, context)
431 return (a[0], 'xls')
415432
=== modified file 'bin/addons/spreadsheet_xml/spreadsheet_xml.py'
--- bin/addons/spreadsheet_xml/spreadsheet_xml.py 2014-11-05 08:06:06 +0000
+++ bin/addons/spreadsheet_xml/spreadsheet_xml.py 2016-08-18 14:00:36 +0000
@@ -130,6 +130,9 @@
130 ret.append(self.get(wb, 'Name'))130 ret.append(self.get(wb, 'Name'))
131 return ret131 return ret
132132
133 def getNbRows(self,worksheet=1):
134 return len(self.xmlobj.xpath('//ss:Worksheet[%d]/ss:Table[1]/ss:Row' % (worksheet,), **self.xa))
135
133 def getRows(self,worksheet=1):136 def getRows(self,worksheet=1):
134 table = self.xmlobj.xpath('//ss:Worksheet[%d]/ss:Table[1]'%(worksheet, ), **self.xa)137 table = self.xmlobj.xpath('//ss:Worksheet[%d]/ss:Table[1]'%(worksheet, ), **self.xa)
135 return SpreadsheetRow(table[0].getiterator(etree.QName(self.defaultns, 'Row')))138 return SpreadsheetRow(table[0].getiterator(etree.QName(self.defaultns, 'Row')))

Subscribers

People subscribed via source and target branches

to all changes: