[FIX] base: ir field - set dependence as required when creating a compute field

Before this commit:
- When you create a compute field, from the model view, dependence field
was not required when creating a compute field.
- When removing the compute code, the dependence field stays marked as
required.

fine-tuning : f01c195288

opw-2003784

closes odoo/odoo#33760

Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
This commit is contained in:
Jorge Pinna Puissant
2019-06-03 06:10:23 +00:00
parent 72a0963d2d
commit 37ab5a7009
+2 -2
View File
@@ -109,7 +109,7 @@
</group>
<group string="Advanced Properties" groups="base.group_no_one">
<field name="related"/>
<field name="depends"/>
<field name="depends" attrs="{'required': [('compute', 'not in', [False, ''])]}"/>
<field name="compute" widget="ace" options="{'mode': 'python'}"/>
</group>
<div groups="base.group_no_one">
@@ -279,7 +279,7 @@
</group>
<group string="Advanced Properties" groups="base.group_no_one">
<field name="related"/>
<field name="depends" attrs="{'required': [('compute', '!=', False)] }"/>
<field name="depends" attrs="{'required': [('compute', 'not in', [False, ''])]}"/>
<field name="compute" widget="ace" options="{'mode': 'python'}"/>
</group>
<div groups="base.group_no_one">