I have 2 custom modules "notebook" and "bpc" in which notebook.notebook_form_view is referenced to bpc_form_view.
In notebook module, lets say we have 3 fields :
'title' : fields.char('Title', size=30, required=True),
'note' : fields.text('Note'),
'note_date' : fields.date('Date'),
In bpc module, I need to add 2 fields and the inherited fields.
'before' : fields.text('before'),
'after': fields.text('after'),
in my bpc_form_view:
<record model="ir.ui.view" id="bpc_form_view">
<field name="name">bpc.form</field>
<field name="model">bpc</field>
<field name="inherit_id" ref="notebook.notebook_form_view">form
</field>
<field name="arch" type="xml">
<field name="note" position="before">
<field name="before" />
</field>
<field name="note_date" position="after">
<field name="after" />
</field>
</field>
</record>
in my notebook_form_view:
<record model="ir.ui.view" id="notebook_form_view">
<field name="name">notebook.form</field>
<field name="model">notebook</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Notebook">
<field name="title"/>
<field name="note"/>
<field name="note_date"/>
</form>
</field>
</record>
**Output sequence regarding the notebook_form_view is:**
title
note
Date
**Output regarding the inherited view in bpc_form_view is in the sequence:**
Note
before
after
Date
Title
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
Hi
inherit notbook
in bpc
too in .py
then all the inherited field you can found
Thanks
Sandeep
@Sandeep, There is no error while compiling these 2 modules and also view is displayed....
I am asking why is re-arranging the fields of an inherited view not done...
what is actually the output
Hey dude, first read the question... I have given the fields displayed in sequence:
for bpc: Note before after Date Title
Please try with this code <field name="note" position="replace"/> <field name="note_date" position="replace"/> <field name="title" position="before"> <field name="Note"/> <field name="before"/> <field name="after"/> <field name="Date"/> </field>