[FIX] stock, inventory management

bzr revid: qdp-launchpad@openerp.com-20140409130859-0mla46wyl6ubecyb
This commit is contained in:
Quentin (OpenERP)
2014-04-09 15:08:59 +02:00
parent 4908a107d1
commit 7c810ff6fe
2 changed files with 1 additions and 11 deletions
+1 -8
View File
@@ -587,14 +587,6 @@ class stock_quant(osv.osv):
raise osv.except_osv(_('Error'), _('You cannot move to a location of type view %s.') % (location.name))
return True
def write(self, cr, uid, ids, vals, context=None):
#check the inventory constraint before the write
if isinstance(ids, (int, long)):
ids = [ids]
if 'owner_id' in vals or 'lot_id' in vals or 'package_id' in vals or 'location_id' in vals or 'product_id' in vals:
self._check_open_inventory_location(cr, uid, ids, context=context)
return super(stock_quant, self).write(cr, uid, ids, vals, context=context)
#----------------------------------------------------------
# Stock Picking
@@ -2591,6 +2583,7 @@ class stock_inventory(osv.osv):
for th_line in inventory.theoretical_line_ids:
th_vals.append({
'product_id': th_line.product_id.id,
'product_uom_id': th_line.product_uom_id.id,
'product_qty': th_line.product_qty,
'location_id': th_line.location_id.id,
'prod_lot_id': th_line.prod_lot_id.id,
-3
View File
@@ -151,9 +151,6 @@
<field name="location_id" ref="stock_location_components"/>
</record>
<function model="stock.inventory" name="prepare_inventory">
<function eval="[[('id', '=', ref('stock_inventory_0'))]]" model="stock.inventory" name="search"/>
</function>
<function model="stock.inventory" name="action_done">
<function eval="[[('id', '=', ref('stock_inventory_0'))]]" model="stock.inventory" name="search"/>
</function>