Skip to Content
Odoo Menu
  • Zaloguj się
  • Wypróbuj za darmo
  • Aplikacje
    Finanse
    • Księgowość
    • Fakturowanie
    • Wydatki
    • Arkusz kalkulacyjny (BI)
    • Dokumenty
    • Podpisy
    Sprzedaż
    • CRM
    • Sprzedaż
    • PoS Sklep
    • PoS Restauracja
    • Subskrypcje
    • Wypożyczalnia
    Strony Internetowe
    • Kreator Stron Internetowych
    • eCommerce
    • Blog
    • Forum
    • Czat na Żywo
    • eLearning
    Łańcuch dostaw
    • Magazyn
    • Produkcja
    • PLM
    • Zakupy
    • Konserwacja
    • Jakość
    Zasoby Ludzkie
    • Pracownicy
    • Rekrutacja
    • Urlopy
    • Ocena pracy
    • Polecenia Pracownicze
    • Flota
    Marketing
    • Marketing Społecznościowy
    • E-mail Marketing
    • SMS Marketing
    • Wydarzenia
    • Automatyzacja Marketingu
    • Ankiety
    Usługi
    • Projekt
    • Ewidencja czasu pracy
    • Usługi Terenowe
    • Helpdesk
    • Planowanie
    • Spotkania
    Produktywność
    • Dyskusje
    • Zatwierdzenia
    • IoT
    • VoIP
    • Baza wiedzy
    • WhatsApp
    Aplikacje trzecich stron Studio Odoo Odoo Cloud Platform
  • Branże
    Sprzedaż detaliczna
    • Księgarnia
    • Sklep odzieżowy
    • Sklep meblowy
    • Sklep spożywczy
    • Sklep z narzędziami
    • Sklep z zabawkami
    Żywienie i hotelarstwo
    • Bar i Pub
    • Restauracja
    • Fast Food
    • Pensjonat
    • Dystrybutor napojów
    • Hotel
    Agencja nieruchomości
    • Agencja nieruchomości
    • Biuro architektoniczne
    • Budowa
    • Zarządzanie nieruchomościami
    • Ogrodnictwo
    • Stowarzyszenie właścicieli nieruchomości
    Doradztwo
    • Biuro księgowe
    • Partner Odoo
    • Agencja marketingowa
    • Kancelaria prawna
    • Agencja rekrutacyjna
    • Audyt i certyfikacja
    Produkcja
    • Tekstylia
    • Metal
    • Meble
    • Jedzenie
    • Browar
    • Prezenty firmowe
    Zdrowie & Fitness
    • Klub sportowy
    • Salon optyczny
    • Centrum fitness
    • Praktycy Wellness
    • Apteka
    • Salon fryzjerski
    Transakcje
    • Złota rączka
    • Wsparcie Sprzętu IT
    • Systemy energii słonecznej
    • Szewc
    • Firma sprzątająca
    • Usługi HVAC
    Inne
    • Organizacja non-profit
    • Agencja Środowiskowa
    • Wynajem billboardów
    • Fotografia
    • Leasing rowerów
    • Sprzedawca oprogramowania
    Przeglądaj wszystkie branże
  • Community
    Ucz się
    • Samouczki
    • Dokumentacja
    • Certyfikacje
    • Szkolenie
    • Blog
    • Podcast
    Pomóż w nauce innym
    • Program Edukacyjny
    • Scale Up! Gra biznesowa
    • Odwiedź Odoo
    Skorzystaj z oprogramowania
    • Pobierz
    • Porównaj edycje
    • Wydania
    Współpracuj
    • Github
    • Forum
    • Wydarzenia
    • Tłumaczenia
    • Zostań partnerem
    • Usługi dla partnerów
    • Zarejestruj swoją firmę rachunkową
    Skorzystaj z usług
    • Znajdź partnera
    • Znajdź księgowego
    • Spotkaj się z doradcą
    • Usługi wdrożenia
    • Opinie klientów
    • Wsparcie
    • Aktualizacje
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Zaplanuj demo
  • Cennik
  • Pomoc

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

  • CRM
  • e-Commerce
  • Księgowość
  • Zapasy
  • PoS
  • Projekt
  • MRP
All apps
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
Wszystkie posty Osoby Odznaki
Tagi (Zobacz wszystko)
odoo accounting v14 pos v15
O tym forum
Pomoc

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

Zaprenumeruj

Otrzymaj powiadomienie o aktywności w tym poście

To pytanie dostało ostrzeżenie
inheritanceqwebodoo12
1 Odpowiedz
13035 Widoki
Awatar
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
Awatar
Odrzuć
Awatar
Eman Abdulmalik
Najlepsza odpowiedź

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
Awatar
Odrzuć
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.

Podoba Ci się ta dyskusja? Dołącz do niej!

Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!

Zarejestruj się
Powiązane posty Odpowiedzi Widoki Czynność
Qweb: Inherit <report> tag and include "paperformat" atribute Rozwiązane
inheritance qweb report odoo12
Awatar
Awatar
1
maj 20
4426
Override and Change the middle of a function Rozwiązane
inheritance odoo12
Awatar
Awatar
Awatar
Awatar
7
cze 24
26017
How to modify a qweb template? Rozwiązane
inheritance qweb
Awatar
Awatar
2
gru 22
23888
Sort order for dropdown list of Many2one field
qweb odoo12
Awatar
Awatar
Awatar
2
paź 22
6262
How to insert image in odoo 12 Docker qweb report
qweb odoo12
Awatar
Awatar
Awatar
2
mar 21
4480
Społeczność
  • Samouczki
  • Dokumentacja
  • Forum
Open Source
  • Pobierz
  • Github
  • Runbot
  • Tłumaczenia
Usługi
  • Hosting Odoo.sh
  • Wsparcie
  • Aktualizacja
  • Indywidualne rozwiązania
  • Edukacja
  • Znajdź księgowego
  • Znajdź partnera
  • Zostań partnerem
O nas
  • Nasza firma
  • Zasoby marki
  • Skontaktuj się z nami
  • Oferty pracy
  • Wydarzenia
  • Podcast
  • Blog
  • Klienci
  • Informacje prawne • Prywatność
  • Bezpieczeństwo Odoo
الْعَرَبيّة 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 to pakiet aplikacji biznesowych typu open source, które zaspokoją wszystkie potrzeby Twojej firmy: CRM, eCommerce, księgowość, inwentaryzacja, punkt sprzedaży, zarządzanie projektami itp.

Unikalną wartością Odoo jest to, że jest jednocześnie bardzo łatwe w użyciu i w pełni zintegrowane.

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