Odoo Help


Is it possible include a record as a field in another record?

Stefan Reisich
on 4/23/13, 4:13 PM 1,144 views


like you can see I have a record with id osc_product_category_form. Now I want include this record(form) in the record with the id asdfasdf.

Is it possible to make something like this:

<record id="osc_product_category_form" model="ir.ui.view">
    <field name="name">osc.product.category.form</field>
    <field name="model">osc.product.category</field>
    <field name="arch" type="xml">

        <form string="OsCommerce Product Categories" version="7.0">
                <page string="osCommerce">
                            <field name="osc_category_id"/>
                            <field name="osc_categories_image" widget="image"/>
                            <field name="osc_categories_name"/>


<record id="asdfasdf" model="ir.ui.view">
    <field name="name">asdf.product.category.form</field>
    <field name="model">product.category</field>
    <field name="inherit_id" ref="product.product_category_form_view"/> <-- inherit and add the record from above
    <field name="arch" type="xml">

        <xpath expr="//form/sheet" position="inside">
            <field name="osc_product_category_form"/> <-- the record above


Thank you very much.

If you dealing with form inheritance and facing problem then. if have to correct xpath and position , position have different options like, inside, after, before, replace.

expr=notebook/page/group/group/field[name='fieldname'] to set correct path.

Your question title and problem description more clear, so please update your question with proper title with well description.

on 4/23/13, 5:33 PM

i have updated my question. the xpath expr is ok. if i include other fields from product.category they are shown. but i want include the fields from the record with id osc_product_category_form

Rove.design GmbH, Stefan Reisich
on 4/24/13, 5:56 AM

Omal Bastin

--Omal Bastin--

| 6 6 8
Kochi, Kerala, India
--Omal Bastin--

Swiming deep into openERP/ODOO

Omal Bastin
On 4/24/13, 7:41 AM

Its not possible to add a record inside another record. I think you are trying to show a kanban view same as the contacts tab in partner form view.

If your are using openerp server v7, then go to addons/base/res/res_partner_view.xml. check the record "view_partner_form"

no, i don't want a kanban view. i need a form view with fields to be filled out. :-(

Rove.design GmbH, Stefan Reisich
on 4/24/13, 9:09 AM

maybe there is another approach to realise something like this?

Rove.design GmbH, Stefan Reisich
on 4/24/13, 9:10 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 4/23/13, 4:13 PM
Seen: 1144 times
Last updated: 3/16/15, 8:10 AM