Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
2862 Weergaven

Hello,

I'm having a really difficult time getting Odoo to update individuals when their "parent"/"company" is assigned a "Contact Tag". I've tried doing an automated action with hit or miss results.


Will someone please help? I tried this:

record['category_id'] = record.parent_id.category_id


Which is similar to what I would use if I want the contact to inherit the "salesperson" from the parent. Any help would be greatly appreciated.


Thank you

Avatar
Annuleer
Beste antwoord

Hi:

You will need to define 2 automated actions for this. One to set the contact tag to be the same as the parent when a child (contact) is created and another to update the contact tags on the children whenever the parent is updated.

Automated Action 1: Set contact tag on creation of new child contact.


Automated Action 2: Update contact tags on children when parent's tags are updated. 


Avatar
Annuleer
Auteur

Thank you so much Paresh. This worked perfectly.

Beste antwoord

Hello, 

I want the individual contact to inherit the salesperson of the parent company. I have used the following code but it is not working:


CODE:

if record.parent_id:

   record['user_id'] = record.parent_id.user_id



Kindly help

Avatar
Annuleer