Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
3 Besvarelser
5639 Visninger

Hi! I am filtering the list which retrieves a many2one field in a form containing stock locations but I have to hide one specific location, I added to the existing domain attribute of location_id (origin location) field and location_dest_id (destination location) the following condition:

domain="['|','|', ('company_id', '=', company_id), ('company_id', '=', False), ('location_id','!=',15)]"/>

15 is the id of the location that I don't want to show in the list, I'm doing with debug options from the view options, but after do some refresh at the page, that location keeps appearing in the list. Is something wrong with the conditions given in the domain attribute?

Avatar
Kassér
Forfatter Bedste svar
Hi, Karthikeyan N R I tried your solution but it keeps showing the location and Paresh Wagh tried your solution too, actually it was the first solution got in mind to apply this filter, but raises the error: xmlParseEntityRef: no name, line 49, column 173. I'm in version 12 EE, Did I miss something?

Thanks for your help

Regards

Avatar
Kassér

Hi,

I think your using the domain which Mr.Paresh told you in your xml, thats y xmlParseEntityRef: no name, line 49, column 173 occurs, please check this one,

https://www.odoo.com/forum/help-1/xmlsyntaxerror-xmlparseentityref-no-name-line-257-column-55-114463

Try replacing & with &

Bedste svar

Hi,

Just remove any one of the pipeline symbol and try again,

domain="['|', ('company_id', '=', company_id), ('company_id', '=', False), ('location_id','!=',15)]"/>

Hope it works

Thanks

 

 
Avatar
Kassér
Bedste svar

Change the first | to & like so and it should work.

domain="['&','|', ('company_id', '=', company_id), ('company_id', '=', False), ('location_id','!=',15)]"/>
Avatar
Kassér
Related Posts Besvarelser Visninger Aktivitet
1
mar. 15
5325
2
sep. 23
8421
1
sep. 23
2596
2
mar. 22
6435
2
aug. 20
4129