[NEW] account_chorus_notify

This commit is contained in:
clementthomas
2023-12-06 08:22:59 +01:00
parent 2d799eaf8c
commit c33cd1749c
4 changed files with 96 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
# -*- coding: utf-8 -*-
from . import chorus_flow

View 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