Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
4158 Lượt xem

Hello Dears,.


I want when quotation status be Cancel the Customer i select in the quotation will be deactivate automatically 

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,

You can make the customer inactive by super the function of the cancel button.

class SaleOrderInherit(models.Model):
_inherit = 'sale.order'

@api.multi
def action_cancel(self, vals):
self.partner_id.active = False
res = super(SaleOrderInherit, self).action_cancel()
return res


Thanks

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
Sales quotation Đã xử lý
2
thg 3 24
2671
5
thg 5 20
3864
1
thg 3 15
5016
1
thg 3 15
4110
2
thg 7 25
1453