mirror of
https://github.com/NaN-tic/trytond-patches.git
synced 2023-12-14 06:03:03 +01:00
parent
e5234e8167
commit
77dbc03dbb
87
issue12072.diff
Normal file
87
issue12072.diff
Normal file
|
@ -0,0 +1,87 @@
|
|||
diff --git a/tryton/sao/src/view/form.js b/tryton/sao/src/view/form.js
|
||||
index b615fb7237..b7d72a155b 100644
|
||||
--- a/tryton/sao/src/view/form.js
|
||||
+++ b/tryton/sao/src/view/form.js
|
||||
@@ -1274,9 +1274,7 @@ function eval_pyson(value){
|
||||
window.setTimeout(() => {
|
||||
var value = this.get_value();
|
||||
window.setTimeout(() => {
|
||||
- if (this.record &&
|
||||
- (this.get_value() == value) &&
|
||||
- this.modified) {
|
||||
+ if (this.record && (this.get_value() == value)) {
|
||||
this.view.screen.record_modified(false);
|
||||
}
|
||||
}, 300);
|
||||
@@ -3213,7 +3211,6 @@ function eval_pyson(value){
|
||||
row_activate: this.activate.bind(this),
|
||||
exclude_field: attributes.relation_field || null,
|
||||
limit: null,
|
||||
- context: this.view.screen.context,
|
||||
pre_validate: attributes.pre_validate,
|
||||
breadcrumb: breadcrumb,
|
||||
});
|
||||
@@ -3787,7 +3784,6 @@ function eval_pyson(value){
|
||||
row_activate: this.activate.bind(this),
|
||||
readonly: true,
|
||||
limit: null,
|
||||
- context: this.view.screen.context,
|
||||
breadcrumb: breadcrumb,
|
||||
});
|
||||
this.screen.windows.push(this);
|
||||
@@ -3952,16 +3948,12 @@ function eval_pyson(value){
|
||||
// Remove the first tree view as mode is form only
|
||||
view_ids.shift();
|
||||
}
|
||||
- var model = this.attributes.relation;
|
||||
- var breadcrumb = jQuery.extend([], this.view.screen.breadcrumb);
|
||||
- breadcrumb.push(this.attributes.string || Sao.common.MODELNAME.get(model));
|
||||
- return new Sao.Screen(model, {
|
||||
+ return new Sao.Screen(this.attributes.relation, {
|
||||
'domain': domain,
|
||||
'view_ids': view_ids,
|
||||
'mode': ['form'],
|
||||
'views_preload': this.attributes.views,
|
||||
- 'context': context,
|
||||
- 'breadcrumb': breadcrumb,
|
||||
+ 'context': context
|
||||
});
|
||||
},
|
||||
edit: function() {
|
||||
|
||||
diff --git a/tryton/sao/src/model.js b/tryton/sao/src/model.js
|
||||
index 5d91429c55..d8358fd299 100644
|
||||
--- a/tryton/sao/src/model.js
|
||||
+++ b/tryton/sao/src/model.js
|
||||
@@ -1523,13 +1523,13 @@
|
||||
var previous_value = this.get(record);
|
||||
this.set(record, value);
|
||||
if (this._has_changed(previous_value, this.get(record))) {
|
||||
- record.set_modified(this.name);
|
||||
this.changed(record);
|
||||
record.validate(null, true, false, true);
|
||||
+ record.set_modified(this.name);
|
||||
} else if (force_change) {
|
||||
- this.set_modified();
|
||||
this.changed(record);
|
||||
record.validate(null, true, false, true);
|
||||
+ this.set_modified();
|
||||
}
|
||||
},
|
||||
get_client: function(record) {
|
||||
@@ -2251,13 +2251,13 @@
|
||||
previous_ids.sort(), value.sort());
|
||||
this._set_value(record, value, false, modified);
|
||||
if (modified) {
|
||||
- record.set_modified(this.name);
|
||||
this.changed(record);
|
||||
record.validate(null, true, false, true);
|
||||
+ record.set_modified(this.name);
|
||||
} else if (force_change) {
|
||||
- record.set_modified();
|
||||
this.changed(record);
|
||||
record.validate(null, true, false, true);
|
||||
+ record.set_modified();
|
||||
}
|
||||
},
|
||||
get_client: function(record) {
|
Loading…
Reference in a new issue