mirror of
https://github.com/bringout/oca-ocb-technical.git
synced 2026-04-19 07:12:01 +02:00
Initial commit: Technical packages
This commit is contained in:
commit
3473fa71a0
873 changed files with 297766 additions and 0 deletions
|
|
@ -0,0 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from . import iap_account
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
from odoo import api, models
|
||||
|
||||
|
||||
class IapAccount(models.Model):
|
||||
_inherit = 'iap.account'
|
||||
|
||||
@api.model
|
||||
def _send_iap_bus_notification(self, service_name, title, error_type=False):
|
||||
param = {
|
||||
'title': title,
|
||||
'error_type': 'danger' if error_type else 'success'
|
||||
}
|
||||
if error_type == 'credit':
|
||||
param['url'] = self.env['iap.account'].get_credits_url(service_name)
|
||||
self.env['bus.bus']._sendone(self.env.user.partner_id, 'iap_notification', param)
|
||||
Loading…
Add table
Add a link
Reference in a new issue