i have to calculate the total amount of claims in my custome module.so i want to knwo that how to calculate the total amount of claims in my calim table. how it is posilble?is there anyfuction to done database retrivel of data?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
Easiest way in old API would be self.pool.get('crm.claim').search(cr, uid, [], count=True), so you will receive number of all records in crm_claim table.
can u please give me one example with function definition
def count_claims(self, cr, uid, ids, context=None) return self.pool.get('crm.claim').search(cr, uid, [], count=True) Like so?
return self.pool.get('amount.claim').search(cr, uid, [], count=True) AttributeError: 'NoneType' object has no attribute 'search'--this is the error.pls help me how to select amount from claim?