class hr_extra(osv.osv):
_inherit = "res.partner"
_columns = {
'date_join': fields.date('Date of Joining'),
'service_date': fields.date('Service Benefit Payment Date'),
'order_line': fields.one2many('hr.payment.line','order_id','Payment Structure'),
'amount_total': fields.function(_amount,string='Total', multi="sums",help="The total amount"),
}
class payment_description(osv.osv):
_name = 'payment.description'
_description = 'payment Description'
_columns = {
'name': fields.char('Description'),
}
class hr_payment_description_line(osv.osv):
_name ='hr.payment.description.line'
_columns = {
'description' :fields.many2one('payment.description','Description'),
'amount':fields.float('Amount'),
'order_id':fields.many2one('rea.partner','Payment Details'),
}
I have a description & amount field in my one2many relation.
I want to sum all the values, that given in the tree structure.
Where should i call the sum ans dispaly function?
What is the code?
Please help me....
Thanks.