[FIX] stock: fix domain if no locations
in _get_domain_locations_new if no locations the domain gets extended by nothing so we have a domain ending in '&', '!']. This method gets called by opening the Products app, so it was possible you couldn't open it due to this error.
This commit is contained in:
@@ -214,8 +214,8 @@ class Product(models.Model):
|
||||
dest_loc_domain = dest_loc_domain + [('location_dest_id', operator, [location.id for location in other_locations])]
|
||||
return (
|
||||
domain + loc_domain,
|
||||
domain + ['&'] + dest_loc_domain + ['!'] + loc_domain,
|
||||
domain + ['&'] + loc_domain + ['!'] + dest_loc_domain
|
||||
domain + dest_loc_domain + ['!'] + loc_domain if loc_domain else domain + dest_loc_domain,
|
||||
domain + loc_domain + ['!'] + dest_loc_domain if dest_loc_domain else domain + loc_domain
|
||||
)
|
||||
|
||||
def _search_virtual_available(self, operator, value):
|
||||
|
||||
Reference in New Issue
Block a user