The old implementation had some inconsistencies and didn't allow to have
general error notifications, it was only meant for credit error
notifications.
The notification/log messages of lead enrichment were also improved as
some of them were unclear.
closesodoo/odoo#132233
Related: odoo/enterprise#44488
Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
The purpose of this task is to use the notification which we currently
have for partner autocomplete and to generalize it to our other IAP
services.
So in this commit, we improve the iap notification for the below views
-> we display a toast in green when the request was successfully completed
(and the user has enough credits).
- when a letter is sent in batch from the list view
- when leads are enriched in batch from the list view
-> we display a toast in orange when the user doesn't have enough
credits with a corresponding 'buy credits' link to the service.
- when a letter is sent in batch from the list view
- when leads are enriched in batch from the list view or when
clicking on 'enrich' from the form view
- when creating a new lead mining request
task-2185306
closesodoo/odoo#66977
Related: odoo/enterprise#16736
Signed-off-by: Arnaud Joset <arj@odoo.com>
Co-authored-by: Nisha Patel <nit@odoo.com>