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

i create custom field in account.move and i want to make this field display in the table of the 

Aged receivable and Aged payable in accounting=> reports 

how can i do this?!

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,
If you want to add a new field to the Aged Receivable and Aged Payable reports, you can use Odoo's templating language and xpath logic. It looks roughly like this:

<t t-inherit="base.template" t-inherit-mode="extension">
    <xpath expr="//tr[1]" position="after">
        <tr><td>new cell</td></tr>
    </xpath>
</t>




Set t-inherit-mode="extension" to modify an existing template. If you would set it to primary you would create a new template. From there on you can work with the familiar odoo xpath logic.
Keep in mind that this is a templating language with python support. So to actually print a field you first need to find the variable in the parent record (the recordset is usually called doc, order or something like this depending on the report). To display it you would do something like this:

<p><t t-out="order.name"/></p>




Hope it helps



Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 2 24
1835
0
thg 9 23
1615
1
thg 6 23
3262
0
thg 6 22
3422
Product Variant Đã xử lý
2
thg 5 22
2295