Odoo Help


This community 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.


How to set store = true for existing fields?

Michael Karrer
on 12/19/13, 5:59 AM 1,628 views

Since a lot of fields do not show any subtotals (SUM) if they are "grouped by" i would like to know how i can/should set the store=true parameter for existing fields of OpenERP?!?

eg. for the field:

Modell: hr_timesheet_sheet.sheet

Field: total_timesheet

(If i group the treeview of timesheets to validate by Employees i can not see the subtotals of total_timesheet in the treeview by employee.)

Ali Ravani
On 12/19/13, 8:58 AM

copy both function fields and its function to your module and then add store=True e.g

'total_timesheet': fields.function(_total, method=True, string='Total Timesheet', multi="_total"), 'total_timesheet': fields.function(_total, method=True, string='Total Timesheet', multi="_total", store=True),

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)


Asked: 12/19/13, 5:59 AM
Seen: 1628 times
Last updated: 3/16/15, 8:10 AM