Skip to Content
Odoo Menu
  • Prihlásiť sa
  • Vyskúšajte zadarmo
  • Aplikácie
    Financie
    • Účtovníctvo
    • Fakturácia
    • Výdavky
    • Tabuľka (BI)
    • Dokumenty
    • Podpis
    Predaj
    • CRM
    • Predaj
    • POS Shop
    • POS Restaurant
    • Manažment odberu
    • Požičovňa
    Webstránky
    • Tvorca webstránok
    • eShop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Supply Chain
    • Sklad
    • Výroba
    • Správa životného cyklu produktu
    • Nákup
    • Údržba
    • Manažment kvality
    Ľudské zdroje
    • Zamestnanci
    • Nábor zamestnancov
    • Voľné dni
    • Hodnotenia
    • Odporúčania
    • Vozový park
    Marketing
    • Marketing sociálnych sietí
    • Email marketing
    • SMS marketing
    • Eventy
    • Marketingová automatizácia
    • Prieskumy
    Služby
    • Projektové riadenie
    • Pracovné výkazy
    • Práca v teréne
    • Helpdesk
    • Plánovanie
    • Schôdzky
    Produktivita
    • Tímová komunikácia
    • Schvalovania
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Priemyselné odvetvia
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Reštaurácia
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Reality
    • Real Estate Agency
    • Architecture Firm
    • Konštrukcia
    • Estate Managament
    • Gardening
    • Property Owner Association
    Poradenstvo
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Jedlo
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Iní
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Komunita
    Vzdelávanie
    • Tutoriály
    • Dokumentácia
    • Certifikácie
    • Školenie
    • Blog
    • Podcast
    Empower Education
    • Vzdelávací program
    • Scale Up! Business Game
    • Visit Odoo
    Softvér
    • Stiahnuť
    • Porovnanie Community a Enterprise vierzie
    • Releases
    Spolupráca
    • Github
    • Fórum
    • Eventy
    • Preklady
    • Staň sa partnerom
    • Services for Partners
    • Register your Accounting Firm
    Služby
    • Nájdite partnera
    • Nájdite účtovníka
    • Meet an advisor
    • Implementation Services
    • Zákaznícke referencie
    • Podpora
    • Upgrades
    ​Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Získajte demo
  • Cenník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účtovníctvo
  • Sklady
  • PoS
  • Projektové riadenie
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
Pomoc

I am trying to inherit a <templates id="template" xml:space="preserve"> template, but that ate my last full week.

Odoberať

Get notified when there's activity on this post

This question has been flagged
inheritanceqwebodoo12
1 Odpoveď
13259 Zobrazenia
Avatar
Banita Elena Denisa

Hi there,

Am trying to inherit a <templates id="template" xml:space="preserve">, but no succedd in almost a full week. What was fun to learn, bcamed a nightmare, just bcause of this, so far.
I have done the following come (below). Can someone pleeeeaaassseee, have a look and let me know what am I doing wrong?

I want to inherit the SEO widget. to add a new field, but for a full week I couldn't touch that popup window. It's on odoo 12.

 So,

- I have added the js file (ad_jas.xml)

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="inherit_seo" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="/fk_website_seo/static/js/extend_seo_widget.js"></script>
</xpath>
</template>
</odoo>

- the content of the js file (extend_seo_widget.js)

odoo.define('fk_website_seo.extend_seo_widget', function (require) {
'use strict';

var core = require('web.core');
var ajax = require('web.ajax');
var qweb = core.qweb;
ajax.loadXML('/fk_website_seo/static/src/xml/extend_seo_widget.xml', qweb);
});

- added the xml extension to manifest as qweb

'qweb': [
'static/src/xml/extend_seo_widget.xml'
],
'data': [
    'views/add_jas.xml',
],

- and tried to inherit the SEO widget, with extend_seo_widget.xml

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<templates id="template" xml:space="preserve">
<t t-name="website.seo_preview" t-extend="website.seo_preview">
<t t-jquery=".oe_seo_preview_g" t-operation="after">
<h1>TEST TEST TEST TSET</h1>
<label for="test">Frequency</label>
<field name="test"/>
</t>
</t>
</templates>
</odoo>

- and inherited the website.seo.metadata model, as follow

class inheritedSEOwidget(models.Model):
# this website.seo.metadata is an Abstract model, andthe only way I could inherited it it was using models.Model...
_inherit = 'website.seo.metadata'
_name = "extended.website.seo.metadata"

test = fields.Char(string="Test")

I'm not getting any errors, but still nothing changed there.

that is driving me crazy.

Can you have a look pls?

What am I doing wrong? Google it a lot, and tested everything I got..nothing worked o far.

pls and thank you

0
Avatar
Zrušiť
Avatar
Eman Abdulmalik
Best Answer

Hello Banita,

Please remove the odoo tag and it work perfectly.

<?xml version="1.0" encoding="utf-8"?>
 
<templates id="template" xml:space="preserve">
<t t-name="website.seo_preview" t-extend="website.seo_preview">
<t t-jquery=".oe_seo_preview_g" t-operation="after">
<h1>TEST TEST TEST TSET</h1>
<label for="test">Frequency</label>
<field name="test"/>
</t>
</t>
</templates>

1
Avatar
Zrušiť
Banita Elena Denisa
Autor

Hi Eman,

Thank you for your answer!

I tried your solution and removed odoo tags but unfortunatelly when trying to upgrade I'm getting a "debug=true" (http://localhost:8070/web?debug=true) link and nothing changes.

Beside that nothing in the backend is not loading bcause of the template issue i suppose.

Am I missing something? :((

If it's working for you, and for me is not working... there is something I miss, but the code is the same. What am I missing ... do you have a clue? I checked everything a hundread times...so my eyes is missing something :((

Banita Elena Denisa
Autor

ok, so, removed the odoo tags and used <template instead of <templates tags.... and now the backend is back and running, but still no changes in the extended template. it's seems that is having no effect at all.

is this working for ODOO 12? On my research I have found that working only on odoo10.

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

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

Registrácia
Related Posts Replies Zobrazenia Aktivita
Qweb: Inherit <report> tag and include "paperformat" atribute Solved
inheritance qweb report odoo12
Avatar
Avatar
1
máj 20
4516
Override and Change the middle of a function Solved
inheritance odoo12
Avatar
Avatar
Avatar
Avatar
7
jún 24
26149
How to modify a qweb template? Solved
inheritance qweb
Avatar
Avatar
2
dec 22
24059
Sort order for dropdown list of Many2one field
qweb odoo12
Avatar
Avatar
Avatar
2
okt 22
6403
How to insert image in odoo 12 Docker qweb report
qweb odoo12
Avatar
Avatar
Avatar
2
mar 21
4577
Komunita
  • Tutoriály
  • Dokumentácia
  • Fórum
Open Source
  • Stiahnuť
  • Github
  • Runbot
  • Preklady
Služby
  • Odoo.sh hosting
  • Podpora
  • Vyššia verzia
  • Custom Developments
  • Vzdelávanie
  • Nájdite účtovníka
  • Nájdite partnera
  • Staň sa partnerom
O nás
  • Naša spoločnosť
  • Majetok značky
  • Kontaktujte nás
  • Pracovné ponuky
  • Eventy
  • Podcast
  • Blog
  • Zákazníci
  • Právne dokumenty • Súkromie
  • Bezpečnosť
الْعَرَبيّة 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 je sada podnikových aplikácií s otvoreným zdrojovým kódom, ktoré pokrývajú všetky potreby vašej spoločnosti: CRM, e-shop, účtovníctvo, skladové hospodárstvo, miesto predaja, projektový manažment atď.

Odoo prináša vysokú pridanú hodnotu v jednoduchom použití a súčasne plne integrovanými biznis aplikáciami.

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