I'm trying to change the default pop-up's UI of Odoo POS, as a part of developing custom module for a mobile shop using Odoo 19. The Point of Sale's OWL (Odoo Web Library) template has been overridden to make the pop-up clearer for a mobile shop.
The code and the file placement are correct. All possible causes have also been tried to solve.
- Watchdog' module installed
- Went to the Point of Sale and did a Hard Reload (Cmd + Shift + R) to clear the browser's old files.
- Forced-Clear the Browser's Local Database (Clicked the "Application->Storage -> Clear site data" button from the Developer Tools)
- Disabled the server cache (--dev=all)
- Clicked "Regenerate Asset Bundles" for solving "stuck" frontend caches.
- Deleted the Manifest's Cache (the compiled Python files (__pycache__)
- Cleared Entire Browser Cache (both "Cookies and Site Data" and "Cached Web Content" are checked, and clicked Clear)
- Used the Developer Tools to clear cache (Storage tab->Indexed DB, right-click on localhost entry, and "Delete Database"). With the dev tools still open, did a Hard Reload.
- Restarted with All Flags (.../odoo.conf --dev=all -u mobile_shop)
Seems like the Odoo cache is still holding on to the old files, despite our best efforts. Thank you in advance for your suggestions.
Here is our mobile_shop/__manifest__.py
# Module dependencies
'depends': [
'base',
'sale_management',
'purchase',
'stock',
'point_of_sale',
'mail', # For chatter on repairs, etc.
],
# Data files (we'll add views here)
'data': [
'security/ir.model.access.csv',
'views/imei_history_views.xml',
'views/stock_lot_views.xml',
'views/product_template_views.xml',
],
# Odoo will now be able to read this key
'assets': {
'point_of_sale.assets': [
'mobile_shop/static/src/xml/pos_lot_popup.xml',
'mobile_shop/static/src/css/pos.css',
],
},
'installable': True,
'application': True,
'auto_install': False,
}
File: mobile_shop/static/src/xml/pos_lot_popup.xml
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-name="point_of_sale.EditListPopup" t-inherit="point_of_sale.EditListPopup" t-inherit-mode="extension" owl="1">
<xpath expr="//h1[has-class('popup-title')]" position="replace">
<h1 class="popup-title">
<t t-if="props.title == 'Lot/Serial number(s) required'">
Enter IMEI Number(s) for <t t-esc="props.product.display_name"/>
</t>
<t t-else="">
<t t-esc="props.title"/>
</t>
</h1>
</xpath>
<xpath expr="//div[has-class('popup-body')]" position="inside">
<p class="popup-help-text">
Scan or type each IMEI. Press Enter after each one.
</p>
</xpath>
</t>
</templates>