How it works...

In this recipe, we loaded one JavaScript file and one SCSS file into the Point of Sale application. In step 1, we changed the background color and the border radius of the pricing label of the product card. After installing the pos_demo module, you will be able to see changes to pricing labels:

In step 2, we added the JavaScript file. In it, we added the log into the console. In order to see the message, you will need to open the browser's Developer tools. In the Console tab, you will see the following log. This shows that your JavaScript file is loaded successfully. Right now, we have only added the log into the JavaScript file, but in upcoming recipes, we will add more to it:

In step 3, we added the JavaScript file and the SCSS file into the Point of Sale assets. The external ID of the Point of Sale assets is point_of_sale.assets. Here, only the external ID is different; everything else works like regular assets. If you don't know how assets work in Odoo, refer to the Static-assets management recipe in Chapter 15, CMS Website Development.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset