Odoo Help
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
|
etc.
how to select data from database?
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?
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?
About This Community
This platform 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.
RegisterOdoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.
Test it nowQuestion tools
Stats
Asked: 2/26/15, 1:48 AM |
Seen: 908 times |
Last updated: 3/16/15, 8:10 AM |