Skip to Content
Menu
This question has been flagged
1 Reply
4302 Views

Hi,
I want to create sale.order when i create calendar.event. Is it possible? If yes how can you get by default the customer?

Thanks.

Avatar
Discard
Best Answer

Hi,

You can override the create method of the model calender.event and can create the sale.order.


class CalenderEVent(models.Model):
_inherit = 'calender.event'

@api.model
def create(self, vals):
res = super(CalenderEVent, self).create(vals)
# code here to create sale order
return res


Thanks

Avatar
Discard
Related Posts Replies Views Activity
1
May 25
989
2
Nov 24
2194
0
May 24
1570
4
Feb 24
12351
1
Jan 24
1678