How to Override a Widget in Odoo 13 POS? – CBMS Odoo ERP

How to Override a Widget in Odoo 13 POS? – CBMS Odoo ERP

2
1 minute, 4 seconds Read

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

Similar Posts

2 Comments

  1. avatar
    @abdoh5915 says:

    Good tutorial sir
    Where is the next video?

    I have Question: I need to have the pop-up window when the product has variant and make it available to select from the pop-up window, and include it on the order details and payment
    How can i Do that Please need your help brother

    Thank you and appreciate you sir

Leave a Reply

Your email address will not be published. Required fields are marked *