[FIX]Contacts from Odoo must only be contact type

This commit is contained in:
Fabien BOURGEOIS 2018-08-24 08:49:31 +02:00
parent c175628cb3
commit d3a2fa903a

View File

@ -144,7 +144,8 @@ class Collection(BaseCollection):
'city', 'phone', 'mobile', 'fax', 'email', 'website', 'city', 'phone', 'mobile', 'fax', 'email', 'website',
'function', 'comment', 'image', 'function', 'comment', 'image',
'category_id', 'parent_id', 'state_id', 'country_id'] 'category_id', 'parent_id', 'state_id', 'country_id']
partners = cls.odoo.execute_kw('res.partner', 'search_read', [[]], domain = [('type', '=', 'contact')]
partners = cls.odoo.execute_kw('res.partner', 'search_read', [domain],
{'fields': fields}) {'fields': fields})
cls.partners = {p['id']: p for p in partners} cls.partners = {p['id']: p for p in partners}
categs = cls.odoo.execute_kw('res.partner.category', 'search_read', [[]], categs = cls.odoo.execute_kw('res.partner.category', 'search_read', [[]],