You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior
The scheduled action to run fine.
Additional context
In our instance we did the following fix in method _first_invoice_exception_msg:
Original code
def _first_invoice_exception_msg(self):
"""
Method used to return the first invoice with exception message.
"""
ret = False, False
if (
self.env.context.get("bypass_risk", False)
or self.company_id.allow_overrisk_invoice_validation
):
return ret
for invoice in self.filtered(lambda x: x.move_type == "out_invoice"):
exception_msg = invoice.risk_exception_msg()
if exception_msg:
ret = invoice, exception_msg
break
return
New code
def _first_invoice_exception_msg(self):
"""
Method used to return the first invoice with exception message.
"""
ret = False, False
if (
self.env.context.get("bypass_risk", False)
):
return ret
for invoice in self.filtered(
lambda x: x.move_type == "out_invoice"
and not x.company_id.allow_overrisk_invoice_validation
):
exception_msg = invoice.risk_exception_msg()
if exception_msg:
ret = invoice, exception_msg
break
return
The text was updated successfully, but these errors were encountered:
There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.
Odoo version
15.0
Module
account_financial_risk
Describe the bug
Scheduled Actions: Account; Post draft entries with auto_post set to True up to today fails with the following mensage:
To Reproduce
Affected versions:
Steps to reproduce the behavior:
Expected behavior
The scheduled action to run fine.
Additional context
In our instance we did the following fix in method _first_invoice_exception_msg:
Original code
New code
The text was updated successfully, but these errors were encountered: