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.

0

I created a new field and tried to add it on a new page inside a notebook via view inheritance - it doesn't work - can you take a look at my XML?

By
Aren
on 4/14/16, 11:24 PM 510 views

When I attempt to add a field to the CRM module it is not showing on the page.


XML, as seen on odoo:

 


Result on the page:

 


view.xml

<openerp>
    <data>
        <record model="ir.ui.view">
            <field name="name">module_crm.module_crm</field>
            <field name="model">module_crm.module_crm</field>
            <field name="inherit_id" ref="base.view_partner_form"/>
            <field name="arch" type="xml">
                <xpath expr="//notebook/page[@string="Internal Notes"]" position="after">
                    <page string="Subsidiaries">
                        <field name="test123"/>
                    </page>
                </xpath>
            </field>
        </record>
    </data>
</openerp>

models.py

from openerp import models, fields, api
class module_crm(models.Model):
     _name = 'module_crm.module_crm'
     _inherit = 'res.partner'
     test123 = fields.Char("test123", invisible=False)
0

Odoo

--Odoo --
1328
| 5 2 5
kerala, India
--Odoo --

Working as a Odoo Functional and Technical Expert

Odoo
On 4/15/16, 12:48 AM

Hi,

I changed ur Xpath definition from ur code and try with updated code

0
Maurice Agée
On 4/15/16, 2:31 AM

Where do you want to insert "test123" in page "Subsidiaries" ? l think you must indicated this position. 

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: 4/14/16, 11:24 PM
Seen: 510 times
Last updated: 4/15/16, 2:31 AM