This question has been flagged
1 Reply
11465 Views

I want to override the addons\web\static\src\xml\base.xml in a custom module, i.e. the login page. to load my customized login page first before creating the first database.

How to write the __openerp__.py file and xml file

And what does these tag do in web/__openerp__.py :

'post_load': 'wsgi_postload',
'bootstrap': True,
'web_preload': False,`
Avatar
Discard
Best Answer

In your custom module create folder like: ststic/src/xml/custom.xml

In custom.xml file

<templates id="template" xml:space="preserve">

<t t-extend="Login" >
     <t t-jquery=".oe_login" t-operation="replace">
            Custom code for Login Page
     </t>
</t>

</templates>

Add this file in your __openerp__.py file like : 'qweb': ['static/src/xml/custom.xml']

Avatar
Discard
Author

Thanks for reply. But I mean how to load the web module before creating database( i.e. before install the module. I tried to add 'post_load': 'wsgi_postload', 'bootstrap': True, in __openerp__.py, but not work. I've edited my question.

Add 'auto_install': True in __openerp__.py, it ,may solve your problem. Thanks.

Author

I notice the bug https://bugs.launchpad.net/openerp-web/+bug/963962 similar to my question. It's tagged with fixed. Where is the fix?

can u explain what mean of <t t-extend="Login" > and <t t-jquery=".oe_login"> what is the mean by "Login " and ".oe_login" i think "Login" is the model name and .oe_login is the jquery inherited class am i right or wrong ..??

Login is the template name(Have a lool in base.xml of web). And ".oe_login" is class name.

thanks a lot ..!!!!!!!