Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
Câu hỏi đã đóng với nguyên nhân: not enough information given to provide help
bởi Jodie Beernaut trên 02/04/2024 09:39:22
1472 Lượt xem
try:
instance, partner_company_id, partner_id = request.env['wizard.create.instance'].create_instance(kwargs)
except Exception as e:
return {
'error': str(e)
}

on the model i have an @api.constraints that raise an error but this is ingnored if the function it's inside a try except and it's created anyway. How rollback in case of raised Error?

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
5
thg 9 25
22343
3
thg 8 25
3269
1
thg 5 25
3123
1
thg 4 25
4094
1
thg 4 25
4960