Skip to Content
Menu
This question has been flagged
2641 Views

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
Discard

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 Replies Views Activity
2
Dec 24
7713
1
Oct 22
5137
0
Jul 22
9
0
Oct 22
2553
1
Aug 22
4062