Modifying the Point of Sale screen UI
The UI of the Point of Sale application is written with the OWL QWeb template. In this recipe, we will learn how you can modify UI elements in the Point of Sale application.
Getting ready
In this recipe, we will use the point_of_sale_customization
module created in the Making RPC calls recipe. We will modify the UI of the product card and display the profit margin per product.
How to do it…
Follow these steps to display the profit margin on the product card:
- Add the following code to the
/models/pos_session.py
file to fetch the extra field for the product’s actual price:from odoo import models class PosSession(models.Model): _inherit = 'pos.session' def _loader_params_product_product(self): result = super()._loader_params_product_product() result['search_params']['fields'].append...