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.

-1

Inherit pos templates

By
Jihen BEN ALI
on 7/24/15, 8:04 AM 1,096 views

Hi,

I want to change the logo in the point of sale so I had created a new module as follow

<?xml version="1.0" encoding="utf-8"?>

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

<!-- Edit point of sale template -->

<t t-extend="PosWidget" >

<xpath expr="//div[@class='pos-branding']/img" position="replace"> 

<img class="pos-logo" src="/web_genext/static/src/img/logo.png" />

</xpath>

</t>

</templates>

But when I install this new module the logo doesn't change any suggestion.

Thank you

Sorry, can you tell me the class "pos-branding'" in which file does it exit to be able to help you please

Drees Far
on 7/24/15, 8:15 AM

In the file pos.xml under point_of_sale/static/src/xml

Jihen BEN ALI
on 7/24/15, 8:52 AM

I have answered you and that s correct!!!

Drees Far
on 7/24/15, 8:53 AM
0
Jihen BEN ALI
On 7/25/15, 6:01 AM

The solution is as follow if anyone needs help:


<templates id="my_template" inherit_id="point_of_sale.template">

<t t-extend="PosWidget">

<t t-jquery="div.pos-branding" t-operation="inner">

<img src="/pos_module/static/src/img/logo.png" style="max-height: 40px; padding-left:5px; margin-top:2px;"/>

<span class="placeholder-UsernameWidget"></span>

</t>

</t>

</templates>

Thanks for the help.

-1

Drees Far

--Drees Far--
1130
| 5 2 6
Tunis, Tunisia
--Drees Far--
Drees Far
On 7/24/15, 8:42 AM

 Try this:

Now it shoud works:

<template id="test_report" inherit_id="point_of_sale.template">

<xpath expr="//div[@class='pos-branding']" position="replace">

<div class="pos-branding">

<t t-extend="PosWidget" >

<div class="col-xs-3">

<img src="/web_genext/static/src/img/logo.png" style="max-height: 90px;"/>

</div>

</div>

</xpath>

</template>

Thanks for your answer but it doesn't work nothing change

Jihen BEN ALI
on 7/24/15, 8:54 AM

try to eliminate the img in the xpath <xpath expr="//div[@class='pos-branding']" position="replace">

Drees Far
on 7/24/15, 8:57 AM

Try my last answer :)

Drees Far
on 7/24/15, 9:04 AM

still getting the odoo img

Jihen BEN ALI
on 7/24/15, 9:07 AM

did you get an error? Did you upgrade your module correctly??

Drees Far
on 7/24/15, 9:22 AM

I gett nothing as error when I update my module

Jihen BEN ALI
on 7/24/15, 9:27 AM

You didnt try it because when i have tried it it gave me an error because i didnt clause t like this!!

Drees Far
on 7/24/15, 9:39 AM

I'm not stupid and when I try it I had closed all the balise and I still getting the odoo logo

Jihen BEN ALI
on 7/24/15, 2:07 PM

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: 7/24/15, 8:04 AM
Seen: 1096 times
Last updated: 7/25/15, 6:02 AM