Odoo Help

Welcome!

This community 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.

5

how to attach generated report in attachment

By
Sandeep
on 5/17/13, 3:50 AM 2,251 views

Hey everybody

could you plz tell me, how to attach report in attachment when it is generated via button in OpenERP 6.1

PLz be sure , i don't want for V7

Hi! can anyone help me in writing a python expression for partner_ledger_webkit report? It has a many2many field partner_ids and i want to use the partner name as attachment prefix. I worked around a lot with so many expressions but i don't understand how to write for a many2many, please help its really very urgent.

evon_dun
on 10/3/13, 9:13 AM
1

Francesco OpenCode

--Francesco OpenCode--
3608
| 5 7 9
Grottaglie, Italy
--Francesco OpenCode--

Italian Odoo (OpenERP) Modules Developer LINKEDIN: http://www.linkedin.com/in/francescoapruzzese

Francesco OpenCode
On 5/17/13, 5:39 AM

Go to

Settings -> Customization -> Low Level Objects -> Actions -> Reports

Open the report you want attach. Go to Save As Attachment Prefix and set a string (a python expression is accepted too).

Now when you print a report it will be attached to the record.

image description

Thi is not an answer of my Q.............:(((

Sandeep
on 5/17/13, 7:27 AM

?? You want an automatica attachment when you generate a report. This is the way.

Francesco OpenCode
on 5/17/13, 7:31 AM

i appreciate your answer , but i want in code , i know we can do this via adding attachment=filename and attachment=True parameter in report action record in XML

Sandeep
on 5/17/13, 8:03 AM

My answer is based on information in your question. Extend your question with other information

Francesco OpenCode
on 5/17/13, 8:10 AM

i understand

Sandeep
on 5/17/13, 11:54 AM

Is these working in OpenERP version 7?

Vikram
on 8/22/13, 5:21 AM

Can you help me writing expression for a partner ledger webkit report

evon_dun
on 9/26/13, 6:41 AM

Please, open another post to receive help on this. If the answer is the correct one close this answer because it's 7 month old.

Francesco OpenCode
on 9/26/13, 12:35 PM

Hi! can anyone help me in writing a python expression for partner_ledger_webkit report? It has a many2many field partner_ids and i want to use the partner name as attachment prefix. I worked around a lot with so many expressions but i don't understand how to write for a many2many, please help its really very urgent.

evon_dun
on 10/3/13, 9:11 AM

I want to use partner's name from 'partner_ids' field which is a 'many2many' field in the 'partner.ledger.webkit' model, in the attachment prefix for the report 'Partner Ledger Report' example 'object.company_id.name.pdf'. Please help!

evon_dun
on 10/7/13, 3:51 AM
0

Andreas Maertens

--Andreas Maertens--
912
| 5 5 7
Finsterwalde, Germany
--Andreas Maertens--

I develop odoo8.0 modules

Andreas Maertens
On 5/17/13, 5:27 AM

First you need to install document management addon. Then you just need to give your report an attachment value if it has none.

You can do that here:

settings/technical/actions/reports

search your report

add i.e.

'%s.pdf'%object.name

as attachment prefix.

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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 5/17/13, 3:50 AM
Seen: 2251 times
Last updated: 3/16/15, 8:10 AM