Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
4 Vastaukset
4126 Näkymät
unable to use company fields in template xml ${res.company.name} not working showing as it as text
<?xml version="1.0" encoding="utf-8" ?>
<openerp>
<template id="index" inherit_id="point_of_sale.index">
<xpath expr="//title" position="replace">
<title>${res.company.name}</title>
</xpath>
</template>
</openerp>
Avatar
Hylkää
Tekijä

thanx and what for if i want to shot a new field created in res.company like 'res.company.pTitle'

What have you tried? It is res_company, not res.company.

Tekijä

yes done thanx one more help if you can will be very thankful to you

i want to show image from model res.company.plogo which is binary custom field

how can we do that like scr="res.company.plogo" or any other solution to get image from model res.company.plogo and show here down

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

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

<t t-extend="Chrome">

<t t-jquery=".pos-logo" t-operation="replace">

<img src="" style="padding: 5px; margin: 0px; height: 40px; width: 100px;" />

</t>

</t>

</templates>

Paras vastaus

Try this:

<xpath expr="//title" position="replace">
<title><t t-esc="res_company.name"/></title>
<xpath>
Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
2
syysk. 24
1312
0
lokak. 20
2485
1
huhtik. 20
3139
0
kesäk. 15
4003
1
heinäk. 24
1055