Change call order of check loaded quantity.

SQLite test compatibility.
This commit is contained in:
Sergio Morillo 2016-09-25 00:04:56 +02:00
parent eb8ca679f5
commit a19000a1b3
4 changed files with 5 additions and 5 deletions

View File

@ -277,8 +277,8 @@ class LoadOrder:
pool = Pool()
Move = pool.get('stock.move')
super(LoadOrder, cls).do(records)
cls._check_loaded_quantity(records)
super(LoadOrder, cls).do(records)
moves = []
for record in records:
moves.extend(

View File

@ -157,7 +157,7 @@ Create load order::
>>> order.start_date = datetime.datetime.now() - relativedelta(minutes=20)
>>> order.state
'draft'
>>> order.ul_origin_restrict
>>> bool(order.ul_origin_restrict)
True
>>> order.party = customer
>>> line = order.lines.new()

View File

@ -451,7 +451,7 @@ Confirm load::
Create purchase::
>>> load.purchasable
>>> bool(load.purchasable)
False
>>> load.click('create_purchase')
>>> load.reload()

View File

@ -247,7 +247,7 @@ Check UL loading restrictions::
UserError: ('UserError', (u'UL "1" must be in Done state.', ''))
>>> ul.click('assign')
>>> ul.click('do')
>>> ul.available
>>> bool(ul.available)
True
>>> not Unitload.find([('id', '=', ul.id), ('available', '=', False)])
True
@ -261,7 +261,7 @@ Check UL loading restrictions::
True
>>> len(order.unit_loads)
1
>>> order.unit_loads[0].available
>>> bool(order.unit_loads[0].available)
True
>>> not Unitload.find([('id', '=', order.unit_loads[0].id), ('available', '=', False)])
True