diff options
| -rw-r--r-- | addons/product/models/product_template.py | 2 | ||||
| -rw-r--r-- | addons/product/views/product_views.xml | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/addons/product/models/product_template.py b/addons/product/models/product_template.py index de529ffdd9a..1fcc4b75bf4 100644 --- a/addons/product/models/product_template.py +++ b/addons/product/models/product_template.py @@ -29,7 +29,7 @@ class ProductTemplate(models.Model): def _read_group_categ_id(self, categories, domain, order): category_ids = self.env.context.get('default_categ_id') - if not category_ids: + if not category_ids and self.env.context.get('group_expand'): category_ids = categories._search([], order=order, access_rights_uid=SUPERUSER_ID) return categories.browse(category_ids) diff --git a/addons/product/views/product_views.xml b/addons/product/views/product_views.xml index 1dba24de10f..df24d2def41 100644 --- a/addons/product/views/product_views.xml +++ b/addons/product/views/product_views.xml @@ -448,7 +448,7 @@ name="%(product_template_action_all)d" icon="fa-th-list" type="action" - context="{'search_default_categ_id': active_id, 'default_categ_id': active_id}"> + context="{'search_default_categ_id': active_id, 'default_categ_id': active_id, 'group_expand': True}"> <div class="o_field_widget o_stat_info"> <span class="o_stat_value"><field name="product_count"/></span> <span class="o_stat_text"> Products</span> |
