Skip to content

Commit

Permalink
Merge commit 'refs/pull/131990/head' of https://github.com/odoo/odoo
Browse files Browse the repository at this point in the history
…into 16.0-3342
  • Loading branch information
docker-odoo committed Aug 16, 2023
2 parents ed73b06 + 57e3c63 commit 82d00d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/l10n_latam_check/models/account_payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def _get_payment_method_codes_to_exclude(self):
def action_unmark_sent(self):
""" Unmarking as sent for electronic/deferred check would give the option to print and re-number check but
it's not implemented yet for this kind of checks"""
if self.filtered('l10n_latam_manual_checks'):
if self.filtered(lambda x: x.payment_method_line_id.code == 'check_printing' and x.l10n_latam_manual_checks):
raise UserError(_('Unmark sent is not implemented for electronic or deferred checks'))
return super().action_unmark_sent()

Expand All @@ -262,7 +262,7 @@ def action_post(self):
res = super().action_post()

# mark own checks that are not printed as sent
self.filtered('l10n_latam_manual_checks').write({'is_move_sent': True})
self.filtered(lambda x: x.payment_method_line_id.code == 'check_printing' and x.l10n_latam_manual_checks).write({'is_move_sent': True})
return res

@api.model
Expand Down

0 comments on commit 82d00d5

Please sign in to comment.