Skip to content

Commit

Permalink
Merge pull request #543 from Som-Energia/FIX_annex_3_cancelled
Browse files Browse the repository at this point in the history
Fix annex3 cancelled contracts
  • Loading branch information
pauboixsom authored Feb 22, 2024
2 parents aaf7331 + 1c364e3 commit e098953
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions som_account_invoice_pending/update_pending_states.py
Original file line number Diff line number Diff line change
Expand Up @@ -558,21 +558,21 @@ def update_update_waiting_for_annexIII(
self.update_waiting_for_annex_cancelled_contracts(
cursor, uid, factura_id, traspas_advocats_bs, context
)

ret_value = self.send_email(cursor, uid, invoice["id"], email_params)
if ret_value == -1:
logger.info(
"ERROR: Sending Annex 3 first email to {invoice_name} partner error.".format(
invoice_name=invoice["partner_id"][1],
)
)
else:
fact_obj.set_pending(cursor, uid, [factura_id], final_state)
logger.info(
"Sending Annex 3 first email to {invoice_name} partner with result: {ret_value}".format( # noqa: E501
invoice_name=invoice["partner_id"][1], ret_value=ret_value
ret_value = self.send_email(cursor, uid, invoice["id"], email_params)
if ret_value == -1:
logger.info(
"ERROR: Sending Annex 3 first email to {invoice_name} partner error.".format( # noqa: E501
invoice_name=invoice["partner_id"][1],
)
)
else:
fact_obj.set_pending(cursor, uid, [factura_id], final_state)
logger.info(
"Sending Annex 3 first email to {invoice_name} partner with result: {ret_value}".format( # noqa: E501
invoice_name=invoice["partner_id"][1], ret_value=ret_value
)
)
)

def update_waiting_for_annexII(self, cursor, uid, context=None):
"""
Expand Down

0 comments on commit e098953

Please sign in to comment.