This question has been flagged
1 Reply
5293 Views

I'm creating a theme but sometimes I make mistakes. This usually results in an error 500 that I can fix but not this time. I'm trying all kinds of stuff as I have no manual meaning errors are frequent.

Error:
500: Internal Server Error
Template 'web.assets_common' not found

Trace:
..., line 190, in get_template raise QWebTemplateNotFound("Template %r not found" % name, template=origin_template) QWebTemplateNotFound: Template 'web.assets_common' not found

I was trying something like
<?xml version="1.0" encoding="utf-8"?>

<openerp>
    <data>
        <!--template id="assets" name="Assets" inherit_id="web.assets_common" active="True" >
            <xpath expr="." position="replace">
                <script type="text/javascript" src="/web/static/lib/underscore/underscore.js"/>
            </xpath>
        </template-->
    </data>
</openerp>

I need some tips and tricks on how to handle problems like these. Ideally I would like to disable this theme via command line, or enable another one I know works. This is just one solution, maybe I should go into the database and fix there? I'm a bit lost as I can't access my backend anymore either.

cheers

Avatar
Discard

Thanks Luke, I don't have enough karma yet to comment so I'll reply here. I requested access on the config files, my username also needs access to the database so once I get that and have tried your proposals I'll get back to you. EDIT: someone pls accept Luke's answer cheers.

Accepted his answer for you.

@Bruno,

No problem!

Best Answer

@Bruno,

What I would recommend is moving the theme directory to another directory name in your local filesystem. For example if you have a module directory called website_multi_image that you're working on you could do the following:

sudo mv /opt/odoo/custom/addons/website_multi_image /opt/odoo/custom/addons/website_multi_image_BACKUP

you should then be able to restart your odoo-server from the command line (or openerp-server depending on your setup) and access your backend again. This is a workaround i've used countless times when developing odoo theme modules.

If the issue is really persistent then you could try reverting or fixing the changes you made that threw the error in the local filesystem and then upgrading the module only at the command line. This involves starting the server with the following structure (eg. using website_multi_image) for example:

./openerp-server --update=website_multi_image -c /etc/odoo-server.conf

Please comment back if you run into any issues with the above methods. I'd also recommend getting on the pre-order for this book:

https://www.packtpub.com/big-data-and-business-intelligence/odoo-essentials

I believe this will be targeting developers and it looks like it will be a great resource for theme development.

Avatar
Discard

Accepted your answer since Bruno requested this. Keep up the good work Luke! :)

@Yenthe,

Thanks!