Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
4322 มุมมอง

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
992
2
พ.ย. 24
2200
0
พ.ค. 24
1602
4
ก.พ. 24
12364
sale / delivery แก้ไขแล้ว
1
ม.ค. 24
1680