I have created a simple module. This is the view:
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_test_1" model="ir.ui.view">
<field name="name">Test 1</field>
<field name="model">test.tbl_1</field>
<field name="arch" type="xml">
<form string="Test 1">
<sheet>
<group name="top">
<group name="left">
<field name="code_1"/>
</group>
<group name="left">
<field name="description_1"/>
</group>
</group>
</sheet>
</form>
</field>
</record>
<record id="view_test_2" model="ir.ui.view">
<field name="name">Test 2</field>
<field name="model">test.tbl_2</field>
<field name="arch" type="xml">
<form string="Test 2">
<sheet>
<group name="top">
<group name="left">
<field name="code_2"/>
</group>
<group name="left">
<field name="description_2"/>
</group>
</group>
</sheet>
</form>
</field>
</record>
<!-- Action to open To-do Task list -->
<act_window id="action_test_1" name="Attivita" res_model="test.table_1" view_mode="tree,form" />
<act_window id="action_test_2" name="Servizio" res_model="test.table_2" view_mode="tree,form" />
<!-- Menu item to open To-do Task list -->
<menuitem id="menu_test_1" name="Menu test 1" parent="mail.mail_feeds" sequence="20" action="action_test_1" />
<menuitem id="menu_test_2" name="Menu test 2" parent="mail.mail_feeds" sequence="30" action="action_test_2" />
</data>
</openerp>
and this is my model:
# -*- encoding: utf-8 -*-
from openerp import models, fields
class test_1(models.Model):
_name = 'test.table_1'
_description = 'Table 1'
code_1 = fields.Char('Code', size=1, help="Insert your code", required=True)
description_1 = fields.Text('Description', help="Insert a description", required=True)
class test_2(models.Model):
_name = 'test.table_2'
_description = 'Table 2'
code_2 = fields.Char('Code', size=1, help="Insert your code", required=True)
description_2 = fields.Text('Description', help="Insert a description", required=True)
So, I have two links in the "messaging" menu, one for each action.
Instead, I need only one link to a view with two forms. I would like to chose which one to fill (only one or both).
Anyone coul help me? Thanks in advance!
In your view, there are tags mismatch (group and sheet).