diff options
| author | Denis Ledoux <dle@odoo.com> | 2016-01-20 12:29:50 +0100 |
|---|---|---|
| committer | Denis Ledoux <dle@odoo.com> | 2016-01-20 15:10:00 +0100 |
| commit | d349584f9d281ea955f4a46235747c9b9866daa6 (patch) | |
| tree | 0bd59136cc554017087cb30de784536656d2aba5 /addons/web/static/src/js/framework/session_instance.js | |
| parent | c0571d40669cbc8402f0f3d556dad1a9abc05375 (diff) | |
[FIX] stock: state change tracking
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
Diffstat (limited to 'addons/web/static/src/js/framework/session_instance.js')
0 files changed, 0 insertions, 0 deletions
