Odoo Help

0

How to print two different invoice layouts?

By
wacharine
on 11/2/13, 11:03 AM 1,129 views

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

1
Antanas
On 11/4/13, 2:47 AM

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.

0
Gregoire Huet
On 11/2/13, 5:52 PM

Hello

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

AJ

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

wacharine
on 11/3/13, 2:37 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)

Stats

Asked: 11/2/13, 11:03 AM
Seen: 1129 times
Last updated: 3/16/15, 8:10 AM