Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

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

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

How do you override an XML view that is only called from within another view?

Subscriure's

Get notified when there's activity on this post

This question has been flagged
v8viewsxmlinheritancetemplates
2 Respostes
6827 Vistes
Avatar
Jeff Beidler

If a view template is defined in an XML file, why would Odoo say it can't find the External ID of that view, when you try to inherit/override it?  It is included from another view via the "<t t-raw=...>" tag.  Does that make it "unlisted" somehow, and how would one go about customizing it?

For example, the template with ID "report_purchasequotation_document" appears (so far as I can tell) to only be called from within "report_purchasequotation" by the directive <t t-raw="translate_doc(doc_id, doc_model, 'partner_id.lang', 'purchase.report_purchasequotation_document')"/>.  When I try to inherit from "report_purchasequotation_document", Odoo says, "External ID not found".  What gives?

0
Avatar
Descartar
John Baldwin

use the manage forms debug select and find report_purchasequotation_document the look at the external ID in that row. Inherit that external ID.

Jeff Beidler
Autor

Unfortunately, debug mode isn't available when viewing an HTML report (ie., when you click "print" from an RFQ.)

John Baldwin

try this: purchase.report_purchasequotation

John Baldwin

and this: purchase.report_purchaseorder_document

John Baldwin

sorry about the last I meant this one: purchase.report_purchasequotation_document

John Baldwin

Those are the matching external IDs I found under Settings>User Interface>Views> search box term "purchase". You should be able to inherit from that. You left off the preceeding "purchase." ...

Jeff Beidler
Autor

I've found and tried those before. If you use "purchase.report_purchasequotation_document", Odoo says (in the Python traceback) that the External ID does not exist. If you use "purchase.report_purchasequotation", then it accepts that, but you can't override any of the elements of "purchase.report_purchasequotation_document", because they don't exist in the parent, which outputs the contents of "purchase.report_purchasequotation_document" via the "" directive.

Avatar
Jeff Beidler
Autor Best Answer

There may have been a bug in the way Odoo created a database under whatever previous version I was running.  I updated and created a clean database, and now everything seems to work as expected.  I am able to override "purchase.report_purchasequotation_document" via simple inheritance.

0
Avatar
Descartar
Avatar
John Baldwin
Best Answer

You have to do a seperate override of the second view. I ran accross that problem and drove myself nuts trying to figure it out. In CRM there are several smart buttons incorporated into the res.partner view. I don't need this information in my system and they were taking up valuable space. Due to the fact that they were included from various modules by inherited views and xpath paths, I had to find each and target those inherited views to remove them. The nice part was that using the internal debug mode I just went to manage views and could see the inherited views in the res.partner view list. After that it was easy to remove or (invisible='1') hide them.

0
Avatar
Descartar
Jeff Beidler
Autor

Do you mean override the calling view? That's what I'm trying to do now - replace the view called in the directive.

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

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

Registrar-se
Related Posts Respostes Vistes Activitat
Inherit view to another model
v8 views inheritance
Avatar
Avatar
1
de set. 16
5082
Why can't Odoo find my view? Solved
v8 views templates
Avatar
1
de març 15
5343
Why can't I override the "name" field on the Sales Order Lines view? Solved
v8 views inheritance
Avatar
1
de març 15
7645
Replace xpath expr with xpath
views xml inheritance xpath
Avatar
0
d’ag. 21
4170
Using a Module to Customize Product Tree View
views modules xml inheritance
Avatar
Avatar
Avatar
Avatar
5
de nov. 15
14139
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة 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 és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

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