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
    Real Estate
    • Real Estate Agency
    • Architektūros įmonė
    • Konstrukcija
    • Estate Managament
    • Sodininkauti
    • Turto savininkų asociacija
    Consulting
    • Accounting Firm
    • Odoo Partneris
    • Marketing Agency
    • Teisinė firma
    • Talentų paieška
    • Auditai & sertifikavimas
    Gamyba
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Įmonių dovanos
    Sveikata & Fitnesas
    • Sporto klubas
    • Akinių parduotuvė
    • Fitneso Centras
    • Sveikatos praktikai
    • Vaistinė
    • Kirpėjas
    Trades
    • Handyman
    • IT įranga ir palaikymas
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • 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

[v15] POS OWL framework Abstract Concepts

Prenumeruoti

Get notified when there's activity on this post

This question has been flagged
javascriptposframeworkOWL
4089 Rodiniai
Portretas
Odoo4Life

Hello there,

I have been learning the OWL framework by doing the todo list tutorial. I have completed the tutorial and understood the concepts of components, hooks, templates, event handling, reactivity, etc.

Now I am going through the POS app and trying to understand how OWL was used in Odoo specifically. However, except from the templates, I cannot seem relate the code from Odoo POS with the OWL tutorial code.

This is why I would like to ask here to get some more details and hopefully understand the way in which it is written.

I was looking specifically at the ProductScreen component within the Point of Sale and trying to understand it.
Below I have added specific questions.
I have attached three links to images with screenshot of what I will refer to in the following questions.

1. How does Odoo instantiate classes (such as class ProductScreen).What is the trigger for the instantiation and what does the instantiated object reference?
For example: In regular Javascript I have to use the "new" keyword to create an instance of the class. However, I do not see that in the code. So I'm wondering how Odoo does this.

2. What does ProductScreen.template = 'ProductScreen' represent? Is that the same as static template = xml `

....
` of the OWL tutorial? Instead of it being inline, the  ".template" method is used to reference it?

3.What does Registries.Component.add(ProductScreen) do? I suppose it adds it to the registry. What is the registry? I read that it is a key,value map. Is it some sort of Object? what does Odoo do with the registry once the component is added to it?

4. What does return ProductScreen do? What root component is calling on the ProductScreen component for its return? is it returned as an instance of the class?

Sorry I am asking so many questions about this. I just seem to find it very interesting, but couldn't find a lot of information about these concepts. And thought this might be the best place to ask.


Any help would be greatly appreciated, thanks!

https://ibb.co/mJdfztz

https://ibb.co/YkqhmKq

https://ibb.co/nLgVhjJ

0
Portretas
Atmesti
Odoo4Life
Autorius

Alright so I've been putting many hours of research on this topic and I think I've found some answers to some of the questions:

- The Main.js file (addons/point_of_sale/static/src/js/main.js), contains the PosApp class which is the Root component of the Point of Sale addon/module.

- The PosApp component has a method called Setup(). This method is used as a class constructor. Within this method there is a "this.Components" property. All entries within the registry category: "main components", are stored in an array and assigned to the Components property.
This means that the registry is used as a means to store references to all the components that make up the Point of Sale module.

- The PosApp component also has the static template = xml`...`. Which is taught in the OWL documentation. Within this template is a foreach tag, which is used to loop through the "this.Components" array. Hereby, laying out all other component's templates in the process.

The above brings an understanding to:
1. When the foreach loop runs, it instantiates each component.
3 The use of registry is to store a the references of each component under certain registry category.

To whoever reads this and sees that their are flaws to the above-mentioned. Please correct me.

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
How inherit the point of sale Java script class in odoo 17
javascript pos OWL v17
Portretas
Portretas
1
gruod. 24
3320
How can I use orm with JavaScript in PosOrder prototype file
javascript pos orm OWL Odoo 18
Portretas
Portretas
2
liep. 25
2658
py.eval in Javascript
javascript OWL
Portretas
0
saus. 25
1790
does odoo 17 allow to add button to Navbar header in point of sale session inside it to get dynamic data
javascript pos
Portretas
Portretas
1
lapkr. 24
2193
How to add product in POS programmatically Solved
javascript pos
Portretas
Portretas
Portretas
Portretas
4
spal. 24
5164
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