| 1 |
|
| 2 |
from odoo import models, fields |
| 3 |
|
| 4 |
|
| 5 |
class ResPartner(models.Model): |
| 6 |
_inherit = 'res.partner' |
| 7 |
|
| 8 |
invoice_edi_format = fields.Selection(selection_add=[('pint_sg', "Singapore (Peppol PINT SG)")]) |
| 9 |
|
| 10 |
def _get_edi_builder(self, invoice_edi_format): |
| 11 |
|
| 12 |
if invoice_edi_format == 'pint_sg': |
| 13 |
return self.env['account.edi.xml.pint_sg'] |
| 14 |
return super()._get_edi_builder(invoice_edi_format) |
| 15 |
|
| 16 |
def _get_ubl_cii_formats_info(self): |
| 17 |
|
| 18 |
formats_info = super()._get_ubl_cii_formats_info() |
| 19 |
formats_info['pint_sg'] = {'countries': ['SG'], 'on_peppol': True, 'sequence': 90} |
| 20 |
return formats_info |