Odoo Help

0

Attachments: reports from wizards (how to save them properly)

By
Odooveloper (by Rui Franco)
on 4/7/15, 5:23 AM 476 views

When you define a report, you have to associate it to a model. When the report is saved, the ir.attachment record will hold the model and a record id which, typically, is the active record from which you called the report. Great.


...But, what about reports called from wizards? Wizards have temporary id's so... if the report has a model associated, the attachment record will be associated to that model and the wizard's temporary id! This will cause the attachment to be related to a random record!


How can I tell Odoo/OpenERP that I want the attachment record to be related to a specific id (for instance, a value coming from one of the wizard's fields)?

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

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

1 follower(s)

Stats

Asked: 4/7/15, 5:23 AM
Seen: 476 times
Last updated: 4/7/15, 5:23 AM