Skip to Content
Odoo Menu
  • Prisijungti
  • Išbandykite nemokamai
  • Programėlės
    Finansai
    • Apskaita
    • Pateikimas apmokėjimui
    • Sąnaudos
    • Skaičiuoklė (BI)
    • Dokumentai
    • Pasirašymas
    Pardavimai
    • CRM
    • Pardavimai
    • Kasų sistema - Parduotuvė
    • Kasų sistema - Restoranas
    • Prenumeratos
    • Nuoma
    Svetainės
    • Svetainių kūrėjimo įrankis
    • El. Prekyba
    • Internetinis Tinklaraštis
    • Forumas
    • Tiesioginis pokalbis
    • eMokymasis
    Tiekimo grandinė
    • Atsarga
    • Gamyba
    • PLM
    • Įsigijimai
    • Priežiūra
    • Kokybė
    Žmogaus ištekliai
    • Darbuotojai
    • Įdarbinimas
    • Atostogos
    • Įvertinimai
    • Rekomendacijos
    • Transporto priemonės
    Rinkodara
    • Socialinė rinkodara
    • Rinkodara el. paštu
    • SMS rinkodara
    • Renginiai
    • Rinkodaros automatizavimas
    • Apklausos
    Paslaugos
    • Projektas
    • Darbo laiko žiniaraščiai
    • Priežiūros tarnyba
    • Pagalbos tarnyba
    • Planavimas
    • Rezervacijos
    Produktyvumas
    • Diskucija
    • Patvirtinimai
    • IoT
    • VoIP
    • Žinių biblioteka
    • WhatsApp
    Trečiųjų šalių programos Odoo Studija Odoo debesijos platforma
  • Pramonės šakos
    Mažmeninė prekyba
    • Knygynas
    • Drabužių parduotuvė
    • Baldų parduotuvė
    • Maisto prekių parduotuvė
    • Techninės įrangos parduotuvė
    • Žaislų parduotuvė
    Food & Hospitality
    • Barai ir pub'ai
    • Restoranas
    • Greitasis maistas
    • Guest House
    • Gėrimų platintojas
    • Hotel
    Nekilnojamasis turtas
    • Real Estate Agency
    • Architektūros įmonė
    • Konstrukcija
    • Estate Managament
    • Sodininkauti
    • Turto savininkų asociacija
    Konsultavimas
    • Accounting Firm
    • Odoo Partneris
    • Marketing Agency
    • Teisinė firma
    • Talentų paieška
    • Auditai & sertifikavimas
    Gamyba
    • Textile
    • Metal
    • Furnitures
    • Maistas
    • Brewery
    • Įmonių dovanos
    Sveikata & Fitnesas
    • Sporto klubas
    • Akinių parduotuvė
    • Fitneso Centras
    • Sveikatos praktikai
    • Vaistinė
    • Kirpėjas
    Trades
    • Handyman
    • IT įranga ir palaikymas
    • Saulės energijos sistemos
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Kiti
    • Nonprofit Organization
    • Aplinkos agentūra
    • Reklaminių stendų nuoma
    • Fotografavimas
    • Dviračių nuoma
    • Programinės įrangos perpardavėjas
    Browse all Industries
  • Bendrija
    Mokykitės
    • Mokomosios medžiagos
    • Dokumentacija
    • Sertifikatai
    • Mokymai
    • Internetinis Tinklaraštis
    • Tinklalaidės
    Skatinkite švietinimą
    • Švietimo programa
    • Scale Up! Verslo žaidimas
    • Aplankykite Odoo
    Gaukite programinę įrangą
    • Atsisiųsti
    • Palyginkite versijas
    • Leidimai
    Bendradarbiauti
    • Github
    • Forumas
    • Renginiai
    • Vertimai
    • Tapkite partneriu
    • Services for Partners
    • Registruokite jūsų apskaitos įmonę
    Gaukite paslaugas
    • Susiraskite partnerį
    • Susirask buhalterį
    • Susitikti su konsultantu
    • Diegimo paslaugos
    • Klientų rekomendavimas
    • Palaikymas
    • Atnaujinimai
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Gaukite demo
  • Kainodara
  • Pagalba

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

  • CRM
  • e-Commerce
  • Apskaita
  • Atsarga
  • PoS
  • Projektas
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Žymos (View all)
odoo accounting v14 pos v15
About this forum
Pagalba

My xml dosen't update when updating the module (Owl)

Prenumeruoti

Get notified when there's activity on this post

This question has been flagged
OWLodoo16features
2824 Rodiniai
Portretas
Vladislav Bochkov

I have this JavaScript code (Owl):

odoo.define('victorikus_web.BuildYourCakeApp', function (require) {
'use strict';

const {Component, mount, whenReady, loadFile, useState} = require('@odoo/owl');

class BuildYourCakeApp extends Component {
static template = "victorikus_web.BuildYourCakeApp";

setup() {
console.log("BuildYourCakeApp, setup")
}

state = useState({step: 1, shape: 'square', size: '25cm', color: 'red'});

updateSize(event) {
console.log('updateSize');
this.state.size = event.target.value;
}

updateShape(event) {
console.log('updateShape');
this.state.shape = event.target.value;
}

updateColor(event) {
console.log('updateColor');
this.state.color = event.target.value;
}

resetCake() {
console.log('resetCake');
this.state.step = 1;
this.state.shape = 'square';
this.state.size = '25cm';
this.state.color = 'red';
}
}

whenReady(async function () {
const root = document.querySelector("#BuildYourCakeApp");
if (root) {
const templates = await loadFile(`victorikus_web/static/src/xml/BuildYourCakeApp.xml`);
const env = {
templates,
};
mount(BuildYourCakeApp, root, env);
}
});
});

That links to this xml:

<?xml version="1.0" encoding="UTF-8" ?>

<odoo>

    <data>

        <template id="build_your_cake" name="Build Your Cake">

            <t t-call="web.frontend_layout">

                <div class="oe_structure">

                    <div id="wrap" class="container">

                        <div id="BuildYourCakeApp"></div>

                    </div>

                </div>

            </t>

        </template>

    </data>

</odoo>


And adds this xml with owl to the div with id "BuildYourCakeApp":

<?xml version="1.0" encoding="UTF-8" ?>

<templates>

    <t t-name="victorikus_web.BuildYourCakeApp" owl="1">

        <div class="container col-lg-12 mt-5">

            <h1 class="text-center mb-4">Build Your Cake</h1>

            <div class="card p-4 rounded">

                <div class="row">

                    <div class="col-lg-6">

                        <div class="step-container">

                            <h2>Step: 1</h2>


                            <div class="form-group mt-4">

                                <b>

                                    <label>Shape:</label>

                                </b>

                                <div class="form-check">

                                    <input class="form-check-input" type="radio" name="shapeRadios" id="shapeSquare"

                                           value="square" checked="checked" t-on-change="updateShape"/>

                                    <label class="form-check-label" for="shapeSquare">

                                        Square

                                    </label>

                                </div>

                                <div class="form-check">

                                    <input class="form-check-input" type="radio" name="shapeRadios" id="shapeRound"

                                           value="round" t-on-change="updateShape"/>

                                    <label class="form-check-label" for="shapeRound">

                                        Round

                                    </label>

                                </div>

                            </div>


                            <div class="form-group mt-4">

                                <b>

                                    <label for="cakeSize">Size:</label>

                                </b>

                                <select class="form-control" id="cakeSize" t-on-change="updateSize">

                                    <option value="">Select an option</option>

                                    <option value="25cm">25 cm</option>

                                    <option value="31cm">31 cm</option>

                                    <option value="39cm">39 cm</option>

                                </select>

                            </div>


                            <div class="form-group mt-4">

                                <b>

                                    <label>Color:</label>

                                </b>

                                <div class="form-check">

                                    <input class="form-check-input" type="radio" name="colorRadios" id="colorRed"

                                           value="red" checked="checked" t-on-change="updateColor"/>

                                    <label class="form-check-label" for="colorRed">

                                        Red

                                    </label>

                                </div>

                                <div class="form-check">

                                    <input class="form-check-input" type="radio" name="colorRadios" id="colorBlue"

                                           value="blue" t-on-change="updateColor"/>

                                    <label class="form-check-label" for="colorBlue">

                                        Blue

                                    </label>

                                </div>

                            </div>

                        </div>

                    </div>

                    <div class="col-lg-6">

                        <div class="result-container mt-4 p-3">

                            A

                            <t t-esc="state.color"/>

                            <t t-esc="state.shape"/>

                            of

                            <t t-esc="state.size"/>

                            cake!

                            <button type="button" class="btn btn-primary mt-3" t-on-click="resetCake">Click Me!</button>

                        </div>

                    </div>

                </div>

            </div>

        </div>

    </t>

</templates>


Here is my mainfest file:

# -*- coding: utf-8 -*-
{
'name': "Victorikus Web",

'summary': """
Cake Shop Website.
""",

'description': """
Cake Shop Website.
""",

'author': "My Company",
'website': "https://www.yourcompany.com",

'license': 'Other proprietary',

# Categories can be used to filter modules in modules listing
# Check https://github.com/odoo/odoo/blob/16.0/odoo/addons/base/data/ir_module_category_data.xml
# for the full list
'category': 'Website',
'version': '1.0.0',

# any module necessary for this one to work correctly
'depends': ['base', 'web', 'website', 'website_sale', 'website_sale_stock', 'account', 'stock', 'contacts'],

'installable': True,

'application': True,

# always loaded
'data': [
'views/landing_page.xml',
'data/res.partner.csv',
'data/res.company.csv',
'data/res.lang.xml',
'data/website.xml',
'data/website.page.csv',
'data/product.template.csv',
'data/res.users.csv',
'data/res.groups.xml',
'data/website.page.sql',
'data/no_update.sql',

# Views
'views/build_your_cake_template.xml'
],

'assets': {
'web.assets_frontend': [
'victorikus_web/static/src/js/landing_page.js',
'victorikus_web/static/src/css/styles.css',
'victorikus_web/static/src/js/BuildYourCakeApp.js',
],
'web.assets_qweb': [
'victorikus_web/static/src/xml/BuildYourCakeApp.xml',
],
},


# only loaded in demonstration mode
'demo': [
],
}


But when modifying the xml with owl, it does not reflect the changes, not until I open a private page and then it shows the updated version.
When exploring the dev tools, I discovered that it loads the xml from cache.
Am I doing something wrong?

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

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

Registracija
Related Posts Replies Rodiniai Veikla
Call JS code from button in header in Odoo 16
OWL odoo16features
Portretas
Portretas
Portretas
2
liep. 24
6007
in odoo16 owl, how to store current page state after go to another page, and restore them when back to this page from the breadcrumbs?
OWL odoo16features
Portretas
Portretas
1
spal. 23
3173
Dialog Box Closed when I clicked to "Filters" or "Groub by" or "Favorites" Odoo 16 OWL
OWL odoo16features
Portretas
0
rugs. 23
2191
Show Loading Spinner on OWL Component v16
qweb OWL odoo16features
Portretas
Portretas
1
saus. 25
4865
How do I override functions outside the class in the Odoo 16 Owl framework?
js OWL odoo16features
Portretas
Portretas
1
birž. 24
5614
Bendrija
  • Mokomosios medžiagos
  • Dokumentacija
  • Forumas
Atvirasis kodas
  • Atsisiųsti
  • Github
  • Runbot
  • Vertimai
Paslaugos
  • Odoo.sh talpinimas
  • Palaikymas
  • Atnaujinti
  • Pritaikytas programavimo kūrimas
  • Švietimas
  • Susirask buhalterį
  • Susiraskite partnerį
  • Tapkite partneriu
Apie mus
  • Mūsų įmonė
  • Prekės ženklo turtas
  • Susisiekite su mumis
  • Darbo pasiūlymai
  • Renginiai
  • Tinklalaidės
  • Internetinis Tinklaraštis
  • Klientai
  • Teisinis • Privatumas
  • Saugumas
الْعَرَبيّة 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 yra atvirojo kodo verslo programų rinkinys, kuris apima visas įmonės poreikius: CRM, El. Prekybą, Apskaitą, Atsargų, Kasų sistemą, Projektų valdymą ir kt.

Unikali Odoo vertės pasiūla – būti tuo pačiu metu labai lengvai naudojama ir visiškai integruota sistema.

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