Siirry sisältöön
Odoo Menu
  • Kirjaudu sisään
  • Kokeile ilmaiseksi
  • Sovellukset
    Talous
    • Kirjanpito
    • Laskutus
    • Kulut
    • Datataulukot (BI)
    • Asiakirjat
    • Allekirjoita
    Myynti
    • CRM
    • Myynti
    • Kassajärjestelmä myymälään
    • Kassajärjestelmä ravintolaan
    • Tilaukset
    • Vuokraus
    Verkkosivut
    • Verkkosivun Rakennustyökalu
    • Verkkokauppa
    • Blogi
    • Foorumi
    • Livechat
    • Verkko-oppiminen
    Toimitusketju
    • Varastointi
    • Tuotanto
    • Tuotteen elinkaaren hallinta (PLM)
    • Ostot
    • Huolto
    • Laatu
    Henkilöstöhallinto
    • Työntekijät
    • Rekrytointi
    • Vapaat
    • Arvioinnit
    • Suositukset
    • Kuljetuskalusto
    Markkinointi
    • Somemarkkinointi
    • Sähköpostimarkkinointi
    • Tekstiviestimarkkinointi
    • Tapahtumat
    • Markkinoinnin automaatio
    • Kyselyt
    Palvelut
    • Projekti
    • Työaikakirjaukset
    • Kenttähuolto
    • Asiakaspalvelu
    • Suunnittelu
    • Ajanvaraukset
    Tuottavuus
    • Viestintä
    • Hyväksynnät
    • IoT
    • IP-puhe
    • Tietokirjasto
    • WhatsApp
    Kolmannen osapuolen sovellukset Odoo-Studio Odoo-Pilvialusta
  • Toimialat
    Vähittäiskauppa
    • Kirjakauppa
    • Vaatekauppa
    • Huonekaluliike
    • Ruokakauppa
    • Laitteistokauppa
    • Lelukauppa
    Ruoka & Majoitus
    • Baari ja Pubi
    • Ravintola
    • Pikaruoka
    • Majatalo
    • Juomien jakelija
    • Hotelli
    Kiinteistöt
    • Kiinteistönvälitystoimisto
    • Arkkitehtitoimisto
    • Rakentaminen
    • Kiinteistönhallinta
    • Puutarhanhoito
    • Kiinteistön omistajien yhdistys
    Konsultointi
    • Tilitoimisto
    • Odoo-kumppani
    • Markkinointitoimisto
    • Lakitoimisto
    • Osaajahankinta
    • Tilintarkastus & sertifiointi
    Tuotanto
    • Tekstiili
    • Metalli
    • Huonekalut
    • Ruoka
    • Panimo
    • Yrityslahjat
    Terveys & Liikunta
    • Urheiluseura
    • Silmälasiliike
    • Kuntokeskus
    • Hyvinvointialan ammattilaiset
    • Apteekki
    • Kampaamo
    Kaupat
    • Yleismies
    • IT-laitteisto & Tuki
    • Aurinkoenergiajärjestelmät
    • Suutari
    • Siivoustarvikkeet
    • LVI-palvelut
    Muut
    • Voittoa tavoittelematon järjestö
    • Ympäristötoimisto
    • Mainostaulujen vuokraus  
    • Valokuvaus
    • Leasing-pyörät
    • Ohjelmistojen jälleenmyyjä
    Selaa kaikkia toimialoja
  • Yhteisö
    Opi
    • Tutoriaalit
    • Dokumentaatio
    • Todistukset
    • Koulutus
    • Blogi
    • Podcast
    Kannusta kouluttautumaan
    • Koulutusohjelmat
    • Scale Up! Liiketoimintapeli
    • Vieraile Odoolla
    Hanki ohjelmisto
    • Lataa
    • Vertaile versioita
    • Julkaisut
    Tee yhteistyötä
    • Github
    • Foorumi
    • Tapahtumat
    • Käännökset
    • Ryhdy kumppaniksi
    • Kumppanipalvelut
    • Rekisteröi tilitoimistosi
    Hanki palveluja
    • Löydä kumppani
    • Löydä kirjanpitäjä
    • Varaa asiantuntijatapaaminen
    • Implementaatiopalvelut
    • Asiakasreferenssit
    • Tuki
    • Versionkorotukset
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Varaa demo
  • Hinnoittelu
  • Asiakaspalvelu

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

  • CRM
  • e-Commerce
  • Kirjanpito
  • Varastointi
  • PoS
  • Projekti
  • MRP
All apps
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Kaikki kirjoitukset Ihmiset Merkit
Tunnisteet (Näytä kaikki)
odoo accounting v14 pos v15
Tietoa tästä foorumista
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Kaikki kirjoitukset Ihmiset Merkit
Tunnisteet (Näytä kaikki)
odoo accounting v14 pos v15
Tietoa tästä foorumista
Apua

[v15] POS OWL framework Abstract Concepts

Tilaa

Saat ilmoituksen, kun tähän viestiin ilmaantuu aktiviteettia

Tämä kysymys on merkitty
javascriptposframeworkOWL
4133 Näkymät
Avatar
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
Avatar
Hylkää
Odoo4Life
Tekijä

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.

Nautitko keskustelusta? Älä vain lue, vaan osallistu!

Luo tili jo tänään nauttiaksesi yksinoikeusominaisuuksista ja osallistuaksesi mahtavaan yhteisöömme!

Rekisteröidy
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
How inherit the point of sale Java script class in odoo 17
javascript pos OWL v17
Avatar
Avatar
1
jouluk. 24
3380
How can I use orm with JavaScript in PosOrder prototype file
javascript pos orm OWL Odoo 18
Avatar
Avatar
2
heinäk. 25
2731
py.eval in Javascript
javascript OWL
Avatar
0
tammik. 25
1831
does odoo 17 allow to add button to Navbar header in point of sale session inside it to get dynamic data
javascript pos
Avatar
Avatar
1
marrask. 24
2215
How to add product in POS programmatically Ratkaistu
javascript pos
Avatar
Avatar
Avatar
Avatar
4
lokak. 24
5221
Yhteisö
  • Tutoriaalit
  • Dokumentaatio
  • Foorumi
Avoin lähdekoodi
  • Lataa
  • Github
  • Runbot
  • Käännökset
Palvelut
  • Odoo.sh hosting
  • Tuki
  • Versionkorotus
  • Räätälöidyt kehitykset
  • Koulutus
  • Löydä kirjanpitäjä
  • Löydä kumppani
  • Ryhdy kumppaniksi
Meistä
  • Yrityksemme
  • Tavaramerkki
  • Ota yhteyttä
  • Työpaikat
  • Tapahtumat
  • Podcast
  • Blogi
  • Asiakkaat
  • Oikeudellinen ilmoitus • Yksityisyys
  • Tietoturva
الْعَرَبيّة 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 on kokoelma avoimen lähdekoodin yrityssovelluksia, jotka kattavat kaikki yrityksesi tarpeet: asiakkuudenhallinta eli CRM, verkkokauppa, kirjanpito, varastointi, kassajärjestelmä, projektinhallinta, jne.

Odoon uniikki arvolupaus on olla samanaikaisesti erittäin helppokäyttöinen ja täysin integroitu.

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