Use function name in workflow instead of python code
This commit is contained in:
1 parent
183a3e7bbf
commit
fb5ad2fa18
4 files changed
+96
-152
No files matched your search
+6
-8
@@ -78,27 +78,25 @@ class Inventory(ModelWorkflow, ModelSQL, ModelView):
|
||||
return location_ids[0]
|
||||
return False
|
||||
|
||||
def set_state_draft(self, inventory_id):
|
||||
self.write(inventory_id, {
|
||||
def wkf_draft(self, inventory):
|
||||
self.write(inventory.id, {
|
||||
'state': 'draft',
|
||||
})
|
||||
|
||||
def set_state_cancel(self, inventory_id):
|
||||
def wkf_cancel(self, inventory):
|
||||
line_obj = Pool().get("stock.inventory.line")
|
||||
inventory = self.browse(inventory_id)
|
||||
line_obj.cancel_move(inventory.lines)
|
||||
self.write(inventory_id, {
|
||||
self.write(inventory.id, {
|
||||
'state': 'cancel',
|
||||
})
|
||||
|
||||
def set_state_done(self, inventory_id):
|
||||
def wkf_done(self, inventory):
|
||||
date_obj = Pool().get('ir.date')
|
||||
line_obj = Pool().get('stock.inventory.line')
|
||||
inventory = self.browse(inventory_id)
|
||||
|
||||
for line in inventory.lines:
|
||||
line_obj.create_move(line)
|
||||
self.write(inventory_id, {
|
||||
self.write(inventory.id, {
|
||||
'state': 'done',
|
||||
})
|
||||
|
||||
|
||||
+3
-6
@@ -157,23 +157,20 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<record model="workflow.activity" id="inventory_act_draft">
|
||||
<field name="workflow" ref="wkf_inventory"/>
|
||||
<field name="flow_start">True</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">set_state_draft()</field>
|
||||
<field name="method">wkf_draft</field>
|
||||
<field name="name">Draft</field>
|
||||
</record>
|
||||
<record model="workflow.activity" id="inventory_act_cancel">
|
||||
<field name="workflow" ref="wkf_inventory"/>
|
||||
<field name="flow_stop">True</field>
|
||||
<field name="name">Canceled</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">set_state_cancel()</field>
|
||||
<field name="method">wkf_cancel</field>
|
||||
</record>
|
||||
<record model="workflow.activity" id="inventory_act_done">
|
||||
<field name="workflow" ref="wkf_inventory"/>
|
||||
<field name="flow_stop">True</field>
|
||||
<field name="name">Done</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">set_state_done()</field>
|
||||
<field name="method">wkf_done</field>
|
||||
</record>
|
||||
<record model="workflow.transition"
|
||||
id="inventory_trans_draft_cancel">
|
||||
|
||||
+57
-84
@@ -250,53 +250,50 @@ class ShipmentIn(ModelWorkflow, ModelSQL, ModelView):
|
||||
'moves': value,
|
||||
})
|
||||
|
||||
def set_state_done(self, shipment_id):
|
||||
def wkf_done(self, shipment):
|
||||
move_obj = Pool().get('stock.move')
|
||||
date_obj = Pool().get('ir.date')
|
||||
|
||||
shipment = self.browse(shipment_id)
|
||||
move_obj.write([m.id for m in shipment.inventory_moves
|
||||
if m.state not in ('done', 'cancel')], {
|
||||
'state': 'done',
|
||||
})
|
||||
self.write(shipment_id,{
|
||||
self.write(shipment.id,{
|
||||
'state': 'done',
|
||||
'effective_date': date_obj.today(),
|
||||
})
|
||||
|
||||
def set_state_cancel(self, shipment_id):
|
||||
def wkf_cancel(self, shipment):
|
||||
move_obj = Pool().get('stock.move')
|
||||
shipment = self.browse(shipment_id)
|
||||
move_obj.write([m.id for m in shipment.incoming_moves
|
||||
if m.state != 'cancel'] +
|
||||
[m.id for m in shipment.inventory_moves
|
||||
if m.state != 'cancel'], {
|
||||
'state': 'cancel',
|
||||
})
|
||||
self.write(shipment_id, {
|
||||
self.write(shipment.id, {
|
||||
'state': 'cancel',
|
||||
})
|
||||
|
||||
def set_state_received(self, shipment_id):
|
||||
def wkf_received(self, shipment):
|
||||
move_obj = Pool().get('stock.move')
|
||||
shipment = self.browse(shipment_id)
|
||||
move_obj.write([m.id for m in shipment.incoming_moves
|
||||
if m.state not in ('done', 'cancel')], {
|
||||
'state': 'done',
|
||||
})
|
||||
self.write(shipment_id, {
|
||||
self.write(shipment.id, {
|
||||
'state': 'received'
|
||||
})
|
||||
self.create_inventory_moves(shipment.id)
|
||||
|
||||
def set_state_draft(self, shipment_id):
|
||||
def wkf_draft(self, shipment):
|
||||
move_obj = Pool().get('stock.move')
|
||||
shipment = self.browse(shipment_id)
|
||||
move_obj.write([m.id for m in shipment.incoming_moves
|
||||
if m.state != 'draft'], {
|
||||
'state': 'draft',
|
||||
})
|
||||
move_obj.delete([m.id for m in shipment.inventory_moves])
|
||||
self.write(shipment_id, {
|
||||
self.write(shipment.id, {
|
||||
'state': 'draft',
|
||||
})
|
||||
|
||||
@@ -450,67 +447,61 @@ class ShipmentInReturn(ModelWorkflow, ModelSQL, ModelView):
|
||||
config.shipment_in_return_sequence.id)
|
||||
return super(ShipmentInReturn, self).create(values)
|
||||
|
||||
def set_state_draft(self, shipment_id):
|
||||
def wkf_draft(self, shipment):
|
||||
move_obj = Pool().get('stock.move')
|
||||
shipment = self.browse(shipment_id)
|
||||
self.write(shipment_id, {
|
||||
self.write(shipment.id, {
|
||||
'state': 'draft',
|
||||
})
|
||||
move_obj.write([m.id for m in shipment.moves if m.state != 'draft'], {
|
||||
'state': 'draft',
|
||||
})
|
||||
|
||||
def set_state_waiting(self, shipment_id):
|
||||
def wkf_waiting(self, shipment):
|
||||
move_obj = Pool().get('stock.move')
|
||||
shipment = self.browse(shipment_id)
|
||||
move_obj.write([m.id for m in shipment.moves
|
||||
if m.state not in ('cancel', 'draft')], {
|
||||
'state': 'draft',
|
||||
'planned_date': shipment.planned_date,
|
||||
})
|
||||
|
||||
self.write(shipment_id, {
|
||||
self.write(shipment.id, {
|
||||
'state': 'waiting',
|
||||
})
|
||||
|
||||
def set_state_assigned(self, shipment_id):
|
||||
self.write(shipment_id, {
|
||||
def wkf_assigned(self, shipment):
|
||||
self.write(shipment.id, {
|
||||
'state': 'assigned',
|
||||
})
|
||||
|
||||
def set_state_done(self, shipment_id):
|
||||
def wkf_done(self, shipment):
|
||||
move_obj = Pool().get('stock.move')
|
||||
date_obj = Pool().get('ir.date')
|
||||
|
||||
shipment = self.browse(shipment_id)
|
||||
move_obj.write([m.id for m in shipment.moves
|
||||
if m.state not in ('done', 'cancel')], {
|
||||
'state': 'done',
|
||||
})
|
||||
self.write(shipment_id, {
|
||||
self.write(shipment.id, {
|
||||
'state': 'done',
|
||||
'effective_date': date_obj.today(),
|
||||
})
|
||||
|
||||
def set_state_cancel(self, shipment_id):
|
||||
def wkf_cancel(self, shipment):
|
||||
move_obj = Pool().get('stock.move')
|
||||
shipment = self.browse(shipment_id)
|
||||
move_obj.write([m.id for m in shipment.moves if m.state != 'cancel'], {
|
||||
'state': 'cancel',
|
||||
})
|
||||
self.write(shipment_id, {
|
||||
self.write(shipment.id, {
|
||||
'state': 'cancel',
|
||||
})
|
||||
|
||||
def assign_try(self, shipment_id):
|
||||
def wkf_assign_try(self, shipment):
|
||||
pool = Pool()
|
||||
product_obj = pool.get('product.product')
|
||||
uom_obj = pool.get('product.uom')
|
||||
date_obj = pool.get('ir.date')
|
||||
move_obj = pool.get('stock.move')
|
||||
|
||||
shipment = self.browse(shipment_id)
|
||||
|
||||
Transaction().cursor.lock(move_obj._table)
|
||||
|
||||
location_ids = [m.from_location.id for m in shipment.moves]
|
||||
@@ -539,8 +530,7 @@ class ShipmentInReturn(ModelWorkflow, ModelSQL, ModelView):
|
||||
})
|
||||
return True
|
||||
|
||||
def assign_force(self, shipment_id):
|
||||
shipment = self.browse(shipment_id)
|
||||
def wkf_assign_force(self, shipment):
|
||||
move_obj = Pool().get('stock.move')
|
||||
move_obj.write([m.id for m in shipment.moves], {
|
||||
'state': 'assigned',
|
||||
@@ -779,15 +769,14 @@ class ShipmentOut(ModelWorkflow, ModelSQL, ModelView):
|
||||
'moves': value,
|
||||
})
|
||||
|
||||
def set_state_assigned(self, shipment_id):
|
||||
self.write(shipment_id, {
|
||||
def wkf_assigned(self, shipment):
|
||||
self.write(shipment.id, {
|
||||
'state': 'assigned',
|
||||
})
|
||||
|
||||
def set_state_draft(self, shipment_id):
|
||||
def wkf_draft(self, shipment):
|
||||
move_obj = Pool().get('stock.move')
|
||||
shipment = self.browse(shipment_id)
|
||||
self.write(shipment_id, {
|
||||
self.write(shipment.id, {
|
||||
'state': 'draft',
|
||||
})
|
||||
move_obj.write([m.id for m in
|
||||
@@ -796,29 +785,27 @@ class ShipmentOut(ModelWorkflow, ModelSQL, ModelView):
|
||||
'state': 'draft',
|
||||
})
|
||||
|
||||
def set_state_done(self, shipment_id):
|
||||
def wkf_done(self, shipment):
|
||||
move_obj = Pool().get('stock.move')
|
||||
date_obj = Pool().get('ir.date')
|
||||
|
||||
shipment = self.browse(shipment_id)
|
||||
move_obj.write([m.id for m in shipment.outgoing_moves
|
||||
if m.state not in ('done', 'cancel')], {
|
||||
'state': 'done',
|
||||
})
|
||||
self.write(shipment_id, {
|
||||
self.write(shipment.id, {
|
||||
'state': 'done',
|
||||
'effective_date': date_obj.today(),
|
||||
})
|
||||
|
||||
def set_state_packed(self, shipment_id):
|
||||
def wkf_packed(self, shipment):
|
||||
move_obj = Pool().get('stock.move')
|
||||
uom_obj = Pool().get('product.uom')
|
||||
shipment = self.browse(shipment_id)
|
||||
move_obj.write([m.id for m in shipment.inventory_moves
|
||||
if m.state not in ('done', 'cancel')], {
|
||||
'state': 'done',
|
||||
})
|
||||
self.write(shipment_id, {
|
||||
self.write(shipment.id, {
|
||||
'state': 'packed',
|
||||
})
|
||||
# Sum all outgoing quantities
|
||||
@@ -866,7 +853,6 @@ class ShipmentOut(ModelWorkflow, ModelSQL, ModelView):
|
||||
})
|
||||
|
||||
#Re-read the shipment and remove exceeding quantities
|
||||
shipment = self.browse(shipment_id)
|
||||
for move in shipment.outgoing_moves:
|
||||
if move.state == 'cancel': continue
|
||||
if outgoing_qty.get(move.product.id, 0.0) > 0.0:
|
||||
@@ -885,27 +871,25 @@ class ShipmentOut(ModelWorkflow, ModelSQL, ModelView):
|
||||
'state': 'assigned',
|
||||
})
|
||||
|
||||
def set_state_cancel(self, shipment_id):
|
||||
def wkf_cancel(self, shipment):
|
||||
move_obj = Pool().get('stock.move')
|
||||
shipment = self.browse(shipment_id)
|
||||
move_obj.write([m.id for m in
|
||||
shipment.outgoing_moves + shipment.inventory_moves
|
||||
if m.state != 'cancel'], {
|
||||
'state': 'cancel',
|
||||
})
|
||||
self.write(shipment_id, {
|
||||
self.write(shipment.id, {
|
||||
'state': 'cancel',
|
||||
})
|
||||
|
||||
def set_state_waiting(self, shipment_id):
|
||||
def wkf_waiting(self, shipment):
|
||||
"""
|
||||
Complete inventory moves to match the products and quantities
|
||||
that are in the outgoing moves.
|
||||
"""
|
||||
move_obj = Pool().get('stock.move')
|
||||
uom_obj = Pool().get('product.uom')
|
||||
shipment = self.browse(shipment_id)
|
||||
self.write(shipment_id, {
|
||||
self.write(shipment.id, {
|
||||
'state': 'waiting',
|
||||
})
|
||||
|
||||
@@ -916,7 +900,7 @@ class ShipmentOut(ModelWorkflow, ModelSQL, ModelView):
|
||||
move_obj.delete([x.id for x in shipment.inventory_moves])
|
||||
|
||||
# Re-Browse because moves have been deleted
|
||||
shipment = self.browse(shipment_id)
|
||||
shipment = self.browse(shipment.id)
|
||||
|
||||
for move in shipment.outgoing_moves:
|
||||
if move.state in ('cancel', 'done'):
|
||||
@@ -966,13 +950,11 @@ class ShipmentOut(ModelWorkflow, ModelSQL, ModelView):
|
||||
uom_index[target_uom])
|
||||
return res
|
||||
|
||||
def assign_try(self, shipment_id):
|
||||
def wkf_assign_try(self, shipment):
|
||||
move_obj = Pool().get('stock.move')
|
||||
shipment = self.browse(shipment_id)
|
||||
return move_obj.assign_try(shipment.inventory_moves)
|
||||
|
||||
def assign_force(self, shipment_id):
|
||||
shipment = self.browse(shipment_id)
|
||||
def wkf_assign_force(self, shipment):
|
||||
move_obj = Pool().get('stock.move')
|
||||
move_obj.write([m.id for m in shipment.inventory_moves], {
|
||||
'state': 'assigned',
|
||||
@@ -1233,52 +1215,49 @@ class ShipmentOutReturn(ModelWorkflow, ModelSQL, ModelView):
|
||||
def button_draft(self, ids):
|
||||
self.workflow_trigger_create(ids)
|
||||
|
||||
def set_state_done(self, shipment_id):
|
||||
def wkf_done(self, shipment):
|
||||
move_obj = Pool().get('stock.move')
|
||||
date_obj = Pool().get('ir.date')
|
||||
|
||||
shipment = self.browse(shipment_id)
|
||||
move_obj.write([m.id for m in shipment.inventory_moves
|
||||
if m.state not in ('done', 'cancel')], {
|
||||
'state': 'done',
|
||||
})
|
||||
self.write(shipment_id,{
|
||||
self.write(shipment.id,{
|
||||
'state': 'done',
|
||||
'effective_date': date_obj.today(),
|
||||
})
|
||||
|
||||
def set_state_cancel(self, shipment_id):
|
||||
def wkf_cancel(self, shipment):
|
||||
move_obj = Pool().get('stock.move')
|
||||
shipment = self.browse(shipment_id)
|
||||
move_obj.write([m.id for m in
|
||||
shipment.incoming_moves + shipment.inventory_moves
|
||||
if m.state != 'cancel'], {
|
||||
'state': 'cancel',
|
||||
})
|
||||
self.write(shipment_id, {
|
||||
self.write(shipment.id, {
|
||||
'state': 'cancel',
|
||||
})
|
||||
|
||||
def set_state_received(self, shipment_id):
|
||||
def wkf_received(self, shipment):
|
||||
move_obj = Pool().get('stock.move')
|
||||
shipment = self.browse(shipment_id)
|
||||
move_obj.write([m.id for m in shipment.incoming_moves
|
||||
if m.state not in ('done', 'cancel')], {
|
||||
'state': 'done',
|
||||
})
|
||||
self.write(shipment_id, {
|
||||
self.write(shipment.id, {
|
||||
'state': 'received'
|
||||
})
|
||||
self.create_inventory_moves(shipment.id)
|
||||
|
||||
def set_state_draft(self, shipment_id):
|
||||
def wkf_draft(self, shipment):
|
||||
move_obj = Pool().get('stock.move')
|
||||
shipment = self.browse(shipment_id)
|
||||
move_obj.write([m.id for m in shipment.incoming_moves
|
||||
if m.state != 'draft'], {
|
||||
'state': 'draft',
|
||||
})
|
||||
move_obj.delete([m.id for m in shipment.inventory_moves])
|
||||
self.write(shipment_id, {
|
||||
self.write(shipment.id, {
|
||||
'state': 'draft',
|
||||
})
|
||||
|
||||
@@ -1505,64 +1484,58 @@ class ShipmentInternal(ModelWorkflow, ModelSQL, ModelView):
|
||||
config.shipment_internal_sequence.id)
|
||||
return super(ShipmentInternal, self).create(values)
|
||||
|
||||
def set_state_draft(self, shipment_id):
|
||||
def wkf_draft(self, shipment):
|
||||
move_obj = Pool().get('stock.move')
|
||||
shipment = self.browse(shipment_id)
|
||||
self.write(shipment_id, {
|
||||
self.write(shipment.id, {
|
||||
'state': 'draft',
|
||||
})
|
||||
move_obj.write([m.id for m in shipment.moves], {
|
||||
'state': 'draft',
|
||||
})
|
||||
|
||||
def set_state_waiting(self, shipment_id):
|
||||
def wkf_waiting(self, shipment):
|
||||
move_obj = Pool().get('stock.move')
|
||||
shipment = self.browse(shipment_id)
|
||||
move_obj.write([m.id for m in shipment.moves], {
|
||||
'from_location': shipment.from_location.id,
|
||||
'to_location': shipment.to_location.id,
|
||||
'state': 'draft',
|
||||
'planned_date': shipment.planned_date,
|
||||
})
|
||||
self.write(shipment_id, {
|
||||
self.write(shipment.id, {
|
||||
'state': 'waiting',
|
||||
})
|
||||
|
||||
def set_state_assigned(self, shipment_id):
|
||||
self.write(shipment_id, {
|
||||
def wkf_assigned(self, shipment):
|
||||
self.write(shipment.id, {
|
||||
'state': 'assigned',
|
||||
})
|
||||
|
||||
def set_state_done(self, shipment_id):
|
||||
def wkf_done(self, shipment):
|
||||
move_obj = Pool().get('stock.move')
|
||||
date_obj = Pool().get('ir.date')
|
||||
|
||||
shipment = self.browse(shipment_id)
|
||||
move_obj.write([m.id for m in shipment.moves], {
|
||||
'state': 'done',
|
||||
})
|
||||
self.write(shipment_id, {
|
||||
self.write(shipment.id, {
|
||||
'state': 'done',
|
||||
'effective_date': date_obj.today(),
|
||||
})
|
||||
|
||||
def set_state_cancel(self, shipment_id):
|
||||
def wkf_cancel(self, shipment):
|
||||
move_obj = Pool().get('stock.move')
|
||||
shipment = self.browse(shipment_id)
|
||||
move_obj.write([m.id for m in shipment.moves], {
|
||||
'state': 'cancel',
|
||||
})
|
||||
self.write(shipment_id, {
|
||||
self.write(shipment.id, {
|
||||
'state': 'cancel',
|
||||
})
|
||||
|
||||
def assign_try(self, shipment_id):
|
||||
def wkf_assign_try(self, shipment):
|
||||
move_obj = Pool().get('stock.move')
|
||||
shipment = self.browse(shipment_id)
|
||||
return move_obj.assign_try(shipment.moves)
|
||||
|
||||
def assign_force(self, shipment_id):
|
||||
shipment = self.browse(shipment_id)
|
||||
def wkf_assign_force(self, shipment):
|
||||
move_obj = Pool().get('stock.move')
|
||||
move_obj.write([m.id for m in shipment.moves], {
|
||||
'state': 'assigned',
|
||||
|
||||
+30
-54
@@ -753,29 +753,25 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<record model="workflow.activity" id="shipmentin_act_draft">
|
||||
<field name="workflow" ref="wkf_shipmentin"/>
|
||||
<field name="flow_start">True</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">set_state_draft()</field>
|
||||
<field name="method">wkf_draft</field>
|
||||
<field name="name">Draft</field>
|
||||
</record>
|
||||
<record model="workflow.activity" id="shipmentin_act_cancel">
|
||||
<field name="workflow" ref="wkf_shipmentin"/>
|
||||
<field name="flow_stop">True</field>
|
||||
<field name="name">Canceled</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">set_state_cancel()</field>
|
||||
<field name="method">wkf_cancel</field>
|
||||
</record>
|
||||
<record model="workflow.activity" id="shipmentin_act_done">
|
||||
<field name="workflow" ref="wkf_shipmentin"/>
|
||||
<field name="flow_stop">True</field>
|
||||
<field name="name">Done</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">set_state_done()</field>
|
||||
<field name="method">wkf_done</field>
|
||||
</record>
|
||||
<record model="workflow.activity" id="shipmentin_act_received">
|
||||
<field name="name">Received</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="workflow" ref="wkf_shipmentin"/>
|
||||
<field name="action">set_state_received() create_inventory_moves()</field>
|
||||
<field name="method">wkf_received</field>
|
||||
</record>
|
||||
|
||||
<record model="workflow.transition"
|
||||
@@ -823,40 +819,34 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="workflow" ref="wkf_shipmentout"/>
|
||||
<field name="flow_start">True</field>
|
||||
<field name="name">Draft</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">set_state_draft()</field>
|
||||
<field name="method">wkf_draft</field>
|
||||
</record>
|
||||
<record model="workflow.activity" id="shipmentout_act_cancel">
|
||||
<field name="workflow" ref="wkf_shipmentout"/>
|
||||
<field name="flow_stop">True</field>
|
||||
<field name="name">Canceled</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">set_state_cancel()</field>
|
||||
<field name="method">wkf_cancel</field>
|
||||
</record>
|
||||
<record model="workflow.activity" id="shipmentout_act_done">
|
||||
<field name="workflow" ref="wkf_shipmentout"/>
|
||||
<field name="flow_stop">True</field>
|
||||
<field name="name">Done</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">set_state_done()</field>
|
||||
<field name="method">wkf_done</field>
|
||||
</record>
|
||||
<record model="workflow.activity" id="shipmentout_act_waiting">
|
||||
<field name="name">Waiting</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="workflow" ref="wkf_shipmentout"/>
|
||||
<field name="action">set_state_waiting()</field>
|
||||
<field name="method">wkf_waiting</field>
|
||||
</record>
|
||||
<record model="workflow.activity" id="shipmentout_act_assigned">
|
||||
<field name="name">Assigned</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="workflow" ref="wkf_shipmentout"/>
|
||||
<field name="action">set_state_assigned()</field>
|
||||
<field name="method">wkf_assigned</field>
|
||||
</record>
|
||||
<record model="workflow.activity" id="shipmentout_act_packed">
|
||||
<field name="name">Packed</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="workflow" ref="wkf_shipmentout"/>
|
||||
<field name="action">set_state_packed()</field>
|
||||
<field name="method">wkf_packed</field>
|
||||
</record>
|
||||
|
||||
<record model="workflow.transition"
|
||||
@@ -865,7 +855,7 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="act_to" ref="shipmentout_act_assigned"/>
|
||||
<field name="group" ref="group_stock"/>
|
||||
<field name="signal">assign</field>
|
||||
<field name="condition">assign_try()</field>
|
||||
<field name="condition">wkf_assign_try</field>
|
||||
</record>
|
||||
<record model="workflow.transition"
|
||||
id="shipmentout_trans_assigned_waiting">
|
||||
@@ -887,7 +877,7 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="act_to" ref="shipmentout_act_assigned"/>
|
||||
<field name="group" ref="group_stock_force_assignment"/>
|
||||
<field name="signal">force_assign</field>
|
||||
<field name="condition">assign_force()</field>
|
||||
<field name="condition">wkf_assign_force</field>
|
||||
</record>
|
||||
<record model="workflow.transition"
|
||||
id="shipmentout_trans_draft_waiting">
|
||||
@@ -1026,35 +1016,30 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<record model="workflow.activity" id="shipmentinternal_act_draft">
|
||||
<field name="workflow" ref="wkf_shipmentinternal"/>
|
||||
<field name="flow_start">True</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">set_state_draft()</field>
|
||||
<field name="method">wkf_draft</field>
|
||||
<field name="name">Draft</field>
|
||||
</record>
|
||||
<record model="workflow.activity" id="shipmentinternal_act_cancel">
|
||||
<field name="workflow" ref="wkf_shipmentinternal"/>
|
||||
<field name="flow_stop">True</field>
|
||||
<field name="name">Canceled</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">set_state_cancel()</field>
|
||||
<field name="method">wkf_cancel</field>
|
||||
</record>
|
||||
<record model="workflow.activity" id="shipmentinternal_act_done">
|
||||
<field name="workflow" ref="wkf_shipmentinternal"/>
|
||||
<field name="flow_stop">True</field>
|
||||
<field name="name">Done</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">set_state_done()</field>
|
||||
<field name="method">wkf_done</field>
|
||||
</record>
|
||||
<record model="workflow.activity" id="shipmentinternal_act_waiting">
|
||||
<field name="name">Waiting</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="workflow" ref="wkf_shipmentinternal"/>
|
||||
<field name="action">set_state_waiting()</field>
|
||||
<field name="method">wkf_waiting</field>
|
||||
</record>
|
||||
<record model="workflow.activity" id="shipmentinternal_act_assigned">
|
||||
<field name="name">Assigned</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="workflow" ref="wkf_shipmentinternal"/>
|
||||
<field name="action">set_state_assigned()</field>
|
||||
<field name="method">wkf_assigned</field>
|
||||
</record>
|
||||
|
||||
<record model="workflow.transition"
|
||||
@@ -1084,7 +1069,7 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="act_to" ref="shipmentinternal_act_assigned"/>
|
||||
<field name="group" ref="group_stock"/>
|
||||
<field name="signal">assign</field>
|
||||
<field name="condition">assign_try()</field>
|
||||
<field name="condition">wkf_assign_try</field>
|
||||
</record>
|
||||
<record model="workflow.transition"
|
||||
id="shipmentinternal_trans_assigned_waiting">
|
||||
@@ -1099,7 +1084,7 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="act_to" ref="shipmentinternal_act_assigned"/>
|
||||
<field name="group" ref="group_stock_force_assignment"/>
|
||||
<field name="signal">force_assign</field>
|
||||
<field name="condition">assign_force()</field>
|
||||
<field name="condition">wkf_assign_force</field>
|
||||
</record>
|
||||
<record model="workflow.transition" id="shipmentinternal_trans_assigned_done">
|
||||
<field name="act_from" ref="shipmentinternal_act_assigned"/>
|
||||
@@ -1137,29 +1122,25 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<record model="workflow.activity" id="shipment_out_return_act_draft">
|
||||
<field name="workflow" ref="wkf_shipment_out_return"/>
|
||||
<field name="flow_start">True</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">set_state_draft()</field>
|
||||
<field name="method">wkf_draft</field>
|
||||
<field name="name">Draft</field>
|
||||
</record>
|
||||
<record model="workflow.activity" id="shipment_out_return_act_cancel">
|
||||
<field name="workflow" ref="wkf_shipment_out_return"/>
|
||||
<field name="flow_stop">True</field>
|
||||
<field name="name">Canceled</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">set_state_cancel()</field>
|
||||
<field name="method">wkf_cancel</field>
|
||||
</record>
|
||||
<record model="workflow.activity" id="shipment_out_return_act_done">
|
||||
<field name="workflow" ref="wkf_shipment_out_return"/>
|
||||
<field name="flow_stop">True</field>
|
||||
<field name="name">Done</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">set_state_done()</field>
|
||||
<field name="method">wkf_done</field>
|
||||
</record>
|
||||
<record model="workflow.activity" id="shipment_out_return_act_received">
|
||||
<field name="name">Received</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="workflow" ref="wkf_shipment_out_return"/>
|
||||
<field name="action">set_state_received() create_inventory_moves()</field>
|
||||
<field name="method">wkf_received</field>
|
||||
</record>
|
||||
|
||||
<record model="workflow.transition"
|
||||
@@ -1205,35 +1186,30 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<record model="workflow.activity" id="shipment_in_return_act_draft">
|
||||
<field name="workflow" ref="wkf_shipment_in_return"/>
|
||||
<field name="flow_start">True</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">set_state_draft()</field>
|
||||
<field name="method">wkf_draft</field>
|
||||
<field name="name">Draft</field>
|
||||
</record>
|
||||
<record model="workflow.activity" id="shipment_in_return_act_cancel">
|
||||
<field name="workflow" ref="wkf_shipment_in_return"/>
|
||||
<field name="flow_stop">True</field>
|
||||
<field name="name">Canceled</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">set_state_cancel()</field>
|
||||
<field name="method">wkf_cancel</field>
|
||||
</record>
|
||||
<record model="workflow.activity" id="shipment_in_return_act_done">
|
||||
<field name="workflow" ref="wkf_shipment_in_return"/>
|
||||
<field name="flow_stop">True</field>
|
||||
<field name="name">Done</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="action">set_state_done()</field>
|
||||
<field name="method">wkf_done</field>
|
||||
</record>
|
||||
<record model="workflow.activity" id="shipment_in_return_act_waiting">
|
||||
<field name="name">Waiting</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="workflow" ref="wkf_shipment_in_return"/>
|
||||
<field name="action">set_state_waiting()</field>
|
||||
<field name="method">wkf_waiting</field>
|
||||
</record>
|
||||
<record model="workflow.activity" id="shipment_in_return_act_assigned">
|
||||
<field name="name">Assigned</field>
|
||||
<field name="kind">function</field>
|
||||
<field name="workflow" ref="wkf_shipment_in_return"/>
|
||||
<field name="action">set_state_assigned()</field>
|
||||
<field name="method">wkf_assigned</field>
|
||||
</record>
|
||||
|
||||
<record model="workflow.transition"
|
||||
@@ -1256,7 +1232,7 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="act_to" ref="shipment_in_return_act_assigned"/>
|
||||
<field name="group" ref="group_stock"/>
|
||||
<field name="signal">assign</field>
|
||||
<field name="condition">assign_try()</field>
|
||||
<field name="condition">wkf_assign_try</field>
|
||||
</record>
|
||||
<record model="workflow.transition"
|
||||
id="shipment_in_return_trans_assigned_waiting">
|
||||
@@ -1271,7 +1247,7 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="act_to" ref="shipment_in_return_act_assigned"/>
|
||||
<field name="group" ref="group_stock_force_assignment"/>
|
||||
<field name="signal">force_assign</field>
|
||||
<field name="condition">assign_force()</field>
|
||||
<field name="condition">wkf_assign_force</field>
|
||||
</record>
|
||||
<record model="workflow.transition" id="shipment_in_return_trans_assigned_done">
|
||||
<field name="act_from" ref="shipment_in_return_act_assigned"/>
|
||||
|
||||
Reference in new issue
Block a user