Contributors mailing list archives

contributors@odoo-community.org

Browse archives

Avatar

Prevent to delete product imported by a module

by
Akretion France., David BEAL
- 19/05/2016 11:10:15
Hi all,

I need a generic way to prevent the user to delete product or any other record created by a module.

What are the best options ?

I suggest:
- a base module
- which override unlink() by monkey patching
- check if in this record a boolean field named 'protected' or other convention exist and is True
- then prevent unlink

What do you think ?

Thanks for your suggestions

David BEAL - Akretion
Odoo Development / Integration

Follow-Ups