Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
4436 Vistas

I need to change the logo size in my website in button print pdf:

<template id="layout_logo_show_my" inherit_id="website.layout" customize_show="True" name="My Show Logo">
    <xpath expr="//header//a[@class='navbar-brand']" position="replace">
        <a href="/" class="navbar-brand logo">
            <img src="/logo.png" t-att-alt="'Logo of %s' % res_company.name" t-att-title="res_company.name" style="max-width: 200px; max-height: 150px;/>       

</a>
    </xpath>
    </template>


error=


ParseError: "Error while validating constraint

Element '<xpath expr="//header//a[@class='navbar-brand']">' cannot be located in parent view

Error context:
View `Show Logo`
[view_id: 790, xml_id: website.layout_logo_show, model: n/a, parent_id: 788]


can help me?

Avatar
Descartar
Mejor respuesta

Try to inherit from website.layout_logo_show :

<template id="company_logo_show" inherit_id="website.layout_logo_show" customize_show="True" name="Show Logo">
<xpath expr="//a[contains(@class, 'navbar-brand')]" position="replace">
<a class="navbar-brand page-scroll logo" href="#page-top">
<img src="/mf_theme/static/src/img/...."/>
</a>
</xpath>
</template>

Avatar
Descartar

Still the same error ? or another one ?

Autor Mejor respuesta

@mahmoud:

<template id="layout_logo_show_my" inherit_id="website.layout_logo_show" customize_show="True" name="Show Logo">
        <xpath expr="//a[contains(@class, 'navbar-brand')]" position="replace">
            <a class="navbar-brand page-scroll logo" href="#page-top">
                <img src="/static/src/img/lg.png"/>
            </a>
        </xpath>
    </template>


its doesn't work to me? not error but for logo doesn't show in my website

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
5
feb 24
23921
0
jul 18
2563
2
jul 18
2948
3
may 23
15442
1
ene 23
1857