Odoo Help


Adding Custom field , it's not visible while there is no errors

on 11/15/14, 8:42 AM 2,042 views


Am trying to create a module that add some fields to product module .

i did the structure very well which i create "__init__.py , __openerp__.py , product_rolls_code.py , product_rolls_code_view.xml " .

the problem is i can't see my field .

Check out my code bellow

__ init__.py

import product_rolls_code

__ openerp__.py

'name': "Product Rolls",
'version': "1.0",
'category': "others",
'complexity': "normal",
'author': "Moayad Rayyan",
'depends': [
    "product" #name of module which is needed to be installed
'init_xml': [
    #place here the XML with initial data
'update_xml': [
'data': ['product_rolls_code_view.xml'],
'demo_xml': [],
'test': [],
'installable': True,
'auto_install': False,
'application': False,
'images': [],
'js': [], }


from openerp.osv import fields, osv

class product_rolls_code(osv.osv):

_inherit = "product.product"

_columns = {
    'product_rolls': fields.char('Product Rolls', size=11),


<?xml version="1.0" encoding="utf-8"?>
    <record id="product_rolls_product" model="ir.ui.view">
        <field name="name">product.product.form</field>
        <field name="model">product.product</field>
        <field name="inherit_id" ref="product.product_template_only_form_view"/>
        <field name="arch" type="xml">
         <field name="ean13" position="after">
           <field name="product_rolls" />   


if i inhirit product.template , i will get error : field 'product_rolls' does not exist . by the way the field is created but its hidden ,because once i open manage views , i can see my field created under 'ean13'

on 11/15/14, 9:19 AM

@moayad I am asking to inherit only the view.. Inherit the view - "product_normal_form_view".. instead of 'product_template_only_form_view'

Emipro Technologies Pvt. Ltd.
on 11/15/14, 9:22 AM

i tried , there is no erros but still the field is hidden :(

on 11/15/14, 9:27 AM

@moayad just for testing try another field say "default_code" instead of ean13, because ean13 is there in the template view as well as product view, so may be causing the problem

Emipro Technologies Pvt. Ltd.
on 11/15/14, 9:40 AM

i tried but still :( , many thanks to you

on 11/15/14, 9:51 AM

@moayad I will try and let you know

Emipro Technologies Pvt. Ltd.
on 11/15/14, 9:59 AM

Anas Taji

--Anas Taji--
| 6 7 8
Amman, Jordan
--Anas Taji--

Skype: anas.taji-sw

Email: anas.taji@smartway-jo.com

Anas Taji
On 11/15/14, 11:55 AM

Slam Alykom ;)

As Emipro Technologies pointed, you have to change the view id, try this:

<record id="product_rolls_product" model="ir.ui.view">
    <field name="name">product.product.rolls.form</field>
    <field name="model">product.product</field>
    <field name="inherit_id" ref="product.product_normal_form_view"/>
    <field name="arch" type="xml">
            <xpath expr="//field[@name='list_price']" position="after">
                <field name="product_rolls" />

Also why would you mention "product_rolls_code_view.xml" twice in your manifest file? including it in 'update_xml' is enough.

Good Luck.

Wa Alekom Salam ^^ Element '<xpath expr="//field[@name='list_price']">' cannot be located in parent view why you just used : product.product.rolls.form once we are using the product.form it self

on 11/15/14, 1:18 PM

Emipro Technologies Pvt. Ltd.

--Emipro Technologies Pvt. Ltd.--
| 6 7 8
Rajkot, India
--Emipro Technologies Pvt. Ltd.--

Being an emerging leader in IT market since 2011, Emipro Technologies Pvt. Ltd. has been providing a wide range of business solutions in Odoo & Magento. We are pleased to have a large pool of contented customers with our meticulous work in the domain of ERP & e-Commerce. A ray of relief & satisfaction to  our customers heart by our successful deployment in their organization, purely represents our success in Odoo platform. Hence, we take pride for being an Odoo partner with a vision of expanding our strategic alliances with our customers to offer them high value-added, trustworthy & cost effective solutions.


Since establishment, our business has span across 11 countries of the world. Our customers are companies of all sizes ranging from start-ups to large enterprises, who realize that they need a professional business solutions to generate revenue streams, establish proper communication channels or streamline business operations. Standing with strong determination of customer satisfaction, observing each minute detail of their business processes, providing proper guidance and moving forth to develop product accordingly adds our value and reliability among our customers. 


We are blessed with efficient, passionate & eclectic young developers who have come across almost all kinds of business profiles, working with full dedication, applying creativity & new features in existing modules and completing customer's projects successfully on predefined target. Our in-depth knowledge while giving business solutions in Odoo allows us to offer following services to our customers :


  • Consulting
  • Installation, Configuration & Customization
  • Training & Support
  • Maintenance
  • Upgradation
  • Documentation
  • Crafting community modules
  • Drafting videos on demand
  • Smart Apps development

We will be :) to welcome you @ www.emiprotechnologies.com to solve any kind of your business needs around Odoo. However we are just an inch away from you by email info@emiprotechnologies.com or a tweet to @EmiproTech

Emipro Technologies Pvt. Ltd.
On 11/15/14, 8:51 AM

Hello Moayad,

Check the model name in the view, it is written as 'product.ptoduct'

<field name="model">product.ptoduct</field>


I think change your model to product.template instead of product.product, because ean13 is actually field set in the 'product.template' module and the view that you have inherited is of model 'product.template'

If you want to set your field try to inherit "product_normal_form_view" .

Thank you , but its not the problem ^^ it's copied by mistake

on 11/15/14, 9:02 AM

@moayad Try to inherit the "product_normal_form_view" because the view you inherited is of model 'product.template' and you have specified 'product.product'

Emipro Technologies Pvt. Ltd.
on 11/15/14, 9:16 AM

Error : ParseError: "External ID not found in the system: product.product_only_form_view" while parsing

on 11/15/14, 9:23 AM

@moayad the view id is 'product_normal_form_view' not 'product_only_form_view'

Emipro Technologies Pvt. Ltd.
on 11/15/14, 9:39 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

2 follower(s)


Asked: 11/15/14, 8:42 AM
Seen: 2042 times
Last updated: 3/16/15, 8:10 AM