Hi folks,
I'm trying to set some tags on res.partner for the partners created via the website. I know how to filter to get the contacts I want, but I don't know why it doesn't apply the category_id.
I've created an automated action which works without errors, but doesn't apply the tags. If you have an idea of what I'm doing wrong, don't hesitate to point me to the right direction ;-)
Here's the code
website_contacts = env['res.partner'].search([('team_id' , 'ilike' , "Site Web")])
for contact in website_contacts:
# 21 is the tag "Website" here.
contact.write({'category_id': [(21,)]})