Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
5213 Lượt xem

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?

Ảnh đại diện
Huỷ bỏ

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.

Tác giả

Thanks Hilar

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 12 22
23560
Qweb Inheritance Đã xử lý
3
thg 11 19
8352
2
thg 1 24
1770
2
thg 12 21
23063
1
thg 9 20
8063