This question has been flagged
13 Replies
9783 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

Avatar
Discard

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

Author

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

I have answered you and that s correct!!!

Author Best Answer

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.

Avatar
Discard
Best Answer

 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>

Avatar
Discard
Author

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

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

Try my last answer :)

Author

still getting the odoo img

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

Author

I gett nothing as error when I update my module

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

Author

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