summaryrefslogtreecommitdiff
path: root/addons/stock/views/product_views.xml
diff options
context:
space:
mode:
authorNicolas Martinelli <nim@odoo.com>2019-09-24 09:33:28 +0000
committerNicolas Martinelli <nim@odoo.com>2019-09-24 10:32:41 +0000
commita5835a160ea3f7aea37644ed4e1a49e2e4a6effd (patch)
tree3662d0f2292b9cc52ff25a31de392860a17ce407 /addons/stock/views/product_views.xml
parenta7a60f7c61275f26521cbc4ea0da2889095a5cc5 (diff)
[FIX] stock: do not display 'Location' and 'Warehouse' in search view
- Go to Inventory > Reporting > Inventory Valuation - Run the report - In the search view, filter on 'Location' or 'Warehouse' The filter doesn't work. Actually, the filter can't work. This is a hack introduced in order to add context keys. Originally, the function `search` was added to avoid the error log 'Non-stored field %s cannot be searched.'. This happens because the web client adds the field in the domain on top of adding the context key. By using `filter_domain`, no domain is added and no error is logged. opw-2075456 closes odoo/odoo#37347 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'addons/stock/views/product_views.xml')
-rw-r--r--addons/stock/views/product_views.xml4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/stock/views/product_views.xml b/addons/stock/views/product_views.xml
index 64be1d7a250..17a347594cc 100644
--- a/addons/stock/views/product_views.xml
+++ b/addons/stock/views/product_views.xml
@@ -73,8 +73,8 @@
<field name="arch" type="xml">
<xpath expr="//field[@name='pricelist_id']" position="after">
<separator/>
- <field name="location_id" context="{'location': self}"/>
- <field name="warehouse_id" context="{'warehouse': self}"/>
+ <field name="location_id" context="{'location': self}" filter_domain="[]"/>
+ <field name="warehouse_id" context="{'warehouse': self}" filter_domain="[]"/>
<separator/>
<filter name="real_stock_available" string="Available Products" domain="[('qty_available','&gt;',0)]"/>
<filter name="real_stock_negative" string="Negative Forecasted Quantity" domain="[('virtual_available','&lt;',0)]"/>