[FIX] partner_autocomplete: display insufficient credit notification.
Before this commit the error 'Insufficient Credit' was not triggered by the python side, so the notification was never displayed. closes odoo/odoo#37649 Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
This commit is contained in:
@@ -127,7 +127,12 @@ class ResPartner(models.Model):
|
||||
else:
|
||||
result = {}
|
||||
|
||||
if error:
|
||||
if response and response.get('credit_error'):
|
||||
result.update({
|
||||
'error': True,
|
||||
'error_message': 'Insufficient Credit'
|
||||
})
|
||||
elif error:
|
||||
result.update({
|
||||
'error': True,
|
||||
'error_message': error
|
||||
|
||||
Reference in New Issue
Block a user