Odoo Help


Could we define multiple files in the 'qweb' section of the _openerp__.py?

Pascal Tremblay
on 9/30/15, 5:59 PM 1,133 views

Hello all,

I would want to create 3 or 4 different Pos Ticket in my multi company installation of Odoo 8. 

I thought I could define more than one file in the 'qweb' section, but it doesn't work... 



    'qweb': [


        'static/src/xml/pos_cie_2.xml',     <-----  Could we declare a second file here? It doesn't seem to be possible!!!





Anil R. Kesariya

--Anil R. Kesariya--
| 7 6 8
Rajkot, India
--Anil R. Kesariya--

Odoo Techno Functional Expert

* Engaged with odoo since May - 2012.

* Customise existing module or develop new module base on customer requirement.

* Played key developer role in many past and running projects.

* Expert in requirement gathering of business and transforming requirement into odoo platform.

* Major expertise in core modules, database, report development and theme development.

* Integration expert.

Linkedin  : https://in.linkedin.com/in/anil-kesariya-97b20a66

Anil R. Kesariya
On 9/30/15, 9:40 PM

Hi pascal,

For multiple files you can use this.

'qweb': ['static/src/xml/*.xml']

This load your all xml files.

Hope this would work for you.



Ho wow. very very interesting. Will try it tomorrow. Thanks 1000 times.

Pascal Tremblay
on 9/30/15, 9:49 PM

welcome buddy

Anil R. Kesariya
on 9/30/15, 9:51 PM
Marvin Taboada
On 9/30/15, 11:33 PM

Hello Pascal,

Loading several QWeb templates is possible with both options, please see:



But I don't think it's possible to load different templates for the same Widget and have them available at the same time.

Widgets declare its template only once, the 'PosWidget' declares its template here:

* https://github.com/odoo/odoo/blob/8.0/addons/point_of_sale/static/src/js/widgets.js#L935

For other widgets, as the form widgets, one can create new widgets by inheriting existing ones and overriding their definition (template reference included), and then it can reference the new widgets to be used instead of the existing/default ones.

Even though you can create new PosWidgets, based in the original one, I don't think there is a way to switch widget implementations at runtime.

If someone else knows a way, please let us know.


About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 9/30/15, 5:59 PM
Seen: 1133 times
Last updated: 9/13/17, 6:50 AM