[FIX] web: required attribute on one2many field
Require One2many field without any line must show an error like many2many fields. issue 11782
This commit is contained in:
parent
41ec7eec56
commit
a9fac2ea2d
|
@ -4337,6 +4337,9 @@ instance.web.form.FieldOne2Many = instance.web.form.AbstractField.extend({
|
||||||
commit_value: function() {
|
commit_value: function() {
|
||||||
return this.save_any_view();
|
return this.save_any_view();
|
||||||
},
|
},
|
||||||
|
is_false: function () {
|
||||||
|
return _(this.dataset.ids).isEmpty();
|
||||||
|
},
|
||||||
save_any_view: function() {
|
save_any_view: function() {
|
||||||
var view = this.get_active_view();
|
var view = this.get_active_view();
|
||||||
if (view) {
|
if (view) {
|
||||||
|
|
Loading…
Reference in New Issue