Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
99 Представления

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. 

  1. Watchdog' module installed
  2. Went to the Point of Sale and did a Hard Reload (Cmd + Shift + R) to clear the browser's old files.
  3. Forced-Clear the Browser's Local Database (Clicked the "Application->Storage -> Clear site data" button from the Developer Tools)
  4. Disabled the server cache (--dev=all)
  5. Clicked "Regenerate Asset Bundles" for solving "stuck" frontend caches.
  6. Deleted the Manifest's Cache (the compiled Python files (__pycache__)
  7. Cleared Entire Browser Cache (both "Cookies and Site Data" and "Cached Web Content" are checked, and clicked Clear)
  8. 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.
  9. 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>

 

Аватар
Отменить
Related Posts Ответы Просмотры Активность
2
окт. 25
277
0
окт. 25
613
1
сент. 25
1531
0
июл. 23
4
2
окт. 25
171