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.

1

backend process on creation of record

By
Jagdish Panchal
on 1/3/14, 6:26 AM 727 views

Hello All,

I want to call the method which should be run in backend at the time of record creation.

E.g. If I create POS Order, my process should be run in backend at the same time of creating record.

Can anyone suggest how to do?

Thanks

0

Jagdish Panchal

--Jagdish Panchal--
2674
| 5 3 6
Gandhinagar, India
--Jagdish Panchal--

OpenERP Developer

Jagdish Panchal
On 1/4/14, 3:32 AM

Finally Done using python multiprocessing

0
Dhana Babu
On 1/3/14, 6:33 AM

Just use the create method in your sales order class,

import urllib2
def create(self, cr, uid, vals, context=None):
        # just put your code here...
        urlread = urllib2.urlopen("http://www.abc.com").read()
        return super(sale_order, self).create(cr, uid, context=context)

The above method calling when you click on the save button.

Thanks for the answer: i dont want call sequence i want send request to url(www.abc.com)

Jagdish Panchal
on 1/3/14, 6:58 AM

@Jack. I have edited the code. What do you want ?

Dhana Babu
on 1/3/14, 7:03 AM

Yes i have try this code request send to url thats fine, but my problem is when request to url this url create order in magento and when order created in magento then my process is completed in ERP, it take time i have wait for that request complete, i want do this in backend

Jagdish Panchal
on 1/3/14, 7:32 AM

ok, I think you need to use server actions here is the link http://www.sharoonthomas.com/2009/09/open-erp-server-actions.html

Dhana Babu
on 1/3/14, 7:45 AM

I have try server action, but still facing problem

Jagdish Panchal
on 1/3/14, 8:25 AM

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: 1/3/14, 6:26 AM
Seen: 727 times
Last updated: 3/16/15, 8:10 AM