c7fbae7a343dd90f8449ed94530f1fa2e6070690
*:point_of_sale,pos_ayden,pos_discount,pos_hr,pos_loyalty,pos_mercury, pos_restaurant,pos_sale,pos_six Previously, the point of sale and related modules made heavy usage of `useListener`. This is because the pos was converted early to owl, and in owl 1, using events to communicate between components was encouraged. In owl 2, the decision was made to stop encouraging this way of communicating between components, because it encourages communication accross many layers of components, and is also hard to debug. In addition, in owl 2, because components can have 0 or more than node, including non HTMLElement nodes like text or comment nodes, owl removed the implementation of useListener, as useListener relies on the presence and unicity of a root HTMLElement per component on which we can attach event listeners. Another problem is that events rely on the fact that the components are in the DOM so that the event can propagate, which can lead to issues in some cases and in particular, in the PoS, if you load the point of sale and switch tabs, some things will be broken because we are triggering events, but there have not been any animation frame fired in the tab because it's not focussed, and so owl has not mounted the component yet. When migrating odoo to owl 2, we introduced a shim for this.el and useListener in LegacyComponent, with the hope to remove it as soon as possible. This commit removes all usage of useListener from the pos modules for those reasons. In some cases, useListener was incorrectly used intstead of t-on, and the event was triggered and handled by the same component, in other cases, a simple callback could be passed to a child component. In a few cases, a method had to be implemented on the store as we wanted this method to be available everywhere. closes odoo/odoo#112219 Related: odoo/enterprise#36888 Signed-off-by: Samuel Degueldre <sad@odoo.com>
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%