Merge lp:~unifield-team/unifield-wm/bklg-3 into lp:unifield-wm
- bklg-3
- Merge into trunk
Proposed by
jftempo
Status: | Merged |
---|---|
Merged at revision: | 2395 |
Proposed branch: | lp:~unifield-team/unifield-wm/bklg-3 |
Merge into: | lp:unifield-wm |
Diff against target: |
472 lines (+176/-45) 2 files modified
msf_doc_import/wizard/wiz_common_import.py (+147/-41) msf_doc_import/wizard/wiz_common_import_view.xml (+29/-4) |
To merge this branch: | bzr merge lp:~unifield-team/unifield-wm/bklg-3 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
UniField Reviewer Team | Pending | ||
Review via email: mp+249196@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'msf_doc_import/wizard/wiz_common_import.py' |
2 | --- msf_doc_import/wizard/wiz_common_import.py 2014-09-19 12:18:46 +0000 |
3 | +++ msf_doc_import/wizard/wiz_common_import.py 2015-02-10 13:20:38 +0000 |
4 | @@ -26,6 +26,14 @@ |
5 | from tools.translate import _ |
6 | |
7 | |
8 | +NO_QTY_MODELS = [ |
9 | + 'monthly.review.consumption', |
10 | + 'stock.warehouse.orderpoint', |
11 | + 'threshold.value', |
12 | + 'stock.warehouse.order.cycle', |
13 | +] |
14 | + |
15 | + |
16 | class wiz_common_import(osv.osv_memory): |
17 | ''' |
18 | Special methods for the import wizards |
19 | @@ -115,6 +123,8 @@ |
20 | ''' |
21 | Open the wizard |
22 | ''' |
23 | + data_obj = self.pool.get('ir.model.data') |
24 | + |
25 | if context is None: |
26 | context = {} |
27 | |
28 | @@ -125,15 +135,31 @@ |
29 | 'search_default_not_restricted': 1 if 'search_default_not_restricted' in context else 0, |
30 | } |
31 | wiz_id = self.create(cr, uid, vals, context=context) |
32 | + context['wizard_id'] = wiz_id |
33 | + |
34 | + if parent_model in NO_QTY_MODELS: |
35 | + view_id = data_obj.get_object_reference(cr, uid, 'msf_doc_import', 'wizard_common_import_line_form_view_no_qty')[1] |
36 | + else: |
37 | + view_id = data_obj.get_object_reference(cr, uid, 'msf_doc_import', 'wizard_common_import_line_form_view')[1] |
38 | + |
39 | |
40 | return {'type': 'ir.actions.act_window', |
41 | 'res_model': self._name, |
42 | 'res_id': wiz_id, |
43 | + 'view_id': [view_id], |
44 | 'view_type': 'form', |
45 | 'view_mode': 'form', |
46 | 'target': 'new', |
47 | 'context': context} |
48 | |
49 | + def _get_current_id(self, cr, uid, ids, field_name, args, context=None): |
50 | + res = {} |
51 | + |
52 | + for i in ids: |
53 | + res[i] = i |
54 | + |
55 | + return res |
56 | + |
57 | _columns = { |
58 | 'parent_id': fields.integer(string='ID of the parent document'), |
59 | 'parent_model': fields.char(size=128, string='Model of the parent document'), |
60 | @@ -141,6 +167,7 @@ |
61 | 'product_ids': fields.many2many('product.product', 'product_add_in_line_rel', |
62 | 'wiz_id', 'product_id', string='Products'), |
63 | 'search_default_not_restricted': fields.integer('Search default not restricted', invisible=True), # UFTP-15 (for context reinject in product_ids m2m for 'add multiple lines' button) |
64 | + 'current_id': fields.function(_get_current_id, method=True, type='integer', string='ID'), |
65 | } |
66 | |
67 | _defaults = { |
68 | @@ -165,6 +192,8 @@ |
69 | line_obj = self.pool.get(wiz['line_model']) |
70 | product_ids = wiz['product_ids'] |
71 | |
72 | + context['wizard_id'] = wiz['id'] |
73 | + |
74 | line_obj.create_multiple_lines(cr, uid, parent_id, product_ids, context=context) |
75 | |
76 | return {'type': 'ir.actions.act_window_close'} |
77 | @@ -172,6 +201,76 @@ |
78 | wizard_common_import_line() |
79 | |
80 | |
81 | +class product_product_import_line_qty(osv.osv_memory): |
82 | + _name = 'product.product.import.line.qty' |
83 | + |
84 | + _columns = { |
85 | + 'wizard_id': fields.many2one( |
86 | + 'wizard.common.import.line', |
87 | + string='Wizard', |
88 | + ), |
89 | + 'product_id': fields.many2one( |
90 | + 'product.product', |
91 | + string='Product', |
92 | + ), |
93 | + 'qty': fields.float( |
94 | + string='Qty', |
95 | + ), |
96 | + } |
97 | + |
98 | +product_product_import_line_qty() |
99 | + |
100 | + |
101 | +class product_product(osv.osv): |
102 | + _inherit = 'product.product' |
103 | + |
104 | + def _get_import_product_qty(self, cr, uid, ids, field_name, args, context=None): |
105 | + res = {} |
106 | + pplq_obj = self.pool.get('product.product.import.line.qty') |
107 | + |
108 | + wiz_id = context.get('wizard_id', None) |
109 | + for i in ids: |
110 | + res[i] = 0.00 |
111 | + if wiz_id: |
112 | + pplq_ids = pplq_obj.search(cr, uid, [ |
113 | + ('wizard_id', '=', wiz_id), |
114 | + ('product_id', '=', i), |
115 | + ], context=context) |
116 | + if pplq_ids: |
117 | + res[i] = pplq_obj.read(cr, uid, pplq_ids, ['qty'])[0]['qty'] |
118 | + |
119 | + return res |
120 | + |
121 | + def _write_imp_product_qty(self, cr, uid, ids, field_name, values, args, context=None): |
122 | + """ |
123 | + Create a product.product.import.line.qty for each product/wizard and put the |
124 | + quantity. |
125 | + """ |
126 | + if isinstance(ids, (int, long)): |
127 | + ids = [ids] |
128 | + |
129 | + if field_name == 'import_product_qty' and context.get('wizard_id', None): |
130 | + for prod_id in ids: |
131 | + self.pool.get('product.product.import.line.qty').create(cr, uid, { |
132 | + 'wizard_id': context.get('wizard_id'), |
133 | + 'product_id': prod_id, |
134 | + 'qty': values, |
135 | + }, context=context) |
136 | + |
137 | + _columns = { |
138 | + 'import_product_qty': fields.function( |
139 | + _get_import_product_qty, |
140 | + fnct_inv=_write_imp_product_qty, |
141 | + method=True, |
142 | + type='float', |
143 | + string='Qty', |
144 | + store=False, |
145 | + ), |
146 | + } |
147 | + |
148 | +product_product() |
149 | + |
150 | + |
151 | class purchase_order_line(osv.osv): |
152 | _inherit = 'purchase.order.line' |
153 | |
154 | @@ -185,7 +284,7 @@ |
155 | context = context is None and {} or context |
156 | product_ids = isinstance(product_ids, (int, long)) and [product_ids] or product_ids |
157 | |
158 | - for p_data in p_obj.read(cr, uid, product_ids, ['uom_id', 'standard_price'], context=context): |
159 | + for p_data in p_obj.read(cr, uid, product_ids, ['uom_id', 'standard_price', 'import_product_qty'], context=context): |
160 | po_data = po_obj.read(cr, uid, parent_id, ['pricelist_id', 'partner_id', 'date_order', |
161 | 'fiscal_position', 'state'], context=context) |
162 | |
163 | @@ -193,12 +292,13 @@ |
164 | 'product_id': p_data['id'], |
165 | 'product_uom': p_data['uom_id'][0], |
166 | 'price_unit': p_data['standard_price'], |
167 | + 'product_qty': p_data['import_product_qty'], |
168 | 'old_price_unit': p_data['standard_price'],} |
169 | |
170 | values.update(self.product_id_on_change(cr, uid, False, |
171 | po_data['pricelist_id'][0], # Pricelist |
172 | values['product_id'], # Product |
173 | - 1.00, # Product Qty - Use 1.00 to compute the price according to supplier catalogue |
174 | + p_data['import_product_qty'], # Product Qty - Use 1.00 to compute the price according to supplier catalogue |
175 | values['product_uom'], # UoM |
176 | po_data['partner_id'][0], # Supplier |
177 | po_data['date_order'], # Date order |
178 | @@ -213,7 +313,7 @@ |
179 | '', # Comment |
180 | context=context).get('value', {})) |
181 | # Set the quantity to 0.00 |
182 | - values.update({'product_qty': 0.00}) |
183 | + values.update({'product_qty': p_data['import_product_qty']}) |
184 | |
185 | self.create(cr, uid, values, context=dict(context, noraise=True, import_in_progress=True)) |
186 | |
187 | @@ -269,15 +369,15 @@ |
188 | context = context is None and {} or context |
189 | product_ids = isinstance(product_ids, (int, long)) and [product_ids] or product_ids |
190 | |
191 | - for p_data in p_obj.read(cr, uid, product_ids, ['uom_id'], context=context): |
192 | + for p_data in p_obj.read(cr, uid, product_ids, ['uom_id', 'import_product_qty'], context=context): |
193 | values = {'tender_id': parent_id, |
194 | 'product_id': p_data['id'], |
195 | 'product_uom': p_data['uom_id'][0]} |
196 | |
197 | - values.update(self.on_product_change(cr, uid, False, p_data['id'], p_data['uom_id'][0], 1.00, context=context).get('value', {})) |
198 | + values.update(self.on_product_change(cr, uid, False, p_data['id'], p_data['uom_id'][0], p_data['import_product_qty'], context=context).get('value', {})) |
199 | |
200 | # Set the quantity to 0.00 |
201 | - values.update({'qty': 0.00}) |
202 | + values.update({'qty': p_data['import_product_qty']}) |
203 | |
204 | self.create(cr, uid, values, context=dict(context, noraise=True, import_in_progress=True)) |
205 | |
206 | @@ -325,32 +425,38 @@ |
207 | context = context is None and {} or context |
208 | product_ids = isinstance(product_ids, (int, long)) and [product_ids] or product_ids |
209 | |
210 | - for p_data in p_obj.read(cr, uid, product_ids, ['uom_id'], context=context): |
211 | + for p_data in p_obj.read(cr, uid, product_ids, ['uom_id', 'import_product_qty'], context=context): |
212 | order_data = order_obj.read(cr, uid, parent_id, ['pricelist_id', |
213 | 'partner_id', |
214 | 'date_order', |
215 | + 'procurement_request', |
216 | 'fiscal_position'], context=context) |
217 | |
218 | values = {'order_id': parent_id, |
219 | 'product_id': p_data['id'], |
220 | 'product_uom': p_data['uom_id'][0]} |
221 | |
222 | - values.update(self.product_id_change(cr, uid, False, order_data['pricelist_id'][0], |
223 | - p_data['id'], |
224 | - 1.00, |
225 | - p_data['uom_id'][0], |
226 | - p_data['uom_id'][0], |
227 | - '', |
228 | - order_data['partner_id'][0], |
229 | - context.get('lang'), |
230 | - True, |
231 | - order_data['date_order'], |
232 | - False, |
233 | - order_data['fiscal_position'] and order_data['fiscal_position'][0] or False, |
234 | - False).get('value', {})) |
235 | + if order_data['procurement_request']: |
236 | + values.update(self.requested_product_id_change(cr, uid, False, |
237 | + p_data['id'], |
238 | + '').get('value', {})) |
239 | + else: |
240 | + values.update(self.product_id_change(cr, uid, False, order_data['pricelist_id'][0], |
241 | + p_data['id'], |
242 | + p_data['import_product_qty'], |
243 | + p_data['uom_id'][0], |
244 | + p_data['uom_id'][0], |
245 | + '', |
246 | + order_data['partner_id'][0], |
247 | + context.get('lang'), |
248 | + True, |
249 | + order_data['date_order'], |
250 | + False, |
251 | + order_data['fiscal_position'] and order_data['fiscal_position'][0] or False, |
252 | + False).get('value', {})) |
253 | |
254 | # Set the quantity to 0.00 |
255 | - values.update({'product_uom_qty': 0.00, 'product_uos_qty': 0.00}) |
256 | + values.update({'product_uom_qty': p_data['import_product_qty'], 'product_uos_qty': p_data['import_product_qty']}) |
257 | |
258 | self.create(cr, uid, values, context=dict(context, noraise=True, import_in_progress=True)) |
259 | |
260 | @@ -416,14 +522,14 @@ |
261 | context = context is None and {} or context |
262 | product_ids = isinstance(product_ids, (int, long)) and [product_ids] or product_ids |
263 | |
264 | - for p_data in p_obj.read(cr, uid, product_ids, ['uom_id', 'standard_price'], context=context): |
265 | + for p_data in p_obj.read(cr, uid, product_ids, ['uom_id', 'standard_price', 'import_product_qty'], context=context): |
266 | values = {'item_kit_id': parent_id, |
267 | 'item_product_id': p_data['id'], |
268 | 'item_uom_id': p_data['uom_id'][0],} |
269 | |
270 | values.update(self.on_product_change(cr, uid, False, values['item_product_id'], context=context).get('value', {})) |
271 | # Set the quantity to 0.00 |
272 | - values.update({'product_qty': 0.00}) |
273 | + values.update({'item_qty': p_data['import_product_qty']}) |
274 | |
275 | self.create(cr, uid, values, context=dict(context, noraise=True, import_in_progress=True)) |
276 | |
277 | @@ -460,7 +566,7 @@ |
278 | context = context is None and {} or context |
279 | product_ids = isinstance(product_ids, (int, long)) and [product_ids] or product_ids |
280 | |
281 | - for p_data in p_obj.read(cr, uid, product_ids, ['uom_id', 'standard_price'], context=context): |
282 | + for p_data in p_obj.read(cr, uid, product_ids, ['uom_id', 'standard_price', 'import_product_qty'], context=context): |
283 | values = {'product_id': p_data['id'], |
284 | 'catalogue_id': parent_id, |
285 | 'unit_price': p_data['standard_price'], |
286 | @@ -470,7 +576,7 @@ |
287 | values.update(self.product_change(cr, uid, False, p_data['id'], 1.00, 1.00).get('value', {})) |
288 | |
289 | # Set the quantity to 0.00 |
290 | - values.update({'min_qty': 0.00}) |
291 | + values.update({'min_qty': p_data['import_product_qty']}) |
292 | |
293 | self.create(cr, uid, values, context=dict(context, noraise=True, import_in_progress=True)) |
294 | |
295 | @@ -521,7 +627,7 @@ |
296 | else: |
297 | location_id = get_ref(cr, uid, 'stock', 'stock_location_stock')[1] |
298 | |
299 | - for p_data in p_obj.read(cr, uid, product_ids, ['uom_id', 'name', 'nomen_manda_0'], context=context): |
300 | + for p_data in p_obj.read(cr, uid, product_ids, ['uom_id', 'name', 'nomen_manda_0', 'import_product_qty'], context=context): |
301 | # Set the location dest id |
302 | if picking.type == 'internal': |
303 | location_dest_id = get_ref(cr, uid, 'msf_cross_docking', 'stock_location_cross_docking')[1] |
304 | @@ -544,7 +650,7 @@ |
305 | |
306 | values.update(self.onchange_product_id(cr, uid, False, p_data['id'], location_id, location_dest_id, picking.address_id and picking.address_id.id or False, picking.type, False).get('value', {})) |
307 | |
308 | - values.update({'product_qty': 0.00}) |
309 | + values.update({'product_qty': p_data['import_product_qty']}) |
310 | |
311 | self.create(cr, uid, values, context=dict(context, noraise=True, import_in_progress=True)) |
312 | |
313 | @@ -605,7 +711,7 @@ |
314 | parent_vals[f] = parent_r[f] or 0. |
315 | |
316 | # set line vals |
317 | - for p_data in p_obj.read(cr, uid, product_ids, ['uom_id'], |
318 | + for p_data in p_obj.read(cr, uid, product_ids, ['uom_id', 'import_product_qty'], |
319 | context=context): |
320 | values = { |
321 | 'product_id': p_data['id'], |
322 | @@ -664,14 +770,14 @@ |
323 | ''' |
324 | p_obj = self.pool.get('product.product') |
325 | |
326 | - for p_data in p_obj.read(cr, uid, product_ids, ['uom_id'], context=context): |
327 | + for p_data in p_obj.read(cr, uid, product_ids, ['uom_id', 'import_product_qty'], context=context): |
328 | values = {'product_id': p_data['id'], |
329 | 'product_uom_id': p_data['uom_id'][0], |
330 | 'supply_id': parent_id} |
331 | |
332 | - values.update(self.onchange_product_id(cr, uid, False, p_data['id'], p_data['uom_id'][0], 1.00, context=context).get('value', {})) |
333 | + values.update(self.onchange_product_id(cr, uid, False, p_data['id'], p_data['uom_id'][0], p_data['import_product_qty'], context=context).get('value', {})) |
334 | # Set the quantity to 0.00 |
335 | - values.update({'product_qty': 0.00}) |
336 | + values.update({'product_qty': p_data['import_product_qty']}) |
337 | |
338 | if not self.search(cr, uid, [('product_id', '=', p_data['id']), ('supply_id', '=', parent_id)], context=context): |
339 | self.create(cr, uid, values, context=dict(context, noraise=True)) |
340 | @@ -706,14 +812,14 @@ |
341 | ''' |
342 | p_obj = self.pool.get('product.product') |
343 | |
344 | - for p_data in p_obj.read(cr, uid, product_ids, ['uom_id'], context=context): |
345 | + for p_data in p_obj.read(cr, uid, product_ids, ['uom_id', 'import_product_qty'], context=context): |
346 | values = {'product_id': p_data['id'], |
347 | 'uom_id': p_data['uom_id'][0], |
348 | 'order_cycle_id': parent_id} |
349 | |
350 | values.update(self.product_change(cr, uid, False, p_data['id'], context=context).get('value', {})) |
351 | # Set the quantity to 0.00 |
352 | - values.update({'safety_stock': 0.00}) |
353 | + values.update({'safety_stock': p_data['import_product_qty']}) |
354 | |
355 | if not self.search(cr, uid, [('product_id', '=', p_data['id']), ('order_cycle_id', '=', parent_id)], context=context): |
356 | self.create(cr, uid, values, context=dict(context, noraise=True)) |
357 | @@ -750,7 +856,7 @@ |
358 | |
359 | t_data = self.pool.get('threshold.value').browse(cr, uid, parent_id, context=context) |
360 | |
361 | - for p_data in p_obj.read(cr, uid, product_ids, ['uom_id'], context=context): |
362 | + for p_data in p_obj.read(cr, uid, product_ids, ['uom_id', 'import_product_qty'], context=context): |
363 | values = {'product_id': p_data['id'], |
364 | 'product_uom_id': p_data['uom_id'], |
365 | 'threshold_value_id': parent_id} |
366 | @@ -768,7 +874,7 @@ |
367 | t_data.lead_time, |
368 | t_data.supplier_lt,).get('value', {})) |
369 | # Set the quantity to 0.00 |
370 | - values.update({'fixed_product_qty': 0.00, 'fixed_threshold_value': 0.00}) |
371 | + values.update({'fixed_product_qty': p_data['import_product_qty'], 'fixed_threshold_value': 0.00}) |
372 | |
373 | if not self.search(cr, uid, [('product_id', '=', p_data['id']), ('threshold_value_id', '=', parent_id)], context=context): |
374 | self.create(cr, uid, values, context=dict(context, noraise=True)) |
375 | @@ -807,7 +913,7 @@ |
376 | location_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'stock', 'stock_location_stock')[1] |
377 | reason_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'reason_types_moves', 'reason_type_loss')[1] |
378 | |
379 | - for p_data in p_obj.read(cr, uid, product_ids, ['uom_id'], context=context): |
380 | + for p_data in p_obj.read(cr, uid, product_ids, ['uom_id', 'import_product_qty'], context=context): |
381 | values = {'product_id': p_data['id'], |
382 | 'product_uom': p_data['uom_id'][0], |
383 | 'location_id': location_id, |
384 | @@ -817,7 +923,7 @@ |
385 | values.update(self.on_change_product_id(cr, uid, False, location_id, p_data['id'], p_data['uom_id'][0], False).get('value', {})) |
386 | |
387 | # Set the quantity to 0.00 |
388 | - values.update({'product_qty': 0.00}) |
389 | + values.update({'product_qty': p_data['import_product_qty']}) |
390 | |
391 | self.create(cr, uid, values, context=dict(context, noraise=True)) |
392 | |
393 | @@ -856,7 +962,7 @@ |
394 | location_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'stock', 'stock_location_stock')[1] |
395 | reason_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'reason_types_moves', 'reason_type_loss')[1] |
396 | |
397 | - for p_data in p_obj.read(cr, uid, product_ids, ['uom_id', 'perishable', 'batch_management'], context=context): |
398 | + for p_data in p_obj.read(cr, uid, product_ids, ['uom_id', 'perishable', 'batch_management', 'import_product_qty'], context=context): |
399 | values = {'product_id': p_data['id'], |
400 | 'product_uom': p_data['uom_id'][0], |
401 | 'location_id': location_id, |
402 | @@ -868,7 +974,7 @@ |
403 | values.update(self.on_change_product_id(cr, uid, False, location_id, p_data['id'], p_data['uom_id'][0], False).get('value', {})) |
404 | |
405 | # Set the quantity to 0.00 |
406 | - values.update({'product_qty': 0.00}) |
407 | + values.update({'product_qty': p_data['import_product_qty']}) |
408 | |
409 | self.create(cr, uid, values, context=dict(context, noraise=True)) |
410 | |
411 | @@ -906,7 +1012,7 @@ |
412 | |
413 | c_data = self.pool.get('real.average.consumption').read(cr, uid, parent_id, ['cons_location_id'], context=context) |
414 | |
415 | - for p_data in p_obj.read(cr, uid, product_ids, ['uom_id'], context=context): |
416 | + for p_data in p_obj.read(cr, uid, product_ids, ['uom_id', 'import_product_qty'], context=context): |
417 | values = {'product_id': p_data['id'], |
418 | 'uom_id': p_data['uom_id'], |
419 | 'rac_id': parent_id} |
420 | @@ -914,7 +1020,7 @@ |
421 | values.update(self.product_onchange(cr, uid, False, p_data['id'], c_data['cons_location_id'][0], p_data['uom_id'][0], False).get('value', {})) |
422 | |
423 | # Set the quantity to 0.00 |
424 | - values.update({'consumed_qty': 0.00}) |
425 | + values.update({'consumed_qty': p_data['import_product_qty']}) |
426 | |
427 | self.create(cr, uid, values, context=dict(context, noraise=True)) |
428 | |
429 | |
430 | === modified file 'msf_doc_import/wizard/wiz_common_import_view.xml' |
431 | --- msf_doc_import/wizard/wiz_common_import_view.xml 2014-03-25 08:12:08 +0000 |
432 | +++ msf_doc_import/wizard/wiz_common_import_view.xml 2015-02-10 13:20:38 +0000 |
433 | @@ -11,10 +11,35 @@ |
434 | <field name="parent_id" invisible="1" /> |
435 | <field name="parent_model" invisible="1" /> |
436 | <field name="search_default_not_restricted" invisible="1" /> |
437 | - <field name="product_ids" nolabel="1" colspan="4" mode="tree" domain="context.get('product_ids_domain', [])" context="{'search_default_not_restricted': search_default_not_restricted}"> |
438 | - <tree string="Products" noteditable="True"> |
439 | - <field name="default_code" /> |
440 | - <field name="name" /> |
441 | + <field name="current_id" invisible="1" /> |
442 | + <field name="product_ids" nolabel="1" colspan="4" mode="tree" domain="context.get('product_ids_domain', [])" context="{'search_default_not_restricted': search_default_not_restricted, 'wizard_id': current_id}"> |
443 | + <tree string="Products" editable="top"> |
444 | + <field name="default_code" readonly="True" /> |
445 | + <field name="name" readonly="True" /> |
446 | + <field name="import_product_qty" /> |
447 | + </tree> |
448 | + </field> |
449 | + <separator colspan="4" string="Actions" /> |
450 | + <button special="cancel" string="Cancel" icon="gtk-cancel" /> |
451 | + <button name="fill_lines" string="Add products" icon="terp-check" colspan="3" type="object" /> |
452 | + </form> |
453 | + </field> |
454 | + </record> |
455 | + |
456 | + <record id="wizard_common_import_line_form_view_no_qty" model="ir.ui.view"> |
457 | + <field name="name">wizard.common.import.line.form.view.no.qty</field> |
458 | + <field name="model">wizard.common.import.line</field> |
459 | + <field name="type">form</field> |
460 | + <field name="arch" type="xml"> |
461 | + <form string="Add multiple products"> |
462 | + <field name="parent_id" invisible="1" /> |
463 | + <field name="parent_model" invisible="1" /> |
464 | + <field name="search_default_not_restricted" invisible="1" /> |
465 | + <field name="current_id" invisible="1" /> |
466 | + <field name="product_ids" nolabel="1" colspan="4" mode="tree" domain="context.get('product_ids_domain', [])" context="{'search_default_not_restricted': search_default_not_restricted, 'wizard_id': current_id}"> |
467 | + <tree string="Products" editable="top"> |
468 | + <field name="default_code" readonly="True" /> |
469 | + <field name="name" readonly="True" /> |
470 | </tree> |
471 | </field> |
472 | <separator colspan="4" string="Actions" /> |