Permalink
Browse files

[FIX] partner_autocomplete : Do not crash other tests when partner_au…

…tocomplete server fails

Add a check to see if we're in test mode that returns an InsufficientCreditError to avoid failing other tests if partner_autocomplete server fails

closes #28324
  • Loading branch information...
aprieels committed Oct 31, 2018
1 parent 7aa2136 commit 96a795f1770b4e144a580cdd0d8f94bc7d9d0485
Showing with 2 additions and 0 deletions.
  1. +2 −0 addons/partner_autocomplete/models/res_partner.py
@@ -83,6 +83,8 @@ def get_endpoint(self):
@api.model
def _rpc_remote_api(self, action, params, timeout=15):
if self.env.registry.in_test_mode() :
return False, 'Insufficient Credit'
url = '%s/%s' % (self.get_endpoint(), action)
account = self.env['iap.account'].get('partner_autocomplete')
params.update({

0 comments on commit 96a795f

Please sign in to comment.