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

How can i delete the record in odoo17 i tried with

thanks 
อวตาร
ละทิ้ง

Please recheck your post and update the question with more information

คำตอบที่ดีที่สุด

Hi,

If you need to delete a record you can make it from the UI itself.Select the record -> Action -> delete


Hope it helps

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,

You cannot delete a record from XML.

Python Code to delete a record:

// for deleting record from own model
def delete_own_record(self):
​for record in self:
​record.unlink()

// for deleting record from another model
def delete_another_record(self):
​record = self.env['custom.model.name'].search([domain], limit=1)
​record.unlink()

Hope this helps!

อวตาร
ละทิ้ง