Limit readonly state for xxx2Many
issue5041 review21051002
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
* Limit readonly state for xxx2Many
|
||||
* Simplify login with single database
|
||||
* Show records names in relate window title
|
||||
* Add support for count on Action Window Domains
|
||||
|
||||
@@ -2129,9 +2129,6 @@
|
||||
return this.get_domains(record, pre_validate)[0];
|
||||
},
|
||||
validate: function(record, softvalidation, pre_validate) {
|
||||
if (this.description.readonly) {
|
||||
return true;
|
||||
}
|
||||
var invalid = false;
|
||||
var inversion = new Sao.common.DomainInversion();
|
||||
var ldomain = inversion.localize_domain(inversion.domain_inversion(
|
||||
@@ -2166,8 +2163,6 @@
|
||||
set_state: function(record, states) {
|
||||
this._set_default_value(record);
|
||||
Sao.field.One2Many._super.set_state.call(this, record, states);
|
||||
record._values[this.name].readonly = this.get_state_attrs(record)
|
||||
.readonly;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -2211,7 +2211,6 @@
|
||||
view_ids: (attributes.view_ids || '').split(','),
|
||||
views_preload: attributes.views || {},
|
||||
row_activate: this.activate.bind(this),
|
||||
readonly: attributes.readonly || false,
|
||||
exclude_field: attributes.relation_field || null,
|
||||
pre_validate: attributes.pre_validate
|
||||
});
|
||||
@@ -2293,18 +2292,15 @@
|
||||
this.screen.set_current_record(null);
|
||||
}
|
||||
}
|
||||
var readonly = false;
|
||||
var domain = [];
|
||||
var size_limit = null;
|
||||
if (record) {
|
||||
readonly = field.get_state_attrs(record).readonly;
|
||||
domain = field.get_domain(record);
|
||||
size_limit = record.expr_eval(this.attributes.size);
|
||||
}
|
||||
if (!Sao.common.compare(this.screen.domain, domain)) {
|
||||
this.screen.domain = domain;
|
||||
}
|
||||
this.screen.group.set_readonly(readonly);
|
||||
this.screen.size_limit = size_limit;
|
||||
this.screen.display();
|
||||
}.bind(this));
|
||||
@@ -2731,7 +2727,6 @@
|
||||
'view_ids': (this.attributes.view_ids || '').split(','),
|
||||
'mode': ['form'],
|
||||
'views_preload': this.attributes.views,
|
||||
'readonly': this.attributes.readonly || false,
|
||||
'context': context
|
||||
});
|
||||
screen.new_group([this.screen.current_record.id]);
|
||||
|
||||
Reference in New Issue
Block a user