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

Hello everybody,

i want to set special changes in reports only if a key have a special value.

It should look something like this:


<template id="..." inherit_id="account.report_invoice_with_payments">

    <t t-if="o.key1 == 'VALUE'">

        <xpath expr="..." position="...">            ...        </xpath>

        <xpath expr="..." position="...">            ...        </xpath>

        <xpath expr="..." position="...">            ...        </xpath>

    </t>

    <t t-if="o.key1 == 'VALUE'">

        <xpath expr="..." position="...">            ...        </xpath>

        <xpath expr="..." position="...">            ...        </xpath>

        </t>

    ... and so on....

</template>


We work with Odoo version 14.

Has anyone a idea to do this?


Background: We want to change large areas of the invoice, when some fields are set. But i dont want to copy a whole report in Odoo. I would like to work only on the original report. 


Thank you in advance!

Greetings,

Siegfried Joseph


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

Here it is! A functioning good solution!

https://www.odoo.com/de_DE/forum/hilfe-1/how-to-create-a-new-report-inheriting-from-existing-without-replacing-parent-v12-157992

(No karma, no link ;-))

You can copy templates in a .xml file with "primary='True'". 

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
report odoo16 Đã xử lý
1
thg 2 23
2801
0
thg 6 16
3674
0
thg 10 24
1606
0
thg 8 24
1443
0
thg 7 24
1334