I want to load data files with existing records in odoo and I want to prevent the user from deleting it
Asked
Active
Viewed 124 times
1 Answers
2
There's no direct way to do it, but you can do this solution:
1- add a field "no_delete".
2- In your data file, set it to "True":
<field name="no_delete">1</field>
3-Create a record rule with this domain:
<field name="domain_force">[('no_delete','=',True)]</field>
and set delete to false:
<field name="perm_unlink" eval="0"/>

Wided Kéfi
- 41
- 2