[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
1 changed files with 2 additions and 1 deletions

View File

@ -144,7 +144,8 @@ class Collection(BaseCollection):
'city', 'phone', 'mobile', 'fax', 'email', 'website',
'function', 'comment', 'image',
'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})
cls.partners = {p['id']: p for p in partners}
categs = cls.odoo.execute_kw('res.partner.category', 'search_read', [[]],