Joan Barros
Joan Barros

Reputation: 90

Uncaught Error: QWeb2: Error while extending template 'ClientDetailsNo expression given

Getting this error when trying to extend a qweb template. Has anyone come across something like this. I've not been able to find anything related to this.

Uncaught Error: QWeb2: Error while extending template 'ClientDetailsNo expression given
http://localhost:8069/web/content/246-17d551a/web.assets_common.js:2444Traceback:

Error: QWeb2: Error while extending template 'ClientDetailsNo expression given
at Object.exception (http://localhost:8069/web/content/246-17d551a/web.assets_common.js:2444:7)
at Engine.extend (http://localhost:8069/web/content/246-17d551a/web.assets_common.js:2482:507) 
at Engine._render (http://localhost:8069/web/content/246-17d551a/web.assets_common.js:2477:454)
at Engine.render (http://localhost:8069/web/content/246-17d551a/web.assets_common.js:2477:151)
at Class.display_client_details (http://localhost:8069/web/content/313-25bfa95/point_of_sale.assets.js:337:1375)
at Class.line_select (http://localhost:8069/web/content/313-25bfa95/point_of_sale.assets.js:332:528)
at HTMLTableRowElement.<anonymous> (http://localhost:8069/web/content/313-25bfa95/point_of_sale.assets.js:327:86)
at HTMLTableSectionElement.dispatch (http://localhost:8069/web/content/246-17d551a/web.assets_common.js:740:451)
at HTMLTableSectionElement.elemData.handle (http://localhost:8069/web/content/246-17d551a/web.assets_common.js:713:173)

Code:

<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">

<t t-extend="ClientDetails">
  <t t-query="div.client-details-right" t-operation="append">
    <div class="client-detail">
        <span class="label">RNC</span>
        <span class="detail client-phone">Test</span>
    </div>
  </t>
</t>

Upvotes: 1

Views: 3181

Answers (1)

Naglis Jonaitis
Naglis Jonaitis

Reputation: 2633

There is a typo in the attribute name for the jQuery selector -- it should be t-jquery, not t-query:

<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">

    <t t-extend="ClientDetails">
        <t t-jquery="div.client-details-right" t-operation="append">
            <div class="client-detail">
                <span class="label">RNC</span>
                <span class="detail client-phone">Test</span>
            </div>
        </t>
    </t>

</templates>

Upvotes: 5

Related Questions