A confirmed order is a contract between the company and a party. This is why it can not be changed by default.
But in some cases, both parties can agree on amending the “contract” to change some part. In this case a new revision of the order should be created and used for further actions.
purchase_amendment will have quite the same design.
The orders must be “historized”.
A new document is created to define an Amendment:
action: list of actions
- extra fields needed for actions
When the amendment is validated, it update the order and increase the revision number. Some checks must be performed when applying which will prevent the validation. The order must be processed after the change to correctly create new lines, all draft lines (and/or) document should be deleted before.
The possible actions:
- Recompute taxes: change the taxes lines according to the party tax rules and product taxes.
- Update header field:
- payment term
- parties and addresses
- Update line field:
- product: with the same unit category (like for the shipment)
- quantity: must be at greater than already shipped or invoiced quantity.
- unit price: defined manually
Amendment creation will be accessible to user who can create the order.
The validation of amendment will be restricted to a specific group.