Skip to Content
Menú
This question has been flagged
2737 Vistes

i am trying to extend a frontend qweb template.


I created this file in my_module/static/src/xml


<?xml version="1.0" encoding="utf-8"?>
<templates>
    <t t-inherit="website_sale_stock.product_availability" t-inherit-mode="extension">
        <xpath expr="//div[@id='out_of_stock_message']" position="inside">
            <p>This is available and ships ... </p>
        </xpath>
    </t>
</templates>
and in my manifest i added

    'assets': {     
        'web.assets_qweb': ['my_module/static/src/xml/*.xml',],


But i get this error:

ValueError: Module website_sale_stock not loaded or inexistent, or templates of addon being loaded (my_module) are misordered - - -


I cant find any documentation about the order in which the templates should be loaded.

The website_sale_stock is in my modules dependencies and is definitely installed.


Any idea what i am doing wrong ?

Avatar
Descartar

The error raised in this code https://github.com/odoo/odoo/blob/15.0/addons/web/controllers/main.py#L415

It can't get the parent template for your extended template so you can add log to the above code and trace the error.

Hi Jaco

Ever figured this out? I have the same issue. (Even trying to add the same code, an in_stock_message.)

tnx

Related Posts Respostes Vistes Activitat
2
de des. 24
8014
1
d’oct. 22
5335
0
de jul. 22
9
0
d’oct. 22
2691
1
d’ag. 22
4279