Browse Source

[MIG] beesdoo_stock: adaptation to 12.0

pull/144/head
Vincent Van Rossem 5 years ago
parent
commit
6b04c4a43e
  1. 4
      beesdoo_stock/models/stock.py
  2. 2
      beesdoo_stock/views/stock_view.xml

4
beesdoo_stock/models/stock.py

@ -10,7 +10,7 @@ class StockPackOperation(models.Model):
context = self._context
ctx = (context or {}).copy()
ctx['articles'] = []
for line in self.browse(ids).pack_operation_ids:
for line in self.browse(ids).move_line_ids:
ctx['articles'].append(line.product_id.product_tmpl_id.id)
if ctx['articles']:
return {
@ -24,5 +24,5 @@ class StockPackOperation(models.Model):
'context': ctx,
'nodestroy': True,
'res_id': ctx['articles'],
'domain': [('id', '=', ctx['articles'])],
'domain': [('id', 'in', ctx['articles'])],
}

2
beesdoo_stock/views/stock_view.xml

@ -5,7 +5,7 @@
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.view_picking_form"></field>
<field name="arch" type="xml">
<button name="do_new_transfer" position="after">
<button name="button_validate" position="after">
<button name="actions_on_articles" string="Actions on articles" type="object" class="oe_highlight"/>
</button>
</field>

Loading…
Cancel
Save