Add children field Many2One on ir.ui.view
This commit is contained in:
@@ -27,6 +27,16 @@ class View(
|
||||
fields.fmany2one(
|
||||
'model_ref', 'model', 'ir.model,model', "Model",
|
||||
ondelete='CASCADE'),
|
||||
fields.fmany2one(
|
||||
'field_children', 'field_childs,model',
|
||||
'ir.model.field,name,model',
|
||||
"Children Field",
|
||||
domain=[
|
||||
('model', '=', Eval('model')),
|
||||
],
|
||||
states={
|
||||
'invisible': Eval('type') != 'tree',
|
||||
}),
|
||||
ModelSQL, ModelView):
|
||||
"View"
|
||||
__name__ = 'ir.ui.view'
|
||||
|
||||
@@ -12,8 +12,8 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="domain" widget="pyson"/>
|
||||
<label name="priority"/>
|
||||
<field name="priority"/>
|
||||
<label name="field_childs"/>
|
||||
<field name="field_childs"/>
|
||||
<label name="field_children"/>
|
||||
<field name="field_children"/>
|
||||
<label name="module"/>
|
||||
<field name="module"/>
|
||||
<label name="name"/>
|
||||
|
||||
@@ -7,5 +7,5 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="type"/>
|
||||
<field name="inherit" expand="1" optional="0"/>
|
||||
<field name="domain" expand="1" optional="1"/>
|
||||
<field name="field_childs" optional="1"/>
|
||||
<field name="field_children" optional="1"/>
|
||||
</tree>
|
||||
|
||||
Reference in New Issue
Block a user