Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
4530 มุมมอง

Hello,

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">
            <notebook>
                <page string="osCommerce">
                    <group>
                        <group>
                            <field name="osc_category_id"/>
                            <field name="osc_categories_image" widget="image"/>
                            <field name="osc_categories_name"/>
                            ...
                        </group>
                    </group>
                </page>
            </notebook>
        </form>

    </field>
</record>

<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
        </xpath>

    </field>
</record>

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.

ผู้เขียน

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

คำตอบที่ดีที่สุด

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. :-(

ผู้เขียน

maybe there is another approach to realise something like this?

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
พ.ย. 24
1727
6
เม.ย. 22
43016
1
ก.ย. 21
9533
1
ม.ค. 24
17106
1
พ.ค. 19
5113