Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
4321 Visualizações

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
Cancelar
Melhor resposta

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
1
mai. 25
992
2
nov. 24
2200
0
mai. 24
1602
4
fev. 24
12364
1
jan. 24
1680