Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
3 Antwoorden
5625 Weergaven

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
Annuleer
Auteur Beste antwoord
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
Annuleer

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 &

Beste antwoord

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
Annuleer
Beste antwoord

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

domain="['&','|', ('company_id', '=', company_id), ('company_id', '=', False), ('location_id','!=',15)]"/>
Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
mrt. 15
5318
2
sep. 23
8419
1
sep. 23
2587
2
mrt. 22
6427
2
aug. 20
4124