Skip to Content
Odoo Меню
  • Увійти
  • Спробуйте це безкоштовно
  • Додатки
    Фінанси
    • Бухоблік
    • Виставлення рахунку
    • Витрати
    • Електронні таблиці (BI)
    • Документи
    • Підпис
    Продажі
    • CRM
    • Продажі
    • POS Магазин
    • POS Ресторан
    • Підписки
    • Оренда
    Веб-сайти
    • Конструктор веб-сайту
    • Електронна комерція
    • Блог
    • Форум
    • Живий чат
    • Електронне навчання
    Ланцюг поставок
    • Склад
    • Виробництво
    • PLM
    • Купівлі
    • Технічне обслуговування
    • Якість
    Кадри
    • Співробітники
    • Рекрутинг
    • Відпустки
    • Оцінювання
    • Рекомендації
    • Автотранспорт
    Маркетинг
    • Маркетинг соцмереж
    • Email-маркетинг
    • SMS-маркетинг
    • Події
    • Автом. маркетингу
    • Опитування
    Послуги
    • Проект
    • Табелі
    • Виїзне обслуговування
    • Служба підтримки
    • Планування
    • Призначення
    Продуктивність
    • Обговорення
    • Схвалення
    • IoT
    • IP-телефонія
    • База знань
    • WhatsApp
    Сторонні модулі Odoo Studio Платформа Odoo Cloud
  • Сфери
    Роздрібна торгівля
    • Книжковий магазин
    • Магазин одягу
    • Магазин меблів
    • Продуктовий магазин
    • Магазин будівельних матеріалів
    • Магазин іграшок
    Food & Hospitality
    • Бар та паб
    • Ресторан
    • Фастфуд
    • Guest House
    • Дистриб'ютор напоїв
    • Hotel
    Real Estate
    • Real Estate Agency
    • Архітектурна фірма
    • Будівництво
    • Управління нерухомістю
    • Садівництво
    • Асоціація власників нерухомості
    Consulting
    • Accounting Firm
    • Партнер Odoo
    • Marketing Agency
    • Юридична фірма
    • Придбання Талантів
    • Аудит та сертифікація
    Виробництво
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Корпоративні подарунки
    Здоров'я & Фітнес
    • Спортивний клуб
    • Оптика
    • Фітнес-центр
    • Практики здоров'я
    • Аптека
    • Салон краси
    Trades
    • Ремонтник
    • IT-обладнання та Підтримка
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Екологічна агенція
    • Оренда білбордів
    • Фотографія
    • Лізинг велосипедів
    • Реселлер програмного забезпечення
    Browse all Industries
  • Спільнота
    Навчання
    • Навчальний посібник
    • Документація
    • Сертифікації
    • Тренування
    • Блог
    • Подкаст
    Сприяйте Освіті
    • Програма навчання
    • Бізнес гра Scale Up!
    • Відвідайте Odoo
    Отримайте програмне забезпечення
    • Завантаження
    • Порівняйте версії
    • Релізи
    Співпрацюйте
    • Github
    • Форум
    • Події
    • Переклади
    • Стати партнером
    • Services for Partners
    • Зареєструйте вашу бухгалтерську фірму
    Отримайте послуги
    • Знайдіть партнера
    • Знайдіть бухгалтера
    • Зустріньтеся з консультантом
    • Послуги з впровадження
    • Референси клієнтів
    • Підтримка
    • Оновлення
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Отримати демо
  • Ціни
  • Допомога

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

  • CRM
  • e-Commerce
  • Бухоблік
  • Склад
  • PoS
  • Проект
  • MRP
All apps
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
All Posts Люди Значки
Мітки (View all)
odoo accounting v14 pos v15
Про цей форум
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
All Posts Люди Значки
Мітки (View all)
odoo accounting v14 pos v15
Про цей форум
Допомога

Updating Odoo15 JS to Odoo16 owl

Підписатися

Отримуйте сповіщення про активність щодо цієї публікації

Це запитання позначене
javascriptupgradingOWLlegacy
1 Відповісти
4129 Переглядів
Аватар
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
Аватар
Відмінити
Аватар
Cybrosys Techno Solutions Pvt.Ltd
Найкраща відповідь

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
Аватар
Відмінити
Abhinav Bajimaya
Автор

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

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

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

Реєстрація
Related Posts Відповіді Переглядів Дія
py.eval in Javascript
javascript OWL
Аватар
0
січ. 25
1815
Uncaught Javascript Error > Invalid handler (expected a function, received: 'undefined")
javascript OWL
Аватар
0
вер. 23
3784
is there onload hook in v13 JS FormViewDialog ? Вирішено
javascript OWL
Аватар
Аватар
1
трав. 23
2914
How to add an existing field validation with OWL?
javascript odoo OWL
Аватар
Аватар
Аватар
2
жовт. 25
963
pop up en la pagina de inicio
javascript sale.order OWL
Аватар
Аватар
1
серп. 25
840
Спільнота
  • Навчальний посібник
  • Документація
  • Форум
Open Source
  • Завантаження
  • Github
  • Runbot
  • Переклади
Послуги
  • Хостинг Odoo.sh
  • Підтримка
  • Оновлення
  • Кастомні доробки
  • Навчання
  • Знайдіть бухгалтера
  • Знайдіть партнера
  • Стати партнером
Про нас
  • Наша компанія
  • Торгові активи
  • Зв'яжіться з нами
  • Вакансії
  • Події
  • Подкаст
  • Блог
  • Клієнти
  • Юридичні документи • Конфіденційність
  • Безпека
الْعَرَبيّة 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 - це набір програм для роботи з відкритим кодом, які охоплюють всі ваші потреби компанії: CRM, електронна комерція, бухгалтерський облік, склад, точка продажу, управління проектами тощо.

Унікальна пропозиція Odoo - це одночасно дуже проста у використанні та повністю інтегрована.

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