Skip to content

Commit 85d7d53

Browse files
committed
[IMP] - change a little bit the check to prevent if there's no partner found
1 parent 4a4afc7 commit 85d7d53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

intercompany_sale_purchase/purchase.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def _check_edi_partner(self, cr, uid, order, context=None):
125125
'&', ('id', '=', order.company_id.partner_id.id),
126126
('company_id', '=', False),
127127
], limit=1, context=context)
128-
partner_id = len(partner_ids) > 0 and partner_ids[0]
128+
partner_id = partner_ids and partner_ids[0] or False
129129
if not partner_id:
130130
self._raise_edi_partner_error(cr, uid, context)
131131

0 commit comments

Comments
 (0)