Skip to Content
Menu
This question has been flagged
1 Reply
1220 Views

Hi,

In a multi Company Environment and in the Lead form (CRM), tags that are showen have to be added by a creator from the envirement company : Here is a static example :


I have tried : 
- [("create_uid.company_id", "=", "env.company.id")]- 

- [("create_uid.company_id", "=", " self.env.company.id  ")]
- [("create_uid.company_id", "=", " self.env.user.company_id ")]
Knowing that I am using Odoo 17!

I will be thankful if I get a help to fix that !
Thanks in advance! 


Rgards
/Jabran





Avatar
Discard
Best Answer

Hi,

Please try this Python code :
    def get_domain(self):
        return [("create_uid.company_id", "=", self.env.company.id)]

    tag_ids = fields.Many2many(
        'crm.tag', 'crm_tag_rel', 'lead_id', 'tag_id', string='Tags',
        help="Classify and analyze your lead/opportunity categories like: Training, Service",domain='get_domain')


Hope it helps

Avatar
Discard
Author

Thanks for your efforts, but it didn't work !

Related Posts Replies Views Activity
2
Jul 25
1652
3
Jul 25
2092
1
Jul 25
1405
3
Nov 24
361
4
Sep 24
3039