Add simple list view for company and employee

The views have only the record name field so they can be used in Many2Many to
not display extra information.
This commit is contained in:
Cédric Krier
2024-09-25 12:33:56 +02:00
parent e06b0dce8e
commit 37c44ffbde
4 changed files with 29 additions and 2 deletions
+15
View File
@@ -51,6 +51,13 @@ this repository contains the full copyright notices and license terms. -->
<field name="name">company_list</field>
</record>
<record model="ir.ui.view" id="company_view_list_simple">
<field name="model">company.company</field>
<field name="type">tree</field>
<field name="priority" eval="20"/>
<field name="name">company_list_simple</field>
</record>
<record model="ir.action.act_window" id="act_company_list">
<field name="name">Companies</field>
<field name="res_model">company.company</field>
@@ -128,9 +135,17 @@ this repository contains the full copyright notices and license terms. -->
<record model="ir.ui.view" id="employee_view_tree">
<field name="model">company.employee</field>
<field name="type">tree</field>
<field name="priority" eval="10"/>
<field name="name">employee_tree</field>
</record>
<record model="ir.ui.view" id="employee_view_list_simple">
<field name="model">company.employee</field>
<field name="type">tree</field>
<field name="priority" eval="20"/>
<field name="name">employee_list_simple</field>
</record>
<record model="ir.action.act_window" id="act_employee_form">
<field name="name">Employees</field>
<field name="res_model">company.employee</field>
@@ -0,0 +1,6 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tree>
<field name="rec_name" expand="1" string="Company"/>
</tree>
@@ -0,0 +1,6 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tree>
<field name="rec_name" expand="1" string="Employee"/>
</tree>
+2 -2
View File
@@ -3,8 +3,8 @@
this repository contains the full copyright notices and license terms. -->
<data>
<xpath expr="/form/notebook/page/separator[@name='signature']" position="before">
<field name="companies" colspan="2"/>
<field name="employees" colspan="2"/>
<field name="companies" colspan="2" view_ids="company.company_view_list_simple"/>
<field name="employees" colspan="2" view_ids="company.employee_view_list_simple"/>
<label name="company"/>
<field name="company" widget="selection"/>