-
Notifications
You must be signed in to change notification settings - Fork 23.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The `stock.picking`.`state` field is set to track the change of values (`track_visibility='onchange'`) It's supposed to write the state changes within the picking thread. It does not work properly for function fields, as the onchange tracking is designed to work only with direct user changes, direct `write` operations on the record, while, here, the state value changes according to the picking moves changes, for instance. To solve this, the tracking changes have to be hooked within the `create` & `write` methods of the model on which this function depends on. Therefore, from now, when changes are performed in the moves, on the fields that could lead to the picking state change, we force the tracking of the picking state. In addition, we had the `mail_notrack` key in the context when creating back orders, to avoid displaying the back and forths in the state e.g. when transferring 9 units on 10, the changes were displayed as below: Draft -> Waiting availability Waiting Availability -> Ready to Transfer Ready to Transfer -> Draft Draft -> Partially available Partially Available -> Waiting availability Waiting Availability -> Transferred opw-666317
- Loading branch information
1 parent
c0571d4
commit d349584
Showing
1 changed file
with
32 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters