[IMP]Stock:As Per Pad Specification
bzr revid: sunilsharma.sharma07@gmail.com-20130903063211-mepcb1hu6ewhvfkw
This commit is contained in:
parent
cc6a1c92b2
commit
dafb61db8d
|
@ -1696,10 +1696,10 @@ class stock_inventory(osv.osv):
|
|||
'state': fields.selection([('draft', 'Draft'), ('cancel', 'Cancelled'), ('confirm', 'In Progress'), ('done', 'Validated')], 'Status', readonly=True, select=True),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True, select=True, readonly=True, states={'draft': [('readonly', False)]}),
|
||||
'location_id': fields.many2one('stock.location', 'Location', required=True),
|
||||
'product_id': fields.many2one('product.product', 'Product', help="Product Name"),
|
||||
'package_id': fields.many2one('stock.quant.package', 'Pack'),
|
||||
'partner_id': fields.many2one('res.partner', 'Owner'),
|
||||
'lot_id': fields.many2one('stock.production.lot', 'Lot/Serial Number', help="Forces to specify a Serial Number for all moves generated by Inventoty"),
|
||||
'product_id': fields.many2one('product.product', 'Product', help="Select Product to Specify filters to focus your inventory a on particular product"),
|
||||
'package_id': fields.many2one('stock.quant.package', 'Pack', help="Select Pack to Specify filters to focus your inventory a on particular Pack"),
|
||||
'partner_id': fields.many2one('res.partner', 'Owner', help="Select Owner to Specify filters to focus your inventory a on particular Owner"),
|
||||
'lot_id': fields.many2one('stock.production.lot', 'Lot/Serial Number', help="Select Lot/Serial Number to Specify filters to focus your inventory a on particular Lot/Serial Number"),
|
||||
'move_ids_exist': fields.function(_get_move_ids_exist, type='boolean', string=' Stock Move Exists?', help='technical field for attrs in view'),
|
||||
}
|
||||
|
||||
|
|
|
@ -131,7 +131,7 @@
|
|||
</group>
|
||||
<notebook attrs="{'invisible':[('state','=','draft')]}">
|
||||
<page string="Inventory Details" >
|
||||
<button name="set_checked_qty" states="confirm" string="==> Set Checked Quantity to 0" type="object" class="oe_link oe_right" groups="stock.group_stock_user"/>
|
||||
<button name="set_checked_qty" states="confirm" string="⇒ Set Checked Quantity to 0" type="object" class="oe_link oe_right" groups="stock.group_stock_user"/>
|
||||
<field name="line_ids" string="Inventory Details">
|
||||
<tree string="Inventory Details" editable="bottom" colors="blue: product_qty != real_qty">
|
||||
<field context="{'location':location_id, 'uom':product_uom_id, 'to_date':parent.date}" name="product_id" on_change="on_change_product_id(location_id,product_id,product_uom_id,parent.date)" domain="[('type','=','product')]"/>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
-
|
||||
In order to test the inventory, I create a new product
|
||||
-
|
||||
!record {model: product.product, id: inventory_product}:
|
||||
name: inventory prod
|
||||
type: product
|
||||
!record {model: product.product, id: inventory_product}:
|
||||
name: inventory prod
|
||||
type: product
|
||||
-
|
||||
I create an inventory for this product only
|
||||
-
|
||||
|
@ -67,8 +67,8 @@
|
|||
self.prepare_inventory(cr, uid, [ref('inventory_test1')], context=context)
|
||||
inv = self.browse(cr, uid, ref('inventory_test1'), context=context)
|
||||
assert inv.line_ids and len(inv.line_ids) == 1, "Wrong number of inventory lines."
|
||||
assert len(inv.line_ids[0].product_qty) == 10, "Wrong quantity in inventory line."
|
||||
assert len(inv.line_ids[0].product_id.id) == ref('inventory_product'), "Wrong product in inventory line."
|
||||
assert inv.line_ids[0].product_qty == 10, "Wrong quantity in inventory line."
|
||||
assert inv.line_ids[0].product_id.id == ref('inventory_product'), "Wrong product in inventory line."
|
||||
-
|
||||
I modify the inventory line and set the quantity to 20 product on this new inventory
|
||||
-
|
||||
|
|
Loading…
Reference in New Issue