[NEW] account_chorus_notify
This commit is contained in:
3
account_chorus_notify/__init__.py
Normal file
3
account_chorus_notify/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import models
|
75
account_chorus_notify/__manifest__.py
Normal file
75
account_chorus_notify/__manifest__.py
Normal file
@@ -0,0 +1,75 @@
|
||||
# Copyright 2021 Elabore ()
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
"name": "account_chorus_notify",
|
||||
"version": "14.0.1.0.0",
|
||||
"author": "Elabore",
|
||||
"maintainer": "False",
|
||||
"website": "False",
|
||||
"license": "AGPL-3",
|
||||
"category": "False",
|
||||
"summary": "Send notification when chorus invoice failed",
|
||||
"description": """
|
||||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
|
||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
:alt: License: AGPL-3
|
||||
=======================
|
||||
Account Chorus Notify
|
||||
=======================
|
||||
Send notification when chorus invoice failed
|
||||
|
||||
Installation
|
||||
============
|
||||
Just install account_chorus_notify, all dependencies will be installed by default.
|
||||
|
||||
Known issues / Roadmap
|
||||
======================
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
Bugs are tracked on `GitHub Issues
|
||||
<https://github.com/elabore-coop/elabore-odoo-addons/issues>`_. In case of trouble, please
|
||||
check there if your issue has already been reported. If you spotted it first,
|
||||
help us smashing it by providing a detailed and welcomed feedback.
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Images
|
||||
------
|
||||
* Elabore: `Icon <https://elabore.coop/web/image/res.company/1/logo?unique=f3db262>`_.
|
||||
|
||||
|
||||
Funders
|
||||
-------
|
||||
The development of this module has been financially supported by:
|
||||
* Elabore (https://elabore.coop)
|
||||
|
||||
Maintainer
|
||||
----------
|
||||
This module is maintained by ELABORE.
|
||||
|
||||
""",
|
||||
# any module necessary for this one to work correctly
|
||||
"depends": [
|
||||
"l10n_fr_chorus_account",
|
||||
],
|
||||
"external_dependencies": {
|
||||
"python": [],
|
||||
},
|
||||
# always loaded
|
||||
"data": [
|
||||
|
||||
],
|
||||
# only loaded in demonstration mode
|
||||
"demo": [],
|
||||
"js": [],
|
||||
"css": [],
|
||||
"qweb": [],
|
||||
"installable": True,
|
||||
# Install this module automatically if all dependency have been previously
|
||||
# and independently installed. Used for synergetic or glue modules.
|
||||
"auto_install": False,
|
||||
"application": False,
|
||||
}
|
3
account_chorus_notify/models/__init__.py
Normal file
3
account_chorus_notify/models/__init__.py
Normal file
@@ -0,0 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from . import chorus_flow
|
15
account_chorus_notify/models/chorus_flow.py
Normal file
15
account_chorus_notify/models/chorus_flow.py
Normal file
@@ -0,0 +1,15 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import models, fields, api, _
|
||||
|
||||
|
||||
class ChorusFlow(models.Model):
|
||||
_inherit = "chorus.flow"
|
||||
|
||||
def update_flow_status(self):
|
||||
res = super(ChorusFlow, self).update_flow_status()
|
||||
for flow in self:
|
||||
if flow.status == 'IN_REJETE':
|
||||
for invoice in flow.invoice_ids:
|
||||
invoice.message_post(_("Chorus flow n°%s rejected.")%(flow.name,))
|
||||
return res
|
Reference in New Issue
Block a user