Monday, October 19, 2020

defined as ondelete='restrict'

I face the error bellow we I tried to install some module in odoo 14 , the error is 

ValueError: Field mark_id of model rep.template is defined as ondelete='restrict 

 

of course ! , I have model by name 'rep.template', in which that I have many2one file defined as bellow 

mark_id = file.Many2one('rep.mark', string='Mark')

and I face the error above because of this field , so to fix this error I rewrite this field as bellow

mark_id = file.Many2one('rep.mark', string='Mark', ondelete="cascade")



No comments:

Post a Comment

Odoo Invoice Qr code issues

There are two main issues must of us facing with the QR code in Odoo invoice & these issues are 1/ QR code displayed as broken image w...