self.$element.removeClass('oe_form_dirty');
});
},
- on_form_changed: function(changed_by_user) {
- if (changed_by_user) {
- this.$element.addClass('oe_form_dirty');
- }
+ on_form_changed: function() {
for (var w in this.widgets) {
w = this.widgets[w];
w.process_modifiers();
w.update_dom();
}
},
+ do_notify_change: function() {
+ this.$element.addClass('oe_form_dirty');
+ },
on_pager_action: function(action) {
if (this.can_be_discarded()) {
switch (action) {
this.set_value_from_ui();
this.view.do_onchange(this);
this.view.on_form_changed(true);
+ this.view.do_notify_change();
} else {
this.update_dom(true);
}
this.$form_header.find('button.oe_form_button_create').click(function() {
self.do_save().then(self.on_button_new);
});
+ },
+ do_notify_change: function() {
+ if (this.dataset.parent_view) {
+ this.dataset.parent_view.do_notify_change();
+ } else {
+ this._super.apply(this, arguments);
+ }
}
});