Se rendre au contenu
Menu
Cette question a été signalée
3 Réponses
5640 Vues

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
Ignorer
Auteur Meilleure réponse
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
Ignorer

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 &

Meilleure réponse

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
Ignorer
Meilleure réponse

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

domain="['&','|', ('company_id', '=', company_id), ('company_id', '=', False), ('location_id','!=',15)]"/>
Avatar
Ignorer
Publications associées Réponses Vues Activité
1
mars 15
5325
2
sept. 23
8421
1
sept. 23
2596
2
mars 22
6435
2
août 20
4129