Skip to content
Snippets Groups Projects
Commit 8c48d4f2 authored by Walid HANNICHE (waha)'s avatar Walid HANNICHE (waha)
Browse files

[FIX] stock: replenishement save on reorder clicked


Steps to reproduce:
- In inventory/replenishement
- edit a line (eg: prefered route) then click on reorder
- the edits are discarded

Fix:
the line is saved only when it gets unselected or manually saved
it more intuitive to also do it when a button is clicked on the line

opw-3125732

closes odoo/odoo#116065

Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
parent a5f961a3
Branches
Tags
No related merge requests found
......@@ -36,9 +36,9 @@ var StockOrderpointListController = ListController.extend({
_onButtonClicked: function (ev) {
if (ev.data.attrs.class.split(' ').includes('o_replenish_buttons')) {
ev.stopPropagation();
var self = this;
this._callButtonAction(ev.data.attrs, ev.data.record).then(function () {
self.reload();
this.trigger_up('save_line', {
recordID: ev.data.record.id,
onSuccess: () => this._callButtonAction(ev.data.attrs, ev.data.record).then(() => this.reload())
});
} else {
this._super.apply(this, arguments);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment