Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How is Qweb2 can not find and load templates?

By
emily
on 4/26/15, 3:32 AM 776 views

Below are my codes, I've uninstalled nd re-installed it, still the browser reports this error: Uncaught Error: QWeb2: Template 'ProductFlangeView' not found. Anything I did wrong?


__openerp__.py

{
    'name' : 'Flange',
    'version' : '1.0.0',
    'author' : 'Emily Yu',
    'category' : 'Custom',
    'website' : '',
    'description': """
    """,
    'depends' : ['product'],
    'data':[
        'security/ir.model.access.csv',
        'views.xml'
    ],
    'qweb': [
        'static/src/xml/product_flange.xml'
    ],
    'installable': True,    
}


product_flange.xml

<?xml version="1.0" encoding="UTF-8"?>
<!-- vim:fdl=1:
-->
<templates id="template" xml:space="preserve">
    <t t-name="ProductFlangeView">
        <t t-extend="product.flange">
		    <t t-jquery="body" t-operation="append">
		        <div>text</div>
		    </t>
		</t>            
    </t>
</templates>


widget.js

var flange = openerp.Widget.extend({
    template: 'ProductFlangeView',
    events: {
        // events binding example
        'change select': 'get_selection',
    },
....

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 4/26/15, 3:32 AM
Seen: 776 times
Last updated: 4/26/15, 3:32 AM