Skip to Content
Menu
This question has been flagged
2 Replies
3051 Views

Hello. i have a multi-company project and i've created a field. but this field must to be show only in company A and not for comany B. 

Anyone have answer for this? 

Thanks

Avatar
Discard
Best Answer

https://www.odoo.com/forum/help-1/13-how-to-show-hide-form-fields-by-company-for-multi-company-166607

Avatar
Discard
Best Answer

Hi Ranoa,

You can specify this condition in the form view.For that you will have to check if the company_id field value of the record equals to the company which you have to hide that field.Create a new field named hide_company_id and store the id of the company “company B”.(the company id from which you want to hide that field, basically the value will be an integer the actual id value).Then add this condition in the field definition.

field name="your_field" attrs="{'invisible': [(company_id, '=', 'hide_company_id')]}"/>

Regards

Avatar
Discard
Related Posts Replies Views Activity
3
Nov 24
347
0
Nov 24
153
3
Sep 24
10000
4
Sep 24
1491
2
Aug 24
357