I need to create a server action in order to delete every supplier info that are linked to my products.
I tried the following code; which does not work(I am not a developper)
I understand that the link between product and supplier info is a one2many
I would appreciate any help because I have hundreds of products with obsolete or inaccurate supplier info due to mergers of various suppliers.
context = context or {}
for record in self.browse(cr, uid, context.get('active_ids', []), context=context):
value = ""
for val in [product.supplierinfo]:
if val: value += ""
pool.get('product.template').delete(cr, uid, record.id, {product.supplierinfo: value[:-1]}, context=context)