Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
4330 Представления

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.

Аватар
Отменить
Лучший ответ

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

Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
мая 25
995
2
нояб. 24
2205
0
мая 24
1612
4
февр. 24
12368
sale / delivery Решено
1
янв. 24
1681