Odoo Help

0

How to create a group by search on a new field

By
vicen
on 12/4/13, 11:36 AM 1,302 views

Hi everybody,

I've created a new field into the product.product view. Now, i want to create a new group by filter search into the sale.report module. I have created a many2one field x_gamme_2 in the table product.product related with a x_gamme_2 model that i've created, then i have created many2one a link with the table sale.report. How it could be done please? do i have to modify the sale.report.py to add another way of search based on the custom field i've added?

Thanks for your help

1
Ray Carnes
On 12/4/13, 4:09 PM

Are you asking how to add the new field to the Search View?

<filter string="Label for x_gamme_2" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'x_gamme_2'}"/>

yes i have added this line into my Search view but when i have tried to use this function i have a "ProgrammingError: column sale_report.x_gamme_2 does not exist LINE 1: ...eport.id) AS id, count(sale_report.id) AS __count,"sale_repo..." do i have to modify the sale_report.py ?

vicen
on 12/5/13, 3:58 AM
0
vicen
On 12/6/13, 4:07 AM

yes i have added this line into my Search view but when i have tried to use this function i have a "ProgrammingError: column sale_report.x_gamme_2 does not exist LINE 1: ...export.id) AS id, count(sale_report.id) AS __count,"sale_repo..." do i have to modify the sale_report.py ?

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)

Stats

Asked: 12/4/13, 11:36 AM
Seen: 1302 times
Last updated: 3/16/15, 8:10 AM