Improvements in loads.
This commit is contained in:
parent
80ec4ce720
commit
45d723c0f6
12
load.py
12
load.py
|
@ -68,7 +68,8 @@ class LoadOrder:
|
|||
'ul_warehouse': 'UL "%s" must be in warehouse "%s" to be loaded in order "%s".',
|
||||
'ul_origin': 'UL "%s" does not belong to any origin of this load order.',
|
||||
'ul_overload': 'All valid lines of load order "%s" are complete. Cannot load more ULs.',
|
||||
'ul_data': 'Product data of UL "%s" does not match with any line of load order "%s".'})
|
||||
'ul_data': 'Product data of UL "%s" does not match with any line of load order "%s".',
|
||||
'draft_ul': 'Cannot change state to Draft for load order "%s" because it has loaded ULs.'})
|
||||
|
||||
@classmethod
|
||||
def default_ul_origin_restrict(cls):
|
||||
|
@ -162,6 +163,15 @@ class LoadOrder:
|
|||
Move.save(moves)
|
||||
Move.do([m for r in records for l in r.lines for m in l.moves])
|
||||
|
||||
@classmethod
|
||||
def draft(cls, records):
|
||||
for record in records:
|
||||
if record.state != 'waiting':
|
||||
continue
|
||||
if record.unit_loads:
|
||||
cls.raise_user_error('draft_ul', record.rec_name)
|
||||
super(LoadOrder, cls).draft(records)
|
||||
|
||||
def _get_inventory_move(self, move):
|
||||
pool = Pool()
|
||||
Move = pool.get('stock.move')
|
||||
|
|
|
@ -38,6 +38,10 @@ msgid "UL \"%s\" must be in warehouse \"%s\" to be loaded in order \"%s\"."
|
|||
msgstr ""
|
||||
"La UdC \"%s\" debe encontrarse en el almacén \"%s\" para ser cargada en la orden \"%s\"."
|
||||
|
||||
msgctxt "error:carrier.load.order:"
|
||||
msgid "Cannot change state to Draft for load order \"%s\" because it has loaded ULs."
|
||||
msgstr "No puede establecerse el estado Borrador para la orden \"%s\" porque tiene UdCs cargadas."
|
||||
|
||||
msgctxt "error:carrier.load_uls:"
|
||||
msgid "Cannot find Unit load \"%s\"."
|
||||
msgstr "No se ha podido encontrar la UdC \"%s\"."
|
||||
|
|
Loading…
Reference in New Issue