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.
I want to edit the method def name_search in order to get specific account depending to invoice type.
But I could not call the invoice object in order to get type.
Any help please and thanks
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100):
invoice_obj = self.pool.get('account_invoice')
invoice_ids = invoice_obj.search(cr, user, name,, context=context)
for inv in invoice_obj.browse(cr, user, invoice_ids,context=None):
codes=[610001, 610002, 610003, 610004, 610005]
args += [('code','in' , codes)]
ids = self.search(cr, user, args, context=context, limit=limit)
return self.name_get(cr, user, ids, context=context)
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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 8/30/16, 9:06 AM|
|Seen: 346 times|
|Last updated: 8/30/16, 10:21 AM|