1
from osv import fields,osv
3
class report_lunch_amount(osv.osv):
5
_name='report.lunch.amount'
6
_description = "Amount available by user and box"
9
'name':fields.char('Name',size=30,required=True),
10
'user_cashmove': fields.many2one('res.users','User Name', readonly=True,readonly=True),
11
'amount': fields.function(amount_available, method=True, readonly=True, string='Remained Total'),
12
'box':fields.many2one('lunch.cashbox','Box Name',size=30,readonly=True),
19
create or replace view report_lunch_amount_user as (
20
select user_cashmove as user, sum(amount) as sum,box from lunch_cashmove group by user_cashmove, box)""")