| 1 | # Part of Odoo. See LICENSE file for full copyright and licensing details. |
| 2 | from odoo import models, api, _ |
| 3 | |
| 4 | |
| 5 | class AccountPayment(models.Model): |
| 6 | _inherit = 'account.payment' |
| 7 | |
| 8 | @api.depends('country_code', 'partner_type') |
| 9 | def _compute_payment_receipt_title(self): |
| 10 | # OVERRIDE |
| 11 | super()._compute_payment_receipt_title() |
| 12 | for payment in self.filtered(lambda p: p.country_code == 'NZ' and p.partner_type == 'supplier'): |
| 13 | payment.payment_receipt_title = _('Remittance Advice') |