Skip to Content
Odoo Menu
  • Log ind
  • Prøv gratis
  • Apps
    Økonomi
    • Bogføring
    • Fakturering
    • Udgifter
    • Regneark (BI)
    • Dokumenter
    • e-Signatur
    Salg
    • CRM
    • Salg
    • POS Butik
    • POS Restaurant
    • Abonnementer
    • Udlejning
    Hjemmeside
    • Hjemmesidebygger
    • e-Handel
    • Blog
    • Forum
    • LiveChat
    • e-Læring
    Forsyningskæde
    • Lagerbeholdning
    • Produktion
    • PLM
    • Indkøb
    • Vedligeholdelse
    • Kvalitet
    HR
    • Medarbejdere
    • Rekruttering
    • Fravær
    • Medarbejdersamtaler
    • Anbefalinger
    • Flåde
    Marketing
    • Markedsføring på sociale medier
    • E-mailmarketing
    • SMS-marketing
    • Arrangementer
    • Automatiseret marketing
    • Spørgeundersøgelser
    Tjenester
    • Projekt
    • Timesedler
    • Udkørende Service
    • Kundeservice
    • Planlægning
    • Aftaler
    Produktivitet
    • Dialog
    • Godkendelser
    • IoT
    • VoIP
    • Vidensdeling
    • WhatsApp
    Tredjepartsapps Odoo Studio Odoo Cloud-platform
  • Brancher
    Detailhandel
    • Boghandel
    • Tøjforretning
    • Møbelforretning
    • Dagligvarebutik
    • Byggemarked
    • Legetøjsforretning
    Mad og værtsskab
    • Bar og pub
    • Restaurant
    • Fastfood
    • Gæstehus
    • Drikkevareforhandler
    • Hotel
    Ejendom
    • Ejendomsmægler
    • Arkitektfirma
    • Byggeri
    • Ejendomsadministration
    • Havearbejde
    • Boligejerforening
    Rådgivning
    • Regnskabsfirma
    • Odoo-partner
    • Marketingbureau
    • Advokatfirma
    • Rekruttering
    • Audit & certificering
    Produktion
    • Tekstil
    • Metal
    • Møbler
    • Fødevareproduktion
    • Bryggeri
    • Firmagave
    Heldbred & Fitness
    • Sportsklub
    • Optiker
    • Fitnesscenter
    • Kosmetolog
    • Apotek
    • Frisør
    Håndværk
    • Handyman
    • IT-hardware og support
    • Solenergisystemer
    • Skomager
    • Rengøringsservicer
    • VVS- og ventilationsservice
    Andet
    • Nonprofitorganisation
    • Miljøagentur
    • Udlejning af billboards
    • Fotografi
    • Cykeludlejning
    • Softwareforhandler
    Gennemse alle brancher
  • Community
    Få mere at vide
    • Tutorials
    • Dokumentation
    • Certificeringer
    • Oplæring
    • Blog
    • Podcast
    Bliv klogere
    • Udannelselsesprogram
    • Scale Up!-virksomhedsspillet
    • Besøg Odoo
    Få softwaren
    • Download
    • Sammenlign versioner
    • Udgaver
    Samarbejde
    • Github
    • Forum
    • Arrangementer
    • Oversættelser
    • Bliv partner
    • Tjenester til partnere
    • Registrér dit regnskabsfirma
    Modtag tjenester
    • Find en partner
    • Find en bogholder
    • Kontakt en rådgiver
    • Implementeringstjenester
    • Kundereferencer
    • Support
    • Opgraderinger
    Github Youtube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Få en demo
  • Prissætning
  • Hjælp

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

  • CRM
  • e-Commerce
  • Bogføring
  • Lager
  • PoS
  • Projekt
  • MRP
All apps
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Hjælp

How to make a field from Sale Order form Line Item invisible by inheriting view_order_form in my custom module?

Tilmeld

Få besked, når der er aktivitet på dette indlæg

Dette spørgsmål er blevet anmeldt
viewsinheritancesale.order.line
2 Besvarelser
5512 Visninger
Avatar
Francisco Luz

I am following the instructions at Inheritance in Views but am having trouble.

In my custom module I have created a xml file which its content can be seen here.

I am trying to make invisible the tax_id column in the line item at the sale order form.

The custom xml file is producing no changes on the targed form view whatsoever. I have taken the following precautions:

  • Restarted the server
  • Updated my custom module at Settings -> Installed Modules
  • Tested the xpath path parameter. It does point to the targeted field
  • Hacked into the core xml file at ../openerp/server/addons/sale/sale_view.xml beforehand to make sure I was trying to alter the right form view.

I keep getting the error "ValidateError: Error occurred while validating the field(s) arch: Invalid XML for View Architecture!"

0
Avatar
Kassér
Avatar
Francisco Luz
Forfatter Bedste svar

The solution could not be more trivial. Apparently you must declare dependency of those modules, or the module, which originally created the xml view you are trying to alter.

In my particular case, I just added dependency of sale, stock and procurement into my module manifest ( __openerp__.py ) and BANG! It worked beautilly. A lesson learned in the hard way though.

0
Avatar
Kassér
Avatar
Serpent Consulting Services Pvt. Ltd.
Bedste svar

Francisco,

The line <field name="tax_id" position="replace"/> will not work because the order does not have tax_id field.

If it has, try to reach to the field by xpath.

In order to know the xact error, please check your server long and see what it contains.

Thanks.

0
Avatar
Kassér
Francisco Luz
Forfatter

The error message issue has being resolved but I am stuck still. The sale order object indeed does not have the tax_id but the form view does. Check out the file at ../openerp/server/addons/sale/sale_view.xml To further test what you said about why it should not work, I changed my targeted field to client_order_ref, which is a field that belongs to the sale order object. See my xml file content at https://gist.github.com/drupalista-br/4bf8facff175c1800908 The custom xml file is producing no changes on the targed form view whatsoever. I have taken the following precautions: * Restarted the server * Updated my custom module at Settings -> Installed Modules * Tested the xpath path parameter. It does point to the targeted field.

Serpent Consulting Services Pvt. Ltd.

The view has the field tax_id, but it belongs to sale order line. You may take a route to that field using complete xpath(form/notebook/page/field/form/group) and I am sure it will work.

Francisco Luz
Forfatter

My issue did not lie on the xml syntax but for not declaring a dependency to the sale and stock modules in the manifest file.

Serpent Consulting Services Pvt. Ltd.

Alright, mentioning the dependency is first. Close the question if its resolved. Thanks.

Francisco Luz
Forfatter

Why would I close the question? It might help someone else.

Serpent Consulting Services Pvt. Ltd.

Meant, Close as solved by choosing an answer!

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

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

Tilmeld dig
Related Posts Besvarelser Visninger Aktivitet
View inheritance hiding a field
views inheritance
Avatar
Avatar
1
nov. 24
2613
Change the Position of field in Xpath Løst
views inheritance
Avatar
Avatar
Avatar
Avatar
Avatar
5
jul. 24
95879
How to extend a base template for a specific page only, without affecting other pages that use the same base template?
views inheritance
Avatar
Avatar
1
dec. 23
4018
removing elements from an inherited view
views inheritance
Avatar
Avatar
1
maj 22
5051
I am building a custom module that has a dependent module that has extended the base view of res_partner. In my custom module I also have an inherited view of the base res_partner view. In it how do I hide the inherited view of my dependent module?
views inheritance
Avatar
0
jan. 20
3505
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Oversættelser
Tjenester
  • Odoo.sh-hosting
  • Support
  • Opgradere
  • Individuelt tilpasset udvikling
  • Uddannelse
  • Find en bogholder
  • Find en partner
  • Bliv partner
Om os
  • Vores virksomhed
  • Brandaktiver
  • Kontakt os
  • Stillinger
  • Arrangementer
  • Podcast
  • Blog
  • Kunder
  • Juridiske dokumenter • Privatlivspolitik
  • Sikkerhedspolitik
الْعَرَبيّة 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 er en samling open source-forretningsapps, der dækker alle dine virksomhedsbehov – lige fra CRM, e-handel og bogføring til lagerstyring, POS, projektledelse og meget mere.

Det unikke ved Odoo er, at systemet både er brugervenligt og fuldt integreret.

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