I have the users that share the same view, what he does is clone the view, the ids and the groups to which he belongs. I would like to create the menu items correctly, but at the time of the fields. I attach part of my xml view, I know that the tree view is missing. Someone could help me?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Akuntansi
- Inventaris
- PoS
- Project
- MRP
Pertanyaan ini telah diberikan tanda
1
Balas
6019
Tampilan
<!-- VIEW 1 -->
<record model="ir.ui.view" id="centromedico.historialclinico_form">
<field name="name">centromedico.historialclinico.form</field>
<field name="model">centromedico.historialclinico</field>
<field name="arch" type="xml">
<form>
<group col="2" colspan="2">
<field name="phistorial" style='width: 500px;'>
<tree>
<field name="name"/>
</tree>
</field>
</group>
<group col="2" colspan="2">
<field name="diagnostico" style='max-width: 1150px; width: 500px;'/>
<field name="tratamiento" style='max-width: 1150px; width: 500px;'/>
<field name="evolucion" style='max-width: 1150px; width: 500px;'/>
</group>
</form>
</field>
</record>
<record model="ir.actions.act_window" id="centromedico.historialclinico_action_window">
<field name="name">centromedico.historialclinico_window</field>
<field name="res_model">centromedico.historialclinico</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem name="Historial clínico" id="centromedico.historialclinico_menu" parent="" action="centromedico.historialclinico_action_window"
groups="centromedico.grupo_doctores"/>
<!-- VIEW 2-->
<record model="ir.ui.view" id="centromedico.historialclinico2_form">
<field name="name">centromedico.historialclinico2.form</field>
<field name="model">centromedico.historialclinico</field>
<field name="arch" type="xml">
<form>
<group col="2" colspan="2">
<field name="phistorial" style='width: 500px;'>
<tree>
<field name="name"/>
</tree>
</field>
</group>
<group col="2" colspan="2">
<field name="diagnostico" style='max-width: 1150px; width: 500px;' readonly="1"/>
<field name="tratamiento" style='max-width: 1150px; width: 500px;' readonly="1"/>
<field name="evolucion" style='max-width: 1150px; width: 500px;'/>
</group>
</form>
</field>
</record>
<record model="ir.actions.act_window" id="centromedico.historialclinico2_action_window">
<field name="name">centromedico.historialclinico2_window</field>
<field name="res_model">centromedico.historialclinico</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem name="Historial clí" id="centromedico.historialclinico2_menu" parent="" action="centromedico.historialclinico2_action_window"
groups="centromedico.grupo_enfermeros"/>
Hi,
If you are looking how to assign the views to each menu, what you have to do is that you have to pass the view_ids in the menu action.
In your menu action,
<field name="view_ids" eval="[(5, 0, 0),
(0, 0, {'view_mode': 'tree', 'view_id': ref('xml.id.of.tree.view')}),
(0, 0, {'view_mode': 'form', 'view_id': ref('ntromedico.historialclinico2_form')})/>
Thanks
Menikmati diskusi? Jangan hanya membaca, ikuti!
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
|
0
Mei 22
|
3016 | ||
How to uninstall a module from command line odoo 11
Diselesaikan
|
|
4
Jul 24
|
22244 | |
Odoo 11 Hide EDIT & DELETE
Diselesaikan
|
|
1
Mar 21
|
3085 | |
|
0
Jan 21
|
1765 | ||
Odoo Date Total In Version 11
Diselesaikan
|
|
3
Mar 19
|
3143 |