Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
5201 Visualizzazioni

I have a piece of code like below

<div class="footer o_standard_footer">
<div class="text-center" style="border-top: 1px solid black;">
<ul class="list-inline mb4">
<li t-if="company.phone" class="list-inline-item">Phone: <span t-field="company.phone"/></li>
<li t-if="company.email" class="list-inline-item">Email: <span t-field="company.email"/></li>
<li t-if="company.website" class="list-inline-item">Web: <span t-field="company.website"/></li>
<li t-if="company.vat" class="list-inline-item"><t t-esc="company.country_id.vat_label or 'Tax ID'"/>: <span t-field="company.vat"/></li>
</ul>

<div name="financial_infos">
<span t-field="company.report_footer"/>
</div>

<div t-if="report_type == 'pdf'" class="text-muted">
Page: <span class="page"/> / <span class="topage"/>
</div>
</div>
</div>

I just want to change the style="border-top: 1px solid black; to style="border-top: 1px solid lightgray;"  Normally i would inherit the whole div and change as per requirement but i wanna know is there any efficient method to inherit the above code to change just the border?

Also I have another code like below

<template id="report_invoice_document">
<t t-call="web.external_layout">
<t t-set="o" t-value="o.with_context(lang=lang)" />
<t t-set="address">
<address t-field="o.partner_id" t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}' />
<div t-if="o.partner_id.vat" class="mt16"><t t-esc="o.company_id.country_id.vat_label or 'Tax ID'"/>: <span t-field="o.partner_id.vat"/></div>
</t>

I don't know to inherit the t  because it has no id and i'm really confused as to what should i mention in xpath, someone tell me how to inherit the t field to modify the address widget?

Avatar
Abbandona

Why don't you want to study the official documentation, one of the available books on Odoo development or enjoy Google to answer such basic questions?

You may also want to use a publicly available xpath-tester to test your xpath expressions.

Autore

Thanks Hilar

Post correlati Risposte Visualizzazioni Attività
2
dic 22
23550
3
nov 19
8334
2
gen 24
1753
2
dic 21
23051
1
set 20
8044