[IMP] server_action_navigate

Co-authored-by: Holger Brunn <mail@hunki-enterprises.com>

[IMP] tests
This commit is contained in:
Sylvain LE GAL
2020-07-25 11:16:32 +02:00
committed by Quentin Tawry
parent bf8af4757c
commit de4e9ffd40
6 changed files with 68 additions and 27 deletions

View File

@@ -18,21 +18,19 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
<group>
<field name="max_navigate_line_sequence" invisible="1"/>
<field name="max_navigate_line_model" invisible="1"/>
<!-- we can check emptyness of a 2many like this since v10 i think /-->
<button name="delete_last_line" string="Delete Last Line" type="object"
attrs="{'invisible': [('max_navigate_line_sequence', '=', 1)]}"/>
<field name="navigate_line_ids" context="{'default_sequence': max_navigate_line_sequence}" nolabel="1" colspan="4">
attrs="{'invisible': [('navigate_line_ids', '=', [])]}"/>
<field name="navigate_line_ids" context="{'navigate_line_ids': navigate_line_ids}" nolabel="1" colspan="4">
<tree editable="bottom" delete="false">
<field name="sequence" invisible="1"/>
<field name="sequence2"/>
<field name="field_id" domain="[
('model', '=', parent.max_navigate_line_model),
('ttype', 'in', ['many2one', 'one2many', 'many2many']),
]"/>
<!-- the handle widget takes care of the sequence /-->
<field name="sequence" widget="handle" invisible="True" />
<field name="field_id" />
<field name="field_model"/>
</tree>
</field>
<field name="navigate_action_id"
attrs="{'invisible': [('max_navigate_line_sequence', '=', 1)]}"/>
attrs="{'invisible': [('navigate_line_ids', '=', [])]}"/>
</group>
</page>
</xpath>