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
    Real Estate
    • Real Estate Agency
    • Architektūros įmonė
    • Konstrukcija
    • Estate Managament
    • Sodininkauti
    • Turto savininkų asociacija
    Consulting
    • Accounting Firm
    • Odoo Partneris
    • Marketing Agency
    • Teisinė firma
    • Talentų paieška
    • Auditai & sertifikavimas
    Gamyba
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Įmonių dovanos
    Sveikata & Fitnesas
    • Sporto klubas
    • Akinių parduotuvė
    • Fitneso Centras
    • Sveikatos praktikai
    • Vaistinė
    • Kirpėjas
    Trades
    • Handyman
    • IT įranga ir palaikymas
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • 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

Odoo9 view inheritance

Prenumeruoti

Get notified when there's activity on this post

This question has been flagged
viewinheritanceodoo9
2 Replies
3840 Rodiniai
Portretas
David Todd

This question is slightly related to \a previous one I asked, except I believe I found a way to do what I want (which answers the previous question). I am trying to combine multiple models into the same view, and according to the docs, this forum, stackoverflow and random websites, what I want is to inherit the main view and use an xpath to insert my fields.

My main view is this

<record model="ir.ui.view" id="erpwarehouse.mainviewrec">
 <field name="name">erpwarehouse.form</field>
 <field name="model">erpwarehouse.erpwarehouse</field>
 <field name="arch" type="xml">
 <form string="Test">
 <sheet>
 <notebook colspan="6">
 <page string="ERPWarehouse" name="erpwarehouse" autofocus="autofocus">
 <label for="estimate_id">estimate_id</label> <field name="estimate_id"/>
 <label for="worder_id">worder_id</label> <field name="worder_id"/>
 <label for="receiving_id">receiving_id</label> <field name="receiving_id"/>
 <label for="production_id">production_id</label> <field name="production_id"/>
 <label for="billing_id">billing_id</label> <field name="billing_id"/>
 </page>
 </notebook>
 </sheet>
 </form>
 </field>
</record>

I have tried the following possible solutions to try to get my other views to show up as extra pages in the notebook defined above (one for each of the fields) to no avail.

<record model="ir.ui.view" id="erpwarehouse.estimateView">
 <field name="name">erpwarehouse.estimateform</field>
 <field name="model">erpwarehouse.estimate</field>
 <field name="inherit_id" ref="erpwarehouse.mainviewrec"/>
 <field name="arch" type="xml">
 <xpath expr="//notebook/page[@name='erpwarehouse']" position="before">
 <page string="Estimate">
 <field name="project_scope"/>
</page>
 </xpath>
 </field>
</record>
<record model="ir.ui.view" id="erpwarehouse.estimateView">
 <field name="name">erpwarehouse.estimateform</field>
 <field name="model">erpwarehouse.estimate</field>
 <field name="inherit_id" ref="erpwarehouse.mainviewrec"/>
 <field name="arch" type="xml">
 <notebook position="inside">
 <page string="Estimate">
 <field name="project_scope"/>
 </page>
 </notebook>
 </field>
</record>
<record model="ir.ui.view" id="erpwarehouse.estimateView">
 <field name="name">erpwarehouse.estimateform</field>
 <field name="model">erpwarehouse.estimate</field>
 <field name="inherit_id" ref="erpwarehouse.mainviewrec"/>
 <field name="arch" type="xml">
 <xpath expr="//page[0]" position="before">
 <page string="Estimate">
 <field name="project_scope"/>
</page>
 </xpath>
 </field>
</record>

I have also changed the id and name of the record to be erpwarehouse.mainviewrec_inherit, but that did not appear to do anything. Am I missing something? Any help would be greatly appreciated!

0
Portretas
Atmesti
David Todd
Autorius

I am also not getting any errors in the odoo log, my browser's console, or popups. The xpath page simply does not appear. Inside the backend, I can see that the inherit relationship is working as settings->User Interface->Views->erpwarehouse.form->inherited views shows erpwarehouse.estimateform as well as the external ID that I set

Portretas
NareshKumar.P
Best Answer
Hi ,
Try this way

<record model="ir.ui.view" id="erpwarehouse.estimateView">
<field name="name">erpwarehouse.estimateform</field>
<field name="model">erpwarehouse.estimate</field>
<field name="inherit_id" ref="erpwarehouse.mainviewrec"/>
<field name="arch" type="xml">
    <page string="ERPWarehouse" position="before">
        <page string="Estimate">
            <field name="project_scope"/>
        </page>
    </page>
</field>
</record>
0
Portretas
Atmesti
David Todd
Autorius

I just tried this way and unfortunately it did not work. I got the error "View inheritance may not use attribute 'string' as a selector.". That led me to replace string="ERPWarehouse" with name="erpwarehouse" and I didn't get an error, but I'm back where I started

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

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

Registracija
Related Posts Replies Rodiniai Veikla
View inheritance Solved
view inheritance
Portretas
Portretas
1
kov. 20
4304
How do I remove fields from a view in a custom module? Solved
view inheritance
Portretas
Portretas
Portretas
Portretas
12
gruod. 18
36129
Weird error "Expression cannot be located in parent view" in view inheritance Solved
view inheritance
Portretas
Portretas
1
liep. 16
7873
ODOO9: Inheritance view to add a button in a tree
inheritance odoo9
Portretas
0
bal. 16
3737
Two-level view inheritance, what am I missing?
view inheritance
Portretas
Portretas
2
kov. 15
6782
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