콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다

V15 allows you to add contacts and addresses (subcontacts) to every contact you create, but the subcontacts do not automatically take on the tags that were given to their parent contact. How do I configure the subcontacts to automatically take on their parent tags? I have 100s of contacts and subcontacts to add, and I would hate to have to continue doing this individually. Any help is appreciated. 

아바타
취소
베스트 답변

You can leverage our "multi edit" feature when working with records in List View:

1. Check that the Tags field is visible


2. Select ALL of the records you want to update


3. Click OK to confirm the update


Extra Credit:  You can also use Filters if you have specific criteria to identify records so you can update even more with a single edit that updates all of them at once.

아바타
취소
베스트 답변

Hi Patricia,

You can add onchange on the field category_id ( Tags ). If it's parent then apply same tags to childs

your code should look something like this:



@api.onchange('category_id')
def onchangge_contact_categ_id(self):
       if self.category_id and not self.parent_id:                 self.child_ids.mapped('category_id') = [Command.set(self.category_id.ids)]

Of course, since you may have different childs types ( invoice contact, delivery_contact...) and you want to apply this to only a specific type, then you have to call filtered before calling mapped.


I hope it's clear.

아바타
취소
관련 게시물 답글 화면 활동
2
3월 24
1924
1
3월 15
9755
1
9월 21
4203
5
10월 16
9025
1
4월 24
1041