Hi,
I want to send a mail once a sale order got created. I am using the email templates for the mail structure. I have defined the create method in the following way.
def create(self, cr, uid, vals, context=None):
if context is None:
context = {}
temp_id = 2
self.pool.get('email.template').send_mail(cr, uid, temp_id, ids,True, context=context)
return super(sale_order,self).create(cr,uid,vals,context=None)
But for that code to work, for sending the mail, I need the current record id which is getting saved(say ids). How can I get the id of the sale order which is getting created. Please help me with a solution.
Issue resolved by using "ids = super(sale_order,self).create(cr,uid,vals,context=None)" and "return ids"