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.

2

How can I open report when creating Sales Order using Automated Action?

By
Nirali Jogani
on 7/21/14, 3:06 AM 1,214 views

In the automated action we can send emails at the time of record creation or updation. So, I want sales order report generated when create sales order or on update.

I tried with automated action and server action.

I tried with this configuration in OpenERP.

Automated Action values:

Rule Name : Sale Order Automated action
Related Document Model : sale.order
Active : True
Sequence : 1
Before Update Filter : Null
After Update Filter :  Null
Trigger Date : Null
Set Responsible : Null
Add Followers : Null
Server actions to run : Sales Order Report  Server Action

Server Action Values:

Action Name : Sales Order Report  Server Action
object : sale.order
action type : Client Action
condition : True
Client Action : Quotation / Order (Action usage in this action is ir.actions.report.xml)
Sequence : 1
type : ir.actions.server

I tried in different ways but can't reach to the solution. Email functionality is working properly but why it does not generate report? please, point out me a way for report generation. If any one have tried it, help me please. I also want to open wizard at the time of record creation.

Thanks.

Hi Ben, I've changed Server Action with Action Type : Python Code Python Code: datas = {'model': 'sale.order','ids': [object.id],'form': self.read(cr, uid, [object.id],[],context)} action = {'type': 'ir.actions.report.xml', 'report_name': 'sale.order', 'datas': datas} type:ir.actions.server and all other values are remains as it is. Then after I am not able to generate report with automated action. please, point out me a little more.

Nirali Jogani
on 8/7/14, 1:57 AM
0

Ben Bernard

--Ben Bernard--
1083
| 4 3 6
Jakarta, Indonesia
--Ben Bernard--
Ben Bernard
On 8/5/14, 5:37 AM

My solution would be something like

  • add action server with action type = Python Code
  • the python code would be something like calling report service to make report. Add the created report as datas for new (or update) ir.attachment record

 

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

1 follower(s)

Stats

Asked: 7/21/14, 3:06 AM
Seen: 1214 times
Last updated: 3/16/15, 8:10 AM