Change call order of check loaded quantity.
SQLite test compatibility.
This commit is contained in:
parent
eb8ca679f5
commit
a19000a1b3
2
load.py
2
load.py
|
@ -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(
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -451,7 +451,7 @@ Confirm load::
|
|||
|
||||
Create purchase::
|
||||
|
||||
>>> load.purchasable
|
||||
>>> bool(load.purchasable)
|
||||
False
|
||||
>>> load.click('create_purchase')
|
||||
>>> load.reload()
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue