Skip to Content
Menu
This question has been flagged
2 Replies
5049 Views

Public category means website category. One product can be tagged for several Public categories. (probably the most important categories as they relate to the ecommerce)

I have tried to create a filter with a group by instruction on the public_category_id" field, but it is returning an error.

Does anyone knows how to achieve this "group by"

 ps: I am using the Saas V8 release, with not much capacity to code.

Thanks in advance

Avatar
Discard

What error is being returned?

Author Best Answer

here is the server error

Traceback (most recent call last):

  File "/home/odoo/src/odoo/8.0/openerp/http.py", line 544, in _handle_exception return super(JsonRequest, self)._handle_exception(exception) File "/home/odoo/src/odoo/8.0/openerp/http.py", line 581, in dispatch result = self._call_function(**self.params) File "/home/odoo/src/odoo/8.0/openerp/http.py", line 317, in _call_function return checked_call(self.db, *args, **kwargs) File "/home/odoo/src/odoo/8.0/openerp/service/model.py", line 118, in wrapper return f(dbname, *args, **kwargs) File "/home/odoo/src/odoo/8.0/openerp/http.py", line 314, in checked_call return self.endpoint(*a, **kw) File "/home/odoo/src/odoo/8.0/openerp/http.py", line 810, in __call__ return self.method(*args, **kw) File "/home/odoo/src/odoo/8.0/openerp/http.py", line 410, in response_wrap response = f(*args, **kw) File "/home/odoo/src/odoo/8.0/addons/web/controllers/main.py", line 944, in call_kw return self._call_kw(model, method, args, kwargs) File "/home/odoo/src/odoo/8.0/addons/web/controllers/main.py", line 936, in _call_kw return getattr(request.registry.get(model), method)(request.cr, request.uid, *args, **kwargs) File "/home/odoo/src/odoo/8.0/openerp/api.py", line 268, in wrapper return old_api(self, *args, **kwargs) File "/home/odoo/src/odoo/8.0/openerp/models.py", line 2093, in read_group assert groupby_def and groupby_def._classic_write, "Fields in 'groupby' must be regular database-persisted fields (no function or related fields), or function fields with store=True"AssertionError: Fields in 'groupby' must be regular database-persisted fields (no function or related fields), or function fields with store=True


And here is the filter leading to the above error

Nom du Filtre    filtre by public cat    

Utilisateur

Modèle    Product Template

Default filter

Action   Products

Domaine    [['sale_ok', '=', 1], ['public_categ_ids', '!=', False]]

Contexte    {'group_by': ['public_categ_ids']}

Avatar
Discard
Related Posts Replies Views Activity
0
May 24
507
1
Jul 21
1874
0
Apr 16
3134
1
May 15
3034
2
Mar 15
3758