mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
replace product_qty by product_uom_qty
This commit is contained in:
committed by
Alexandre Fayolle
parent
e648a372d9
commit
2cec2e50ff
@@ -30,7 +30,7 @@ class StockReservation(models.Model):
|
||||
The fields mandatory for the creation of a reservation are:
|
||||
|
||||
* product_id
|
||||
* product_qty
|
||||
* product_uom_qty
|
||||
* product_uom
|
||||
* name
|
||||
|
||||
@@ -102,7 +102,7 @@ class StockReservation(models.Model):
|
||||
'picking_type_id': _default_picking_type_id,
|
||||
'location_id': _default_location_id,
|
||||
'location_dest_id': _default_location_dest_id,
|
||||
'product_qty': 1.0,
|
||||
'product_uom_qty': 1.0,
|
||||
}
|
||||
|
||||
@api.multi
|
||||
@@ -166,8 +166,8 @@ class StockReservation(models.Model):
|
||||
@api.onchange('product_uom_qty')
|
||||
def _onchange_quantity(self):
|
||||
""" On change of product quantity avoid negative quantities """
|
||||
if not self.product_id or self.product_qty <= 0.0:
|
||||
self.product_qty = 0.0
|
||||
if not self.product_id or self.product_uom_qty <= 0.0:
|
||||
self.product_uom_qty = 0.0
|
||||
|
||||
@api.multi
|
||||
def open_move(self):
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
-
|
||||
!record {model: stock.reservation, id: reserv_sorbet1}:
|
||||
product_id: product_sorbet
|
||||
product_qty: 5.0
|
||||
product_uom_qty: 5.0
|
||||
product_uom: product.product_uom_kgm
|
||||
name: reserve 5 kgm of sorbet for test
|
||||
-
|
||||
|
||||
@@ -24,9 +24,9 @@
|
||||
<group>
|
||||
<group name="main_grp" string="Details">
|
||||
<field name="product_id" />
|
||||
<label for="product_qty" />
|
||||
<label for="product_uom_qty" />
|
||||
<div>
|
||||
<field name="product_qty" class="oe_inline"/>
|
||||
<field name="product_uom_qty" class="oe_inline"/>
|
||||
<field name="product_uom"
|
||||
groups="product.group_uom" class="oe_inline"/>
|
||||
</div>
|
||||
@@ -60,7 +60,7 @@
|
||||
<field name="name" />
|
||||
<field name="product_id" />
|
||||
<field name="move_id" />
|
||||
<field name="product_qty" sum="Total" />
|
||||
<field name="product_uom_qty" sum="Total" />
|
||||
<field name="product_uom" />
|
||||
<field name="date_validity" />
|
||||
<field name="state"/>
|
||||
|
||||
Reference in New Issue
Block a user