Merge lp:~fabien-morin/unifield-server/fm-us-2619-2661-merged into lp:unifield-server
- fm-us-2619-2661-merged
- Merge into trunk
Proposed by
jftempo
Status: | Rejected |
---|---|
Rejected by: | jftempo |
Proposed branch: | lp:~fabien-morin/unifield-server/fm-us-2619-2661-merged |
Merge into: | lp:unifield-server |
Diff against target: |
2792 lines (+2080/-112) 16 files modified
bin/addons/base/i18n/fr.po (+12/-0) bin/addons/base/ir/ir_actions.py (+1/-1) bin/addons/import_data/import_data.py (+4/-1) bin/addons/msf_doc_import/__init__.py (+1/-0) bin/addons/msf_doc_import/__openerp__.py (+1/-0) bin/addons/msf_doc_import/doc_import_report.xml (+11/-0) bin/addons/msf_doc_import/msf_import_export.py (+792/-0) bin/addons/msf_doc_import/msf_import_export_conf.py (+530/-0) bin/addons/msf_doc_import/report/export_generic.mako (+137/-0) bin/addons/msf_doc_import/report/import_generic_template.mako (+21/-0) bin/addons/msf_doc_import/report/import_generic_template.py (+52/-0) bin/addons/msf_doc_import/view/msf_import_export_view.xml (+96/-0) bin/addons/msf_doc_import/wizard/abstract_wizard_import.py (+16/-3) bin/addons/msf_profile/i18n/fr_MF.po (+364/-96) bin/addons/product_nomenclature/product_nomenclature.py (+1/-1) bin/osv/orm.py (+41/-10) |
To merge this branch: | bzr merge lp:~fabien-morin/unifield-server/fm-us-2619-2661-merged |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
UniField Reviewer Team | Pending | ||
Review via email: mp+326749@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
- 4325. By Fabien MORIN
-
US-2619-2661 [FIX] do not apply this change in the context of
sync_update_execution as both the import and the update execution uses the same
import_data method. - 4326. By Fabien MORIN
-
US-2619-2661 [MERGE] with latest trunk
Unmerged revisions
- 4326. By Fabien MORIN
-
US-2619-2661 [MERGE] with latest trunk
- 4325. By Fabien MORIN
-
US-2619-2661 [FIX] do not apply this change in the context of
sync_update_execution as both the import and the update execution uses the same
import_data method. - 4324. By Fabien MORIN
-
US-2619 US-2661 [FIX] do not allow new line charcter in strings at import
- 4323. By Fabien MORIN
-
US-2619 US-2661 [MERGE] with 2619 improvments
- 4322. By Fabien MORIN
-
US-2619 US-2661 [MERGE] small fix from US-2661
- 4321. By Fabien MORIN
-
US-2619 - US-2661 [MERGE] last modification of US-2661
- 4320. By Fabien MORIN
-
US-2619 - US-2661 [MERGE] both ticket in a same branch
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'bin/addons/base/i18n/fr.po' | |||
2 | --- bin/addons/base/i18n/fr.po 2016-12-15 16:14:13 +0000 | |||
3 | +++ bin/addons/base/i18n/fr.po 2017-09-12 08:08:04 +0000 | |||
4 | @@ -9695,3 +9695,15 @@ | |||
5 | 9695 | #: selection:base.language.install,lang:0 | 9695 | #: selection:base.language.install,lang:0 |
6 | 9696 | msgid "Russian / русский язык" | 9696 | msgid "Russian / русский язык" |
7 | 9697 | msgstr "Russie / русский язык" | 9697 | msgstr "Russie / русский язык" |
8 | 9698 | |||
9 | 9699 | #. module: base | ||
10 | 9700 | #: code:addons/orm.py:935 | ||
11 | 9701 | #, python-format | ||
12 | 9702 | msgid "New line characters in the field '%s' not allowed. Please fix entry :\n'%s'" | ||
13 | 9703 | msgstr "Le caractère de retour à la ligne dans le champ '%s' est interdit. Veuillez corriger l'entrée:\n'%s'" | ||
14 | 9704 | |||
15 | 9705 | #. module: base | ||
16 | 9706 | #: code:addons/orm.py:1042 | ||
17 | 9707 | #, python-format | ||
18 | 9708 | msgid "Line %s: %s" | ||
19 | 9709 | msgstr "Ligne %s: %s" | ||
20 | 9698 | 9710 | ||
21 | === modified file 'bin/addons/base/ir/ir_actions.py' | |||
22 | --- bin/addons/base/ir/ir_actions.py 2017-05-18 12:16:12 +0000 | |||
23 | +++ bin/addons/base/ir/ir_actions.py 2017-09-12 08:08:04 +0000 | |||
24 | @@ -150,7 +150,7 @@ | |||
25 | 150 | _name = 'ir.actions.act_window' | 150 | _name = 'ir.actions.act_window' |
26 | 151 | _table = 'ir_act_window' | 151 | _table = 'ir_act_window' |
27 | 152 | _sequence = 'ir_actions_id_seq' | 152 | _sequence = 'ir_actions_id_seq' |
29 | 153 | _order = 'name' | 153 | _order = 'name, id' |
30 | 154 | _replace_exported_fields = { | 154 | _replace_exported_fields = { |
31 | 155 | 'groups_txt': [ | 155 | 'groups_txt': [ |
32 | 156 | (['groups_id', 'Groups'], 10) | 156 | (['groups_id', 'Groups'], 10) |
33 | 157 | 157 | ||
34 | === modified file 'bin/addons/import_data/import_data.py' | |||
35 | --- bin/addons/import_data/import_data.py 2016-05-24 08:44:23 +0000 | |||
36 | +++ bin/addons/import_data/import_data.py 2017-09-12 08:08:04 +0000 | |||
37 | @@ -46,7 +46,10 @@ | |||
38 | 46 | 46 | ||
39 | 47 | if data.get('parent_id', False): | 47 | if data.get('parent_id', False): |
40 | 48 | n_obj = self.pool.get('product.nomenclature') | 48 | n_obj = self.pool.get('product.nomenclature') |
42 | 49 | parent_ids = n_obj.search(cr, uid, [('msfid', '=', data['parent_id'])], limit=1) | 49 | if isinstance(data['parent_id'], (int, long)): |
43 | 50 | parent_ids = [data['parent_id']] | ||
44 | 51 | else: | ||
45 | 52 | parent_ids = n_obj.search(cr, uid, [('msfid', '=', data['parent_id'])], limit=1) | ||
46 | 50 | if parent_ids: | 53 | if parent_ids: |
47 | 51 | parent_id = parent_ids[0] | 54 | parent_id = parent_ids[0] |
48 | 52 | 55 | ||
49 | 53 | 56 | ||
50 | === modified file 'bin/addons/msf_doc_import/__init__.py' | |||
51 | --- bin/addons/msf_doc_import/__init__.py 2016-05-17 12:05:25 +0000 | |||
52 | +++ bin/addons/msf_doc_import/__init__.py 2017-09-12 08:08:04 +0000 | |||
53 | @@ -54,3 +54,4 @@ | |||
54 | 54 | import product_list | 54 | import product_list |
55 | 55 | import supplier_catalogue | 55 | import supplier_catalogue |
56 | 56 | import report | 56 | import report |
57 | 57 | import msf_import_export | ||
58 | 57 | 58 | ||
59 | === modified file 'bin/addons/msf_doc_import/__openerp__.py' | |||
60 | --- bin/addons/msf_doc_import/__openerp__.py 2017-05-22 16:04:34 +0000 | |||
61 | +++ bin/addons/msf_doc_import/__openerp__.py 2017-09-12 08:08:04 +0000 | |||
62 | @@ -51,6 +51,7 @@ | |||
63 | 51 | 'view/stock_picking_import_lines_view.xml', | 51 | 'view/stock_picking_import_lines_view.xml', |
64 | 52 | 'view/replenishment_rules_view.xml', | 52 | 'view/replenishment_rules_view.xml', |
65 | 53 | 'view/supplier_catalogue_view.xml', | 53 | 'view/supplier_catalogue_view.xml', |
66 | 54 | 'view/msf_import_export_view.xml', | ||
67 | 54 | 'wizard/wizard_import_po_line_view.xml', | 55 | 'wizard/wizard_import_po_line_view.xml', |
68 | 55 | 'wizard/wizard_import_fo_line.xml', | 56 | 'wizard/wizard_import_fo_line.xml', |
69 | 56 | 'wizard/wizard_import_tender_line.xml', | 57 | 'wizard/wizard_import_tender_line.xml', |
70 | 57 | 58 | ||
71 | === modified file 'bin/addons/msf_doc_import/doc_import_report.xml' | |||
72 | --- bin/addons/msf_doc_import/doc_import_report.xml 2016-07-27 08:54:22 +0000 | |||
73 | +++ bin/addons/msf_doc_import/doc_import_report.xml 2017-09-12 08:08:04 +0000 | |||
74 | @@ -45,5 +45,16 @@ | |||
75 | 45 | auto="False" | 45 | auto="False" |
76 | 46 | string="Import Generic template" /> | 46 | string="Import Generic template" /> |
77 | 47 | 47 | ||
78 | 48 | <report | ||
79 | 49 | id="wizard_export_generic" | ||
80 | 50 | model="msf.import.export" | ||
81 | 51 | name="wizard.export.generic" | ||
82 | 52 | file="msf_doc_import/report/export_generic.mako" | ||
83 | 53 | report_type="webkit" | ||
84 | 54 | header="False" | ||
85 | 55 | menu="False" | ||
86 | 56 | auto="False" | ||
87 | 57 | string="Generic Export" /> | ||
88 | 58 | |||
89 | 48 | </data> | 59 | </data> |
90 | 49 | </openerp> | 60 | </openerp> |
91 | 50 | 61 | ||
92 | === added file 'bin/addons/msf_doc_import/msf_import_export.py' | |||
93 | --- bin/addons/msf_doc_import/msf_import_export.py 1970-01-01 00:00:00 +0000 | |||
94 | +++ bin/addons/msf_doc_import/msf_import_export.py 2017-09-12 08:08:04 +0000 | |||
95 | @@ -0,0 +1,792 @@ | |||
96 | 1 | # encoding: utf-8 | ||
97 | 2 | ############################################################################## | ||
98 | 3 | # | ||
99 | 4 | # OpenERP, Open Source Management Solution | ||
100 | 5 | # Copyright (C) 2017 MSF, TeMPO Consulting | ||
101 | 6 | # | ||
102 | 7 | # This program is free software: you can redistribute it and/or modify | ||
103 | 8 | # it under the terms of the GNU General Public License as published by | ||
104 | 9 | # the Free Software Foundation, either version 3 of the License, or | ||
105 | 10 | # (at your option) any later version. | ||
106 | 11 | # | ||
107 | 12 | # This program is distributed in the hope that it will be useful, | ||
108 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
109 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
110 | 15 | # GNU General Public License for more details. | ||
111 | 16 | # | ||
112 | 17 | # You should have received a copy of the GNU General Public License | ||
113 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
114 | 19 | # | ||
115 | 20 | ############################################################################## | ||
116 | 21 | |||
117 | 22 | import base64 | ||
118 | 23 | import time | ||
119 | 24 | import threading | ||
120 | 25 | import logging | ||
121 | 26 | |||
122 | 27 | import pooler | ||
123 | 28 | import tools | ||
124 | 29 | |||
125 | 30 | from osv import fields | ||
126 | 31 | from osv import osv | ||
127 | 32 | from tools.translate import _ | ||
128 | 33 | |||
129 | 34 | from tempfile import TemporaryFile | ||
130 | 35 | from lxml import etree | ||
131 | 36 | from lxml.etree import XMLSyntaxError | ||
132 | 37 | |||
133 | 38 | from msf_doc_import.wizard.abstract_wizard_import import ImportHeader | ||
134 | 39 | from msf_doc_import.msf_import_export_conf import MODEL_DICT | ||
135 | 40 | from msf_doc_import.msf_import_export_conf import MODEL_DATA_DICT | ||
136 | 41 | |||
137 | 42 | MIN_COLUMN_SIZE = 40 | ||
138 | 43 | MAX_COLUMN_SIZE = 400 | ||
139 | 44 | |||
140 | 45 | class msf_import_export(osv.osv_memory): | ||
141 | 46 | _name = 'msf.import.export' | ||
142 | 47 | _description = 'MSF Import Export' | ||
143 | 48 | _inherit = 'abstract.wizard.import' | ||
144 | 49 | |||
145 | 50 | def _get_model_list(self, cr, uid, context=None): | ||
146 | 51 | """The list of available model depend on the menu entry selected | ||
147 | 52 | """ | ||
148 | 53 | if context is None: | ||
149 | 54 | context = {} | ||
150 | 55 | domain_type = None | ||
151 | 56 | if 'domain_type' in context: | ||
152 | 57 | domain_type = context['domain_type'] | ||
153 | 58 | result_list = [(key, _(value['name'])) for key, value in MODEL_DICT.items() if value['domain_type'] == domain_type] | ||
154 | 59 | return [('', '')] + sorted(result_list, key=lambda a: a[0]) | ||
155 | 60 | |||
156 | 61 | _columns = { | ||
157 | 62 | 'display_file_import': fields.boolean('File Import'), | ||
158 | 63 | 'display_file_export': fields.boolean('File Export'), | ||
159 | 64 | 'model_list_selection': fields.selection(selection=_get_model_list, string='Object to Import/Export', required=True), | ||
160 | 65 | 'import_file': fields.binary('File to import .xml'), | ||
161 | 66 | 'hide_download_3_entries': fields.boolean('Hide export 3 entries button'), | ||
162 | 67 | 'hide_download_all_entries': fields.boolean('Hide export all entries button'), | ||
163 | 68 | 'display_test_import_button': fields.boolean('Display test import button'), | ||
164 | 69 | } | ||
165 | 70 | |||
166 | 71 | _default = { | ||
167 | 72 | 'display_file_import': lambda *a: False, | ||
168 | 73 | 'display_file_export': lambda *a: False, | ||
169 | 74 | 'hide_download_3_entries': lambda *a: False, | ||
170 | 75 | 'hide_download_all_entries': lambda *a: False, | ||
171 | 76 | 'display_test_import_button': lambda *a: False, | ||
172 | 77 | } | ||
173 | 78 | |||
174 | 79 | def get_filename(self, cr, uid, model, selection, template_only=False, context=None): | ||
175 | 80 | """Generate a filename for the import/export | ||
176 | 81 | """ | ||
177 | 82 | model_obj = self.pool.get(model) | ||
178 | 83 | file_name = _(MODEL_DICT[selection]['name']) | ||
179 | 84 | file_name = file_name.replace(' ', '_') | ||
180 | 85 | if template_only: | ||
181 | 86 | file_name = _('%s_Import_Template') % file_name | ||
182 | 87 | else: | ||
183 | 88 | file_name = _('%s_Export_%s') % (file_name, time.strftime('%Y%m%d')) | ||
184 | 89 | return file_name | ||
185 | 90 | |||
186 | 91 | def generic_download(self, cr, uid, ids, template_only=False, | ||
187 | 92 | nb_lines=None, context=None): | ||
188 | 93 | """Mutualise the code of all download buttons in one place | ||
189 | 94 | """ | ||
190 | 95 | if context is None: | ||
191 | 96 | context = {} | ||
192 | 97 | if isinstance(ids, (int, long)): | ||
193 | 98 | ids = [ids] | ||
194 | 99 | |||
195 | 100 | wiz = self.browse(cr, uid, ids[0]) | ||
196 | 101 | selection = wiz.model_list_selection | ||
197 | 102 | model = MODEL_DICT[selection]['model'] | ||
198 | 103 | if selection not in MODEL_DATA_DICT: | ||
199 | 104 | raise osv.except_osv(_('Error'), | ||
200 | 105 | _('Selection \'%s\' not found. ' | ||
201 | 106 | 'Please contact the support team.') % (selection)) | ||
202 | 107 | |||
203 | 108 | if 'header_list' not in MODEL_DATA_DICT[selection]: | ||
204 | 109 | raise osv.except_osv(_('Error'), | ||
205 | 110 | _('The header_list for report \'%s\' is not' | ||
206 | 111 | ' defined. Please contact the support team.') % (selection)) | ||
207 | 112 | fields = MODEL_DATA_DICT[selection]['header_list'] | ||
208 | 113 | domain = MODEL_DICT[selection].get('domain', []) | ||
209 | 114 | context['translate_selection_field'] = True | ||
210 | 115 | data = { | ||
211 | 116 | 'model': model, | ||
212 | 117 | 'fields': fields, | ||
213 | 118 | 'nb_lines': nb_lines, | ||
214 | 119 | 'template_only': template_only, | ||
215 | 120 | 'domain': domain, | ||
216 | 121 | 'target_filename': self.get_filename(cr, uid, model, selection, template_only), | ||
217 | 122 | } | ||
218 | 123 | return { | ||
219 | 124 | 'type': 'ir.actions.report.xml', | ||
220 | 125 | 'report_name': 'wizard.export.generic', | ||
221 | 126 | 'datas': data, | ||
222 | 127 | 'context': context, | ||
223 | 128 | } | ||
224 | 129 | |||
225 | 130 | def download_all_entries_file(self, cr, uid, ids, context=None): | ||
226 | 131 | """Download a template filled with all datas of the modele | ||
227 | 132 | """ | ||
228 | 133 | return self.generic_download(cr, uid, ids, context=context) | ||
229 | 134 | |||
230 | 135 | def download_3_entries_file(self, cr, uid, ids, context=None): | ||
231 | 136 | """Download a template filled with the first 3 lines of data | ||
232 | 137 | """ | ||
233 | 138 | return self.generic_download(cr, uid, ids, nb_lines=3, context=context) | ||
234 | 139 | |||
235 | 140 | def download_template_file(self, cr, uid, ids, context=None): | ||
236 | 141 | """Download the template file (without any data) | ||
237 | 142 | """ | ||
238 | 143 | return self.generic_download(cr, uid, ids, template_only=True, | ||
239 | 144 | context=context) | ||
240 | 145 | |||
241 | 146 | def get_excel_size_from_string(self, string): | ||
242 | 147 | """Compute the string to get the size of it in a excel | ||
243 | 148 | understandable value | ||
244 | 149 | :param string: the str chain to get the excel size | ||
245 | 150 | :return: A int instance | ||
246 | 151 | """ | ||
247 | 152 | # this calculation is used to translate the | ||
248 | 153 | # character len to an excel understandable len | ||
249 | 154 | |||
250 | 155 | max_digit_width = 7 # For Calabri 11 which is the font used in our reports | ||
251 | 156 | conversion_factor = 3/4. # to convert from pixel to points | ||
252 | 157 | padding = 15 | ||
253 | 158 | |||
254 | 159 | # this formule partially come from readings here: | ||
255 | 160 | # http://stackoverflow.com/questions/4577546/calculating-height-width-and-ysplit-xsplit-for-open-xml-spreadsheets?answertab=votes#tab-top | ||
256 | 161 | size = round(max_digit_width*len(string)*conversion_factor+padding) | ||
257 | 162 | |||
258 | 163 | # set a max and min len for the columns to avoid ridiculus column size | ||
259 | 164 | size = min(size, MAX_COLUMN_SIZE) | ||
260 | 165 | size = max(size, MIN_COLUMN_SIZE) | ||
261 | 166 | return size | ||
262 | 167 | |||
263 | 168 | def get_child_field(self, cr, uid, field, model, fields_get_dict, | ||
264 | 169 | context=None): | ||
265 | 170 | if context is None: | ||
266 | 171 | context = {} | ||
267 | 172 | if '.' in field: | ||
268 | 173 | model_obj = self.pool.get(model) | ||
269 | 174 | if model not in fields_get_dict: | ||
270 | 175 | fields_get_res = model_obj.fields_get(cr, uid, context=context) | ||
271 | 176 | fields_get_dict[model] = fields_get_res | ||
272 | 177 | else: | ||
273 | 178 | fields_get_res = fields_get_dict[model] | ||
274 | 179 | |||
275 | 180 | |||
276 | 181 | child_field = field.split('.')[0] | ||
277 | 182 | rest = '.'.join(field.split('.')[1:]) | ||
278 | 183 | |||
279 | 184 | if child_field not in fields_get_res: | ||
280 | 185 | raise osv.except_osv(_('Error'), | ||
281 | 186 | _('field \'%s\' not found for model \'%s\'. Please contact the support team.') | ||
282 | 187 | % (child_field, model)) | ||
283 | 188 | |||
284 | 189 | #if child and child !='id' and fields_get_res[child_field].get('relation'): | ||
285 | 190 | child_model = fields_get_res[child_field]['relation'] | ||
286 | 191 | if child_model not in fields_get_dict: | ||
287 | 192 | model_obj = self.pool.get(child_model) | ||
288 | 193 | fields_get_res = model_obj.fields_get(cr, uid, context=context) | ||
289 | 194 | fields_get_dict[child_model] = fields_get_res | ||
290 | 195 | return self.get_child_field(cr, uid, rest, child_model, fields_get_dict, | ||
291 | 196 | context=context) | ||
292 | 197 | else: | ||
293 | 198 | return field, model | ||
294 | 199 | |||
295 | 200 | def _get_headers(self, cr, uid, model, selection=None, field_list=None, rows=None, context=None): | ||
296 | 201 | """Generate a list of ImportHeader objects using the data that retived | ||
297 | 202 | from the field name. | ||
298 | 203 | :param model: Model of the object imported/exported | ||
299 | 204 | :param selection: requried to get the list of fields to compose the header | ||
300 | 205 | :param field_list: if known, the list of the fields to display in the | ||
301 | 206 | header can be passed | ||
302 | 207 | :param rows: Data rows to export. In case of export, the size of the | ||
303 | 208 | columns matter and can be determinied according to the data string length | ||
304 | 209 | :param context: Context of the call, this is particularly important to | ||
305 | 210 | get the language for tranlsating the fields. | ||
306 | 211 | :return: A list of ImportHeader | ||
307 | 212 | """ | ||
308 | 213 | if context is None: | ||
309 | 214 | context = {} | ||
310 | 215 | headers = [] | ||
311 | 216 | if not field_list: | ||
312 | 217 | field_list = MODEL_DATA_DICT[selection]['header_list'] | ||
313 | 218 | model_obj = self.pool.get(model) | ||
314 | 219 | |||
315 | 220 | fields_get_dict = {} # keep fields_get result in cache | ||
316 | 221 | fields_get_dict[model] = model_obj.fields_get(cr, uid, context=context) | ||
317 | 222 | |||
318 | 223 | for field_index, field in enumerate(field_list): | ||
319 | 224 | res = {'tech_name': field} | ||
320 | 225 | if selection and field in MODEL_DATA_DICT[selection]['required_field_list']: | ||
321 | 226 | res['required'] = True | ||
322 | 227 | child_field, child_model = self.get_child_field(cr, uid, field, model, | ||
323 | 228 | fields_get_dict, context=context) | ||
324 | 229 | first_part = field.split('.')[0] | ||
325 | 230 | if first_part not in fields_get_dict[model]: | ||
326 | 231 | raise osv.except_osv(_('Error'), | ||
327 | 232 | _('field \'%s\' not found for model \'%s\'. Please contact the support team.') | ||
328 | 233 | % (first_part, model)) | ||
329 | 234 | if first_part != child_field: | ||
330 | 235 | if child_field not in fields_get_dict[child_model]: | ||
331 | 236 | raise osv.except_osv(_('Error'), | ||
332 | 237 | _('field \'%s\' not found for model \'%s\'. Please contact the support team.') | ||
333 | 238 | % (child_field, child_model)) | ||
334 | 239 | res['name'] = '%s / %s' % (fields_get_dict[model][first_part]['string'], | ||
335 | 240 | fields_get_dict[child_model][child_field]['string']) | ||
336 | 241 | else: | ||
337 | 242 | res['name'] = fields_get_dict[model][first_part]['string'] | ||
338 | 243 | |||
339 | 244 | |||
340 | 245 | field_type = fields_get_dict[child_model][child_field]['type'] | ||
341 | 246 | if field_type == 'boolean': | ||
342 | 247 | res['ftype'] = 'Boolean' | ||
343 | 248 | elif field_type == 'float': | ||
344 | 249 | res['ftype'] = 'Float' | ||
345 | 250 | elif field_type == 'integer': | ||
346 | 251 | res['ftype'] = 'Number' | ||
347 | 252 | else: | ||
348 | 253 | res['ftype'] = 'String' | ||
349 | 254 | |||
350 | 255 | if not rows: | ||
351 | 256 | # if no data passed, set the column size with the size of the header name | ||
352 | 257 | res['size'] = self.get_excel_size_from_string(res['name']) | ||
353 | 258 | else: | ||
354 | 259 | # automatically set the width of the column by searching for the | ||
355 | 260 | # biggest string in this column | ||
356 | 261 | all_cells_chain = [tools.ustr(x[field_index]) for x in rows] | ||
357 | 262 | res['size'] = MIN_COLUMN_SIZE | ||
358 | 263 | if all_cells_chain: | ||
359 | 264 | longest_chain = max(all_cells_chain, key=len) | ||
360 | 265 | if longest_chain: | ||
361 | 266 | res['size'] = self.get_excel_size_from_string(longest_chain) | ||
362 | 267 | headers.append(ImportHeader(**res)) | ||
363 | 268 | return headers | ||
364 | 269 | |||
365 | 270 | def domain_type_change(self, cr, uid, ids, model_list_selection, context=None): | ||
366 | 271 | """When the type of object to import/export change, change the buttons | ||
367 | 272 | to display or not according to the new object model | ||
368 | 273 | """ | ||
369 | 274 | if context is None: | ||
370 | 275 | context = {} | ||
371 | 276 | result = {'value': {}} | ||
372 | 277 | result['value']['display_file_import'] = True | ||
373 | 278 | result['value']['display_file_export'] = True | ||
374 | 279 | if model_list_selection: | ||
375 | 280 | if model_list_selection and model_list_selection in MODEL_DATA_DICT: | ||
376 | 281 | hide_export = MODEL_DATA_DICT[model_list_selection].get('hide_export', False) | ||
377 | 282 | result['value']['display_file_export'] = not hide_export | ||
378 | 283 | hide_3 = MODEL_DATA_DICT[model_list_selection].get('hide_download_3_entries', False) | ||
379 | 284 | result['value']['hide_download_3_entries'] = hide_3 | ||
380 | 285 | hide_all = MODEL_DATA_DICT[model_list_selection].get('hide_download_all_entries', False) | ||
381 | 286 | result['value']['hide_download_all_entries'] = hide_all | ||
382 | 287 | else: | ||
383 | 288 | result['value']['hide_download_3_entries'] = False | ||
384 | 289 | result['value']['hide_download_all_entries'] = False | ||
385 | 290 | return result | ||
386 | 291 | |||
387 | 292 | def file_change(self, cr, uid, obj_id, import_file, context=None): | ||
388 | 293 | """Display the import button only if a file as been selected | ||
389 | 294 | """ | ||
390 | 295 | if context is None: | ||
391 | 296 | context = {} | ||
392 | 297 | result = {'value': {'display_test_import_button': False}} | ||
393 | 298 | if import_file: | ||
394 | 299 | result['value']['display_test_import_button'] = True | ||
395 | 300 | return result | ||
396 | 301 | |||
397 | 302 | def check_xml_syntax(self, cr, uid, xml_string, context=None): | ||
398 | 303 | """Try to parse the xml file and raise if there is an error | ||
399 | 304 | """ | ||
400 | 305 | try: | ||
401 | 306 | file_dom = etree.fromstring(xml_string) | ||
402 | 307 | except XMLSyntaxError as e: | ||
403 | 308 | raise osv.except_osv(_('Error'), _('File structure is incorrect, ' | ||
404 | 309 | 'please correct. You may generate a template with the File ' | ||
405 | 310 | 'export functionality.')) | ||
406 | 311 | |||
407 | 312 | def test_import(self, cr, uid, ids, context=None): | ||
408 | 313 | """Warn if file structure is correct | ||
409 | 314 | """ | ||
410 | 315 | if self.check_import(cr, uid, ids, context=context): | ||
411 | 316 | raise osv.except_osv(_('Info'), _('File structure is correct.')) | ||
412 | 317 | |||
413 | 318 | def check_import(self, cr, uid, ids, context=None): | ||
414 | 319 | """Verify that a file has been selected and all columns expected are | ||
415 | 320 | present | ||
416 | 321 | """ | ||
417 | 322 | obj = self.read(cr, uid, ids[0]) | ||
418 | 323 | if not obj['import_file']: | ||
419 | 324 | raise osv.except_osv(_('Error'), _('Nothing to import.')) | ||
420 | 325 | fileobj = TemporaryFile('w+') | ||
421 | 326 | try: | ||
422 | 327 | xml_string = base64.decodestring(obj['import_file']) | ||
423 | 328 | self.check_xml_syntax(cr, uid, xml_string, context=context) | ||
424 | 329 | for wiz in self.browse(cr, uid, ids, context=context): | ||
425 | 330 | selection = wiz.model_list_selection | ||
426 | 331 | model = MODEL_DICT[selection]['model'] | ||
427 | 332 | if model == 'user.access.configurator': | ||
428 | 333 | continue | ||
429 | 334 | rows, nb_rows = self.read_file(wiz, context=context) | ||
430 | 335 | head = rows.next() | ||
431 | 336 | self.check_missing_columns(cr, uid, wiz, head, context=context) | ||
432 | 337 | finally: | ||
433 | 338 | fileobj.close() | ||
434 | 339 | return True | ||
435 | 340 | |||
436 | 341 | def excel_col(self, col): | ||
437 | 342 | """Covert column number (1,2,...26,27,28...) to excel-style column label | ||
438 | 343 | letters (A,B,..Z,AA,AB,...).""" | ||
439 | 344 | quot, rem = divmod(col-1,26) | ||
440 | 345 | return self.excel_col(quot) + chr(rem+ord('A')) if col!=0 else '' | ||
441 | 346 | |||
442 | 347 | def check_missing_columns(self, cr, uid, wizard_brw, head, context=None): | ||
443 | 348 | """Check that the column names in the file match the expected property | ||
444 | 349 | names, raise if any column is missing. | ||
445 | 350 | """ | ||
446 | 351 | selection = wizard_brw.model_list_selection | ||
447 | 352 | model = MODEL_DICT[selection]['model'] | ||
448 | 353 | model_obj = self.pool.get(model) | ||
449 | 354 | header_columns = [head[i].data for i in range(0, len(head))] | ||
450 | 355 | missing_columns = [] | ||
451 | 356 | field_list = MODEL_DATA_DICT[selection]['header_list'] | ||
452 | 357 | |||
453 | 358 | fields_get_dict = {} # keep fields_get result in cache | ||
454 | 359 | fields_get_dict[model] = model_obj.fields_get(cr, uid, context=context) | ||
455 | 360 | fields_get_res = model_obj.fields_get(cr, uid, | ||
456 | 361 | [x.split('.')[0] for x in field_list], context=context) | ||
457 | 362 | if len(field_list) != len(header_columns): | ||
458 | 363 | raise osv.except_osv(_('Info'), _('The number of column is not same ' \ | ||
459 | 364 | 'than expected (get %s, expected %s). Check your import file and ' \ | ||
460 | 365 | 'the Object to import/export.') % (len(header_columns), len(field_list))) | ||
461 | 366 | |||
462 | 367 | for field_index, field in enumerate(field_list): | ||
463 | 368 | child_field, child_model = self.get_child_field(cr, uid, field, model, | ||
464 | 369 | fields_get_dict, context=context) | ||
465 | 370 | first_part = field.split('.')[0] | ||
466 | 371 | if first_part not in fields_get_dict[model]: | ||
467 | 372 | raise osv.except_osv(_('Error'), | ||
468 | 373 | _('field \'%s\' not found for model \'%s\'. Please contact the support team.') | ||
469 | 374 | % (first_part, model)) | ||
470 | 375 | if first_part != child_field: | ||
471 | 376 | if child_field not in fields_get_dict[child_model]: | ||
472 | 377 | raise osv.except_osv(_('Error'), | ||
473 | 378 | _('field \'%s\' not found for model \'%s\'. Please contact the support team.') | ||
474 | 379 | % (child_field, child_model)) | ||
475 | 380 | column_name = '%s / %s' % (fields_get_dict[model][first_part]['string'], | ||
476 | 381 | fields_get_dict[child_model][child_field]['string']) | ||
477 | 382 | else: | ||
478 | 383 | column_name = fields_get_dict[model][first_part]['string'] | ||
479 | 384 | |||
480 | 385 | if column_name.upper() != header_columns[field_index].upper(): | ||
481 | 386 | missing_columns.append(_('Column %s: get \'%s\' expected \'%s\'.') | ||
482 | 387 | % (self.excel_col(field_index+1), header_columns[field_index], column_name)) | ||
483 | 388 | if missing_columns: | ||
484 | 389 | raise osv.except_osv(_('Info'), _('The following columns ' | ||
485 | 390 | 'are missing in the imported file:\n%s') % ',\n'.join(missing_columns)) | ||
486 | 391 | |||
487 | 392 | def import_xml(self, cr, uid, ids, context=None): | ||
488 | 393 | """Create a thread to import the data after import checking | ||
489 | 394 | """ | ||
490 | 395 | if context is None: | ||
491 | 396 | context = {} | ||
492 | 397 | if isinstance(ids, (int, long)): | ||
493 | 398 | ids = [ids] | ||
494 | 399 | |||
495 | 400 | self.check_import(cr, uid, ids, context=context) | ||
496 | 401 | |||
497 | 402 | for wiz in self.browse(cr, uid, ids, context=context): | ||
498 | 403 | rows, nb_rows = self.read_file(wiz, context=context) | ||
499 | 404 | head = rows.next() | ||
500 | 405 | selection = wiz.model_list_selection | ||
501 | 406 | model = MODEL_DICT[selection]['model'] | ||
502 | 407 | |||
503 | 408 | if model == 'user.access.configurator': | ||
504 | 409 | # special case handling for this one | ||
505 | 410 | model_obj = self.pool.get(model) | ||
506 | 411 | wizard_id = model_obj.create(cr, uid, {}, context) | ||
507 | 412 | model_obj.write(cr, uid, [wizard_id], {'file_to_import_uac': | ||
508 | 413 | wiz.import_file}, context=context) | ||
509 | 414 | return model_obj.do_process_uac(cr, uid, [wizard_id], context=context) | ||
510 | 415 | |||
511 | 416 | expected_headers = self._get_headers(cr, uid, model, selection=selection, context=context) | ||
512 | 417 | if model != 'user.access.configurator': | ||
513 | 418 | self.check_headers(head, expected_headers, context=context) | ||
514 | 419 | |||
515 | 420 | self.write(cr, uid, [wiz.id], { | ||
516 | 421 | 'total_lines_to_import': nb_rows, | ||
517 | 422 | 'state': 'progress', | ||
518 | 423 | 'start_date': time.strftime('%Y-%m-%d %H:%M:%S'), | ||
519 | 424 | 'info_message': _('Import in progress, please leave this window open and press the button \'Update\' ' | ||
520 | 425 | 'to show the progression of the import. Otherwise, you can continue to use Unifield'), | ||
521 | 426 | }, context=context) | ||
522 | 427 | wiz.total_lines_to_import = nb_rows | ||
523 | 428 | |||
524 | 429 | thread = threading.Thread( | ||
525 | 430 | target=self.bg_import, | ||
526 | 431 | args=(cr.dbname, uid, wiz, expected_headers, rows, context), | ||
527 | 432 | ) | ||
528 | 433 | thread.start() | ||
529 | 434 | # for now we don't want background but foreground | ||
530 | 435 | # in case background is needed, just set a value to wait time | ||
531 | 436 | wait_time = None | ||
532 | 437 | thread.join(wait_time) | ||
533 | 438 | return True | ||
534 | 439 | |||
535 | 440 | def bg_import(self, dbname, uid, import_brw, headers, rows, context=None): | ||
536 | 441 | """ | ||
537 | 442 | Run the import of lines in background | ||
538 | 443 | :param dbname: Name of the database | ||
539 | 444 | :param uid: ID of the res.users that calls this method | ||
540 | 445 | :param import_brw: browse_record of a wizard.import.batch | ||
541 | 446 | :param headers: List of expected headers | ||
542 | 447 | :param rows: Iterator on file rows | ||
543 | 448 | :param context: Context of the call | ||
544 | 449 | :return: True | ||
545 | 450 | """ | ||
546 | 451 | if context is None: | ||
547 | 452 | context = {} | ||
548 | 453 | cr = pooler.get_db(dbname).cursor() | ||
549 | 454 | model = MODEL_DICT[import_brw.model_list_selection]['model'] | ||
550 | 455 | impobj = self.pool.get(model) | ||
551 | 456 | |||
552 | 457 | import_data_obj = self.pool.get('import_data') | ||
553 | 458 | prod_nomenclature_obj = self.pool.get('product.nomenclature') | ||
554 | 459 | |||
555 | 460 | # Manage errors | ||
556 | 461 | import_errors = {} | ||
557 | 462 | |||
558 | 463 | def save_error(errors, row_index): | ||
559 | 464 | if not isinstance(errors, list): | ||
560 | 465 | errors = [errors] | ||
561 | 466 | import_errors.setdefault(row_index+2, []) | ||
562 | 467 | import_errors[row_index+2].extend(errors) | ||
563 | 468 | |||
564 | 469 | # Manage warnings | ||
565 | 470 | import_warnings = {} | ||
566 | 471 | |||
567 | 472 | def save_warnings(warnings): | ||
568 | 473 | if not isinstance(warnings, list): | ||
569 | 474 | warnings = [warnings] | ||
570 | 475 | import_warnings.setdefault(row_index+2, []) | ||
571 | 476 | import_warnings[row_index+2].extend(warnings) | ||
572 | 477 | |||
573 | 478 | start_time = time.time() | ||
574 | 479 | |||
575 | 480 | if model == 'product.product': | ||
576 | 481 | # Create the cache | ||
577 | 482 | if not hasattr(self, '_cache'): | ||
578 | 483 | self._cache = {} | ||
579 | 484 | self._cache.setdefault(dbname, {}) | ||
580 | 485 | |||
581 | 486 | if not hasattr(prod_nomenclature_obj, '_cache'): | ||
582 | 487 | prod_nomenclature_obj._cache = {} | ||
583 | 488 | prod_nomenclature_obj._cache.setdefault(dbname, {}) | ||
584 | 489 | |||
585 | 490 | # Clear the cache | ||
586 | 491 | self._cache[dbname] = {'product.nomenclature': {'name': {}, 'complete_name': {}}, | ||
587 | 492 | 'product.uom': {'name': {}}, | ||
588 | 493 | 'product.asset.type': {'name': {}}, | ||
589 | 494 | 'product.international.status': {'name': {}}, | ||
590 | 495 | } | ||
591 | 496 | # Product nomenclature | ||
592 | 497 | cr.execute('SELECT name, id FROM product_nomenclature;') | ||
593 | 498 | for nv in cr.dictfetchall(): | ||
594 | 499 | self._cache[dbname]['product.nomenclature']['name'].update({nv['name']: nv['id']}) | ||
595 | 500 | # Product category | ||
596 | 501 | cr.execute('SELECT id, family_id FROM product_category;') | ||
597 | 502 | for pc in cr.dictfetchall(): | ||
598 | 503 | prod_nomenclature_obj._cache[dbname].update({pc['family_id']: pc['id']}) | ||
599 | 504 | # Product nomenclature complete name | ||
600 | 505 | cr.execute('''SELECT id, name FROM | ||
601 | 506 | ( | ||
602 | 507 | (SELECT | ||
603 | 508 | n0.id, n0.name AS name | ||
604 | 509 | FROM product_nomenclature n0 | ||
605 | 510 | WHERE n0.level = 0) | ||
606 | 511 | UNION | ||
607 | 512 | (SELECT n1.id, n0.name ||' | '|| n1.name AS name | ||
608 | 513 | FROM product_nomenclature n1 | ||
609 | 514 | LEFT JOIN product_nomenclature n0 ON n1.parent_id = n0.id | ||
610 | 515 | WHERE n1.level = 1) | ||
611 | 516 | UNION | ||
612 | 517 | (SELECT n2.id, n0.name ||' | '|| n1.name ||' | '|| n2.name AS name | ||
613 | 518 | FROM product_nomenclature n1 | ||
614 | 519 | LEFT JOIN product_nomenclature n0 ON n1.parent_id = n0.id | ||
615 | 520 | LEFT JOIN product_nomenclature n2 ON n2.parent_id = n1.id | ||
616 | 521 | WHERE n2.level = 2) | ||
617 | 522 | UNION | ||
618 | 523 | (SELECT n3.id, n0.name ||' | '|| n1.name ||' | '|| n2.name ||' | '|| n3.name AS name | ||
619 | 524 | FROM product_nomenclature n1 | ||
620 | 525 | LEFT JOIN product_nomenclature n0 ON n1.parent_id = n0.id | ||
621 | 526 | LEFT JOIN product_nomenclature n2 ON n2.parent_id = n1.id | ||
622 | 527 | LEFT JOIN product_nomenclature n3 ON n3.parent_id = n2.id | ||
623 | 528 | WHERE n3.level = 3) | ||
624 | 529 | ) AS cn''') | ||
625 | 530 | for cnv in cr.dictfetchall(): | ||
626 | 531 | self._cache[dbname]['product.nomenclature']['complete_name'].update({cnv['name']: cnv['id']}) | ||
627 | 532 | # Product UoM | ||
628 | 533 | cr.execute('SELECT name, id FROM product_uom;') | ||
629 | 534 | for uv in cr.dictfetchall(): | ||
630 | 535 | self._cache[dbname]['product.uom']['name'].update({uv['name']: uv['id']}) | ||
631 | 536 | # Asset type | ||
632 | 537 | cr.execute('SELECT name, id FROM product_asset_type;') | ||
633 | 538 | for av in cr.dictfetchall(): | ||
634 | 539 | self._cache[dbname]['product.asset.type']['name'].update({av['name']: av['id']}) | ||
635 | 540 | # International status | ||
636 | 541 | cr.execute('SELECT name, id FROM product_international_status;') | ||
637 | 542 | for iv in cr.dictfetchall(): | ||
638 | 543 | self._cache[dbname]['product.international.status']['name'].update({iv['name']: iv['id']}) | ||
639 | 544 | |||
640 | 545 | fields_def = impobj.fields_get(cr, uid, context=context) | ||
641 | 546 | i = 0 | ||
642 | 547 | |||
643 | 548 | def _get_obj(header, value, fields_def): | ||
644 | 549 | list_obj = header.split('.') | ||
645 | 550 | relation = fields_def[list_obj[0]]['relation'] | ||
646 | 551 | if impobj._name == 'product.product' and value in self._cache.get(dbname, {}).get(relation, {}).get(list_obj[1], {}): | ||
647 | 552 | return self._cache[dbname][relation][list_obj[1]][value] | ||
648 | 553 | new_obj = self.pool.get(relation) | ||
649 | 554 | newids = new_obj.search(cr, uid, [(list_obj[1], '=', value)], limit=1) | ||
650 | 555 | if not newids: | ||
651 | 556 | # no obj | ||
652 | 557 | raise osv.except_osv(_('Warning !'), _('%s \'%s\' does not exist') % (new_obj._description, value,)) | ||
653 | 558 | |||
654 | 559 | if impobj._name == 'product.product': | ||
655 | 560 | self._cache[dbname].setdefault(relation, {}) | ||
656 | 561 | self._cache[dbname][relation].setdefault(list_obj[1], {}) | ||
657 | 562 | self._cache[dbname][relation][list_obj[1]][value] = newids[0] | ||
658 | 563 | return newids[0] | ||
659 | 564 | |||
660 | 565 | def process_data(field, value, fields_def): | ||
661 | 566 | if value is None or field not in fields_def: | ||
662 | 567 | return | ||
663 | 568 | if '.' not in field: | ||
664 | 569 | if fields_def[field]['type'] == 'selection': | ||
665 | 570 | if impobj == 'product.product' and self._cache[dbname].get('product.product.%s.%s' % (field, value), False): | ||
666 | 571 | value = self._cache[dbname]['product.product.%s.%s' % (field, value)] | ||
667 | 572 | else: | ||
668 | 573 | for key, val in fields_def[field]['selection']: | ||
669 | 574 | if value.lower() in [tools.ustr(key).lower(), tools.ustr(val).lower()]: | ||
670 | 575 | value = key | ||
671 | 576 | if impobj == 'product.product': | ||
672 | 577 | self._cache[dbname].setdefault('product.product.%s' % field, {}) | ||
673 | 578 | self._cache[dbname]['product.product.%s.%s' % (field, value)] = key | ||
674 | 579 | break | ||
675 | 580 | return value | ||
676 | 581 | |||
677 | 582 | else: | ||
678 | 583 | if fields_def[field.split('.')[0]]['type'] in 'many2one': | ||
679 | 584 | return _get_obj(field, value, fields_def) | ||
680 | 585 | |||
681 | 586 | raise osv.except_osv(_('Warning !'), _('%s does not exist')%(value,)) | ||
682 | 587 | |||
683 | 588 | i = 1 | ||
684 | 589 | nb_error = 0 | ||
685 | 590 | nb_succes = 0 | ||
686 | 591 | nb_update_success = 0 | ||
687 | 592 | col_datas = {} | ||
688 | 593 | nb_imported_lines = 0 | ||
689 | 594 | header_codes = [x[3] for x in headers] | ||
690 | 595 | if import_data_obj.pre_hook.get(impobj._name): | ||
691 | 596 | # for headers mod. | ||
692 | 597 | col_datas = import_data_obj.pre_hook[impobj._name](impobj, cr, uid, header_codes, {}, col_datas) | ||
693 | 598 | |||
694 | 599 | for row_index, row in enumerate(rows): | ||
695 | 600 | res, errors, line_data = self.check_error_and_format_row(import_brw.id, row, headers, context=context) | ||
696 | 601 | if res < 0: | ||
697 | 602 | save_error(errors, row_index) | ||
698 | 603 | continue | ||
699 | 604 | |||
700 | 605 | if all(not x for x in line_data): | ||
701 | 606 | save_warnings( | ||
702 | 607 | _('Line seemed empty, so this line was ignored') | ||
703 | 608 | ) | ||
704 | 609 | continue | ||
705 | 610 | |||
706 | 611 | newo2m = False | ||
707 | 612 | delimiter = False | ||
708 | 613 | o2mdatas = {} | ||
709 | 614 | i += 1 | ||
710 | 615 | data = {} | ||
711 | 616 | try: | ||
712 | 617 | if model == 'hq.entries': | ||
713 | 618 | hq_entries_obj = self.pool.get('hq.entries.import') | ||
714 | 619 | hq_entries_obj.update_hq_entries(cr, uid, line_data, context=context) | ||
715 | 620 | continue | ||
716 | 621 | |||
717 | 622 | n = 0 | ||
718 | 623 | line_ok = True | ||
719 | 624 | if import_data_obj.pre_hook.get(impobj._name): | ||
720 | 625 | import_data_obj.pre_hook[impobj._name](impobj, cr, uid, header_codes, line_data, col_datas) | ||
721 | 626 | |||
722 | 627 | for n, h in enumerate(header_codes): | ||
723 | 628 | if isinstance(line_data[n], basestring): | ||
724 | 629 | line_data[n] = line_data[n].rstrip() | ||
725 | 630 | if len(line_data[n].splitlines()) > 1: | ||
726 | 631 | # US-2661 do not allowed newline character in char fields | ||
727 | 632 | save_error(_("New line characters in the field '%s' not allowed. Please fix entry :\n'%s'") % (h, line_data[n]), row_index) | ||
728 | 633 | nb_error += 1 | ||
729 | 634 | line_ok = False | ||
730 | 635 | break | ||
731 | 636 | |||
732 | 637 | # UFTP-327 | ||
733 | 638 | # if required reject cells with exceeded field length | ||
734 | 639 | if 'import_data_field_max_size' in context: | ||
735 | 640 | if h in context['import_data_field_max_size']: | ||
736 | 641 | max_size = context['import_data_field_max_size'][h] | ||
737 | 642 | if len(line_data[n]) > max_size: | ||
738 | 643 | msg_tpl = "field '%s' value exceed field length of %d" | ||
739 | 644 | msg = msg_tpl % (h , max_size, ) | ||
740 | 645 | logging.getLogger('import data').info( | ||
741 | 646 | 'Error %s'% (msg, )) | ||
742 | 647 | cr.rollback() | ||
743 | 648 | error = "Line %s, row: %s, %s" % (i, n, msg, ) | ||
744 | 649 | save_error(error, row_index) | ||
745 | 650 | nb_error += 1 | ||
746 | 651 | line_ok = False | ||
747 | 652 | break | ||
748 | 653 | |||
749 | 654 | if newo2m and ('.' not in h or h.split('.')[0] != newo2m or h.split('.')[1] == delimiter): | ||
750 | 655 | data.setdefault(newo2m, []).append((0, 0, o2mdatas.copy())) | ||
751 | 656 | o2mdatas = {} | ||
752 | 657 | delimiter = False | ||
753 | 658 | newo2m = False | ||
754 | 659 | if '.' not in h: | ||
755 | 660 | # type datetime, date, bool, int, float | ||
756 | 661 | value = process_data(h, line_data[n], fields_def) | ||
757 | 662 | if value is not None: | ||
758 | 663 | data[h] = value | ||
759 | 664 | else: | ||
760 | 665 | points = h.split('.') | ||
761 | 666 | if row[n] and fields_def[points[0]]['type'] == 'one2many': | ||
762 | 667 | newo2m = points[0] | ||
763 | 668 | delimiter = points[1] | ||
764 | 669 | new_fields_def = self.pool.get(fields_def[newo2m]['relation']).fields_get(cr, uid, context=context) | ||
765 | 670 | o2mdatas[points[1]] = process_data('.'.join(points[1:]), line_data[n], new_fields_def) | ||
766 | 671 | elif fields_def[points[0]]['type'] in 'many2one': | ||
767 | 672 | if not line_data[n]: | ||
768 | 673 | data[points[0]] = False | ||
769 | 674 | elif line_data[n]: | ||
770 | 675 | data[points[0]] = _get_obj(h, line_data[n], fields_def) or False | ||
771 | 676 | elif fields_def[points[0]]['type'] in 'many2many' and line_data[n]: | ||
772 | 677 | data.setdefault(points[0], []).append((4, _get_obj(h, line_data[n], fields_def))) | ||
773 | 678 | if not line_ok: | ||
774 | 679 | continue | ||
775 | 680 | if newo2m and o2mdatas: | ||
776 | 681 | data.setdefault(newo2m, []).append((0, 0, o2mdatas.copy())) | ||
777 | 682 | |||
778 | 683 | if import_data_obj.post_hook.get(impobj._name): | ||
779 | 684 | import_data_obj.post_hook[impobj._name](impobj, cr, uid, data, line_data, header_codes) | ||
780 | 685 | |||
781 | 686 | # Search if an object already exist. If not, create it. | ||
782 | 687 | ids_to_update = [] | ||
783 | 688 | |||
784 | 689 | if impobj._name == 'product.product': | ||
785 | 690 | # Allow to update the product, use xmlid_code or default_code | ||
786 | 691 | if 'xmlid_code' in data: | ||
787 | 692 | ids_to_update = impobj.search(cr, uid, [('xmlid_code', | ||
788 | 693 | '=', data['xmlid_code'])], order='NO_ORDER') | ||
789 | 694 | if 'default_code' in data: | ||
790 | 695 | ids_to_update = impobj.search(cr, uid, [('default_code', | ||
791 | 696 | '=', data['default_code'])], order='NO_ORDER') | ||
792 | 697 | elif impobj._name == 'product.nomenclature': | ||
793 | 698 | ids_to_update = impobj.search(cr, uid, [('msfid', '=', | ||
794 | 699 | data['msfid'])], order='NO_ORDER') | ||
795 | 700 | elif impobj._name == 'product.category': | ||
796 | 701 | ids_to_update = impobj.search(cr, uid, [('msfid', '=', | ||
797 | 702 | data['msfid'])], order='NO_ORDER') | ||
798 | 703 | |||
799 | 704 | if ids_to_update: | ||
800 | 705 | #UF-2170: remove the standard price value from the list for update product case | ||
801 | 706 | if 'standard_price' in data: | ||
802 | 707 | del data['standard_price'] | ||
803 | 708 | impobj.write(cr, uid, ids_to_update, data) | ||
804 | 709 | nb_update_success += 1 | ||
805 | 710 | |||
806 | 711 | else: | ||
807 | 712 | impobj.create(cr, uid, data, context={'from_import_menu': True}) | ||
808 | 713 | nb_succes += 1 | ||
809 | 714 | except osv.except_osv, e: | ||
810 | 715 | logging.getLogger('import data').info('Error %s' % e.value) | ||
811 | 716 | cr.rollback() | ||
812 | 717 | save_error(e.value, row_index) | ||
813 | 718 | nb_error += 1 | ||
814 | 719 | except Exception, e: | ||
815 | 720 | cr.rollback() | ||
816 | 721 | logging.getLogger('import data').info('Error %s' % e) | ||
817 | 722 | save_error(e, row_index) | ||
818 | 723 | nb_error += 1 | ||
819 | 724 | else: | ||
820 | 725 | nb_imported_lines += 1 | ||
821 | 726 | |||
822 | 727 | self.write(cr, uid, [import_brw.id], {'total_lines_imported': nb_imported_lines}, context=context) | ||
823 | 728 | |||
824 | 729 | warn_msg = '' | ||
825 | 730 | for line_number in sorted(import_warnings.keys()): | ||
826 | 731 | warnings = import_warnings[line_number] | ||
827 | 732 | for warn in warnings: | ||
828 | 733 | warn_msg += _('Line %s: %s') % (line, warn) | ||
829 | 734 | if not warn_msg.endswith('\n'): | ||
830 | 735 | warn_msg += '\n' | ||
831 | 736 | |||
832 | 737 | err_msg = '' | ||
833 | 738 | for line_number in sorted(import_errors.keys()): | ||
834 | 739 | errors = import_errors[line_number] | ||
835 | 740 | for err in errors: | ||
836 | 741 | err_msg += _('Line %s: %s') % (line_number, err) | ||
837 | 742 | if not err_msg.endswith('\n'): | ||
838 | 743 | err_msg += '\n' | ||
839 | 744 | |||
840 | 745 | if err_msg: | ||
841 | 746 | cr.rollback() | ||
842 | 747 | |||
843 | 748 | info_msg = _('''Processing of file completed in %s second(s)! | ||
844 | 749 | - Total lines to import: %s | ||
845 | 750 | - Total lines %s: %s %s | ||
846 | 751 | - Total lines with errors: %s %s | ||
847 | 752 | %s | ||
848 | 753 | ''') % ( | ||
849 | 754 | str(round(time.time() - start_time, 1)), | ||
850 | 755 | import_brw.total_lines_to_import-1, | ||
851 | 756 | err_msg and _('without errors') or _('imported'), | ||
852 | 757 | nb_imported_lines, | ||
853 | 758 | warn_msg and _('(%s line(s) with warning - see warning messages below)') % ( | ||
854 | 759 | len(import_warnings.keys()) or '', | ||
855 | 760 | ), | ||
856 | 761 | err_msg and len(import_errors.keys()) or 0, | ||
857 | 762 | err_msg and _('(see error messages below)'), | ||
858 | 763 | err_msg and _("no data will be imported until all the error messages are corrected") or '', | ||
859 | 764 | ) | ||
860 | 765 | |||
861 | 766 | self.write(cr, uid, [import_brw.id], { | ||
862 | 767 | 'error_message': err_msg, | ||
863 | 768 | 'show_error': err_msg and True or False, | ||
864 | 769 | 'warning_message': warn_msg, | ||
865 | 770 | 'show_warning': warn_msg and True or False, | ||
866 | 771 | 'info_message': info_msg, | ||
867 | 772 | 'state': 'done', | ||
868 | 773 | 'end_date': time.strftime('%Y-%m-%d %H:%M:%S'), | ||
869 | 774 | }, context=context) | ||
870 | 775 | |||
871 | 776 | if import_data_obj.post_load_hook.get(impobj._name): | ||
872 | 777 | import_data_obj.post_load_hook[impobj._name](impobj, cr, uid) | ||
873 | 778 | |||
874 | 779 | if impobj == 'product.product': | ||
875 | 780 | # Clear the cache | ||
876 | 781 | self._cache[dbname] = {} | ||
877 | 782 | prod_nomenclature_obj._cache[dbname] = {} | ||
878 | 783 | |||
879 | 784 | |||
880 | 785 | cr.commit() | ||
881 | 786 | cr.close() | ||
882 | 787 | |||
883 | 788 | return True | ||
884 | 789 | |||
885 | 790 | msf_import_export() | ||
886 | 791 | |||
887 | 792 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
888 | 0 | 793 | ||
889 | === added file 'bin/addons/msf_doc_import/msf_import_export_conf.py' | |||
890 | --- bin/addons/msf_doc_import/msf_import_export_conf.py 1970-01-01 00:00:00 +0000 | |||
891 | +++ bin/addons/msf_doc_import/msf_import_export_conf.py 2017-09-12 08:08:04 +0000 | |||
892 | @@ -0,0 +1,530 @@ | |||
893 | 1 | # encoding: utf-8 | ||
894 | 2 | ############################################################################## | ||
895 | 3 | # | ||
896 | 4 | # OpenERP, Open Source Management Solution | ||
897 | 5 | # Copyright (C) 2017 MSF, TeMPO Consulting | ||
898 | 6 | # | ||
899 | 7 | # This program is free software: you can redistribute it and/or modify | ||
900 | 8 | # it under the terms of the GNU General Public License as published by | ||
901 | 9 | # the Free Software Foundation, either version 3 of the License, or | ||
902 | 10 | # (at your option) any later version. | ||
903 | 11 | # | ||
904 | 12 | # This program is distributed in the hope that it will be useful, | ||
905 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
906 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
907 | 15 | # GNU General Public License for more details. | ||
908 | 16 | # | ||
909 | 17 | # You should have received a copy of the GNU General Public License | ||
910 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
911 | 19 | # | ||
912 | 20 | ############################################################################## | ||
913 | 21 | |||
914 | 22 | from tools.translate import _ | ||
915 | 23 | |||
916 | 24 | MODEL_DICT = { | ||
917 | 25 | # SUPPLY | ||
918 | 26 | 'products': { | ||
919 | 27 | 'name': 'Products', | ||
920 | 28 | 'domain_type': 'supply', | ||
921 | 29 | 'model': 'product.product', | ||
922 | 30 | }, | ||
923 | 31 | 'product_nomenclature': { | ||
924 | 32 | 'name': 'Product Nomenclature', | ||
925 | 33 | 'domain_type': 'supply', | ||
926 | 34 | 'model': 'product.nomenclature', | ||
927 | 35 | }, | ||
928 | 36 | 'product_category': { | ||
929 | 37 | 'name': 'Product Categories', | ||
930 | 38 | 'domain_type': 'supply', | ||
931 | 39 | 'model': 'product.category', | ||
932 | 40 | }, | ||
933 | 41 | 'suppliers': { | ||
934 | 42 | 'name': 'Suppliers', | ||
935 | 43 | 'domain_type': 'supply', | ||
936 | 44 | 'model': 'res.partner', | ||
937 | 45 | 'domain': [('supplier', '=', True)], | ||
938 | 46 | }, | ||
939 | 47 | 'supplier_catalogues': { | ||
940 | 48 | 'name': 'Supplier Catalogues', | ||
941 | 49 | 'domain_type': 'supply', | ||
942 | 50 | 'model': 'supplier.catalogue', | ||
943 | 51 | }, | ||
944 | 52 | 'supplier_catalogues_lines': { | ||
945 | 53 | 'name': 'Supplier catalogue lines', | ||
946 | 54 | 'domain_type': 'supply', | ||
947 | 55 | 'model': 'supplier.catalogue.line', | ||
948 | 56 | }, | ||
949 | 57 | |||
950 | 58 | |||
951 | 59 | # FINANCE | ||
952 | 60 | 'gl_accounts': { | ||
953 | 61 | 'name': 'GL Accounts', | ||
954 | 62 | 'domain_type': 'finance', | ||
955 | 63 | 'model': 'account.account' | ||
956 | 64 | }, | ||
957 | 65 | 'gl_journals': { | ||
958 | 66 | 'name': 'GL Journals', | ||
959 | 67 | 'domain_type': 'finance', | ||
960 | 68 | 'model': 'account.journal' | ||
961 | 69 | }, | ||
962 | 70 | 'analytic_accounts': { | ||
963 | 71 | 'name': 'Analytic Accounts', | ||
964 | 72 | 'domain_type': 'finance', | ||
965 | 73 | 'model': 'account.analytic.account' | ||
966 | 74 | }, | ||
967 | 75 | 'analytic_journals': { | ||
968 | 76 | 'name': 'Analytic Journals', | ||
969 | 77 | 'domain_type': 'finance', | ||
970 | 78 | 'model': 'account.analytic.journal' | ||
971 | 79 | }, | ||
972 | 80 | 'employees': { | ||
973 | 81 | 'name': 'Employees', | ||
974 | 82 | 'domain_type': 'finance', | ||
975 | 83 | 'model': 'hr.employee' | ||
976 | 84 | }, | ||
977 | 85 | 'hq_entries': { | ||
978 | 86 | 'name': 'HQ Entries', | ||
979 | 87 | 'domain_type': 'finance', | ||
980 | 88 | 'model': 'hq.entries' | ||
981 | 89 | }, | ||
982 | 90 | 'currency_rate': { | ||
983 | 91 | 'name': 'Currencies Rates', | ||
984 | 92 | 'domain_type': 'finance', | ||
985 | 93 | 'model': 'res.currency.rate' | ||
986 | 94 | }, | ||
987 | 95 | |||
988 | 96 | |||
989 | 97 | # NON FUNCTIONNAL | ||
990 | 98 | 'user_groups': { | ||
991 | 99 | 'name': 'User Groups', | ||
992 | 100 | 'domain_type': 'non_functionnal', | ||
993 | 101 | 'model': 'res.groups' | ||
994 | 102 | }, | ||
995 | 103 | 'user_access': { | ||
996 | 104 | 'name': 'User Access', | ||
997 | 105 | 'domain_type': 'non_functionnal', | ||
998 | 106 | 'model': 'user.access.configurator' | ||
999 | 107 | }, | ||
1000 | 108 | 'record_rules': { | ||
1001 | 109 | 'name': 'Record Rules', | ||
1002 | 110 | 'domain_type': 'non_functionnal', | ||
1003 | 111 | 'model': 'ir.rule' | ||
1004 | 112 | }, | ||
1005 | 113 | 'access_control_list': { | ||
1006 | 114 | 'name': 'Access Controls List', | ||
1007 | 115 | 'domain_type': 'non_functionnal', | ||
1008 | 116 | 'model': 'ir.model.access' | ||
1009 | 117 | }, | ||
1010 | 118 | 'field_access_rules': { | ||
1011 | 119 | 'name': 'Field Access Rules', | ||
1012 | 120 | 'domain_type': 'non_functionnal', | ||
1013 | 121 | 'model': 'msf_field_access_rights.field_access_rule' | ||
1014 | 122 | }, | ||
1015 | 123 | 'field_access_rule_lines': { | ||
1016 | 124 | 'name': 'Field Access Rule Lines', | ||
1017 | 125 | 'domain_type': 'non_functionnal', | ||
1018 | 126 | 'model': 'msf_field_access_rights.field_access_rule_line' | ||
1019 | 127 | }, | ||
1020 | 128 | 'button_access_rules': { | ||
1021 | 129 | 'name': 'Button Access Rules', | ||
1022 | 130 | 'domain_type': 'non_functionnal', | ||
1023 | 131 | 'model': 'msf_button_access_rights.button_access_rule' | ||
1024 | 132 | }, | ||
1025 | 133 | 'window_actions': { | ||
1026 | 134 | 'name': 'Window Actions', | ||
1027 | 135 | 'domain_type': 'non_functionnal', | ||
1028 | 136 | 'model': 'ir.actions.act_window' | ||
1029 | 137 | }, | ||
1030 | 138 | } | ||
1031 | 139 | |||
1032 | 140 | MODEL_DATA_DICT = { | ||
1033 | 141 | # SUPPLY | ||
1034 | 142 | 'products': { | ||
1035 | 143 | 'header_list': [ | ||
1036 | 144 | 'default_code', | ||
1037 | 145 | 'name', | ||
1038 | 146 | 'xmlid_code', | ||
1039 | 147 | 'old_code', | ||
1040 | 148 | 'type', | ||
1041 | 149 | 'transport_ok', | ||
1042 | 150 | 'subtype', | ||
1043 | 151 | 'asset_type_id.name', | ||
1044 | 152 | 'procure_method', | ||
1045 | 153 | 'supply_method', | ||
1046 | 154 | 'standard_price', | ||
1047 | 155 | 'volume', | ||
1048 | 156 | 'weight', | ||
1049 | 157 | 'international_status.name', | ||
1050 | 158 | 'state.name', | ||
1051 | 159 | 'active', | ||
1052 | 160 | 'perishable', | ||
1053 | 161 | 'batch_management', | ||
1054 | 162 | 'uom_id.name', | ||
1055 | 163 | 'uom_po_id.name', | ||
1056 | 164 | 'nomen_manda_0.name', | ||
1057 | 165 | 'nomen_manda_1.name', | ||
1058 | 166 | 'nomen_manda_2.name', | ||
1059 | 167 | 'nomen_manda_3.name', | ||
1060 | 168 | 'life_time', | ||
1061 | 169 | 'use_time', | ||
1062 | 170 | 'short_shelf_life', | ||
1063 | 171 | 'alert_time', | ||
1064 | 172 | 'heat_sensitive_item.code', | ||
1065 | 173 | 'cold_chain', | ||
1066 | 174 | 'sterilized', | ||
1067 | 175 | 'single_use', | ||
1068 | 176 | 'narcotic', | ||
1069 | 177 | 'justification_code_id.code', | ||
1070 | 178 | 'controlled_substance', | ||
1071 | 179 | 'closed_article', | ||
1072 | 180 | 'restricted_country', | ||
1073 | 181 | 'country_restriction', | ||
1074 | 182 | 'dangerous_goods', | ||
1075 | 183 | 'un_code', | ||
1076 | 184 | 'criticism', | ||
1077 | 185 | 'abc_class', | ||
1078 | 186 | 'product_catalog_path', | ||
1079 | 187 | 'description', | ||
1080 | 188 | 'description2', | ||
1081 | 189 | 'description_sale', | ||
1082 | 190 | 'description_purchase', | ||
1083 | 191 | 'procure_delay', | ||
1084 | 192 | 'property_account_income.code', | ||
1085 | 193 | 'property_account_expense.code', | ||
1086 | 194 | ], | ||
1087 | 195 | 'required_field_list': [ | ||
1088 | 196 | 'name', | ||
1089 | 197 | 'international_status.name', | ||
1090 | 198 | 'nomen_manda_0.name', | ||
1091 | 199 | 'nomen_manda_1.name', | ||
1092 | 200 | 'nomen_manda_2.name', | ||
1093 | 201 | 'nomen_manda_3.name', | ||
1094 | 202 | ], | ||
1095 | 203 | 'hide_download_all_entries': True, | ||
1096 | 204 | }, | ||
1097 | 205 | 'product_nomenclature': { | ||
1098 | 206 | 'header_list': [ | ||
1099 | 207 | 'level', | ||
1100 | 208 | 'name', | ||
1101 | 209 | 'type', | ||
1102 | 210 | 'parent_id.msfid', | ||
1103 | 211 | 'msfid', | ||
1104 | 212 | ], | ||
1105 | 213 | 'required_field_list': [ | ||
1106 | 214 | 'level', | ||
1107 | 215 | 'name', | ||
1108 | 216 | ], | ||
1109 | 217 | 'hide_download_3_entries': True, | ||
1110 | 218 | 'hide_download_all_entries': True, | ||
1111 | 219 | }, | ||
1112 | 220 | 'product_category': { | ||
1113 | 221 | 'header_list': [ | ||
1114 | 222 | 'type', | ||
1115 | 223 | 'property_account_expense_categ', | ||
1116 | 224 | 'property_account_income_categ', | ||
1117 | 225 | 'name', | ||
1118 | 226 | 'property_stock_journal', | ||
1119 | 227 | 'donation_expense_account', | ||
1120 | 228 | 'family_id', | ||
1121 | 229 | 'msfid', | ||
1122 | 230 | ], | ||
1123 | 231 | 'required_field_list': [ | ||
1124 | 232 | 'name', | ||
1125 | 233 | 'family_id', | ||
1126 | 234 | 'msfid', | ||
1127 | 235 | ], | ||
1128 | 236 | }, | ||
1129 | 237 | 'suppliers': { | ||
1130 | 238 | 'header_list': [ | ||
1131 | 239 | 'address.type', | ||
1132 | 240 | 'address.city', | ||
1133 | 241 | 'address.name', | ||
1134 | 242 | 'address.street', | ||
1135 | 243 | 'address.zip', | ||
1136 | 244 | 'address.country_id.name', | ||
1137 | 245 | 'address.email', | ||
1138 | 246 | 'property_account_payable.code', | ||
1139 | 247 | 'property_account_receivable.code', | ||
1140 | 248 | 'name', | ||
1141 | 249 | 'lang', | ||
1142 | 250 | 'partner_type', | ||
1143 | 251 | 'customer', | ||
1144 | 252 | 'supplier', | ||
1145 | 253 | 'property_product_pricelist_purchase.currency_id', | ||
1146 | 254 | 'property_product_pricelist.currency_id', | ||
1147 | 255 | ], | ||
1148 | 256 | 'required_field_list': [ | ||
1149 | 257 | 'property_account_payable.code', | ||
1150 | 258 | 'property_account_receivable.code', | ||
1151 | 259 | 'name', | ||
1152 | 260 | ], | ||
1153 | 261 | }, | ||
1154 | 262 | 'supplier_catalogues': { | ||
1155 | 263 | 'header_list': [ | ||
1156 | 264 | 'name', | ||
1157 | 265 | 'period_from', | ||
1158 | 266 | 'period_to', | ||
1159 | 267 | 'currency_id.name', | ||
1160 | 268 | 'partner_id.name', | ||
1161 | 269 | ], | ||
1162 | 270 | 'required_field_list': [ | ||
1163 | 271 | 'name', | ||
1164 | 272 | 'currency_id.name', | ||
1165 | 273 | 'partner_id.name', | ||
1166 | 274 | ], | ||
1167 | 275 | }, | ||
1168 | 276 | 'supplier_catalogues_lines': { | ||
1169 | 277 | 'header_list': [ | ||
1170 | 278 | 'catalogue_id.name', | ||
1171 | 279 | 'product_id.code', | ||
1172 | 280 | 'product_id.name', | ||
1173 | 281 | 'line_uom_id.name', | ||
1174 | 282 | 'min_qty', | ||
1175 | 283 | 'unit_price', | ||
1176 | 284 | 'rounding', | ||
1177 | 285 | 'min_order_qty', | ||
1178 | 286 | 'comment', | ||
1179 | 287 | ], | ||
1180 | 288 | 'required_field_list': [ | ||
1181 | 289 | 'catalogue_id.name', | ||
1182 | 290 | 'product_id.code', | ||
1183 | 291 | 'line_uom_id.name', | ||
1184 | 292 | 'min_qty', | ||
1185 | 293 | 'unit_price', | ||
1186 | 294 | ], | ||
1187 | 295 | }, | ||
1188 | 296 | |||
1189 | 297 | |||
1190 | 298 | # FINANCE | ||
1191 | 299 | 'gl_accounts': { | ||
1192 | 300 | 'header_list': [ | ||
1193 | 301 | 'user_type.code', | ||
1194 | 302 | 'accrual_account', | ||
1195 | 303 | 'activation_date', | ||
1196 | 304 | 'code', | ||
1197 | 305 | 'default_destination_id.code', | ||
1198 | 306 | 'inactivation_date', | ||
1199 | 307 | 'type', | ||
1200 | 308 | 'name', | ||
1201 | 309 | 'note', | ||
1202 | 310 | 'type_for_register', | ||
1203 | 311 | 'reconcile', | ||
1204 | 312 | 'parent_id.code', | ||
1205 | 313 | 'is_not_hq_correctible', | ||
1206 | 314 | 'shrink_entries_for_hq', | ||
1207 | 315 | 'currency_revaluation', | ||
1208 | 316 | ], | ||
1209 | 317 | 'required_field_list': [ | ||
1210 | 318 | 'user_type.code', | ||
1211 | 319 | 'activation_date', | ||
1212 | 320 | 'code', | ||
1213 | 321 | 'type', | ||
1214 | 322 | 'name', | ||
1215 | 323 | 'type_for_register', | ||
1216 | 324 | ], | ||
1217 | 325 | }, | ||
1218 | 326 | 'gl_journals': { | ||
1219 | 327 | 'header_list': [ | ||
1220 | 328 | 'code', | ||
1221 | 329 | 'currency.name', | ||
1222 | 330 | 'default_credit_account_id.code', | ||
1223 | 331 | 'default_debit_account_id.code', | ||
1224 | 332 | 'name', | ||
1225 | 333 | 'type', | ||
1226 | 334 | 'analytic_journal_id.code', | ||
1227 | 335 | ], | ||
1228 | 336 | 'required_field_list': [ | ||
1229 | 337 | 'code', | ||
1230 | 338 | 'name', | ||
1231 | 339 | 'type', | ||
1232 | 340 | 'analytic_journal_id.code', | ||
1233 | 341 | ], | ||
1234 | 342 | }, | ||
1235 | 343 | 'analytic_accounts': { | ||
1236 | 344 | 'header_list': [ | ||
1237 | 345 | 'name', | ||
1238 | 346 | 'code', | ||
1239 | 347 | 'category', | ||
1240 | 348 | 'parent_id.code', | ||
1241 | 349 | 'type', | ||
1242 | 350 | 'date_start', | ||
1243 | 351 | ], | ||
1244 | 352 | 'required_field_list': [ | ||
1245 | 353 | 'name', | ||
1246 | 354 | 'code', | ||
1247 | 355 | 'category', | ||
1248 | 356 | 'parent_id.code', | ||
1249 | 357 | 'date_start', | ||
1250 | 358 | ], | ||
1251 | 359 | }, | ||
1252 | 360 | 'analytic_journals': { | ||
1253 | 361 | 'header_list': [ | ||
1254 | 362 | 'active', | ||
1255 | 363 | 'code', | ||
1256 | 364 | 'name', | ||
1257 | 365 | 'type', | ||
1258 | 366 | ], | ||
1259 | 367 | 'required_field_list': [ | ||
1260 | 368 | 'code', | ||
1261 | 369 | 'name', | ||
1262 | 370 | 'type', | ||
1263 | 371 | ], | ||
1264 | 372 | }, | ||
1265 | 373 | 'employees': { | ||
1266 | 374 | 'header_list': [ | ||
1267 | 375 | 'name', | ||
1268 | 376 | 'identification_id', | ||
1269 | 377 | 'active', | ||
1270 | 378 | ], | ||
1271 | 379 | 'required_field_list': [ | ||
1272 | 380 | 'name', | ||
1273 | 381 | 'identification_id', | ||
1274 | 382 | ], | ||
1275 | 383 | }, | ||
1276 | 384 | 'hq_entries': { | ||
1277 | 385 | 'header_list': [ | ||
1278 | 386 | 'name', | ||
1279 | 387 | 'ref', | ||
1280 | 388 | 'document_date', | ||
1281 | 389 | 'date', | ||
1282 | 390 | 'account_id', | ||
1283 | 391 | 'partner_txt', | ||
1284 | 392 | 'amount', | ||
1285 | 393 | 'currency_id.name', | ||
1286 | 394 | 'destination_id', | ||
1287 | 395 | 'cost_center_id', | ||
1288 | 396 | 'analytic_id', | ||
1289 | 397 | 'free_1_id', | ||
1290 | 398 | 'free_2_id', | ||
1291 | 399 | ], | ||
1292 | 400 | 'required_field_list': [ | ||
1293 | 401 | 'name', | ||
1294 | 402 | 'account_id', | ||
1295 | 403 | 'currency_id.name', | ||
1296 | 404 | 'destination_id', | ||
1297 | 405 | 'analytic_id', | ||
1298 | 406 | ], | ||
1299 | 407 | }, | ||
1300 | 408 | 'currency_rate': { | ||
1301 | 409 | 'header_list': [ | ||
1302 | 410 | 'name', | ||
1303 | 411 | 'rate', | ||
1304 | 412 | 'currency_id.name', | ||
1305 | 413 | ], | ||
1306 | 414 | 'required_field_list': [ | ||
1307 | 415 | 'name', | ||
1308 | 416 | 'rate', | ||
1309 | 417 | 'currency_id.name', | ||
1310 | 418 | ], | ||
1311 | 419 | }, | ||
1312 | 420 | |||
1313 | 421 | |||
1314 | 422 | # NON FUNCTIONNAL | ||
1315 | 423 | 'user_groups': { | ||
1316 | 424 | 'header_list': [ | ||
1317 | 425 | 'name', | ||
1318 | 426 | ], | ||
1319 | 427 | 'required_field_list': [ | ||
1320 | 428 | 'name', | ||
1321 | 429 | ], | ||
1322 | 430 | }, | ||
1323 | 431 | 'user_access': { | ||
1324 | 432 | 'header_list': [ | ||
1325 | 433 | ], | ||
1326 | 434 | 'required_field_list': [ | ||
1327 | 435 | ], | ||
1328 | 436 | 'hide_export': True, | ||
1329 | 437 | }, | ||
1330 | 438 | 'record_rules': { | ||
1331 | 439 | 'header_list': [ | ||
1332 | 440 | 'model_id.model', | ||
1333 | 441 | 'name', | ||
1334 | 442 | 'global', | ||
1335 | 443 | 'domain_force', | ||
1336 | 444 | 'perm_read', | ||
1337 | 445 | 'perm_write', | ||
1338 | 446 | 'perm_create', | ||
1339 | 447 | 'perm_unlink', | ||
1340 | 448 | ], | ||
1341 | 449 | 'required_field_list': [ | ||
1342 | 450 | 'model_id.model', | ||
1343 | 451 | 'name', | ||
1344 | 452 | ], | ||
1345 | 453 | }, | ||
1346 | 454 | 'access_control_list': { | ||
1347 | 455 | 'header_list': [ | ||
1348 | 456 | 'name', | ||
1349 | 457 | 'model_id.model', | ||
1350 | 458 | 'group_id.name', | ||
1351 | 459 | 'perm_read', | ||
1352 | 460 | 'perm_write', | ||
1353 | 461 | 'perm_create', | ||
1354 | 462 | 'perm_unlink', | ||
1355 | 463 | ], | ||
1356 | 464 | 'required_field_list': [ | ||
1357 | 465 | 'name', | ||
1358 | 466 | 'model_id.model', | ||
1359 | 467 | ], | ||
1360 | 468 | }, | ||
1361 | 469 | 'field_access_rules': { | ||
1362 | 470 | 'header_list': [ | ||
1363 | 471 | 'name', | ||
1364 | 472 | 'model_id.model', | ||
1365 | 473 | 'instance_level', | ||
1366 | 474 | 'domain_text', | ||
1367 | 475 | 'status', | ||
1368 | 476 | ], | ||
1369 | 477 | 'required_field_list': [ | ||
1370 | 478 | 'name', | ||
1371 | 479 | 'model_id.model', | ||
1372 | 480 | 'instance_level', | ||
1373 | 481 | ], | ||
1374 | 482 | }, | ||
1375 | 483 | 'field_access_rule_lines': { | ||
1376 | 484 | 'header_list': [ | ||
1377 | 485 | 'field_access_rule.name', | ||
1378 | 486 | 'field_access_rule_model_id', | ||
1379 | 487 | 'field.name', | ||
1380 | 488 | 'field_name', | ||
1381 | 489 | 'write_access', | ||
1382 | 490 | 'value_not_synchronized_on_create', | ||
1383 | 491 | 'value_not_synchronized_on_write', | ||
1384 | 492 | ], | ||
1385 | 493 | 'required_field_list': [ | ||
1386 | 494 | 'field_access_rule', | ||
1387 | 495 | 'field', | ||
1388 | 496 | ], | ||
1389 | 497 | }, | ||
1390 | 498 | 'button_access_rules': { | ||
1391 | 499 | 'header_list': [ | ||
1392 | 500 | 'model_id.model', | ||
1393 | 501 | 'view_id.name', | ||
1394 | 502 | 'label', | ||
1395 | 503 | 'name', | ||
1396 | 504 | 'group_names', | ||
1397 | 505 | 'type', | ||
1398 | 506 | ], | ||
1399 | 507 | 'required_field_list': [ | ||
1400 | 508 | 'model_id.model', | ||
1401 | 509 | 'view_id.name', | ||
1402 | 510 | 'name', | ||
1403 | 511 | ], | ||
1404 | 512 | }, | ||
1405 | 513 | 'window_actions': { | ||
1406 | 514 | 'header_list': [ | ||
1407 | 515 | 'name', | ||
1408 | 516 | 'res_model', | ||
1409 | 517 | 'view_type', | ||
1410 | 518 | 'view_id.name', | ||
1411 | 519 | 'domain', | ||
1412 | 520 | 'groups_id', | ||
1413 | 521 | ], | ||
1414 | 522 | 'required_field_list': [ | ||
1415 | 523 | 'name', | ||
1416 | 524 | 'res_model', | ||
1417 | 525 | 'view_type', | ||
1418 | 526 | ], | ||
1419 | 527 | }, | ||
1420 | 528 | } | ||
1421 | 529 | |||
1422 | 530 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
1423 | 0 | 531 | ||
1424 | === added file 'bin/addons/msf_doc_import/report/export_generic.mako' | |||
1425 | --- bin/addons/msf_doc_import/report/export_generic.mako 1970-01-01 00:00:00 +0000 | |||
1426 | +++ bin/addons/msf_doc_import/report/export_generic.mako 2017-09-12 08:08:04 +0000 | |||
1427 | @@ -0,0 +1,137 @@ | |||
1428 | 1 | <?xml version="1.0"?> | ||
1429 | 2 | <?mso-application progid="Excel.Sheet"?> | ||
1430 | 3 | <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" | ||
1431 | 4 | xmlns:o="urn:schemas-microsoft-com:office:office" | ||
1432 | 5 | xmlns:x="urn:schemas-microsoft-com:office:excel" | ||
1433 | 6 | xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" | ||
1434 | 7 | xmlns:html="http://www.w3.org/TR/REC-html40"> | ||
1435 | 8 | |||
1436 | 9 | <DocumentProperties xmlns="urn:schemas-microsoft-com:office:office"> | ||
1437 | 10 | <Author>MSFUser</Author> | ||
1438 | 11 | <LastAuthor>MSFUser</LastAuthor> | ||
1439 | 12 | <Created>2012-06-18T15:46:09Z</Created> | ||
1440 | 13 | <Company>Medecins Sans Frontieres</Company> | ||
1441 | 14 | <Version>11.9999</Version> | ||
1442 | 15 | </DocumentProperties> | ||
1443 | 16 | |||
1444 | 17 | <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel"> | ||
1445 | 18 | <WindowHeight>13170</WindowHeight> | ||
1446 | 19 | <WindowWidth>19020</WindowWidth> | ||
1447 | 20 | <WindowTopX>120</WindowTopX> | ||
1448 | 21 | <WindowTopY>60</WindowTopY> | ||
1449 | 22 | <ProtectStructure>False</ProtectStructure> | ||
1450 | 23 | <ProtectWindows>False</ProtectWindows> | ||
1451 | 24 | </ExcelWorkbook> | ||
1452 | 25 | |||
1453 | 26 | <Styles> | ||
1454 | 27 | <Style ss:ID="header"> | ||
1455 | 28 | <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/> | ||
1456 | 29 | <Interior ss:Color="#ffcc99" ss:Pattern="Solid"/> | ||
1457 | 30 | <Font ss:Bold="1" ss:Color="#000000" /> | ||
1458 | 31 | <Borders> | ||
1459 | 32 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
1460 | 33 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
1461 | 34 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
1462 | 35 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
1463 | 36 | </Borders> | ||
1464 | 37 | <Protection /> | ||
1465 | 38 | </Style> | ||
1466 | 39 | <Style ss:ID="String"> | ||
1467 | 40 | <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/> | ||
1468 | 41 | <Borders> | ||
1469 | 42 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
1470 | 43 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
1471 | 44 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
1472 | 45 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
1473 | 46 | </Borders> | ||
1474 | 47 | <Protection ss:Protected="0" /> | ||
1475 | 48 | </Style> | ||
1476 | 49 | <Style ss:ID="Boolean"> | ||
1477 | 50 | <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/> | ||
1478 | 51 | <Borders> | ||
1479 | 52 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
1480 | 53 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
1481 | 54 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
1482 | 55 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
1483 | 56 | </Borders> | ||
1484 | 57 | <Protection ss:Protected="0" /> | ||
1485 | 58 | </Style> | ||
1486 | 59 | <Style ss:ID="Float"> | ||
1487 | 60 | <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/> | ||
1488 | 61 | <Borders> | ||
1489 | 62 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
1490 | 63 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
1491 | 64 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
1492 | 65 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
1493 | 66 | </Borders> | ||
1494 | 67 | <NumberFormat ss:Format="Fixed" /> | ||
1495 | 68 | <Protection ss:Protected="0" /> | ||
1496 | 69 | </Style> | ||
1497 | 70 | <Style ss:ID="Number"> | ||
1498 | 71 | <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/> | ||
1499 | 72 | <Borders> | ||
1500 | 73 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
1501 | 74 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
1502 | 75 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
1503 | 76 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
1504 | 77 | </Borders> | ||
1505 | 78 | <NumberFormat ss:Format="Fixed" /> | ||
1506 | 79 | <Protection ss:Protected="0" /> | ||
1507 | 80 | </Style> | ||
1508 | 81 | <Style ss:ID="DateTime"> | ||
1509 | 82 | <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/> | ||
1510 | 83 | <Borders> | ||
1511 | 84 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> | ||
1512 | 85 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/> | ||
1513 | 86 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/> | ||
1514 | 87 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/> | ||
1515 | 88 | </Borders> | ||
1516 | 89 | <NumberFormat ss:Format="Short Date" /> | ||
1517 | 90 | <Protection ss:Protected="0" /> | ||
1518 | 91 | </Style> | ||
1519 | 92 | </Styles> | ||
1520 | 93 | |||
1521 | 94 | <ss:Worksheet ss:Name="${data.get('model_name', _('Sheet 1'))|x}" ss:Protected="0"> | ||
1522 | 95 | |||
1523 | 96 | <Table x:FullColumns="1" x:FullRows="1"> | ||
1524 | 97 | |||
1525 | 98 | <% rows = getRows(data['model'], data['fields'], data.get('nb_lines'), data.get('domain'), data.get('template_only', False), data['context']) %> | ||
1526 | 99 | <% headers = getHeaders(data['model'], data['fields'], rows, data['context']) %> | ||
1527 | 100 | % for col in headers: | ||
1528 | 101 | <Column ss:AutoFitWidth="1" ss:Width="${col[2] or 70|x}" ss:StyleID="${col[1]|x}" /> | ||
1529 | 102 | % endfor | ||
1530 | 103 | |||
1531 | 104 | <Row> | ||
1532 | 105 | % for col in headers: | ||
1533 | 106 | <Cell ss:StyleID="header"> | ||
1534 | 107 | <Data ss:Type="String">${col[0]|x}</Data> | ||
1535 | 108 | </Cell> | ||
1536 | 109 | % endfor | ||
1537 | 110 | </Row> | ||
1538 | 111 | |||
1539 | 112 | % if not data.get('template_only', False): | ||
1540 | 113 | % for row in rows: | ||
1541 | 114 | <Row> | ||
1542 | 115 | % for index, cell in enumerate(row): | ||
1543 | 116 | <Cell ss:StyleID="${headers[index][1]|x}"> | ||
1544 | 117 | % if headers[index][1] == 'String' and not cell: | ||
1545 | 118 | <Data ss:Type="String"></Data> | ||
1546 | 119 | % else: | ||
1547 | 120 | <Data ss:Type="String">${cell|x}</Data> | ||
1548 | 121 | % endif | ||
1549 | 122 | </Cell> | ||
1550 | 123 | % endfor | ||
1551 | 124 | </Row> | ||
1552 | 125 | % endfor | ||
1553 | 126 | % endif | ||
1554 | 127 | </Table> | ||
1555 | 128 | |||
1556 | 129 | <x:WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel"> | ||
1557 | 130 | <ProtectScenarios>False</ProtectScenarios> | ||
1558 | 131 | <EnableSelection>UnlockedCells</EnableSelection> | ||
1559 | 132 | <AllowInsertRows /> | ||
1560 | 133 | </x:WorksheetOptions> | ||
1561 | 134 | |||
1562 | 135 | </ss:Worksheet> | ||
1563 | 136 | |||
1564 | 137 | </Workbook> | ||
1565 | 0 | 138 | ||
1566 | === modified file 'bin/addons/msf_doc_import/report/import_generic_template.mako' | |||
1567 | --- bin/addons/msf_doc_import/report/import_generic_template.mako 2016-08-15 11:49:05 +0000 | |||
1568 | +++ bin/addons/msf_doc_import/report/import_generic_template.mako 2017-09-12 08:08:04 +0000 | |||
1569 | @@ -46,6 +46,27 @@ | |||
1570 | 46 | </Borders> | 46 | </Borders> |
1571 | 47 | <Protection ss:Protected="0" /> | 47 | <Protection ss:Protected="0" /> |
1572 | 48 | </Style> | 48 | </Style> |
1573 | 49 | <Style ss:ID="Boolean"> | ||
1574 | 50 | <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/> | ||
1575 | 51 | <Borders> | ||
1576 | 52 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
1577 | 53 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
1578 | 54 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
1579 | 55 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
1580 | 56 | </Borders> | ||
1581 | 57 | <Protection ss:Protected="0" /> | ||
1582 | 58 | </Style> | ||
1583 | 59 | <Style ss:ID="Float"> | ||
1584 | 60 | <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/> | ||
1585 | 61 | <Borders> | ||
1586 | 62 | <Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
1587 | 63 | <Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
1588 | 64 | <Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
1589 | 65 | <Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1" /> | ||
1590 | 66 | </Borders> | ||
1591 | 67 | <NumberFormat ss:Format="Fixed" /> | ||
1592 | 68 | <Protection ss:Protected="0" /> | ||
1593 | 69 | </Style> | ||
1594 | 49 | <Style ss:ID="Number"> | 70 | <Style ss:ID="Number"> |
1595 | 50 | <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/> | 71 | <Alignment ss:Horizontal="Center" ss:Vertical="Center" ss:WrapText="1"/> |
1596 | 51 | <Borders> | 72 | <Borders> |
1597 | 52 | 73 | ||
1598 | === modified file 'bin/addons/msf_doc_import/report/import_generic_template.py' | |||
1599 | --- bin/addons/msf_doc_import/report/import_generic_template.py 2016-07-27 09:38:38 +0000 | |||
1600 | +++ bin/addons/msf_doc_import/report/import_generic_template.py 2017-09-12 08:08:04 +0000 | |||
1601 | @@ -19,12 +19,64 @@ | |||
1602 | 19 | # | 19 | # |
1603 | 20 | ############################################################################## | 20 | ############################################################################## |
1604 | 21 | 21 | ||
1605 | 22 | from report import report_sxw | ||
1606 | 22 | from report_webkit.webkit_report import XlsWebKitParser | 23 | from report_webkit.webkit_report import XlsWebKitParser |
1607 | 23 | 24 | ||
1608 | 25 | |||
1609 | 24 | XlsWebKitParser( | 26 | XlsWebKitParser( |
1610 | 25 | 'report.wizard.import.generic.template', | 27 | 'report.wizard.import.generic.template', |
1611 | 26 | 'abstract.wizard.import', | 28 | 'abstract.wizard.import', |
1612 | 27 | 'addons/msf_doc_import/report/import_generic_template.mako', | 29 | 'addons/msf_doc_import/report/import_generic_template.mako', |
1613 | 28 | ) | 30 | ) |
1614 | 29 | 31 | ||
1615 | 32 | |||
1616 | 33 | class report_generic_export_parser(report_sxw.rml_parse): | ||
1617 | 34 | |||
1618 | 35 | def __init__(self, cr, uid, name, context=None): | ||
1619 | 36 | super(report_generic_export_parser, self).__init__(cr, uid, name, context=context) | ||
1620 | 37 | self.localcontext.update({ | ||
1621 | 38 | 'getHeaders': self.getHeaders, | ||
1622 | 39 | 'getRows': self.getRows, | ||
1623 | 40 | }) | ||
1624 | 41 | return | ||
1625 | 42 | |||
1626 | 43 | def getHeaders(self, model, field_list, rows, context=None): | ||
1627 | 44 | ''' | ||
1628 | 45 | get the column names of the table. Set the type of the column and the | ||
1629 | 46 | size of it. | ||
1630 | 47 | ''' | ||
1631 | 48 | import_export_obj = self.pool.get('msf.import.export') | ||
1632 | 49 | return import_export_obj._get_headers(self.cr, self.uid, model, | ||
1633 | 50 | selection=None, field_list=field_list, rows=rows, context=context) | ||
1634 | 51 | |||
1635 | 52 | def getRows(self, model, fields, nb_lines=None, domain=None, | ||
1636 | 53 | template_only=False, context=None): | ||
1637 | 54 | """ | ||
1638 | 55 | Return list of lines from given generic export | ||
1639 | 56 | """ | ||
1640 | 57 | if context is None: | ||
1641 | 58 | context={} | ||
1642 | 59 | if template_only: | ||
1643 | 60 | return [] | ||
1644 | 61 | if not domain: | ||
1645 | 62 | domain = [] | ||
1646 | 63 | rows = [] | ||
1647 | 64 | counter = 0 | ||
1648 | 65 | chunk_size = 100 | ||
1649 | 66 | model_obj = self.pool.get(model) | ||
1650 | 67 | ids = model_obj.search(self.cr, self.uid, domain, limit=nb_lines) | ||
1651 | 68 | fields = [x.replace('.', '/') for x in fields] | ||
1652 | 69 | for i in range(0, len(ids), chunk_size): | ||
1653 | 70 | ids_chunk = ids[i:i + chunk_size] | ||
1654 | 71 | counter += len(ids_chunk) | ||
1655 | 72 | context['translate_selection_field'] = True | ||
1656 | 73 | rows.extend(model_obj.export_data(self.cr, self.uid, ids_chunk, fields, context=context)['datas']) | ||
1657 | 74 | return rows | ||
1658 | 75 | |||
1659 | 76 | XlsWebKitParser( | ||
1660 | 77 | 'report.wizard.export.generic', | ||
1661 | 78 | 'msf.import.export', | ||
1662 | 79 | 'addons/msf_doc_import/report/export_generic.mako', | ||
1663 | 80 | parser=report_generic_export_parser, | ||
1664 | 81 | ) | ||
1665 | 30 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | 82 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1666 | 31 | 83 | ||
1667 | === added file 'bin/addons/msf_doc_import/view/msf_import_export_view.xml' | |||
1668 | --- bin/addons/msf_doc_import/view/msf_import_export_view.xml 1970-01-01 00:00:00 +0000 | |||
1669 | +++ bin/addons/msf_doc_import/view/msf_import_export_view.xml 2017-09-12 08:08:04 +0000 | |||
1670 | @@ -0,0 +1,96 @@ | |||
1671 | 1 | <?xml version="1.0" encoding="utf-8" ?> | ||
1672 | 2 | <openerp> | ||
1673 | 3 | <data> | ||
1674 | 4 | |||
1675 | 5 | <record id="msf_import_export_view" model="ir.ui.view"> | ||
1676 | 6 | <field name="name">msf.import.export.view</field> | ||
1677 | 7 | <field name="model">msf.import.export</field> | ||
1678 | 8 | <field name="type">form</field> | ||
1679 | 9 | <field name="arch" type="xml"> | ||
1680 | 10 | <form string="Import / Export"> | ||
1681 | 11 | <group> | ||
1682 | 12 | <field name="display_file_import" invisible="1" /> | ||
1683 | 13 | <field name="display_file_export" invisible="1" /> | ||
1684 | 14 | <field name='model_list_selection' on_change="domain_type_change(model_list_selection)" /> | ||
1685 | 15 | </group> | ||
1686 | 16 | <group col="4" colspan="4"> | ||
1687 | 17 | <field name="hide_download_3_entries" invisible="1" /> | ||
1688 | 18 | <field name="hide_download_all_entries" invisible="1" /> | ||
1689 | 19 | <group colspan="2" col="2" name="file_import" attrs="{'invisible':[('display_file_import', '=', False)]}"> | ||
1690 | 20 | <separator string="File Import" colspan="2"/> | ||
1691 | 21 | <field name="display_test_import_button" invisible="1" /> | ||
1692 | 22 | <field name="import_file" colspan="4" on_change="file_change(import_file)"/> | ||
1693 | 23 | <button name="test_import" string="Test file" type="object" icon="gtk-ok" colspan="4" attrs="{'invisible':[('display_test_import_button', '=', False)]}" /> | ||
1694 | 24 | <button name="import_xml" string="Run import" type="object" icon="gtk-execute" colspan="4" attrs="{'invisible': [('state', '!=', 'draft')]}" /> | ||
1695 | 25 | <separator colspan="4" string="Information" /> | ||
1696 | 26 | <field name="info_message" colspan="4" nolabel="1" /> | ||
1697 | 27 | </group> | ||
1698 | 28 | <group colspan="2" col="2" name="file_export"> | ||
1699 | 29 | <separator string="File Export" colspan="2"/> | ||
1700 | 30 | <group attrs="{'invisible':[('display_file_export', '=', False)]}"> | ||
1701 | 31 | <button name="download_template_file" string="Export empty template" icon="gtk-save" help="Download template file" type="object" /> | ||
1702 | 32 | <button name="download_3_entries_file" string="Export first 3 entries" type="object" icon="gtk-save" colspan="4" attrs="{'invisible':[('hide_download_3_entries', '=', True)]}"/> | ||
1703 | 33 | <button name="download_all_entries_file" string="Export all data" type="object" icon="gtk-save" colspan="4" attrs="{'invisible':[('hide_download_all_entries', '=', True)]}"/> | ||
1704 | 34 | </group> | ||
1705 | 35 | </group> | ||
1706 | 36 | <group colspan="4" attrs="{'invisible': [('show_warning', '=', False)]}"> | ||
1707 | 37 | <separator colspan="4" string="Warning messages" /> | ||
1708 | 38 | <field name="warning_message" nolabel="1" colspan="4" widget="full_text"/> | ||
1709 | 39 | </group> | ||
1710 | 40 | |||
1711 | 41 | <group colspan="4" attrs="{'invisible': [('show_error', '=', False)]}"> | ||
1712 | 42 | <separator colspan="4" string="Error messages" /> | ||
1713 | 43 | <field name="error_message" nolabel="1" colspan="4" widget="full_text"/> | ||
1714 | 44 | </group> | ||
1715 | 45 | </group> | ||
1716 | 46 | </form> | ||
1717 | 47 | </field> | ||
1718 | 48 | </record> | ||
1719 | 49 | |||
1720 | 50 | |||
1721 | 51 | <record id="msf_import_export_supply_action" model="ir.actions.act_window"> | ||
1722 | 52 | <field name="name">Supply</field> | ||
1723 | 53 | <field name="res_model">msf.import.export</field> | ||
1724 | 54 | <field name="view_type">form</field> | ||
1725 | 55 | <field name="view_mode">form</field> | ||
1726 | 56 | <field name="target">current</field> | ||
1727 | 57 | <field name="context">{'domain_type': 'supply'}</field> | ||
1728 | 58 | </record> | ||
1729 | 59 | |||
1730 | 60 | <record id="msf_import_export_finance_action" model="ir.actions.act_window"> | ||
1731 | 61 | <field name="name">Finance</field> | ||
1732 | 62 | <field name="res_model">msf.import.export</field> | ||
1733 | 63 | <field name="view_type">form</field> | ||
1734 | 64 | <field name="view_mode">form</field> | ||
1735 | 65 | <field name="target">current</field> | ||
1736 | 66 | <field name="context">{'domain_type': 'finance'}</field> | ||
1737 | 67 | </record> | ||
1738 | 68 | |||
1739 | 69 | <record id="msf_import_export_non_functional_action" model="ir.actions.act_window"> | ||
1740 | 70 | <field name="name">Non Functional</field> | ||
1741 | 71 | <field name="res_model">msf.import.export</field> | ||
1742 | 72 | <field name="view_type">form</field> | ||
1743 | 73 | <field name="view_mode">form</field> | ||
1744 | 74 | <field name="target">current</field> | ||
1745 | 75 | <field name="context">{'domain_type': 'non_functionnal'}</field> | ||
1746 | 76 | </record> | ||
1747 | 77 | |||
1748 | 78 | <menuitem id="msf_import_export_menu" | ||
1749 | 79 | name="Import / Export" | ||
1750 | 80 | parent="object_query.menu_preferences" /> | ||
1751 | 81 | |||
1752 | 82 | <menuitem id="msf_import_export_supply_menu" | ||
1753 | 83 | parent="msf_import_export_menu" | ||
1754 | 84 | action="msf_import_export_supply_action" /> | ||
1755 | 85 | |||
1756 | 86 | <menuitem id="msf_import_export_finance_menu" | ||
1757 | 87 | parent="msf_import_export_menu" | ||
1758 | 88 | action="msf_import_export_finance_action" /> | ||
1759 | 89 | |||
1760 | 90 | <menuitem id="msf_import_export_non_functional_menu" | ||
1761 | 91 | parent="msf_import_export_menu" | ||
1762 | 92 | action="msf_import_export_non_functional_action" /> | ||
1763 | 93 | |||
1764 | 94 | |||
1765 | 95 | </data> | ||
1766 | 96 | </openerp> | ||
1767 | 0 | 97 | ||
1768 | === modified file 'bin/addons/msf_doc_import/wizard/abstract_wizard_import.py' | |||
1769 | --- bin/addons/msf_doc_import/wizard/abstract_wizard_import.py 2017-03-20 09:49:38 +0000 | |||
1770 | +++ bin/addons/msf_doc_import/wizard/abstract_wizard_import.py 2017-09-12 08:08:04 +0000 | |||
1771 | @@ -39,7 +39,7 @@ | |||
1772 | 39 | """ | 39 | """ |
1773 | 40 | Class used to export Header template. | 40 | Class used to export Header template. |
1774 | 41 | """ | 41 | """ |
1776 | 42 | type_ok = ['String', 'Number', 'DateTime'] | 42 | type_ok = ['String', 'Number', 'DateTime', 'Boolean', 'Float'] |
1777 | 43 | 43 | ||
1778 | 44 | def __new__(cls, name, ftype='String', size=70, tech_name=None, required=False): | 44 | def __new__(cls, name, ftype='String', size=70, tech_name=None, required=False): |
1779 | 45 | """ | 45 | """ |
1780 | @@ -71,12 +71,12 @@ | |||
1781 | 71 | :return: A datetime instance or False | 71 | :return: A datetime instance or False |
1782 | 72 | """ | 72 | """ |
1783 | 73 | # US:2527: accept only one format, reject other | 73 | # US:2527: accept only one format, reject other |
1785 | 74 | date_format = [ | 74 | accepted_date_format = [ |
1786 | 75 | '%d/%m/%Y', | 75 | '%d/%m/%Y', |
1787 | 76 | ] | 76 | ] |
1788 | 77 | 77 | ||
1789 | 78 | d = False | 78 | d = False |
1791 | 79 | for dformat in date_format: | 79 | for dformat in accepted_date_format: |
1792 | 80 | try: | 80 | try: |
1793 | 81 | d = DateTime.strptime(date_value, dformat) | 81 | d = DateTime.strptime(date_value, dformat) |
1794 | 82 | d = d.strftime('%Y-%m-%d %H:%M:%S') | 82 | d = d.strftime('%Y-%m-%d %H:%M:%S') |
1795 | @@ -130,9 +130,22 @@ | |||
1796 | 130 | return (0, value, None) | 130 | return (0, value, None) |
1797 | 131 | else: | 131 | else: |
1798 | 132 | try: | 132 | try: |
1799 | 133 | if isinstance(value, basestring): | ||
1800 | 134 | value = value.rstrip().replace(',', '.') | ||
1801 | 133 | return (0, float(value), None) | 135 | return (0, float(value), None) |
1802 | 134 | except Exception as e: | 136 | except Exception as e: |
1803 | 135 | return (-1, value, e) | 137 | return (-1, value, e) |
1804 | 138 | elif header[1] == 'Boolean': | ||
1805 | 139 | if value.upper() in ('T', 'TRUE', '1'): | ||
1806 | 140 | value = True | ||
1807 | 141 | else: | ||
1808 | 142 | value = False | ||
1809 | 143 | elif header[1] == 'Number': | ||
1810 | 144 | if vtype =='int': | ||
1811 | 145 | try: | ||
1812 | 146 | return (0, int(value), None) | ||
1813 | 147 | except Exception as e: | ||
1814 | 148 | return (-1, value, e) | ||
1815 | 136 | 149 | ||
1816 | 137 | return (0, value, None) | 150 | return (0, value, None) |
1817 | 138 | 151 | ||
1818 | 139 | 152 | ||
1819 | === modified file 'bin/addons/msf_profile/i18n/fr_MF.po' | |||
1820 | --- bin/addons/msf_profile/i18n/fr_MF.po 2017-09-08 15:57:28 +0000 | |||
1821 | +++ bin/addons/msf_profile/i18n/fr_MF.po 2017-09-12 08:08:04 +0000 | |||
1822 | @@ -4544,13 +4544,14 @@ | |||
1823 | 4544 | msgid "Contact Titles" | 4544 | msgid "Contact Titles" |
1824 | 4545 | msgstr "Titre/Position Contact" | 4545 | msgstr "Titre/Position Contact" |
1825 | 4546 | 4546 | ||
1827 | 4547 | #. module: msf_button_access_rights | 4547 | #. modules: msf_button_access_rights, msf_doc_import |
1828 | 4548 | #: model:ir.actions.act_window,name:msf_button_access_rights.button_access_rule_list | 4548 | #: model:ir.actions.act_window,name:msf_button_access_rights.button_access_rule_list |
1829 | 4549 | #: model:ir.ui.menu,name:msf_button_access_rights.msf_button_access_rules | 4549 | #: model:ir.ui.menu,name:msf_button_access_rights.msf_button_access_rules |
1830 | 4550 | #: view:ir.ui.view:0 | 4550 | #: view:ir.ui.view:0 |
1831 | 4551 | #: field:ir.ui.view,button_access_rules_ref:0 | 4551 | #: field:ir.ui.view,button_access_rules_ref:0 |
1832 | 4552 | #: code:addons/msf_doc_import/msf_import_export_conf.py:124 | ||
1833 | 4552 | msgid "Button Access Rules" | 4553 | msgid "Button Access Rules" |
1835 | 4553 | msgstr "Button Access Rules" | 4554 | msgstr "Règles d'Accès de bouton" |
1836 | 4554 | 4555 | ||
1837 | 4555 | #. module: stock | 4556 | #. module: stock |
1838 | 4556 | #: code:addons/stock/stock.py:1091 | 4557 | #: code:addons/stock/stock.py:1091 |
1839 | @@ -7005,11 +7006,6 @@ | |||
1840 | 7005 | msgid "MSF Codification" | 7006 | msgid "MSF Codification" |
1841 | 7006 | msgstr "Codification MSF" | 7007 | msgstr "Codification MSF" |
1842 | 7007 | 7008 | ||
1843 | 7008 | #. module: product_list | ||
1844 | 7009 | #: view:product.list.line:0 | ||
1845 | 7010 | msgid "Products" | ||
1846 | 7011 | msgstr "Products" | ||
1847 | 7012 | |||
1848 | 7013 | #. module: base_setup | 7009 | #. module: base_setup |
1849 | 7014 | #: view:base.setup.company:0 | 7010 | #: view:base.setup.company:0 |
1850 | 7015 | msgid "Your company information will be used to personalize documents issued with OpenERP such as invoices, sales orders and much more." | 7011 | msgid "Your company information will be used to personalize documents issued with OpenERP such as invoices, sales orders and much more." |
1851 | @@ -13296,12 +13292,6 @@ | |||
1852 | 13296 | msgid "Destinations" | 13292 | msgid "Destinations" |
1853 | 13297 | msgstr "Destinations" | 13293 | msgstr "Destinations" |
1854 | 13298 | 13294 | ||
1855 | 13299 | #. module: import_data | ||
1856 | 13300 | #: selection:import_category,object:0 | ||
1857 | 13301 | #: selection:import_nomenclature,object:0 | ||
1858 | 13302 | msgid "Product Nomenclature" | ||
1859 | 13303 | msgstr "Product Nomenclature" | ||
1860 | 13304 | |||
1861 | 13305 | #. module: analytic_distribution | 13295 | #. module: analytic_distribution |
1862 | 13306 | #: code:addons/analytic_distribution/account_commitment.py:166 | 13296 | #: code:addons/analytic_distribution/account_commitment.py:166 |
1863 | 13307 | #, python-format | 13297 | #, python-format |
1864 | @@ -15965,6 +15955,47 @@ | |||
1865 | 15965 | msgid "New Zealand" | 15955 | msgid "New Zealand" |
1866 | 15966 | msgstr "Nouvelle-Zélande" | 15956 | msgstr "Nouvelle-Zélande" |
1867 | 15967 | 15957 | ||
1868 | 15958 | #. modules: msf_doc_import, msf_supply_doc_export | ||
1869 | 15959 | #: code:addons/msf_doc_import/wizard/__init__.py:68 | ||
1870 | 15960 | #: code:addons/msf_doc_import/wizard/__init__.py:73 | ||
1871 | 15961 | #: code:addons/msf_doc_import/wizard/__init__.py:78 | ||
1872 | 15962 | #: code:addons/msf_doc_import/wizard/wizard_in_simulation_screen.py:65 | ||
1873 | 15963 | #: report:addons/msf_supply_doc_export/report/report_real_composition_kit_xls.mako:71 | ||
1874 | 15964 | #, python-format | ||
1875 | 15965 | msgid "Expiry Date" | ||
1876 | 15966 | msgstr "Date d'expiration" | ||
1877 | 15967 | |||
1878 | 15968 | #. modules: account, msf_outgoing, register_accounting, account_override, purchase_compare_rfq, msf_doc_import, return_claim, analytic_distribution | ||
1879 | 15969 | #: code:addons/account/report/account_general_ledger.py:550 | ||
1880 | 15970 | #: view:account.chart:0 | ||
1881 | 15971 | #: field:account.chart,currency_id:0 | ||
1882 | 15972 | #: view:account.analytic.chart:0 | ||
1883 | 15973 | #: field:account.analytic.chart,currency_id:0 | ||
1884 | 15974 | #: code:addons/msf_doc_import/wizard/wizard_in_simulation_screen.py:63 | ||
1885 | 15975 | #: code:addons/msf_doc_import/wizard/wizard_po_simulation_screen.py:70 | ||
1886 | 15976 | #: field:wizard.import.po.simulation.screen,in_currency:0 | ||
1887 | 15977 | #: field:wizard.import.po.simulation.screen.line,imp_currency:0 | ||
1888 | 15978 | #: field:wizard.import.po.simulation.screen.line,in_currency:0 | ||
1889 | 15979 | #: field:wizard.simu.import.po.line,currency_id:0 | ||
1890 | 15980 | #: field:wizard.simu.import.po.line,initial_currency:0 | ||
1891 | 15981 | #: field:create.picking.move.processor,currency:0 | ||
1892 | 15982 | #: field:internal.move.processor,currency:0 | ||
1893 | 15983 | #: field:outgoing.delivery.move.processor,currency:0 | ||
1894 | 15984 | #: field:ppl.move.processor,currency:0 | ||
1895 | 15985 | #: field:return.ppl.move.processor,currency:0 | ||
1896 | 15986 | #: field:stock.move.in.processor,currency:0 | ||
1897 | 15987 | #: field:stock.move.processor,currency:0 | ||
1898 | 15988 | #: field:validate.move.processor,currency:0 | ||
1899 | 15989 | #: field:wizard.compare.rfq,currency_id:0 | ||
1900 | 15990 | #: field:account.direct.invoice.wizard,currency_id:0 | ||
1901 | 15991 | #: field:wizard.account.invoice,fake_currency_id:0 | ||
1902 | 15992 | #: field:wizard.account.invoice,virtual_currency_id:0 | ||
1903 | 15993 | #: field:claim.product.line,price_currency_claim_product_line:0 | ||
1904 | 15994 | #: field:claim.product.line,price_unit_claim_product_line:0 | ||
1905 | 15995 | #, python-format | ||
1906 | 15996 | msgid "Currency" | ||
1907 | 15997 | msgstr "Devise" | ||
1908 | 15998 | |||
1909 | 15968 | #. module: sale | 15999 | #. module: sale |
1910 | 15969 | #: help:sale.order.line,delay:0 | 16000 | #: help:sale.order.line,delay:0 |
1911 | 15970 | msgid "Number of days between the order confirmation the shipping of the products to the customer" | 16001 | msgid "Number of days between the order confirmation the shipping of the products to the customer" |
1912 | @@ -17377,6 +17408,7 @@ | |||
1913 | 17377 | 17408 | ||
1914 | 17378 | #. module: msf_doc_import | 17409 | #. module: msf_doc_import |
1915 | 17379 | #: view:wizard.import.batch:0 | 17410 | #: view:wizard.import.batch:0 |
1916 | 17411 | #: view:msf.import.export:0 | ||
1917 | 17380 | msgid "Warning messages" | 17412 | msgid "Warning messages" |
1918 | 17381 | msgstr "Messages d'avertissement" | 17413 | msgstr "Messages d'avertissement" |
1919 | 17382 | 17414 | ||
1920 | @@ -20661,9 +20693,11 @@ | |||
1921 | 20661 | msgid "IN update OUT" | 20693 | msgid "IN update OUT" |
1922 | 20662 | msgstr "IN update OUT" | 20694 | msgstr "IN update OUT" |
1923 | 20663 | 20695 | ||
1925 | 20664 | #. module: import_data | 20696 | #. modules: import_data, msf_doc_import |
1926 | 20665 | #: code:addons/import_data/import_data.py:317 | 20697 | #: code:addons/import_data/import_data.py:317 |
1927 | 20666 | #: code:addons/import_data/import_data.py:356 | 20698 | #: code:addons/import_data/import_data.py:356 |
1928 | 20699 | #: code:addons/msf_doc_import/msf_import_export.py:499 | ||
1929 | 20700 | #: code:addons/msf_doc_import/msf_import_export.py:528 | ||
1930 | 20667 | #, python-format | 20701 | #, python-format |
1931 | 20668 | msgid "%s does not exist" | 20702 | msgid "%s does not exist" |
1932 | 20669 | msgstr "%s n'existe pas" | 20703 | msgstr "%s n'existe pas" |
1933 | @@ -24759,11 +24793,12 @@ | |||
1934 | 24759 | msgid "This wizard will validate all journal entries of a particular journal and period. Once journal entries are validated, you can not update them anymore." | 24793 | msgid "This wizard will validate all journal entries of a particular journal and period. Once journal entries are validated, you can not update them anymore." |
1935 | 24760 | msgstr "Cet assistant validera toutes les écritures comptables pour un journal particulier et une période. Une fois validées, les écritures comptables ne peuvent plus être modifiées." | 24794 | msgstr "Cet assistant validera toutes les écritures comptables pour un journal particulier et une période. Une fois validées, les écritures comptables ne peuvent plus être modifiées." |
1936 | 24761 | 24795 | ||
1938 | 24762 | #. module: msf_field_access_rights | 24796 | #. modules: msf_field_access_rights, msf_doc_import |
1939 | 24763 | #: model:ir.actions.act_window,name:msf_field_access_rights.field_access_rules_list | 24797 | #: model:ir.actions.act_window,name:msf_field_access_rights.field_access_rules_list |
1940 | 24764 | #: model:ir.ui.menu,name:msf_field_access_rights.msf_field_access_rules | 24798 | #: model:ir.ui.menu,name:msf_field_access_rights.msf_field_access_rules |
1941 | 24799 | #: code:addons/msf_doc_import/msf_import_export_conf.py:114 | ||
1942 | 24765 | msgid "Field Access Rules" | 24800 | msgid "Field Access Rules" |
1944 | 24766 | msgstr "Field Access Rules" | 24801 | msgstr "Règles d'Accès au Champs" |
1945 | 24767 | 24802 | ||
1946 | 24768 | #. modules: account, msf_outgoing, finance, sync_client, register_accounting, account_override, sourcing, sync_so, res_currency_functional, analytic_distribution | 24803 | #. modules: account, msf_outgoing, finance, sync_client, register_accounting, account_override, sourcing, sync_so, res_currency_functional, analytic_distribution |
1947 | 24769 | #: code:addons/account/report/account_general_ledger.py:252 | 24804 | #: code:addons/account/report/account_general_ledger.py:252 |
1948 | @@ -25725,9 +25760,10 @@ | |||
1949 | 25725 | msgid "No Period found on Invoice!" | 25760 | msgid "No Period found on Invoice!" |
1950 | 25726 | msgstr "Pas de Période indiquée sur la Facture!" | 25761 | msgstr "Pas de Période indiquée sur la Facture!" |
1951 | 25727 | 25762 | ||
1953 | 25728 | #. module: supplier_catalogue | 25763 | #. modules: supplier_catalogue, msf_doc_import |
1954 | 25729 | #: model:ir.actions.act_window,name:supplier_catalogue.action_supplier_catalogue_line_list | 25764 | #: model:ir.actions.act_window,name:supplier_catalogue.action_supplier_catalogue_line_list |
1955 | 25730 | #: view:supplier.catalogue.line:0 | 25765 | #: view:supplier.catalogue.line:0 |
1956 | 25766 | #: code:addons/msf_doc_import/msf_import_export_conf.py:53 | ||
1957 | 25731 | msgid "Supplier catalogue lines" | 25767 | msgid "Supplier catalogue lines" |
1958 | 25732 | msgstr "Lignes Catalogue Fournisseur" | 25768 | msgstr "Lignes Catalogue Fournisseur" |
1959 | 25733 | 25769 | ||
1960 | @@ -25857,6 +25893,7 @@ | |||
1961 | 25857 | 25893 | ||
1962 | 25858 | #. module: msf_doc_import | 25894 | #. module: msf_doc_import |
1963 | 25859 | #: view:wizard.import.batch:0 | 25895 | #: view:wizard.import.batch:0 |
1964 | 25896 | #: view:msf.import.export:0 | ||
1965 | 25860 | msgid "Run import" | 25897 | msgid "Run import" |
1966 | 25861 | msgstr "Démarrer l'import" | 25898 | msgstr "Démarrer l'import" |
1967 | 25862 | 25899 | ||
1968 | @@ -29743,7 +29780,13 @@ | |||
1969 | 29743 | msgid "Total amount this customer owes you." | 29780 | msgid "Total amount this customer owes you." |
1970 | 29744 | msgstr "Montant Total Dû par ce Client." | 29781 | msgstr "Montant Total Dû par ce Client." |
1971 | 29745 | 29782 | ||
1973 | 29746 | #. modules: tender_flow, msf_partner, account, product, base, useability_dashboard_and_menu | 29783 | #. modules: consumption_calculation, stock_override |
1974 | 29784 | #: report:addons/consumption_calculation/report/report_monthly_consumption_xls.mako:70 | ||
1975 | 29785 | #: field:export.report.stock.move,name:0 | ||
1976 | 29786 | msgid "Generated on" | ||
1977 | 29787 | msgstr "Generated on" | ||
1978 | 29788 | |||
1979 | 29789 | #. modules: tender_flow, msf_partner, account, product, base, useability_dashboard_and_menu, msf_doc_import | ||
1980 | 29747 | #: model:ir.ui.menu,name:account.menu_account_supplier | 29790 | #: model:ir.ui.menu,name:account.menu_account_supplier |
1981 | 29748 | #: model:ir.ui.menu,name:account.menu_finance_payables | 29791 | #: model:ir.ui.menu,name:account.menu_finance_payables |
1982 | 29749 | #: model:ir.actions.act_window,name:base.action_partner_supplier_form | 29792 | #: model:ir.actions.act_window,name:base.action_partner_supplier_form |
1983 | @@ -29755,6 +29798,7 @@ | |||
1984 | 29755 | #: view:tender:0 | 29798 | #: view:tender:0 |
1985 | 29756 | #: field:tender,supplier_ids:0 | 29799 | #: field:tender,supplier_ids:0 |
1986 | 29757 | #: model:ir.ui.menu,name:useability_dashboard_and_menu.menu_supplier | 29800 | #: model:ir.ui.menu,name:useability_dashboard_and_menu.menu_supplier |
1987 | 29801 | #: code:addons/msf_doc_import/msf_import_export_conf.py:42 | ||
1988 | 29758 | msgid "Suppliers" | 29802 | msgid "Suppliers" |
1989 | 29759 | msgstr "Fournisseurs" | 29803 | msgstr "Fournisseurs" |
1990 | 29760 | 29804 | ||
1991 | @@ -30275,11 +30319,6 @@ | |||
1992 | 30275 | msgid "Line %s. No info about given account: %s" | 30319 | msgid "Line %s. No info about given account: %s" |
1993 | 30276 | msgstr "Line %s. No info about given account: %s" | 30320 | msgstr "Line %s. No info about given account: %s" |
1994 | 30277 | 30321 | ||
1995 | 30278 | #. module: account_hq_entries | ||
1996 | 30279 | #: model:ir.module.module,shortdesc:account_hq_entries.module_meta_information | ||
1997 | 30280 | msgid "HQ Entries" | ||
1998 | 30281 | msgstr "HQ Entries" | ||
1999 | 30282 | |||
2000 | 30283 | #. module: msf_budget | 30322 | #. module: msf_budget |
2001 | 30284 | #: view:wizard.budget.summary.export:0 | 30323 | #: view:wizard.budget.summary.export:0 |
2002 | 30285 | msgid "Budget Summary PDF Export" | 30324 | msgid "Budget Summary PDF Export" |
2003 | @@ -30894,6 +30933,7 @@ | |||
2004 | 30894 | 30933 | ||
2005 | 30895 | #. module: msf_doc_import | 30934 | #. module: msf_doc_import |
2006 | 30896 | #: code:addons/msf_doc_import/wizard/wizard_import_batch.py:308 | 30935 | #: code:addons/msf_doc_import/wizard/wizard_import_batch.py:308 |
2007 | 30936 | #: code:addons/msf_doc_import/msf_import_export.py:688 | ||
2008 | 30897 | #, python-format | 30937 | #, python-format |
2009 | 30898 | msgid "(%s line(s) with warning - see warning messages below)" | 30938 | msgid "(%s line(s) with warning - see warning messages below)" |
2010 | 30899 | msgstr "(%s ligne(s) avec des avertissements - voir les avertissements ci-dessous)" | 30939 | msgstr "(%s ligne(s) avec des avertissements - voir les avertissements ci-dessous)" |
2011 | @@ -32587,6 +32627,7 @@ | |||
2012 | 32587 | 32627 | ||
2013 | 32588 | #. module: msf_doc_import | 32628 | #. module: msf_doc_import |
2014 | 32589 | #: code:addons/msf_doc_import/wizard/wizard_import_batch.py:313 | 32629 | #: code:addons/msf_doc_import/wizard/wizard_import_batch.py:313 |
2015 | 32630 | #: code:addons/msf_doc_import/msf_import_export.py:693 | ||
2016 | 32590 | #, python-format | 32631 | #, python-format |
2017 | 32591 | msgid "no data will be imported until all the error messages are corrected" | 32632 | msgid "no data will be imported until all the error messages are corrected" |
2018 | 32592 | msgstr "aucune donnée ne sera importée tant que toutes les erreurs ne seront pas corrigées" | 32633 | msgstr "aucune donnée ne sera importée tant que toutes les erreurs ne seront pas corrigées" |
2019 | @@ -35506,6 +35547,7 @@ | |||
2020 | 35506 | 35547 | ||
2021 | 35507 | #. module: msf_doc_import | 35548 | #. module: msf_doc_import |
2022 | 35508 | #: code:addons/msf_doc_import/wizard/wizard_import_batch.py:298 | 35549 | #: code:addons/msf_doc_import/wizard/wizard_import_batch.py:298 |
2023 | 35550 | #: code:addons/msf_doc_import/msf_import_export.py:678 | ||
2024 | 35509 | #, python-format | 35551 | #, python-format |
2025 | 35510 | msgid "Processing of file completed in %s second(s)!\n" | 35552 | msgid "Processing of file completed in %s second(s)!\n" |
2026 | 35511 | "- Total lines to import: %s\n" | 35553 | "- Total lines to import: %s\n" |
2027 | @@ -36767,8 +36809,11 @@ | |||
2028 | 36767 | msgid "Move state" | 36809 | msgid "Move state" |
2029 | 36768 | msgstr "Statut de la transaction " | 36810 | msgstr "Statut de la transaction " |
2030 | 36769 | 36811 | ||
2032 | 36770 | #. module: procurement_auto | 36812 | #. modules: procurement_auto, procurement, msf_doc_import |
2033 | 36771 | #: field:stock.warehouse.automatic.supply.line,supply_id:0 | 36813 | #: field:stock.warehouse.automatic.supply.line,supply_id:0 |
2034 | 36814 | #: field:stock.warehouse.orderpoint.line,supply_id:0 | ||
2035 | 36815 | #: model:ir.actions.act_window,name:msf_doc_import.msf_import_export_supply_action | ||
2036 | 36816 | #: model:ir.ui.menu,name:msf_doc_import.msf_import_export_supply_menu | ||
2037 | 36772 | msgid "Supply" | 36817 | msgid "Supply" |
2038 | 36773 | msgstr "Approvisionnement" | 36818 | msgstr "Approvisionnement" |
2039 | 36774 | 36819 | ||
2040 | @@ -40027,12 +40072,14 @@ | |||
2041 | 40027 | msgid "DP execute" | 40072 | msgid "DP execute" |
2042 | 40028 | msgstr "DP execute" | 40073 | msgstr "DP execute" |
2043 | 40029 | 40074 | ||
2045 | 40030 | #. modules: msf_instance, sync_so, account_hq_entries | 40075 | #. modules: msf_instance, sync_so, account_hq_entries, account_hq_entries, msf_doc_import |
2046 | 40031 | #: model:ir.actions.act_window,name:account_hq_entries.action_hq_entries_tree | 40076 | #: model:ir.actions.act_window,name:account_hq_entries.action_hq_entries_tree |
2047 | 40032 | #: model:ir.model,name:account_hq_entries.model_hq_entries | 40077 | #: model:ir.model,name:account_hq_entries.model_hq_entries |
2048 | 40033 | #: model:ir.ui.menu,name:account_hq_entries.menu_hq_entries | 40078 | #: model:ir.ui.menu,name:account_hq_entries.menu_hq_entries |
2049 | 40034 | #: view:res.company:0 | 40079 | #: view:res.company:0 |
2050 | 40035 | #: model:ir.model,name:sync_so.model_hq_entries | 40080 | #: model:ir.model,name:sync_so.model_hq_entries |
2051 | 40081 | #: model:ir.module.module,shortdesc:account_hq_entries.module_meta_information | ||
2052 | 40082 | #: code:addons/msf_doc_import/msf_import_export_conf.py:81 | ||
2053 | 40036 | msgid "HQ Entries" | 40083 | msgid "HQ Entries" |
2054 | 40037 | msgstr "Ecritures HQ" | 40084 | msgstr "Ecritures HQ" |
2055 | 40038 | 40085 | ||
2056 | @@ -42744,6 +42791,7 @@ | |||
2057 | 42744 | 42791 | ||
2058 | 42745 | #. module: msf_doc_import | 42792 | #. module: msf_doc_import |
2059 | 42746 | #: code:addons/msf_doc_import/wizard/wizard_import_batch.py:306 | 42793 | #: code:addons/msf_doc_import/wizard/wizard_import_batch.py:306 |
2060 | 42794 | #: code:addons/msf_doc_import/msf_import_export.py:686 | ||
2061 | 42747 | #, python-format | 42795 | #, python-format |
2062 | 42748 | msgid "imported" | 42796 | msgid "imported" |
2063 | 42749 | msgstr "importées" | 42797 | msgstr "importées" |
2064 | @@ -42986,6 +43034,7 @@ | |||
2065 | 42986 | 43034 | ||
2066 | 42987 | #. module: msf_doc_import | 43035 | #. module: msf_doc_import |
2067 | 42988 | #: code:addons/msf_doc_import/wizard/wizard_import_batch.py:306 | 43036 | #: code:addons/msf_doc_import/wizard/wizard_import_batch.py:306 |
2068 | 43037 | #: code:addons/msf_doc_import/msf_import_export.py:686 | ||
2069 | 42989 | #, python-format | 43038 | #, python-format |
2070 | 42990 | msgid "without errors" | 43039 | msgid "without errors" |
2071 | 42991 | msgstr "sans erreurs" | 43040 | msgstr "sans erreurs" |
2072 | @@ -48145,7 +48194,8 @@ | |||
2073 | 48145 | msgid "Report can not be edited due to missing FX rates in specific currency table %s" | 48194 | msgid "Report can not be edited due to missing FX rates in specific currency table %s" |
2074 | 48146 | msgstr "Report can not be edited due to missing FX rates in specific currency table %s" | 48195 | msgstr "Report can not be edited due to missing FX rates in specific currency table %s" |
2075 | 48147 | 48196 | ||
2077 | 48148 | #. module: base | 48197 | #. modules: base, msf_doc_import |
2078 | 48198 | #: code:addons/msf_doc_import/msf_import_export_conf.py:86 | ||
2079 | 48149 | #: model:ir.actions.act_window,name:base.ir_access_act | 48199 | #: model:ir.actions.act_window,name:base.ir_access_act |
2080 | 48150 | #: model:ir.ui.menu,name:base.menu_ir_access_act | 48200 | #: model:ir.ui.menu,name:base.menu_ir_access_act |
2081 | 48151 | msgid "Access Controls List" | 48201 | msgid "Access Controls List" |
2082 | @@ -50484,7 +50534,7 @@ | |||
2083 | 50484 | msgid "Followup lines" | 50534 | msgid "Followup lines" |
2084 | 50485 | msgstr "Suivi des Lignes" | 50535 | msgstr "Suivi des Lignes" |
2085 | 50486 | 50536 | ||
2087 | 50487 | #. modules: msf_budget, account, financing_contract, analytic_distribution | 50537 | #. modules: msf_budget, account, financing_contract, analytic_distribution, msf_doc_import |
2088 | 50488 | #: view:account.analytic.account:0 | 50538 | #: view:account.analytic.account:0 |
2089 | 50489 | #: model:ir.ui.menu,name:account.account_analytic_def_account | 50539 | #: model:ir.ui.menu,name:account.account_analytic_def_account |
2090 | 50490 | #: view:account.analytic.account:0 | 50540 | #: view:account.analytic.account:0 |
2091 | @@ -50492,6 +50542,7 @@ | |||
2092 | 50492 | #: model:ir.ui.menu,name:financing_contract.menu_action_account_analytic_account_form | 50542 | #: model:ir.ui.menu,name:financing_contract.menu_action_account_analytic_account_form |
2093 | 50493 | #: view:account.analytic.account:0 | 50543 | #: view:account.analytic.account:0 |
2094 | 50494 | #: model:ir.ui.menu,name:msf_budget.menu_action_account_analytic_account_budget_form | 50544 | #: model:ir.ui.menu,name:msf_budget.menu_action_account_analytic_account_budget_form |
2095 | 50545 | #: code:addons/msf_doc_import/msf_import_export_conf.py:66 | ||
2096 | 50495 | msgid "Analytic Accounts" | 50546 | msgid "Analytic Accounts" |
2097 | 50496 | msgstr "Comptes Analytiques" | 50547 | msgstr "Comptes Analytiques" |
2098 | 50497 | 50548 | ||
2099 | @@ -50610,7 +50661,7 @@ | |||
2100 | 50610 | msgid "Read Access" | 50661 | msgid "Read Access" |
2101 | 50611 | msgstr "Accès Lecture" | 50662 | msgstr "Accès Lecture" |
2102 | 50612 | 50663 | ||
2104 | 50613 | #. modules: product_nomenclature, import_data, product_asset, kit | 50664 | #. modules: product_nomenclature, import_data, product_asset, kit, msf_doc_import |
2105 | 50614 | #: selection:import_data,object:0 | 50665 | #: selection:import_data,object:0 |
2106 | 50615 | #: selection:import_product,object:0 | 50666 | #: selection:import_product,object:0 |
2107 | 50616 | #: selection:update_product,object:0 | 50667 | #: selection:update_product,object:0 |
2108 | @@ -50618,6 +50669,9 @@ | |||
2109 | 50618 | #: field:product.asset,nomenclature_description:0 | 50669 | #: field:product.asset,nomenclature_description:0 |
2110 | 50619 | #: model:ir.model,name:product_nomenclature.model_product_nomenclature | 50670 | #: model:ir.model,name:product_nomenclature.model_product_nomenclature |
2111 | 50620 | #: view:product.nomenclature:0 | 50671 | #: view:product.nomenclature:0 |
2112 | 50672 | #: selection:import_category,object:0 | ||
2113 | 50673 | #: selection:import_nomenclature,object:0 | ||
2114 | 50674 | #: code:addons/msf_doc_import/msf_import_export_conf.py:32 | ||
2115 | 50621 | msgid "Product Nomenclature" | 50675 | msgid "Product Nomenclature" |
2116 | 50622 | msgstr "Nomenclature du Produit" | 50676 | msgstr "Nomenclature du Produit" |
2117 | 50623 | 50677 | ||
2118 | @@ -51151,7 +51205,7 @@ | |||
2119 | 51151 | #: code:addons/msf_outgoing/wizard/validate_picking_processor.py:75 | 51205 | #: code:addons/msf_outgoing/wizard/validate_picking_processor.py:75 |
2120 | 51152 | #, python-format | 51206 | #, python-format |
2121 | 51153 | msgid "Line %s: %s" | 51207 | msgid "Line %s: %s" |
2123 | 51154 | msgstr "Ligne %s: %s" | 51208 | msgstr "Ligne %s : %s" |
2124 | 51155 | 51209 | ||
2125 | 51156 | #. module: account_override | 51210 | #. module: account_override |
2126 | 51157 | #: help:account.move.line,journal_type:0 | 51211 | #: help:account.move.line,journal_type:0 |
2127 | @@ -52986,11 +53040,6 @@ | |||
2128 | 52986 | msgid "Included Fields" | 53040 | msgid "Included Fields" |
2129 | 52987 | msgstr "Champs Inclus" | 53041 | msgstr "Champs Inclus" |
2130 | 52988 | 53042 | ||
2131 | 52989 | #. module: kit | ||
2132 | 52990 | #: view:kit.mass.import:0 | ||
2133 | 52991 | msgid "Error messages" | ||
2134 | 52992 | msgstr "Error messages" | ||
2135 | 52993 | |||
2136 | 52994 | #. module: msf_partner | 53043 | #. module: msf_partner |
2137 | 52995 | #: view:res.partner:0 | 53044 | #: view:res.partner:0 |
2138 | 52996 | msgid "Customer LT" | 53045 | msgid "Customer LT" |
2139 | @@ -56414,13 +56463,14 @@ | |||
2140 | 56414 | msgid "Choose Fiscal Year" | 56463 | msgid "Choose Fiscal Year" |
2141 | 56415 | msgstr "Choisir l'Exercice Comptable " | 56464 | msgstr "Choisir l'Exercice Comptable " |
2142 | 56416 | 56465 | ||
2144 | 56417 | #. module: msf_field_access_rights | 56466 | #. modules: msf_field_access_rights, msf_doc_import |
2145 | 56418 | #: model:ir.actions.act_window,name:msf_field_access_rights.field_access_rule_line_list | 56467 | #: model:ir.actions.act_window,name:msf_field_access_rights.field_access_rule_line_list |
2146 | 56419 | #: model:ir.ui.menu,name:msf_field_access_rights.field_access_rule_line_list_menu | 56468 | #: model:ir.ui.menu,name:msf_field_access_rights.field_access_rule_line_list_menu |
2147 | 56420 | #: view:msf_field_access_rights.field_access_rule:0 | 56469 | #: view:msf_field_access_rights.field_access_rule:0 |
2148 | 56421 | #: field:msf_field_access_rights.field_access_rule,field_access_rule_line_ids:0 | 56470 | #: field:msf_field_access_rights.field_access_rule,field_access_rule_line_ids:0 |
2149 | 56471 | #: code:addons/msf_doc_import/msf_import_export_conf.py:119 | ||
2150 | 56422 | msgid "Field Access Rule Lines" | 56472 | msgid "Field Access Rule Lines" |
2152 | 56423 | msgstr "Field Access Rule Lines" | 56473 | msgstr "Lignes de Règle d'Accès au Champs" |
2153 | 56424 | 56474 | ||
2154 | 56425 | #. module: analytic_distribution | 56475 | #. module: analytic_distribution |
2155 | 56426 | #: field:analytic.distribution.wizard,fp_line_ids:0 | 56476 | #: field:analytic.distribution.wizard,fp_line_ids:0 |
2156 | @@ -56584,11 +56634,12 @@ | |||
2157 | 56584 | msgid "Manually corrected" | 56634 | msgid "Manually corrected" |
2158 | 56585 | msgstr "Manually corrected" | 56635 | msgstr "Manually corrected" |
2159 | 56586 | 56636 | ||
2161 | 56587 | #. modules: account, account_mcdb | 56637 | #. modules: account, account_mcdb, msf_doc_import |
2162 | 56588 | #: view:account.analytic.journal:0 | 56638 | #: view:account.analytic.journal:0 |
2163 | 56589 | #: model:ir.actions.act_window,name:account.action_account_analytic_journal_form | 56639 | #: model:ir.actions.act_window,name:account.action_account_analytic_journal_form |
2164 | 56590 | #: model:ir.ui.menu,name:account.account_def_analytic_journal | 56640 | #: model:ir.ui.menu,name:account.account_def_analytic_journal |
2165 | 56591 | #: view:account.mcdb:0 | 56641 | #: view:account.mcdb:0 |
2166 | 56642 | #: code:addons/msf_doc_import/msf_import_export_conf.py:71 | ||
2167 | 56592 | msgid "Analytic Journals" | 56643 | msgid "Analytic Journals" |
2168 | 56593 | msgstr "Journaux analytiques" | 56644 | msgstr "Journaux analytiques" |
2169 | 56594 | 56645 | ||
2170 | @@ -56652,8 +56703,10 @@ | |||
2171 | 56652 | msgid "In days" | 56703 | msgid "In days" |
2172 | 56653 | msgstr "En jours." | 56704 | msgstr "En jours." |
2173 | 56654 | 56705 | ||
2175 | 56655 | #. module: msf_doc_import | 56706 | #. modules: msf_doc_import, kit |
2176 | 56707 | #: view:kit.mass.import:0 | ||
2177 | 56656 | #: view:wizard.import.batch:0 | 56708 | #: view:wizard.import.batch:0 |
2178 | 56709 | #: view:msf.import.export:0 | ||
2179 | 56657 | msgid "Error messages" | 56710 | msgid "Error messages" |
2180 | 56658 | msgstr "Messages d'erreur" | 56711 | msgstr "Messages d'erreur" |
2181 | 56659 | 56712 | ||
2182 | @@ -57560,9 +57613,10 @@ | |||
2183 | 57560 | msgid "Action to Trigger" | 57613 | msgid "Action to Trigger" |
2184 | 57561 | msgstr "Action à Déclencher" | 57614 | msgstr "Action à Déclencher" |
2185 | 57562 | 57615 | ||
2187 | 57563 | #. module: base | 57616 | #. modules: base, msf_doc_import |
2188 | 57564 | #: model:ir.actions.act_window,name:base.ir_action_window | 57617 | #: model:ir.actions.act_window,name:base.ir_action_window |
2189 | 57565 | #: model:ir.ui.menu,name:base.menu_ir_action_window | 57618 | #: model:ir.ui.menu,name:base.menu_ir_action_window |
2190 | 57619 | #: code:addons/msf_doc_import/msf_import_export_conf.py:129 | ||
2191 | 57566 | msgid "Window Actions" | 57620 | msgid "Window Actions" |
2192 | 57567 | msgstr "Fenêtre Actions" | 57621 | msgstr "Fenêtre Actions" |
2193 | 57568 | 57622 | ||
2194 | @@ -58838,11 +58892,6 @@ | |||
2195 | 58838 | msgid "Specific partner" | 58892 | msgid "Specific partner" |
2196 | 58839 | msgstr "Partenaire spécifique" | 58893 | msgstr "Partenaire spécifique" |
2197 | 58840 | 58894 | ||
2198 | 58841 | #. module: procurement | ||
2199 | 58842 | #: field:stock.warehouse.orderpoint.line,supply_id:0 | ||
2200 | 58843 | msgid "Supply" | ||
2201 | 58844 | msgstr "Supply" | ||
2202 | 58845 | |||
2203 | 58846 | #. module: sale_override | 58895 | #. module: sale_override |
2204 | 58847 | #: view:sale.order.line:0 | 58896 | #: view:sale.order.line:0 |
2205 | 58848 | msgid "This button shouldn't be use from form view. Please use the red cross on list view." | 58897 | msgid "This button shouldn't be use from form view. Please use the red cross on list view." |
2206 | @@ -60862,6 +60911,7 @@ | |||
2207 | 60862 | #: selection:wizard.import.batch,state:0 | 60911 | #: selection:wizard.import.batch,state:0 |
2208 | 60863 | #: view:automated.import.job:0 | 60912 | #: view:automated.import.job:0 |
2209 | 60864 | #: selection:automated.import.job,state:0 | 60913 | #: selection:automated.import.job,state:0 |
2210 | 60914 | #: selection:msf.import.export,state:0 | ||
2211 | 60865 | #, python-format | 60915 | #, python-format |
2212 | 60866 | msgid "In progress" | 60916 | msgid "In progress" |
2213 | 60867 | msgstr "En cours" | 60917 | msgstr "En cours" |
2214 | @@ -61119,9 +61169,10 @@ | |||
2215 | 61119 | msgid "%y - Year without century [00,99]." | 61169 | msgid "%y - Year without century [00,99]." |
2216 | 61120 | msgstr "%y - Année sans le siècle (00 à 99)." | 61170 | msgstr "%y - Année sans le siècle (00 à 99)." |
2217 | 61121 | 61171 | ||
2219 | 61122 | #. module: base | 61172 | #. modules: base, msf_doc_import |
2220 | 61123 | #: model:ir.actions.act_window,name:base.action_rule | 61173 | #: model:ir.actions.act_window,name:base.action_rule |
2221 | 61124 | #: model:ir.ui.menu,name:base.menu_action_rule | 61174 | #: model:ir.ui.menu,name:base.menu_action_rule |
2222 | 61175 | #: code:addons/msf_doc_import/msf_import_export_conf.py:104 | ||
2223 | 61125 | msgid "Record Rules" | 61176 | msgid "Record Rules" |
2224 | 61126 | msgstr "Règles d´Enregistrement" | 61177 | msgstr "Règles d´Enregistrement" |
2225 | 61127 | 61178 | ||
2226 | @@ -61450,6 +61501,7 @@ | |||
2227 | 61450 | #: code:addons/sale_override/sale.py:364 | 61501 | #: code:addons/sale_override/sale.py:364 |
2228 | 61451 | #: code:addons/sale_override/sale.py:365 | 61502 | #: code:addons/sale_override/sale.py:365 |
2229 | 61452 | #: code:addons/sale_override/sale.py:366 | 61503 | #: code:addons/sale_override/sale.py:366 |
2230 | 61504 | #: selection:msf.import.export,state:0 | ||
2231 | 61453 | #, python-format | 61505 | #, python-format |
2232 | 61454 | msgid "Not started" | 61506 | msgid "Not started" |
2233 | 61455 | msgstr "Non démarré" | 61507 | msgstr "Non démarré" |
2234 | @@ -61984,6 +62036,32 @@ | |||
2235 | 61984 | msgid "Nothing to import" | 62036 | msgid "Nothing to import" |
2236 | 61985 | msgstr "Rien à importer" | 62037 | msgstr "Rien à importer" |
2237 | 61986 | 62038 | ||
2238 | 62039 | #. modules: msf_budget, msf_homere_interface, supplier_catalogue, consumption_calculation, account_hq_entries, msf_doc_import, analytic_distribution, msf_doc_import, register_accounting | ||
2239 | 62040 | #: code:addons/account_hq_entries/wizard/hq_entries_import.py:319 | ||
2240 | 62041 | #: code:addons/analytic_distribution/wizard/import_commitment_wizard.py:72 | ||
2241 | 62042 | #: code:addons/consumption_calculation/wizard/wizard_import_fmc.py:87 | ||
2242 | 62043 | #: code:addons/consumption_calculation/wizard/wizard_import_rac.py:85 | ||
2243 | 62044 | #: code:addons/msf_budget/wizard/wizard_budget_import.py:240 | ||
2244 | 62045 | #: code:addons/msf_doc_import/composition_kit.py:86 | ||
2245 | 62046 | #: code:addons/msf_doc_import/composition_kit.py:181 | ||
2246 | 62047 | #: code:addons/msf_doc_import/initial_stock_inventory.py:92 | ||
2247 | 62048 | #: code:addons/msf_doc_import/initial_stock_inventory.py:600 | ||
2248 | 62049 | #: code:addons/msf_doc_import/stock_cost_reevaluation.py:51 | ||
2249 | 62050 | #: code:addons/msf_doc_import/tender.py:98 | ||
2250 | 62051 | #: code:addons/msf_doc_import/wizard/wizard_import_product_list.py:88 | ||
2251 | 62052 | #: code:addons/msf_doc_import/wizard/wizard_import_supplier_catalogue.py:164 | ||
2252 | 62053 | #: code:addons/msf_homere_interface/wizard/hr_payroll_employee_import.py:584 | ||
2253 | 62054 | #: code:addons/msf_homere_interface/wizard/hr_payroll_import.py:479 | ||
2254 | 62055 | #: code:addons/supplier_catalogue/supplier_catalogue.py:590 | ||
2255 | 62056 | #: code:addons/supplier_catalogue/wizard/catalogue_import_lines.py:45 | ||
2256 | 62057 | #: code:addons/msf_doc_import/account.py:196 | ||
2257 | 62058 | #: code:addons/msf_doc_import/wizard/stock_partial_picking.py:254 | ||
2258 | 62059 | #: code:addons/msf_doc_import/wizard/stock_partial_picking.py:785 | ||
2259 | 62060 | #: code:addons/register_accounting/wizard/wizard_register_import.py:255 | ||
2260 | 62061 | #, python-format | ||
2261 | 62062 | msgid "Nothing to import." | ||
2262 | 62063 | msgstr "Rien à importer" | ||
2263 | 62064 | |||
2264 | 61987 | #. module: account_mcdb | 62065 | #. module: account_mcdb |
2265 | 61988 | #: selection:account.mcdb,currency_choice:0 | 62066 | #: selection:account.mcdb,currency_choice:0 |
2266 | 61989 | msgid "Booking" | 62067 | msgid "Booking" |
2267 | @@ -62406,6 +62484,7 @@ | |||
2268 | 62406 | 62484 | ||
2269 | 62407 | #. module: msf_doc_import | 62485 | #. module: msf_doc_import |
2270 | 62408 | #: code:addons/msf_doc_import/wizard/wizard_import_batch.py:106 | 62486 | #: code:addons/msf_doc_import/wizard/wizard_import_batch.py:106 |
2271 | 62487 | #: code:addons/msf_doc_import/msf_import_export.py:364 | ||
2272 | 62409 | #, python-format | 62488 | #, python-format |
2273 | 62410 | 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 to use Unifield" | 62489 | 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 to use Unifield" |
2274 | 62411 | 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" | 62490 | 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" |
2275 | @@ -67248,6 +67327,8 @@ | |||
2276 | 67248 | #: field:threshold.value,line_ids:0 | 67327 | #: field:threshold.value,line_ids:0 |
2277 | 67249 | #: field:threshold.value,product_ids:0 | 67328 | #: field:threshold.value,product_ids:0 |
2278 | 67250 | #: view:restrictive.country.setup:0 | 67329 | #: view:restrictive.country.setup:0 |
2279 | 67330 | #: view:product.list.line:0 | ||
2280 | 67331 | #: code:addons/msf_doc_import/msf_import_export_conf.py:27 | ||
2281 | 67251 | #, python-format | 67332 | #, python-format |
2282 | 67252 | msgid "Products" | 67333 | msgid "Products" |
2283 | 67253 | msgstr "Produits" | 67334 | msgstr "Produits" |
2284 | @@ -68849,6 +68930,8 @@ | |||
2285 | 68849 | #. module: msf_doc_import | 68930 | #. module: msf_doc_import |
2286 | 68850 | #: code:addons/msf_doc_import/wizard/wizard_import_batch.py:286 | 68931 | #: code:addons/msf_doc_import/wizard/wizard_import_batch.py:286 |
2287 | 68851 | #: code:addons/msf_doc_import/wizard/wizard_import_batch.py:292 | 68932 | #: code:addons/msf_doc_import/wizard/wizard_import_batch.py:292 |
2288 | 68933 | #: code:addons/msf_doc_import/msf_import_export.py:666 | ||
2289 | 68934 | #: code:addons/msf_doc_import/msf_import_export.py:672 | ||
2290 | 68852 | #, python-format | 68935 | #, python-format |
2291 | 68853 | msgid "Line %s: %s" | 68936 | msgid "Line %s: %s" |
2292 | 68854 | msgstr "Ligne %s : %s" | 68937 | msgstr "Ligne %s : %s" |
2293 | @@ -79938,6 +80021,7 @@ | |||
2294 | 79938 | #: field:automated.import.job,state:0 | 80021 | #: field:automated.import.job,state:0 |
2295 | 79939 | #: field:export.report.inconsistencies,state:0 | 80022 | #: field:export.report.inconsistencies,state:0 |
2296 | 79940 | #: field:export.report.stopped.products,state:0 | 80023 | #: field:export.report.stopped.products,state:0 |
2297 | 80024 | #: field:msf.import.export,state:0 | ||
2298 | 79941 | #: field:wizard.import.invoice.line,state:0 | 80025 | #: field:wizard.import.invoice.line,state:0 |
2299 | 79942 | msgid "State" | 80026 | msgid "State" |
2300 | 79943 | msgstr "État" | 80027 | msgstr "État" |
2301 | @@ -80596,6 +80680,7 @@ | |||
2302 | 80596 | 80680 | ||
2303 | 80597 | #. module: msf_doc_import | 80681 | #. module: msf_doc_import |
2304 | 80598 | #: code:addons/msf_doc_import/wizard/wizard_import_batch.py:170 | 80682 | #: code:addons/msf_doc_import/wizard/wizard_import_batch.py:170 |
2305 | 80683 | #: code:addons/msf_doc_import/msf_import_export.py:549 | ||
2306 | 80599 | #, python-format | 80684 | #, python-format |
2307 | 80600 | msgid "Line seemed empty, so this line was ignored" | 80685 | msgid "Line seemed empty, so this line was ignored" |
2308 | 80601 | msgstr "La ligne semblait vide, donc cette ligne a été ignorée" | 80686 | msgstr "La ligne semblait vide, donc cette ligne a été ignorée" |
2309 | @@ -80655,7 +80740,7 @@ | |||
2310 | 80655 | msgid "Send a test email" | 80740 | msgid "Send a test email" |
2311 | 80656 | msgstr "Send a test email" | 80741 | msgstr "Send a test email" |
2312 | 80657 | 80742 | ||
2314 | 80658 | #. modules: tender_flow, product_nomenclature, product_asset, account_override, purchase_allocation_report, register_accounting, product_expiry, procurement_cycle, return_claim, supplier_catalogue, import_data, stock_schedule, unifield_setup, stock_forecast, stock_batch_recall, order_types, msf_doc_import, purchase_followup, product, stock_override, service_purchasing, consumption_calculation, purchase_override, specific_rules, kit, sale_override, product_list, product_manufacturer, procurement_report, threshold_value, purchase, account, msf_outgoing, stock_move_tracking, product_attributes, procurement_auto, sale, transport_mgmt, procurement, sourcing, msf_audittrail, purchase_msf, stock, sync_so | 80743 | #. modules: tender_flow, product_nomenclature, product_asset, account_override, purchase_allocation_report, register_accounting, product_expiry, procurement_cycle, return_claim, supplier_catalogue, import_data, stock_schedule, unifield_setup, stock_forecast, stock_batch_recall, order_types, msf_doc_import, purchase_followup, product, stock_override, service_purchasing, consumption_calculation, purchase_override, specific_rules, kit, sale_override, product_list, product_manufacturer, procurement_report, threshold_value, purchase, account, msf_outgoing, stock_move_tracking, product_attributes, procurement_auto, sale, transport_mgmt, procurement, sourcing, msf_audittrail, purchase_msf, stock, sync_so, base |
2315 | 80659 | #: field:account.analytic.line,product_id:0 | 80744 | #: field:account.analytic.line,product_id:0 |
2316 | 80660 | #: view:account.entries.report:0 | 80745 | #: view:account.entries.report:0 |
2317 | 80661 | #: field:account.entries.report,product_id:0 | 80746 | #: field:account.entries.report,product_id:0 |
2318 | @@ -80809,6 +80894,47 @@ | |||
2319 | 80809 | #: field:threshold.value.line,product_id:0 | 80894 | #: field:threshold.value.line,product_id:0 |
2320 | 80810 | #: model:ir.model,name:transport_mgmt.model_product_product | 80895 | #: model:ir.model,name:transport_mgmt.model_product_product |
2321 | 80811 | #: model:ir.model,name:unifield_setup.model_product_product | 80896 | #: model:ir.model,name:unifield_setup.model_product_product |
2322 | 80897 | #: report:allocation.invoices.report:0 | ||
2323 | 80898 | #: selection:res.request,ref_doc1:0 | ||
2324 | 80899 | #: selection:res.request,ref_doc2:0 | ||
2325 | 80900 | #: field:product.history.consumption.product,product_id:0 | ||
2326 | 80901 | #: selection:import_category,object:0 | ||
2327 | 80902 | #: selection:import_nomenclature,object:0 | ||
2328 | 80903 | #: report:kit.report:0 | ||
2329 | 80904 | #: report:addons/msf_doc_import/report/in_simulation_screen_xls_report.mako:149 | ||
2330 | 80905 | #: report:addons/msf_doc_import/report/in_simulation_screen_xls_report.mako:158 | ||
2331 | 80906 | #: report:addons/msf_doc_import/report/po_simulation_screen_xls_report.mako:230 | ||
2332 | 80907 | #: report:addons/msf_doc_import/report/po_simulation_screen_xls_report.mako:241 | ||
2333 | 80908 | #: report:po.simulation.screen:0 | ||
2334 | 80909 | #: field:product.product.import.line.qty,product_id:0 | ||
2335 | 80910 | #: field:wizard.import.in.line.simulation.screen,imp_product_id:0 | ||
2336 | 80911 | #: field:wizard.import.in.line.simulation.screen,move_product_id:0 | ||
2337 | 80912 | #: field:wizard.import.po.simulation.screen.line,imp_product_id:0 | ||
2338 | 80913 | #: field:wizard.import.po.simulation.screen.line,in_product_id:0 | ||
2339 | 80914 | #: view:create.picking.move.processor:0 | ||
2340 | 80915 | #: field:create.picking.move.processor,product_id:0 | ||
2341 | 80916 | #: view:internal.move.processor:0 | ||
2342 | 80917 | #: field:internal.move.processor,product_id:0 | ||
2343 | 80918 | #: view:outgoing.delivery.move.processor:0 | ||
2344 | 80919 | #: field:outgoing.delivery.move.processor,product_id:0 | ||
2345 | 80920 | #: view:ppl.move.processor:0 | ||
2346 | 80921 | #: field:ppl.move.processor,product_id:0 | ||
2347 | 80922 | #: view:return.ppl.move.processor:0 | ||
2348 | 80923 | #: field:return.ppl.move.processor,product_id:0 | ||
2349 | 80924 | #: view:stock.move.in.processor:0 | ||
2350 | 80925 | #: field:stock.move.in.processor,product_id:0 | ||
2351 | 80926 | #: view:stock.move.processor:0 | ||
2352 | 80927 | #: field:stock.move.processor,product_id:0 | ||
2353 | 80928 | #: view:validate.move.processor:0 | ||
2354 | 80929 | #: field:validate.move.processor,product_id:0 | ||
2355 | 80930 | #: field:stock.warehouse.orderpoint.line,product_id:0 | ||
2356 | 80931 | #: view:product.where.used:0 | ||
2357 | 80932 | #: field:product.where.used,product_id:0 | ||
2358 | 80933 | #: field:standard.price.track.changes,product_id:0 | ||
2359 | 80934 | #: field:account.direct.invoice.wizard.line,product_id:0 | ||
2360 | 80935 | #: field:unconsistent.stock.report.line,product_id:0 | ||
2361 | 80936 | #: view:stock.card.wizard:0 | ||
2362 | 80937 | #: field:stock.card.wizard,product_id:0 | ||
2363 | 80812 | msgid "Product" | 80938 | msgid "Product" |
2364 | 80813 | msgstr "Produit" | 80939 | msgstr "Produit" |
2365 | 80814 | 80940 | ||
2366 | @@ -80902,7 +81028,7 @@ | |||
2367 | 80902 | msgid "Select a supplier" | 81028 | msgid "Select a supplier" |
2368 | 80903 | msgstr "Sélectionner un fournisseur" | 81029 | msgstr "Sélectionner un fournisseur" |
2369 | 80904 | 81030 | ||
2371 | 80905 | #. modules: msf_budget, purchase, account, msf_outgoing, account_payment, purchase_override, specific_rules, sale, base, register_accounting, msf_doc_import, return_claim, stock, analytic_distribution, msf_homere_interface | 81031 | #. modules: msf_budget, purchase, account, msf_outgoing, account_payment, purchase_override, specific_rules, sale, base, register_accounting, msf_doc_import, return_claim, stock, analytic_distribution, delivery_mechanism, sales_followup, sync_client, tender_flow, sale_override, msf_tools, mission_stock, msf_homere_interface |
2372 | 80906 | #: selection:account.invoice.report,state:0 | 81032 | #: selection:account.invoice.report,state:0 |
2373 | 80907 | #: selection:account.journal.period,state:0 | 81033 | #: selection:account.journal.period,state:0 |
2374 | 80908 | #: selection:account.subscription,state:0 | 81034 | #: selection:account.subscription,state:0 |
2375 | @@ -80947,6 +81073,30 @@ | |||
2376 | 80947 | #: selection:stock.inventory,state:0 | 81073 | #: selection:stock.inventory,state:0 |
2377 | 80948 | #: view:stock.move:0 | 81074 | #: view:stock.move:0 |
2378 | 80949 | #: view:stock.picking:0 | 81075 | #: view:stock.picking:0 |
2379 | 81076 | #: code:addons/delivery_mechanism/delivery_mechanism.py:1295 | ||
2380 | 81077 | #: code:addons/delivery_mechanism/delivery_mechanism.py:1315 | ||
2381 | 81078 | #: code:addons/delivery_mechanism/delivery_mechanism.py:1343 | ||
2382 | 81079 | #: code:addons/delivery_mechanism/delivery_mechanism.py:1388 | ||
2383 | 81080 | #: code:addons/mission_stock/wizard/mission_stock_wizard.py:48 | ||
2384 | 81081 | #: code:addons/mission_stock/wizard/mission_stock_wizard.py:56 | ||
2385 | 81082 | #: code:addons/msf_outgoing/msf_outgoing.py:3197 | ||
2386 | 81083 | #: view:automated.import.job:0 | ||
2387 | 81084 | #: selection:automated.import.job,state:0 | ||
2388 | 81085 | #: code:addons/sale_override/sale.py:176 | ||
2389 | 81086 | #: code:addons/sale_override/sale.py:371 | ||
2390 | 81087 | #: code:addons/sale_override/sale.py:372 | ||
2391 | 81088 | #: code:addons/sale_override/sale.py:377 | ||
2392 | 81089 | #: code:addons/sale_override/sale.py:378 | ||
2393 | 81090 | #: code:addons/sale_override/sale.py:1483 | ||
2394 | 81091 | #: code:addons/sale_override/sale.py:2035 | ||
2395 | 81092 | #: code:addons/sale_override/sale.py:2244 | ||
2396 | 81093 | #: code:addons/sale_override/sale.py:2506 | ||
2397 | 81094 | #: code:addons/sale_override/sale.py:2578 | ||
2398 | 81095 | #: view:sale.order.sourcing.progress:0 | ||
2399 | 81096 | #: selection:sale.followup.multi.wizard,state:0 | ||
2400 | 81097 | #: selection:sync.monitor,state:0 | ||
2401 | 81098 | #: selection:tender.line,line_state:0 | ||
2402 | 81099 | #: selection:msf.import.export,state:0 | ||
2403 | 80950 | #: selection:wizard.import.invoice.line,state:0 | 81100 | #: selection:wizard.import.invoice.line,state:0 |
2404 | 80951 | #: selection:hr.payroll.validation,state:0 | 81101 | #: selection:hr.payroll.validation,state:0 |
2405 | 80952 | msgid "Done" | 81102 | msgid "Done" |
2406 | @@ -83695,6 +83845,7 @@ | |||
2407 | 83695 | 83845 | ||
2408 | 83696 | #. module: msf_doc_import | 83846 | #. module: msf_doc_import |
2409 | 83697 | #: code:addons/msf_doc_import/wizard/wizard_import_batch.py:312 | 83847 | #: code:addons/msf_doc_import/wizard/wizard_import_batch.py:312 |
2410 | 83848 | #: code:addons/msf_doc_import/msf_import_export.py:692 | ||
2411 | 83698 | #, python-format | 83849 | #, python-format |
2412 | 83699 | msgid "(see error messages below)" | 83850 | msgid "(see error messages below)" |
2413 | 83700 | msgstr "(voir les erreurs ci-dessous)" | 83851 | msgstr "(voir les erreurs ci-dessous)" |
2414 | @@ -84421,7 +84572,7 @@ | |||
2415 | 84421 | #: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:354 | 84572 | #: code:addons/msf_doc_import/wizard/abstract_wizard_import.py:354 |
2416 | 84422 | #, python-format | 84573 | #, python-format |
2417 | 84423 | msgid "Import can be run only on draft wizard." | 84574 | msgid "Import can be run only on draft wizard." |
2419 | 84424 | msgstr "L'important ne peut être effectué que sur des assistants en état 'Non démarré'" | 84575 | msgstr "L'importation ne peut être effectuée que sur des assistants en état 'Non démarré'" |
2420 | 84425 | 84576 | ||
2421 | 84426 | #. module: account_payment | 84577 | #. module: account_payment |
2422 | 84427 | #: field:payment.line,currency:0 | 84578 | #: field:payment.line,currency:0 |
2423 | @@ -91108,6 +91259,7 @@ | |||
2424 | 91108 | #: field:local.transport.cost.report,func_currency_id:0 | 91259 | #: field:local.transport.cost.report,func_currency_id:0 |
2425 | 91109 | #: field:local.transport.cost.report,transport_currency_id:0 | 91260 | #: field:local.transport.cost.report,transport_currency_id:0 |
2426 | 91110 | #: field:purchase.order,transport_currency_id:0 | 91261 | #: field:purchase.order,transport_currency_id:0 |
2427 | 91262 | #: code:addons/msf_doc_import/msf_import_export_conf.py:86 | ||
2428 | 91111 | #: report:allocation.invoices.report:0 | 91263 | #: report:allocation.invoices.report:0 |
2429 | 91112 | #: report:addons/msf_doc_import/report/po_simulation_screen_xls_report.mako:238 | 91264 | #: report:addons/msf_doc_import/report/po_simulation_screen_xls_report.mako:238 |
2430 | 91113 | #: report:addons/msf_doc_import/report/po_simulation_screen_xls_report.mako:245 | 91265 | #: report:addons/msf_doc_import/report/po_simulation_screen_xls_report.mako:245 |
2431 | @@ -92693,51 +92845,6 @@ | |||
2432 | 92693 | msgid "Patches marked as 'not-installed' must have an emission date" | 92845 | msgid "Patches marked as 'not-installed' must have an emission date" |
2433 | 92694 | msgstr "Patches marked as 'not-installed' must have an emission date" | 92846 | msgstr "Patches marked as 'not-installed' must have an emission date" |
2434 | 92695 | 92847 | ||
2435 | 92696 | #. modules: register_accounting, msf_outgoing, product_attributes, import_data, stock_override, consumption_calculation, specific_rules, kit, account_override, procurement, base, msf_doc_import | ||
2436 | 92697 | #: report:allocation.invoices.report:0 | ||
2437 | 92698 | #: selection:res.request,ref_doc1:0 | ||
2438 | 92699 | #: selection:res.request,ref_doc2:0 | ||
2439 | 92700 | #: field:product.history.consumption.product,product_id:0 | ||
2440 | 92701 | #: selection:import_category,object:0 | ||
2441 | 92702 | #: selection:import_nomenclature,object:0 | ||
2442 | 92703 | #: report:kit.report:0 | ||
2443 | 92704 | #: report:addons/msf_doc_import/report/in_simulation_screen_xls_report.mako:149 | ||
2444 | 92705 | #: report:addons/msf_doc_import/report/in_simulation_screen_xls_report.mako:158 | ||
2445 | 92706 | #: report:addons/msf_doc_import/report/po_simulation_screen_xls_report.mako:230 | ||
2446 | 92707 | #: report:addons/msf_doc_import/report/po_simulation_screen_xls_report.mako:241 | ||
2447 | 92708 | #: report:po.simulation.screen:0 | ||
2448 | 92709 | #: field:product.product.import.line.qty,product_id:0 | ||
2449 | 92710 | #: field:wizard.import.in.line.simulation.screen,imp_product_id:0 | ||
2450 | 92711 | #: field:wizard.import.in.line.simulation.screen,move_product_id:0 | ||
2451 | 92712 | #: field:wizard.import.po.simulation.screen.line,imp_product_id:0 | ||
2452 | 92713 | #: field:wizard.import.po.simulation.screen.line,in_product_id:0 | ||
2453 | 92714 | #: view:create.picking.move.processor:0 | ||
2454 | 92715 | #: field:create.picking.move.processor,product_id:0 | ||
2455 | 92716 | #: view:internal.move.processor:0 | ||
2456 | 92717 | #: field:internal.move.processor,product_id:0 | ||
2457 | 92718 | #: view:outgoing.delivery.move.processor:0 | ||
2458 | 92719 | #: field:outgoing.delivery.move.processor,product_id:0 | ||
2459 | 92720 | #: view:ppl.move.processor:0 | ||
2460 | 92721 | #: field:ppl.move.processor,product_id:0 | ||
2461 | 92722 | #: view:return.ppl.move.processor:0 | ||
2462 | 92723 | #: field:return.ppl.move.processor,product_id:0 | ||
2463 | 92724 | #: view:stock.move.in.processor:0 | ||
2464 | 92725 | #: field:stock.move.in.processor,product_id:0 | ||
2465 | 92726 | #: view:stock.move.processor:0 | ||
2466 | 92727 | #: field:stock.move.processor,product_id:0 | ||
2467 | 92728 | #: view:validate.move.processor:0 | ||
2468 | 92729 | #: field:validate.move.processor,product_id:0 | ||
2469 | 92730 | #: field:stock.warehouse.orderpoint.line,product_id:0 | ||
2470 | 92731 | #: view:product.where.used:0 | ||
2471 | 92732 | #: field:product.where.used,product_id:0 | ||
2472 | 92733 | #: field:standard.price.track.changes,product_id:0 | ||
2473 | 92734 | #: field:account.direct.invoice.wizard.line,product_id:0 | ||
2474 | 92735 | #: field:unconsistent.stock.report.line,product_id:0 | ||
2475 | 92736 | #: view:stock.card.wizard:0 | ||
2476 | 92737 | #: field:stock.card.wizard,product_id:0 | ||
2477 | 92738 | msgid "Product" | ||
2478 | 92739 | msgstr "Product" | ||
2479 | 92740 | |||
2480 | 92741 | #. module: report_webkit | 92848 | #. module: report_webkit |
2481 | 92742 | #: view:ir.header_webkit:0 | 92849 | #: view:ir.header_webkit:0 |
2482 | 92743 | msgid "Content and styling" | 92850 | msgid "Content and styling" |
2483 | @@ -92870,7 +92977,7 @@ | |||
2484 | 92870 | msgid "SQL Constraint" | 92977 | msgid "SQL Constraint" |
2485 | 92871 | msgstr "Contrainte SQL" | 92978 | msgstr "Contrainte SQL" |
2486 | 92872 | 92979 | ||
2488 | 92873 | #. modules: hr, base, msf_homere_interface | 92980 | #. modules: hr, base, msf_homere_interface, msf_doc_import |
2489 | 92874 | #: model:ir.actions.act_window,name:base.action_partner_employee_form | 92981 | #: model:ir.actions.act_window,name:base.action_partner_employee_form |
2490 | 92875 | #: view:hr.employee:0 | 92982 | #: view:hr.employee:0 |
2491 | 92876 | #: field:hr.job,employee_ids:0 | 92983 | #: field:hr.job,employee_ids:0 |
2492 | @@ -92880,6 +92987,7 @@ | |||
2493 | 92880 | #: model:ir.ui.menu,name:hr.menu_open_view_employee_list_my | 92987 | #: model:ir.ui.menu,name:hr.menu_open_view_employee_list_my |
2494 | 92881 | #: model:ir.ui.menu,name:hr.menu_view_employee_category_configuration_form | 92988 | #: model:ir.ui.menu,name:hr.menu_view_employee_category_configuration_form |
2495 | 92882 | #: view:hr.employee:0 | 92989 | #: view:hr.employee:0 |
2496 | 92990 | #: code:addons/msf_doc_import/msf_import_export_conf.py:76 | ||
2497 | 92883 | msgid "Employees" | 92991 | msgid "Employees" |
2498 | 92884 | msgstr "Employé(e)s" | 92992 | msgstr "Employé(e)s" |
2499 | 92885 | 92993 | ||
2500 | @@ -95260,11 +95368,11 @@ | |||
2501 | 95260 | msgid "GRAND TOTAL" | 95368 | msgid "GRAND TOTAL" |
2502 | 95261 | msgstr "GRAND TOTAL" | 95369 | msgstr "GRAND TOTAL" |
2503 | 95262 | 95370 | ||
2505 | 95263 | #. module: msf_field_access_rights | 95371 | #. module: msf_field_access_right |
2506 | 95264 | #: model:ir.model,name:msf_field_access_rights.model_msf_field_access_rights_field_access_rule_line | 95372 | #: model:ir.model,name:msf_field_access_rights.model_msf_field_access_rights_field_access_rule_line |
2507 | 95265 | #: view:msf_field_access_rights.field_access_rule_line:0 | 95373 | #: view:msf_field_access_rights.field_access_rule_line:0 |
2508 | 95266 | msgid "Field Access Rule Line" | 95374 | msgid "Field Access Rule Line" |
2510 | 95267 | msgstr "Field Access Rule Line" | 95375 | msgstr "Ligne de Règle d'Accès au Champs" |
2511 | 95268 | 95376 | ||
2512 | 95269 | #. module: account_mcdb | 95377 | #. module: account_mcdb |
2513 | 95270 | #: view:account.mcdb:0 | 95378 | #: view:account.mcdb:0 |
2514 | @@ -98029,6 +98137,166 @@ | |||
2515 | 98029 | msgid "Article must be used only in a properly designed programme, need a more detailed description." | 98137 | msgid "Article must be used only in a properly designed programme, need a more detailed description." |
2516 | 98030 | msgstr "L'article doit être uniquement utilisé dans un programme correctement construit, à besoin d'une description plus détaillée." | 98138 | msgstr "L'article doit être uniquement utilisé dans un programme correctement construit, à besoin d'une description plus détaillée." |
2517 | 98031 | 98139 | ||
2518 | 98140 | #. module: msf_doc_import | ||
2519 | 98141 | #: model:ir.actions.report.xml,name:msf_doc_import.wizard_export_generic | ||
2520 | 98142 | msgid "Generic Export" | ||
2521 | 98143 | msgstr "Export Générique" | ||
2522 | 98144 | |||
2523 | 98145 | #. module: msf_doc_import | ||
2524 | 98146 | #: field:msf.import.export,model_list_selection:0 | ||
2525 | 98147 | msgid "Object to Import/Export" | ||
2526 | 98148 | msgstr "Objet à Importer/Exporter" | ||
2527 | 98149 | |||
2528 | 98150 | #. module: msf_doc_import | ||
2529 | 98151 | #: field:msf.import.export,import_file:0 | ||
2530 | 98152 | msgid "File to import .xml" | ||
2531 | 98153 | msgstr "Fichier à importer .xml" | ||
2532 | 98154 | |||
2533 | 98155 | #. module: msf_doc_import | ||
2534 | 98156 | #: code:addons/msf_doc_import/msf_import_export.py:93 | ||
2535 | 98157 | #, python-format | ||
2536 | 98158 | msgid "%s_Import_Template" | ||
2537 | 98159 | msgstr "%s_Modèle_d_import" | ||
2538 | 98160 | |||
2539 | 98161 | #. module: msf_doc_import | ||
2540 | 98162 | #: code:addons/msf_doc_import/msf_import_export.py:198 | ||
2541 | 98163 | #: code:addons/msf_doc_import/msf_import_export.py:322 | ||
2542 | 98164 | #, python-format | ||
2543 | 98165 | msgid "field '%s' not found for model '%s'. Please contact the support team." | ||
2544 | 98166 | msgstr "champ '%s' non trouvé pour le modèle '%s'. Veuillez contacter l'équipe support." | ||
2545 | 98167 | |||
2546 | 98168 | #. module: msf_doc_import | ||
2547 | 98169 | #: code:addons/msf_doc_import/msf_import_export.py:112 | ||
2548 | 98170 | #, python-format | ||
2549 | 98171 | msgid "Selection '%s' not found. Please contact the support team." | ||
2550 | 98172 | msgstr "Sélection '%s' non trouvée. Veuillez contacter l'équipe support." | ||
2551 | 98173 | |||
2552 | 98174 | #. module: msf_doc_import | ||
2553 | 98175 | #: code:addons/msf_doc_import/msf_import_export.py:117 | ||
2554 | 98176 | #, python-format | ||
2555 | 98177 | msgid "The header_list for report '%s' is not defined. Please contact the support team." | ||
2556 | 98178 | msgstr "La liste des entêtes pour le rapport '%s' n'est pas définie. Veuillez contacter l'équipe support." | ||
2557 | 98179 | |||
2558 | 98180 | #. module: msf_doc_import | ||
2559 | 98181 | #: code:addons/msf_doc_import/msf_import_export.py:264 | ||
2560 | 98182 | #, python-format | ||
2561 | 98183 | msgid "File structure is incorrect, please correct. You may generate a template with the File export functionality." | ||
2562 | 98184 | msgstr "La structure du fichier est incorrecte, veuillez corriger. Vous pouvez générer un modèle avec la fonctionnalité d'exportation de modèle." | ||
2563 | 98185 | |||
2564 | 98186 | #. module: msf_doc_import | ||
2565 | 98187 | #: code:addons/msf_doc_import/msf_import_export.py:272 | ||
2566 | 98188 | #, python-format | ||
2567 | 98189 | msgid "File structure is correct." | ||
2568 | 98190 | msgstr "La structure du fichier est correcte." | ||
2569 | 98191 | |||
2570 | 98192 | #. module: msf_doc_import | ||
2571 | 98193 | #: code:addons/msf_doc_import/msf_import_export.py:325 | ||
2572 | 98194 | #, python-format | ||
2573 | 98195 | msgid "Column %s: get '%s' expected '%s'." | ||
2574 | 98196 | msgstr "Colonne %s: reçu '%s' attendu '%s'." | ||
2575 | 98197 | |||
2576 | 98198 | #. module: msf_doc_import | ||
2577 | 98199 | #: code:addons/msf_doc_import/msf_import_export.py:328 | ||
2578 | 98200 | #, python-format | ||
2579 | 98201 | msgid "The following columns are missing in the imported file:\n" | ||
2580 | 98202 | "%s" | ||
2581 | 98203 | msgstr "Les colonnes suivantes sont manquantes dans le fichier importé :\n" | ||
2582 | 98204 | "%s" | ||
2583 | 98205 | |||
2584 | 98206 | #. module: msf_doc_import | ||
2585 | 98207 | #: code:addons/msf_doc_import/msf_import_export_conf.py:37 | ||
2586 | 98208 | #, python-format | ||
2587 | 98209 | msgid "Product Categories" | ||
2588 | 98210 | msgstr "Catégories Produit" | ||
2589 | 98211 | |||
2590 | 98212 | #. module: msf_doc_import | ||
2591 | 98213 | #: model:ir.actions.act_window,name:msf_doc_import.msf_import_export_non_functional_action | ||
2592 | 98214 | #: model:ir.ui.menu,name:msf_doc_import.msf_import_export_non_functional_menu | ||
2593 | 98215 | msgid "Non Functional" | ||
2594 | 98216 | msgstr "Non Functionnel" | ||
2595 | 98217 | |||
2596 | 98218 | #. module: msf_doc_import | ||
2597 | 98219 | #: code:addons/msf_doc_import/msf_import_export_conf.py:48 | ||
2598 | 98220 | #, python-format | ||
2599 | 98221 | msgid "Supplier Catalogues" | ||
2600 | 98222 | msgstr "Catalogues Fournisseur" | ||
2601 | 98223 | |||
2602 | 98224 | #. module: msf_doc_import | ||
2603 | 98225 | #: view:msf.import.export:0 | ||
2604 | 98226 | #: field:msf.import.export,display_file_import:0 | ||
2605 | 98227 | msgid "File Import" | ||
2606 | 98228 | msgstr "Import Fichier" | ||
2607 | 98229 | |||
2608 | 98230 | #. module: msf_doc_import | ||
2609 | 98231 | #: view:msf.import.export:0 | ||
2610 | 98232 | #: field:msf.import.export,display_file_export:0 | ||
2611 | 98233 | msgid "File Export" | ||
2612 | 98234 | msgstr "Export Fichier" | ||
2613 | 98235 | |||
2614 | 98236 | #. module: msf_doc_import | ||
2615 | 98237 | #: view:msf.import.export:0 | ||
2616 | 98238 | msgid "Export empty template" | ||
2617 | 98239 | msgstr "Exporter un modèle vide" | ||
2618 | 98240 | |||
2619 | 98241 | #. module: msf_doc_import | ||
2620 | 98242 | #: view:msf.import.export:0 | ||
2621 | 98243 | msgid "Export first 3 entries" | ||
2622 | 98244 | msgstr "Exporter les 3 premières entrées" | ||
2623 | 98245 | |||
2624 | 98246 | #. module: msf_doc_import | ||
2625 | 98247 | #: view:msf.import.export:0 | ||
2626 | 98248 | msgid "Export all data" | ||
2627 | 98249 | msgstr "Exporter toutes les données" | ||
2628 | 98250 | |||
2629 | 98251 | #. module: msf_doc_import | ||
2630 | 98252 | #: code:addons/msf_doc_import/msf_import_export_conf.py:56 | ||
2631 | 98253 | #, python-format | ||
2632 | 98254 | msgid "GL Accounts" | ||
2633 | 98255 | msgstr "Comptes" | ||
2634 | 98256 | |||
2635 | 98257 | #. module: msf_doc_import | ||
2636 | 98258 | #: code:addons/msf_doc_import/msf_import_export_conf.py:61 | ||
2637 | 98259 | #, python-format | ||
2638 | 98260 | msgid "GL Journals" | ||
2639 | 98261 | msgstr "Journaux" | ||
2640 | 98262 | |||
2641 | 98263 | #. module: msf_doc_import | ||
2642 | 98264 | #: view:msf.import.export:0 | ||
2643 | 98265 | msgid "Test file" | ||
2644 | 98266 | msgstr "Tester le fichier" | ||
2645 | 98267 | |||
2646 | 98268 | #. module: msf_doc_import | ||
2647 | 98269 | #: view:msf.import.export:0 | ||
2648 | 98270 | #: view:wizard.import.batch:0 | ||
2649 | 98271 | msgid "Download template file" | ||
2650 | 98272 | msgstr "Télécharger un fichier modèle" | ||
2651 | 98273 | |||
2652 | 98274 | #. module: msf_homere_interface | ||
2653 | 98275 | #: code:addons/msf_homere_interface/hr.py:137 | ||
2654 | 98276 | #, python-format | ||
2655 | 98277 | msgid "Some employees have the same unique code: %s" | ||
2656 | 98278 | msgstr "Certains employés ont le même code unique : %s" | ||
2657 | 98279 | |||
2658 | 98280 | #. modules: msf_doc_import | ||
2659 | 98281 | #: code:addons/msf_doc_import/msf_import_export_conf.py:86 | ||
2660 | 98282 | msgid "Currency" | ||
2661 | 98283 | msgstr "Devise" | ||
2662 | 98284 | |||
2663 | 98285 | #. modules: msf_doc_import | ||
2664 | 98286 | #: code:addons/msf_doc_import/msf_import_export_conf.py:99 | ||
2665 | 98287 | msgid "User Access" | ||
2666 | 98288 | msgstr "Accès utilisateur" | ||
2667 | 98289 | |||
2668 | 98290 | #. modules: msf_doc_import | ||
2669 | 98291 | #: code:addons/msf_doc_import/msf_import_export_conf.py:99 | ||
2670 | 98292 | msgid "User Groups" | ||
2671 | 98293 | msgstr "Groupes utilisateur" | ||
2672 | 98294 | |||
2673 | 98295 | #. modules: msf_doc_import | ||
2674 | 98296 | #: code:addons/msf_doc_import/msf_import_export_conf.py:99 | ||
2675 | 98297 | msgid "Currencies Rates" | ||
2676 | 98298 | msgstr "Taux des Devises" | ||
2677 | 98299 | |||
2678 | 98032 | #. module: account | 98300 | #. module: account |
2679 | 98033 | #: code:addons/account/report/common_report_header.py:136 | 98301 | #: code:addons/account/report/common_report_header.py:136 |
2680 | 98034 | #, python-format | 98302 | #, python-format |
2681 | 98035 | 98303 | ||
2682 | === modified file 'bin/addons/product_nomenclature/product_nomenclature.py' | |||
2683 | --- bin/addons/product_nomenclature/product_nomenclature.py 2017-05-29 14:06:25 +0000 | |||
2684 | +++ bin/addons/product_nomenclature/product_nomenclature.py 2017-09-12 08:08:04 +0000 | |||
2685 | @@ -821,7 +821,7 @@ | |||
2686 | 821 | 4. duplication from GUI: the default code XXX is saved, then modify in the write | 821 | 4. duplication from GUI: the default code XXX is saved, then modify in the write |
2687 | 822 | ''' | 822 | ''' |
2688 | 823 | # The first 2 cases: dup of default_code/xmlid_code not allow | 823 | # The first 2 cases: dup of default_code/xmlid_code not allow |
2690 | 824 | if context.get('from_import_menu') or context.get('sync_update_execution', False): | 824 | if context.get('sync_update_execution', False): |
2691 | 825 | if not default_code or not vals.get('xmlid_code', False): | 825 | if not default_code or not vals.get('xmlid_code', False): |
2692 | 826 | raise Exception, "Problem creating product: Missing xmlid_code/default_code in the data" | 826 | raise Exception, "Problem creating product: Missing xmlid_code/default_code in the data" |
2693 | 827 | if not vals.get('xmlid_code'): | 827 | if not vals.get('xmlid_code'): |
2694 | 828 | 828 | ||
2695 | === modified file 'bin/osv/orm.py' | |||
2696 | --- bin/osv/orm.py 2017-08-18 14:26:52 +0000 | |||
2697 | +++ bin/osv/orm.py 2017-09-12 08:08:04 +0000 | |||
2698 | @@ -675,10 +675,18 @@ | |||
2699 | 675 | elif f[i] in self._inherit_fields.keys(): | 675 | elif f[i] in self._inherit_fields.keys(): |
2700 | 676 | cols = selection_field(self._inherits) | 676 | cols = selection_field(self._inherits) |
2701 | 677 | if cols and cols._type == 'selection' and not sync_context: | 677 | if cols and cols._type == 'selection' and not sync_context: |
2706 | 678 | sel_list = cols.selection | 678 | # if requested, translate the fields.selection values |
2707 | 679 | if r and type(sel_list) == type([]): | 679 | translated_selection = False |
2708 | 680 | r = [x[1] for x in sel_list if r==x[0]] | 680 | if context.get('translate_selection_field', False) and r and f: |
2709 | 681 | r = r and r[0] or False | 681 | fields_get_res = self.fields_get(cr, uid, f, context=context) |
2710 | 682 | if f[0] in fields_get_res and 'selection' in fields_get_res[f[0]]: | ||
2711 | 683 | r = dict(fields_get_res[f[0]]['selection'])[r] | ||
2712 | 684 | translated_selection = True | ||
2713 | 685 | if not translated_selection: | ||
2714 | 686 | sel_list = cols.selection | ||
2715 | 687 | if r and type(sel_list) == type([]): | ||
2716 | 688 | r = [x[1] for x in sel_list if r==x[0]] | ||
2717 | 689 | r = r and r[0] or False | ||
2718 | 682 | if not r: | 690 | if not r: |
2719 | 683 | if f[i] in self._columns: | 691 | if f[i] in self._columns: |
2720 | 684 | r = check_type(self._columns[f[i]]._type) | 692 | r = check_type(self._columns[f[i]]._type) |
2721 | @@ -935,7 +943,14 @@ | |||
2722 | 935 | if field_type not in ('one2many', 'many2one', 'many2many', | 943 | if field_type not in ('one2many', 'many2one', 'many2many', |
2723 | 936 | 'integer', 'boolean', 'float', 'selection', | 944 | 'integer', 'boolean', 'float', 'selection', |
2724 | 937 | 'reference'): | 945 | 'reference'): |
2726 | 938 | res = value | 946 | if not context.get('sync_update_execution', False) and\ |
2727 | 947 | field_type == 'char' and isinstance(value, basestring) \ | ||
2728 | 948 | and len(value.splitlines()) > 1: | ||
2729 | 949 | # US-2661 do not allowed newline character in char fields | ||
2730 | 950 | res = False | ||
2731 | 951 | warning += [_("New line characters in the field '%s' not allowed. Please fix entry :\n'%s'") % (field[len(prefix)], value)] | ||
2732 | 952 | else: | ||
2733 | 953 | res = value | ||
2734 | 939 | elif field_type == 'one2many': | 954 | elif field_type == 'one2many': |
2735 | 940 | if field[len(prefix)] in done: | 955 | if field[len(prefix)] in done: |
2736 | 941 | continue | 956 | continue |
2737 | @@ -1033,27 +1048,40 @@ | |||
2738 | 1033 | 1048 | ||
2739 | 1034 | from osv import except_osv | 1049 | from osv import except_osv |
2740 | 1035 | position = 0 | 1050 | position = 0 |
2741 | 1051 | error_list = [] | ||
2742 | 1036 | while position<len(datas): | 1052 | while position<len(datas): |
2743 | 1037 | res = {} | 1053 | res = {} |
2744 | 1038 | 1054 | ||
2745 | 1039 | (res, position, warning, res_id, xml_id) = \ | 1055 | (res, position, warning, res_id, xml_id) = \ |
2746 | 1040 | process_liness(self, datas, [], current_module, self._name, fields_def, position=position) | 1056 | process_liness(self, datas, [], current_module, self._name, fields_def, position=position) |
2747 | 1041 | if len(warning): | 1057 | if len(warning): |
2750 | 1042 | cr.rollback() | 1058 | if not context.get('sync_update_execution', False): |
2751 | 1043 | return (-1, res, 'Line ' + str(position) +' : ' + '!\n'.join(warning), '') | 1059 | error_list.append(_('Line %s: %s') % (str(position), '\n'.join(warning))) |
2752 | 1060 | continue | ||
2753 | 1061 | else: | ||
2754 | 1062 | cr.rollback() | ||
2755 | 1063 | return (-1, res, 'Line ' + str(position) +' : ' + '!\n'.join(warning), '') | ||
2756 | 1044 | 1064 | ||
2757 | 1045 | try: | 1065 | try: |
2758 | 1046 | ir_model_data_obj._update(cr, uid, self._name, | 1066 | ir_model_data_obj._update(cr, uid, self._name, |
2759 | 1047 | current_module, res, mode=mode, xml_id=xml_id, | 1067 | current_module, res, mode=mode, xml_id=xml_id, |
2760 | 1048 | noupdate=noupdate, res_id=res_id, context=context) | 1068 | noupdate=noupdate, res_id=res_id, context=context) |
2761 | 1049 | except except_osv, e: | 1069 | except except_osv, e: |
2764 | 1050 | cr.rollback() | 1070 | if not context.get('sync_update_execution', False): |
2765 | 1051 | return (-1, res, 'Line ' + str(position) +' : ' + tools.ustr(e.value), '') | 1071 | error_list.append(_('Line %s: %s') % (str(position), tools.ustr(e.value))) |
2766 | 1072 | continue | ||
2767 | 1073 | else: | ||
2768 | 1074 | cr.rollback() | ||
2769 | 1075 | return (-1, res, 'Line ' + str(position) +' : ' + tools.ustr(e.value), '') | ||
2770 | 1052 | except Exception, e: | 1076 | except Exception, e: |
2771 | 1053 | #US-88: If this from an import account analytic, and there is sql error, AND not sync context, then just clear the cache | 1077 | #US-88: If this from an import account analytic, and there is sql error, AND not sync context, then just clear the cache |
2772 | 1054 | if 'account.analytic.account' in self._name and not context.get('sync_update_execution', False): | 1078 | if 'account.analytic.account' in self._name and not context.get('sync_update_execution', False): |
2773 | 1055 | cache.clean_caches_for_db(cr.dbname) | 1079 | cache.clean_caches_for_db(cr.dbname) |
2775 | 1056 | return (-1, res, 'Line ' + str(position) +' : ' + tools.ustr(e) + "\n" + tools.ustr(traceback.format_exc()), '') | 1080 | if not context.get('sync_update_execution', False): |
2776 | 1081 | error_list.append(_('Line %s: %s') % (str(position), tools.ustr(e) + "\n" + tools.ustr(traceback.format_exc()))) | ||
2777 | 1082 | continue | ||
2778 | 1083 | else: | ||
2779 | 1084 | return (-1, res, 'Line ' + str(position) +' : ' + tools.ustr(e) + "\n" + tools.ustr(traceback.format_exc()), '') | ||
2780 | 1057 | 1085 | ||
2781 | 1058 | if config.get('import_partial', False) and filename and (not (position%100)): | 1086 | if config.get('import_partial', False) and filename and (not (position%100)): |
2782 | 1059 | data = pickle.load(file(config.get('import_partial'))) | 1087 | data = pickle.load(file(config.get('import_partial'))) |
2783 | @@ -1062,6 +1090,9 @@ | |||
2784 | 1062 | if context.get('defer_parent_store_computation'): | 1090 | if context.get('defer_parent_store_computation'): |
2785 | 1063 | self._parent_store_compute(cr) | 1091 | self._parent_store_compute(cr) |
2786 | 1064 | cr.commit() | 1092 | cr.commit() |
2787 | 1093 | if not context.get('sync_update_execution', False) and error_list: | ||
2788 | 1094 | cr.rollback() | ||
2789 | 1095 | return (-1, {}, '\n'.join(error_list), '') | ||
2790 | 1065 | 1096 | ||
2791 | 1066 | if context.get('defer_parent_store_computation'): | 1097 | if context.get('defer_parent_store_computation'): |
2792 | 1067 | self._parent_store_compute(cr) | 1098 | self._parent_store_compute(cr) |