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
    Real Estate
    • Real Estate Agency
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consulting
    • Accounting Firm
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Furnitures
    • Food
    • 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
    • Solar Energy Systems
    • Shoe Maker
    • Serveis de neteja
    • HVAC Services
    Others
    • 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 to 'customize' the website sustainably?

Subscriure's

Get notified when there's activity on this post

This question has been flagged
customizeecommercewebsite
1 Respondre
4390 Vistes
Avatar
Frank Adler

Hi,

I've found that my 'inline changes' in the Odoo website frontend persist during upgrages, but changes done through the 'customize' option get overwritten. This seems to be the case as the customize option actually changes the underlying view which gets (potentially) overwritten during an upgrade.

What is the correct way to change the content in the website front-end, in order for changes (be it 'in-line' or through 'customize') to remain in place during an upgrade?

Thanks

0
Avatar
Descartar
Avatar
Anders Wallenquist
Best Answer

You have to create a module with your changes. You can use "Customize" as a RAD-editor and when your ready recreate your additions as xpath-templates in your module.

0
Avatar
Descartar
Frank Adler
Autor

Thanks Anders. Maybe I misunderstand, but wouldn't your reply mean that for instance to add a simple "id" or a "class" tag to an existing div or p tag (to modify its css, or to alternatively add an inline style tag) I need to reference that through xpath in an inherited view and use 'replace'? Surely there has to be a better way? Especially since the xpath would change as soon as I modify the website inline...?

Anders Wallenquist

If you create a "view"/template in a new module with: Here comes your HTML and t-commands. If you want to change a page: <xpath expr="//div[@name='my_postion']" position="after">

Your code comes here
You can also create snippets that you call with or what you called your snipped. A module makes it easier to recreate your site in another database and preserve what you done when you upgrade and reinstall generic modules.
Anders Wallenquist

Code does not look well in commens. Have a look at the website_crm-module instead (two inherits and one new page): https://github.com/odoo/odoo/blob/master/addons/website_crm/views/website_crm.xml

Anders Wallenquist

This is how we have done on sites we have created. Instead of xpath and replace you can overwrite the whole page and use the same id as the original page. I think there are a positon-parameter you can add to ensure that you are the last contributor. I donẗ know if its better to overwrite or change (xpath). We have had a lot of problems with xpath and t.call/inherits that does not find anything when upgrading thru saas[12345] and 8x. But its better to know where your code are and not burried in a nonfunctional database IMHO.

Anders Wallenquist

For us the bootstrap framework has forced us to relearn how to create a site. Today we have another approach than earlier and seldom create our own classes, just change them in a "theme".

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
Add to cart code if using odoo web.
ecommerce website
Avatar
0
d’abr. 25
1572
Is it possible to have 3 websites on same odoo instance(Odoo Online)
ecommerce website
Avatar
Avatar
1
de maig 24
4948
pause Ecommerce store - vacation mode?
ecommerce website
Avatar
Avatar
1
d’abr. 24
3033
Website Product Block Image Low Quality
ecommerce website
Avatar
0
d’abr. 24
2246
What is the fastest website solution?
ecommerce website
Avatar
Avatar
1
de maig 23
5449
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