[fix] lot qty

This commit is contained in:
Lorenzo Battistini
2013-05-11 10:12:01 +02:00
parent a48589cdb4
commit b3c6afee5c
2 changed files with 3 additions and 1 deletions

View File

@@ -84,7 +84,7 @@ class stock_production_lot(orm.Model):
for location in location_obj.browse(cr, uid, loc_ids, context=context):
c = context.copy()
c.update({
'location': location.id,
'location_id': location.id,
'compute_child': False
})

View File

@@ -172,3 +172,5 @@
!python {model: stock.production.lot}: |
lot = self.browse(cr, uid, ref('lot_icecream_0'), context=context)
assert lot.standard_price == 120, "Price is not updated."
balance = self.pool.get('account.account').browse(cr, uid, ref('account.stk')).balance
assert balance == 6000.0, "Purchased Stocks balance is %s, not 6000 (old balance + (lot.standard_price - new_price) * lot.stock_available)" % balance