diff options
| author | Denis Ledoux <dle@odoo.com> | 2017-02-16 11:08:48 +0100 |
|---|---|---|
| committer | Denis Ledoux <dle@odoo.com> | 2017-02-16 11:20:20 +0100 |
| commit | 5de7500a414557b0d1fb7a6591fe7ceaad8a9484 (patch) | |
| tree | 47d7d6828faa3868d965c8957e447bacb03d5ec2 /addons/web/static/src | |
| parent | 78be4cd1de8c1cfe52e362e1635a028141b03f60 (diff) | |
[FIX] sale: stuck workflow in invoice before delivery
With a sale order with:
- a stockable product
- the `Create Invoice` policy set to `Before Delivery`
After the quotation validation and the invoice validation,
if the user:
- cancelled the invoice,
- then validated it again,
- then hit `ignore exception` on the sale order
- then registered the payment on the invoice
The picking of the sale order was not created automatically,
and the sale order was therefore stuck.
Actually, it was just a write trigger that was missing:
The condition for the sale order workflow to go to the next state
is that the `invoiced` boolean is set to True.
It was, when the invoice of the sale order was paid
(after having registered the payment), but since
this is a computed field, not stored, no write operation
was actually performed on the sale order, and the workflow
wasn't "notified" that a change occured for the `invoiced` boolean.
A simple write on the sale order (e.g. in its notes) would
have unblock the situation, though.
This trigger ensures the worfklow to be notified when
the invoice of the sale order is paid, and therefore
when the `invoiced` boolean is set to `True`.
opw-706591
Diffstat (limited to 'addons/web/static/src')
0 files changed, 0 insertions, 0 deletions
