Hi,
trying to upgrade a module from 10 to 14 and got stuck on the new required ondelete.
The module adds a value to a selectlist:
class ProviderConsignor(models.Model):
_inherit = 'delivery.carrier'
delivery_type = fields.Selection(selection_add=[('consignor', "Consignor")], ondelete={'consignor': 'set default'})
But when trying to install the module I get: ValueError: delivery.carrier.delivery_type: 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.
Tried with cascade and set null as well, but get the same message so I guess the syntas is wrong.
Thanks in advance.