This video discusses on overriding existing widgets inside POS by a step by step process of inheriting point of sale assets, extending an existing widget and adding desired codes into it.
Best practices as suggested by Odoo for javascript customisations.
1. remember the convention for a module name: addon name suffixed with module name.
2. declare all your dependencies at the top of the module. Also, they should be sorted alphabetically by module name. This makes it easier to understand your module.
3. declare all exported values at the end
try to avoid exporting too many things from one module. It is usually better to simply export one thing in one (small/smallish) module.
4. asynchronous modules can be used to simplify some use cases. For example, the web.dom_ready module returns a promise which will be resolved when the dom is actually ready. So, another module that needs the DOM could simply have a require(‘web.dom_ready’) statement somewhere, and the code will only be executed when the DOM is ready.
5. try to avoid defining more than one module in one file. It may be convenient in the short term, but this is actually harder to maintain.
#odoo13 #odoopos #odoowidget
For More Videos Subscribe to our YouTube channel.
Visit our company website:
#Override #Widget #Odoo #POS