Overslaan naar inhoud
Odoo Menu
  • Aanmelden
  • Probeer het gratis
  • Apps
    Financiën
    • Boekhouding
    • Facturatie
    • Onkosten
    • Spreadsheet (BI)
    • Documenten
    • Ondertekenen
    Verkoop
    • CRM
    • Verkoop
    • Kassasysteem winkel
    • Kassasysteem Restaurant
    • Abonnementen
    • Verhuur
    Websites
    • Websitebouwer
    • E-commerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Bevoorradingsketen
    • Voorraad
    • Productie
    • PLM
    • Inkoop
    • Onderhoud
    • Kwaliteit
    Personeelsbeheer
    • Werknemers
    • Werving & Selectie
    • Verlof
    • Evaluaties
    • Aanbevelingen
    • Wagenpark
    Marketing
    • Social media Marketing
    • E-mailmarketing
    • SMS Marketing
    • Evenementen
    • Marketingautomatisering
    • Enquêtes
    Diensten
    • Project
    • Urenstaten
    • Buitendienst
    • Helpdesk
    • Planning
    • Afspraken
    Productiviteit
    • Chat
    • Goedkeuringen
    • IoT
    • VoIP
    • Kennis
    • WhatsApp
    Apps van derden Odoo Studio Odoo Cloud Platform
  • Bedrijfstakken
    Detailhandel
    • Boekhandel
    • kledingwinkel
    • Meubelzaak
    • Supermarkt
    • Bouwmarkt
    • Speelgoedwinkel
    Food & Hospitality
    • Bar en Pub
    • Restaurant
    • Fastfood
    • Guest House
    • Drankenhandelaar
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architectenbureau
    • Bouw
    • Vastgoedbeheer
    • Tuinieren
    • Vereniging van eigenaren
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketingbureau
    • Advocatenkantoor
    • Talentenwerving
    • Audit & Certificering
    Productie
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Relatiegeschenken
    Gezondheid & Fitness
    • Sportclub
    • Opticien
    • Fitnesscentrum
    • Wellness-medewerkers
    • Apotheek
    • Kapper
    Trades
    • Klusjesman
    • IT-hardware & support
    • Solar Energy Systems
    • Schoenmaker
    • Schoonmaakdiensten
    • HVAC Services
    Others
    • Nonprofit Organization
    • Milieuagentschap
    • Verhuur van Billboards
    • Fotograaf
    • Fietsleasing
    • Softwareverkoper
    Browse all Industries
  • Community
    Leren
    • Tutorials
    • Documentatie
    • Certificeringen
    • Training
    • Blog
    • Podcast
    Versterk het onderwijs
    • Onderwijs- programma
    • Scale Up! Business Game
    • Bezoek Odoo
    Download de Software
    • Downloaden
    • Vergelijk edities
    • Releases
    Werk samen
    • Github
    • Forum
    • Evenementen
    • Vertalingen
    • Word een Partner
    • Services for Partners
    • Registreer je accountantskantoor
    Diensten
    • Vind een partner
    • Vind een boekhouder
    • Een adviseur ontmoeten
    • Implementatiediensten
    • Klantreferenties
    • Ondersteuning
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Vraag een demo aan
  • Prijzen
  • Help

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

  • CRM
  • e-Commerce
  • Boekhouding
  • Voorraad
  • PoS
  • Project
  • MRP
All apps
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Alle posts Personen Badges
Labels (Bekijk alle)
odoo accounting v14 pos v15
Over dit forum
Help

Updating Odoo15 JS to Odoo16 owl

Inschrijven

Ontvang een bericht wanneer er activiteit is op deze post

Deze vraag is gerapporteerd
javascriptupgradingOWLlegacy
1 Beantwoorden
4136 Weergaven
Avatar
Abhinav Bajimaya

So we have written an odoo15 module in the legacy javascript format , but now are going to upgrade the code into the odoo16 version.

To be exact, we have used extended the DatePicker field and it works completely fine in v15. 
However, the new v16 uses owl framework and the code is written in a completely different way, but there  I can find ' /legacy' folder still on the odoo16 module, but when the code javascript does not work in v16. 

Is there any way I can use the legacy version of the code in odoo16 as well?

......................................................................................................................................


......................................................................................................................................

Also , in 15 we used to use .extend method in order to add some feature to a js model, its counterpart in odoo is to use prototyping patch method? 

1
Avatar
Annuleer
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Beste antwoord

Hi,

Odoo regularly deprecates code in new versions, which means certain functions or modules might no longer exist or have changed significantly. The underlying architecture of Odoo might have changed, making the older code incompatible with the newer version. Newer versions of Odoo may introduce changes to the database schema, which can affect the compatibility of older code. Update the legacy code to the new version of Odoo by making necessary changes, removing deprecated functions, and updating module structures. If there are substantial changes between versions, you may use migration tools or scripts to help automate some of the code adaptation. Using legacy code might not be the most optimal approach in the long run.

The extend method is used to create a new class that inherits from an existing class and adds or overrides its methods. It allows you to extend the functionality of an existing class without modifying the original class directly. Patching is a way to modify the behavior of an existing method without overriding it completely. In OWL, patching can be achieved using the "patch" method provided by the framework.
That means patching is not used as the counterpart to extend; both are used in different scenarios. You can refer to the blogs

https://www.cybrosys.com/blog/super-override-existing-functions-using-owl
https://www.cybrosys.com/blog/how-to-patch-existing-owl-component-in-odoo-16

Hope it helps

3
Avatar
Annuleer
Abhinav Bajimaya
Auteur

Looks like i need to patch the original DatePicker in order to get what I want here.
I need to change the behaviour of the default datepicker that odoo has , I need to load two calendars here , one is the odoo datepicker and another is the custom nepali datepicker.
https://www.odoo.com/id_ID/forum/help-1/odoo16-owl-adding-a-custom-datepicker-alongside-the-original-datepicker-230437

id appreciate if you looked through this post as well, as it contains more details on what i intend to do

Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!

Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!

Aanmelden
Gerelateerde posts Antwoorden Weergaven Activiteit
py.eval in Javascript
javascript OWL
Avatar
0
jan. 25
1829
Uncaught Javascript Error > Invalid handler (expected a function, received: 'undefined")
javascript OWL
Avatar
0
sep. 23
3789
is there onload hook in v13 JS FormViewDialog ? Opgelost
javascript OWL
Avatar
Avatar
1
mei 23
2923
How to add an existing field validation with OWL?
javascript odoo OWL
Avatar
Avatar
Avatar
2
okt. 25
986
pop up en la pagina de inicio
javascript sale.order OWL
Avatar
Avatar
1
aug. 25
850
Community
  • Tutorials
  • Documentatie
  • Forum
Open Source
  • Downloaden
  • Github
  • Runbot
  • Vertalingen
Diensten
  • Odoo.sh Hosting
  • Ondersteuning
  • Upgrade
  • Gepersonaliseerde ontwikkelingen
  • Onderwijs
  • Vind een boekhouder
  • Vind een partner
  • Word een Partner
Over ons
  • Ons bedrijf
  • Merkelementen
  • Neem contact met ons op
  • Vacatures
  • Evenementen
  • Podcast
  • Blog
  • Klanten
  • Juridisch • Privacy
  • Beveiliging
الْعَرَبيّة 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 is een suite van open source zakelijke apps die aan al je bedrijfsbehoeften voldoet: CRM, E-commerce, boekhouding, inventaris, kassasysteem, projectbeheer, enz.

Odoo's unieke waardepropositie is om tegelijkertijd zeer gebruiksvriendelijk en volledig geïntegreerd te zijn.

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