Odoo Help

Welcome!

This community 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.

3

inherited view arrangement not working

By
Atchuthan
on 6/5/13, 5:08 AM 1,944 views
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
3

Sandeep

--Sandeep--
6083
| 6 5 8
Delhi, India
--Sandeep--
Python OpenERP Developer http://in.linkedin.com/pub/sandeep-rana/3b/a16/786/
Sandeep
On 6/11/13, 3:30 AM

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

Atchuthan
on 6/11/13, 3:41 AM

what is actually the output

Sandeep
on 6/11/13, 3:50 AM

Hey dude, first read the question... I have given the fields displayed in sequence:

for bpc: Note before after Date Title

Atchuthan
on 6/11/13, 3:54 AM
0
DNTQ
On 6/11/13, 5:22 AM

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>

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 6/5/13, 5:08 AM
Seen: 1944 times
Last updated: 3/16/15, 8:10 AM