İçereği Atla
Menü
Bu soru işaretlendi
2 Cevaplar
4041 Görünümler

Hello,

please How to print two different invoice layouts ? when i choose the edit botton i want to see tow possibles layouts (invoice1, invoice2 for exemple)

thanks

Avatar
Vazgeç
En İyi Yanıt

You could even achieve that with one report. Let's take a webkit report example (same princple can be aplied to rml reports): If you need two different layouts:

Add a boolean field for the object, and then in report, make a condition:

if object.my_boolean:
    $object.this}
else:
    ${object.that}

If two options is not enough, you can use selection field, and apply conditions for each selection;

if object.selection == 'this':
    ${object.this}
elif object.selection == 'that':
    ${object.that}
elif object.selection == 'something else':
    ${object.something_else}

You can actually put under such condition anything you like- not only tags, but html elements also.

Avatar
Vazgeç
En İyi Yanıt

Hello

It's possible to have multiple reports for one model. You can develop one report for every layout you need.

AJ

Avatar
Vazgeç
Üretici

thank you for yor reponse,can you please explane this solution?

İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Şub 24
1061
1
Tem 23
1382
1
Şub 24
1241
2
Kas 22
2959
2
Şub 24
1294