Browse Source

[S0046] 0046 - Faciliter la réception de marchandises: Add a button to copy all qty in done column at reception

pull/15/head v1.0-2017-02-26
tfrancoi 8 years ago
committed by Thibault Francois
parent
commit
b688266c67
  1. 2
      beesdoo_inventory/__openerp__.py
  2. 8
      beesdoo_inventory/models/stock.py
  3. 4
      beesdoo_inventory/views/stock.xml

2
beesdoo_inventory/__openerp__.py

@ -20,7 +20,7 @@
'version': '0.1',
# any module necessary for this one to work correctly
'depends': ['delivery'],
'depends': ['delivery', 'beesdoo_base'],
# always loaded
'data': [

8
beesdoo_inventory/models/stock.py

@ -23,6 +23,14 @@ class StockPicking(models.Model):
@api.model
def create(self, values):
print "Values", values
picking = super(StockPicking, self).create(values)
picking._add_follower()
return picking
@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
return True

4
beesdoo_inventory/views/stock.xml

@ -23,6 +23,10 @@
<field name="backorder_id" position="after">
<field name="responsible" />
</field>
<button name="do_new_transfer" position="before">
<button name="copy_qty" string="Copy Pack Quantity" states="partially_available,assigned" type="object" class="oe_highlight"
attrs="{'invisible': ['|', ('picking_type_code', '!=', 'incoming')]}"/>
</button>
</field>
</record>
Loading…
Cancel
Save