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 to replace a BackGround Image in Login Screen ?

By
Takwa
on 6/12/15, 5:37 AM 1,187 views

Hello,i need some help,do you know how to change the background image's login of odoov8?i've already developed a theme custom module and i've tried to replace the image; this is code :

<template id="login_layout" name="My Theme Login" inherit_id="web.login_layout">

<xpath expr="//div[@class='oe_single_form_footer']" position="replace">

<div class="oe_single_form_footer">Powered by T</div><!-- it works-->

</xpath>

<xpath expr="//div[@class='oe_single_form']" position="replace">

<div class="oe_single_form">

<img src="/static/src/img/logo.png'" alt="My Theme Logo"  title="My Theme Logo" /> </div> </xpath>&lt;/template>

but the error i get is: Element '&lt;xpath expr="//div[@class='oe_single_form']">' cannot be located in parent view

and its so logic cause in the inherit template unlike the "oe_single_form_footer" the "oe_single_form" its not in a div balise(sorry am new with odoo):

<template id="web.login_layout" name="Login Layout">

<t t-call="web.layout">

<t t-set="head">

<link href="/web/static/src/css/base.css" rel="stylesheet"/>

<link href="/web/static/lib/bootstrap/css/bootstrap.css" rel="stylesheet"/>

</t>

<t t-set="body_classname" t-value="'oe_single_form'"/>

<div class="oe_single_form_container modal-content">

<div class="oe_single_form_logo">

<img t-attf-src="/web/binary/company_logo{{ '?dbname='+db if db else '' }}"/>

</div>

<hr/>

<t t-raw="0"/>

<div class="oe_single_form_footer" t-if="not disable_footer">

<t t-if="not disable_database_manager">

<a class="oe_login_manage_db" t-attf-href="/web/database/manager{{ '?debug' if debug else '' }}">Manage Databases</a>

<span class="oe_footer_seperator"> | </span> </t> <a href="https://www.odoo.com" target="_blank">Powered by <span>Odoo</span></a> </div> </div> </t> </template>

any suggestion?

0
Christelle Wehbe
On 9/29/15, 7:49 AM

You have to write

<template id="yourThemeName-login" inherit_id="web.login" name="You can write the name of your theme">
    <xpath expr="//body/div[@id='wrapwrap']" position="attributes">
        <attribute name="style">background-color: #333;</attribute>
    </xpath>
</template>

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: 6/12/15, 5:37 AM
Seen: 1187 times
Last updated: 3/12/16, 10:51 PM