[FIX] purchase: add transition invoice_end to cancel in the workflow

If the state of the PO is 'approved', there is no transition foreseen in
order to cancel the PO.

The user might be blocked in the following situation:
- Create a purchase order with invoicing set as Based on incoming shipment
- Validate the purchase order, create the shipment
- Then, cancel it (the shipment)
- Return back in the purchase order, the PO should be in shipping exception
- Hit the "manually corrected"
- Then, try to cancel the PO: nothing happens.

opw-641014
This commit is contained in:
Nicolas Martinelli 2015-06-01 18:03:21 +02:00
parent a3e4a1f39f
commit 4a281754db
1 changed files with 6 additions and 0 deletions

View File

@ -220,6 +220,12 @@
<field name="act_to" ref="act_done"/>
<field name="condition">invoiced</field>
</record>
<record id="trans_invoice_end_cancel" model="workflow.transition">
<field name="act_from" ref="act_invoice_end"/>
<field name="act_to" ref="act_cancel"/>
<field name="signal">purchase_cancel</field>
<field name="condition">invoice_method&lt;&gt;'order'</field>
</record>
</data>
</openerp>