Hi! I am using trytond 6.0.32 and i am facing as error while extending views.
basically i have created a module for “Human_Resource”. and created some lists, one of them is
“employee”. therefore gnuhealth tryton provided a company module where an “Employees” list exist.
i want to inherit an employee which i have created to existing “employees” in the company module.
check code and error below:
<label name="unit"/>
<field name="unit"/>
<label name="department"/>
<field name="department"/>
<label name="designation"/>
<field name="designation"/>
<label name="emp_type"/>
<field name="emp_type"/>
<record model="ir.action.act_window" id="act_employess_form_hr">
<field name="name">Employee</field>
<field name="res_model">company.employee</field>
</record>
<record model="ir.action.act_window.domain" id="act_employees_active">
<field name="name">Current Employees</field>
<field name="sequence" eval="10"/>
<field name="domain" eval="[('is_active', '=', True)]" pyson="1"/>
<field name="act_window" ref="act_employess_form_hr"/>
</record>
<record model="ir.action.act_window.domain" id="act_employees_old">
<field name="name">Old Employees</field>
<field name="sequence" eval="20"/>
<field name="domain" eval="[('is_active', '=', False)]" pyson="1"/>
<field name="act_window" ref="act_employess_form_hr"/>
</record>
<record model="ir.action.act_window.domain" id="act_employees_all">
<field name="name">All</field>
<field name="sequence" eval="20"/>
<field name="act_window" ref="act_employess_form_hr"/>
</record>
<menuitem parent="menu_proc_hr_parent" sequence="10"
action="act_employess_form_hr"
id="menu_employees_form_hr"/>
<!-- Add the fields to the already existing Company.Employee form-->
<record model="ir.ui.view" id="employee_view_form_extended">
<field name="model">company.employee</field>
<field name="inherit" ref="company.employee_view_form" />
<field name="type">form</field>
<field name="name">company_employee</field>
</record>
<!-- Add the fields to the already existing Company.Employee Tree-->
<record model="ir.ui.view" id="employee_view_tree_extended">
<field name="model">company.employee</field>
<field name="inherit" ref="company.employee_view_tree" />
<field name="type">tree</field>
<field name="name">company_employee_tree</field>
</record>
error:
Exception: Error In tag record model ir.ui.view with id health_proc.employee_view_form_extended.
company module:
company.employee
form
employee_form
<record model="ir.ui.view" id="employee_view_tree">
<field name="model">company.employee</field>
<field name="type">tree</field>
<field name="name">employee_tree</field>
</record>
<record model="ir.action.act_window" id="act_employee_form">
<field name="name">Employees</field>
<field name="res_model">company.employee</field>
</record>
<record model="ir.action.act_window.view" id="act_employee_form_view1">
<field name="sequence" eval="10"/>
<field name="view" ref="employee_view_tree"/>
<field name="act_window" ref="act_employee_form"/>
</record>
<record model="ir.action.act_window.view" id="act_employee_form_view2">
<field name="sequence" eval="20"/>
<field name="view" ref="employee_view_form"/>
<field name="act_window" ref="act_employee_form"/>
</record>
<menuitem parent="menu_company" action="act_employee_form"
sequence="20" id="menu_employee_form"/>
NOTE: I have checked and changed the Id where an error occurring.