Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
2859 Zobrazení

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
Zrušit
Nejlepší odpověď

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
Zrušit
Autor

Thank you so much Paresh. This worked perfectly.

Nejlepší odpověď

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
Zrušit