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