Browse Source

[FIX] beesdoo_inventory: fix pack_operation_product_ids > move_line_ids

pull/149/head
Manuel Claeys Bouuaert 5 years ago
committed by Rémy Taymans
parent
commit
b6c3b228ea
  1. 4
      beesdoo_inventory/models/stock.py
  2. 2
      beesdoo_inventory/views/stock.xml

4
beesdoo_inventory/models/stock.py

@ -32,6 +32,6 @@ class StockPicking(models.Model):
@api.multi
def copy_qty(self):
self.ensure_one()
for pack_operation in self.pack_operation_product_ids:
pack_operation.qty_done = pack_operation.product_qty
for move_line in self.move_line_ids:
move_line.qty_done = move_line.product_qty
return True

2
beesdoo_inventory/views/stock.xml

@ -23,7 +23,7 @@
<field name="responsible" />
</field>
<button name="action_assign" position="after">
<button name="copy_qty" string="Copy Pack Quantity" states="partially_available,assigned" type="object" class="oe_highlight"
<button name="copy_qty" string="Copy Move Line Quantity" states="partially_available,assigned" type="object" class="oe_highlight"
attrs="{'invisible': ['|', ('picking_type_code', '!=', 'incoming')]}"/>
</button>
<xpath expr="//field[@name='product_id']" position="attributes">

Loading…
Cancel
Save