On Delete Policy In Odoo || Ondelete Policy for selection Field

Odoo Mates
Odoo Mates
4.5 هزار بار بازدید - 3 سال پیش - On delete policy in odoo.
On delete policy in odoo. Explained why and working on delete policy in odoo. There are different ondelete policies in odoo, on delete set null, on delete cascase, on delete set null. Define ondelete policy for selection field for proper data cleanup. How to fix : ValueError: required selection fields must define an ondelete policy that implements the proper cleanup of the corresponding records upon module uninstallation. Please use one or more of the following policies: 'set default' (if the field has a default defined), 'cascade', or a single-argument callable where the argument is the recordset containing the specified option. ondelete – provides a fallback mechanism for any overridden field with a selection_add. It is a dict that maps every option from the selection_add to a fallback action. This fallback action will be applied to all records whose selection_add option maps to it. The actions can be any of the following: ’set null’ – the default, all records with this option will have their selection value set to False. ’cascade’ – all records with this option will be deleted along with the option itself. ’set default’ – all records with this option will be set to the default of the field definition ’set VALUE’ – all records with this option will be set to the given value callable – a callable whose first and only argument will be the set of records containing the specified Selection option, for custom processing Website: www.odoomates.tech/ Instgram: www.instagram.com/odoomates/ Github: github.com/odoomates Email : [email protected] Facebook: www.facebook.com/odoomate/ Twitter: twitter.com/odoomates Support Us in Ko Fi : ko-fi.com/odoomates
3 سال پیش در تاریخ 1400/11/22 منتشر شده است.
4,500 بـار بازدید شده
... بیشتر