Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Switzerland - Accounting

Entity: account.payment

Compute Method: _compute_l10n_ch_reference_warning_msg

Inputs Method Outputs
  • payment_type
  • partner_id
  • partner_id.country_code
  • partner_bank_id
  • partner_bank_id.l10n_ch_qr_iban
  • memo
for payment in self:
            if payment.payment_type == 'outbound' and\
                    payment.partner_id.country_code in ['CH', 'LI'] and\
                    payment.partner_bank_id.l10n_ch_qr_iban and\
                    not payment._l10n_ch_reference_is_valid(payment.memo):
                payment.l10n_ch_reference_warning_msg = _("Please fill in a correct QRR reference in the payment reference. The banks will refuse your payment file otherwise.")
            else:
                payment.l10n_ch_reference_warning_msg = False

Back to entity