Skip to Content
Menu
This question has been flagged
2703 Views

usable_products = fields.Many2many('product.product',string="Useable Products",required=True, store=True)    current_brand_product = fields.Many2many("brands.products.current", string="Current Brand Products", required=True, store=True)



<search string="Equipment Based Sale Search">                   

 <group  expand="1" string="Group By">                        

                

  <filter string="Current Brand Product" name="brand" context="{'group_by':'current_brand_product'}"/>                      

  <filter string="Useable Products" name="group_by_useable_products" context="{'group_by':'usable_products'}"/>
  

 </group>              

  </search>



i want to group by many2one and many2many field is it possible ?




Error is 



  File "/odoo12c/odoo12c-server/odoo/models.py", line 2070, in read_group
    result = self._read_group_raw(domain, fields, groupby, offset=offset, limit=limit, orderby=orderby, lazy=lazy)
  File "/odoo12c/odoo12c-server/odoo/models.py", line 2107, in _read_group_raw
    assert gb_field.store and gb_field.column_type, "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 r

 

Avatar
Discard