diff --git a/CHANGELOG b/CHANGELOG index 78a996dc8b..5ca32cba4c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 diff --git a/src/model.js b/src/model.js index dff0aa8079..bb92dd5ebe 100644 --- a/src/model.js +++ b/src/model.js @@ -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; } }); diff --git a/src/view/form.js b/src/view/form.js index 32b5b1458b..d6c71162c3 100644 --- a/src/view/form.js +++ b/src/view/form.js @@ -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]);