Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
5656 Zobrazení

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
Zrušit

What error is being returned?

Autor Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
0
kvě 24
1752
1
čvc 21
2734
0
dub 16
4272
1
kvě 15
3950
2
bře 15
4809