Skip to Content
Odoo Menu
  • Prisijungti
  • Išbandykite nemokamai
  • Programėlės
    Finansai
    • Apskaita
    • Pateikimas apmokėjimui
    • Sąnaudos
    • Skaičiuoklė (BI)
    • Dokumentai
    • Pasirašymas
    Pardavimai
    • CRM
    • Pardavimai
    • Kasų sistema - Parduotuvė
    • Kasų sistema - Restoranas
    • Prenumeratos
    • Nuoma
    Svetainės
    • Svetainių kūrėjimo įrankis
    • El. Prekyba
    • Internetinis Tinklaraštis
    • Forumas
    • Tiesioginis pokalbis
    • eMokymasis
    Tiekimo grandinė
    • Atsarga
    • Gamyba
    • PLM
    • Įsigijimai
    • Priežiūra
    • Kokybė
    Žmogaus ištekliai
    • Darbuotojai
    • Įdarbinimas
    • Atostogos
    • Įvertinimai
    • Rekomendacijos
    • Transporto priemonės
    Rinkodara
    • Socialinė rinkodara
    • Rinkodara el. paštu
    • SMS rinkodara
    • Renginiai
    • Rinkodaros automatizavimas
    • Apklausos
    Paslaugos
    • Projektas
    • Darbo laiko žiniaraščiai
    • Priežiūros tarnyba
    • Pagalbos tarnyba
    • Planavimas
    • Rezervacijos
    Produktyvumas
    • Diskucija
    • Patvirtinimai
    • IoT
    • VoIP
    • Žinių biblioteka
    • WhatsApp
    Trečiųjų šalių programos Odoo Studija Odoo debesijos platforma
  • Pramonės šakos
    Mažmeninė prekyba
    • Knygynas
    • Drabužių parduotuvė
    • Baldų parduotuvė
    • Maisto prekių parduotuvė
    • Techninės įrangos parduotuvė
    • Žaislų parduotuvė
    Food & Hospitality
    • Barai ir pub'ai
    • Restoranas
    • Greitasis maistas
    • Guest House
    • Gėrimų platintojas
    • Hotel
    Nekilnojamasis turtas
    • Real Estate Agency
    • Architektūros įmonė
    • Konstrukcija
    • Estate Managament
    • Sodininkauti
    • Turto savininkų asociacija
    Konsultavimas
    • Accounting Firm
    • Odoo Partneris
    • Marketing Agency
    • Teisinė firma
    • Talentų paieška
    • Auditai & sertifikavimas
    Gamyba
    • Textile
    • Metal
    • Furnitures
    • Maistas
    • Brewery
    • Įmonių dovanos
    Sveikata & Fitnesas
    • Sporto klubas
    • Akinių parduotuvė
    • Fitneso Centras
    • Sveikatos praktikai
    • Vaistinė
    • Kirpėjas
    Trades
    • Handyman
    • IT įranga ir palaikymas
    • Saulės energijos sistemos
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Kiti
    • Nonprofit Organization
    • Aplinkos agentūra
    • Reklaminių stendų nuoma
    • Fotografavimas
    • Dviračių nuoma
    • Programinės įrangos perpardavėjas
    Browse all Industries
  • Bendrija
    Mokykitės
    • Mokomosios medžiagos
    • Dokumentacija
    • Sertifikatai
    • Mokymai
    • Internetinis Tinklaraštis
    • Tinklalaidės
    Skatinkite švietinimą
    • Švietimo programa
    • Scale Up! Verslo žaidimas
    • Aplankykite Odoo
    Gaukite programinę įrangą
    • Atsisiųsti
    • Palyginkite versijas
    • Leidimai
    Bendradarbiauti
    • Github
    • Forumas
    • Renginiai
    • Vertimai
    • Tapkite partneriu
    • Services for Partners
    • Registruokite jūsų apskaitos įmonę
    Gaukite paslaugas
    • Susiraskite partnerį
    • Susirask buhalterį
    • Susitikti su konsultantu
    • Diegimo paslaugos
    • Klientų rekomendavimas
    • Palaikymas
    • Atnaujinimai
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Gaukite demo
  • Kainodara
  • Pagalba

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Apskaita
  • Atsarga
  • PoS
  • Projektas
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
Pagalba

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

Prenumeruoti

Get notified when there's activity on this post

This question has been flagged
2 Replies
8974 Rodiniai
Portretas
MoayadRayyan

Greetings,

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': [
    "product_rolls_code_view.xml",
],
'data': ['product_rolls_code_view.xml'],
'demo_xml': [],
'test': [],
'installable': True,
'auto_install': False,
'application': False,
'images': [],
'js': [], }

product_rolls_code.py

from openerp.osv import fields, osv

class product_rolls_code(osv.osv):

_inherit = "product.product"

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

product_rolls_code_view.xml

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>    
    <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" />   
         </field>       
         </field>
    </record>
</data>
</openerp>

 

0
Portretas
Atmesti
Emipro Technologies Pvt. Ltd.

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'

Emipro Technologies Pvt. Ltd.

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

MoayadRayyan
Autorius

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

Emipro Technologies Pvt. Ltd.

@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

MoayadRayyan
Autorius

i tried but still :( , many thanks to you

Emipro Technologies Pvt. Ltd.

@moayad I will try and let you know

Portretas
Anas Taji
Best Answer

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">
        <data>
            <xpath expr="//field[@name='list_price']" position="after">
                <field name="product_rolls" />
            </xpath>
        </data>
    </field>
</record>

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

Good Luck.

2
Portretas
Atmesti
MoayadRayyan
Autorius

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

Portretas
Emipro Technologies Pvt. Ltd.
Best Answer

Hello Moayad,

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

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

Edit:

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

0
Portretas
Atmesti
MoayadRayyan
Autorius

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

Emipro Technologies Pvt. Ltd.

@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'

MoayadRayyan
Autorius

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

Emipro Technologies Pvt. Ltd.

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

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registracija
Bendrija
  • Mokomosios medžiagos
  • Dokumentacija
  • Forumas
Atvirasis kodas
  • Atsisiųsti
  • Github
  • Runbot
  • Vertimai
Paslaugos
  • Odoo.sh talpinimas
  • Palaikymas
  • Atnaujinti
  • Pritaikytas programavimo kūrimas
  • Švietimas
  • Susirask buhalterį
  • Susiraskite partnerį
  • Tapkite partneriu
Apie mus
  • Mūsų įmonė
  • Prekės ženklo turtas
  • Susisiekite su mumis
  • Darbo pasiūlymai
  • Renginiai
  • Tinklalaidės
  • Internetinis Tinklaraštis
  • Klientai
  • Teisinis • Privatumas
  • Saugumas
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo yra atvirojo kodo verslo programų rinkinys, kuris apima visas įmonės poreikius: CRM, El. Prekybą, Apskaitą, Atsargų, Kasų sistemą, Projektų valdymą ir kt.

Unikali Odoo vertės pasiūla – būti tuo pačiu metu labai lengvai naudojama ir visiškai integruota sistema.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now