How to create view inside view using same columns field object

Asked by shanky

Hello,

Can we create view in this way

<form>
    <field name="xyz" />
    <field name="abc" />
    <field name="pqr" />
    <field name="lmn" nolabel="1">
        <tree>
            <field name="abc" />
            <field name="pqr" />
        </tree>
        <form string="Temp1">
            <field name="xyz" />
            <field name="abc" />
            <field name="pqr" />
            <field name="lmn"/>
        </form>
    </field>
</form>

I get error message is "Either you wrongly customised this view, or some modules bringing those views are not compatible with your current data model"

First of all , is this possible?

However I refer our default basic module(base,project,stock,base_contact,hr, account) *_view.xml file , I don't get any reference

Any one help me?
Shankar

Question information

Language:
English Edit question
Status:
Solved
For:
Odoo Addons (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Solved by:
Vinay Rana (OpenERP)
Solved:
Last query:
Last reply:
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) said :
#1

Hello Shankar,

Regarding your aim, you can only write inner tree/form graph view for one2many fields.
if 'lmn' is a one2many field, it is quite possible.

If there is any field which is Many2One and you want any specific view to be opened, you should use like this:
<field name="xyz" context="{'form_view_ref' : 'XML_ID reference of the form view of xyz relation'}"/>

Hope this helps.

Thanks.

Revision history for this message
shanky (shankar-shinde-deactivatedaccount) said :
#2

Jay ,

I will try it

Thanks

Revision history for this message
Best Vinay Rana (OpenERP) (vra-openerp) said :
#3

Hello Shankar,

Can you close this if your problem is solved?

Thanks.

Revision history for this message
shanky (shankar-shinde-deactivatedaccount) said :
#4

Thanks vra (openerp), that solved my question.