This question has been flagged
2 Replies
5671 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

Avatar
Discard
Best Answer

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'}"/>
Avatar
Discard
Author

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 ?

Author Best Answer

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 ?

Avatar
Discard