Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
12680 Vues

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
Ignorer
Meilleure réponse

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
Ignorer
Auteur

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.

Auteur

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 ..!!!!!!!

Publications associées Réponses Vues Activité
0
mars 15
4309
1
mai 25
709
2
mai 25
1279
0
nov. 24
1077
1
juil. 24
2865