Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
2877 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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. 


Ảnh đại diện
Huỷ bỏ
Tác giả

Thank you so much Paresh. This worked perfectly.

Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ