addons/l10n_tw_edi_ecpay/models/res_partner.py
raw| 1 | # Part of Odoo. See LICENSE file for full copyright and licensing details. |
| 2 | |
| 3 | from odoo import fields, models |
| 4 | |
| 5 | |
| 6 | class ResPartner(models.Model): |
| 7 | _inherit = 'res.partner' |
| 8 | |
| 9 | invoice_edi_format = fields.Selection(selection_add=[('tw_ecpay', "ECPay")]) |
| 10 | |
| 11 | def _l10n_tw_edi_formatted_address(self): |
| 12 | address = self._display_address(without_company=True) |
| 13 | return ", ".join(filter(None, map(str.strip, address.splitlines()))) |