Initial commit: L10N_Asia Pacific packages

This commit is contained in:
Ernad Husremovic 2025-08-29 15:20:52 +02:00
commit 54c86b612c
828 changed files with 58224 additions and 0 deletions

View file

@ -0,0 +1,9 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# Copyright (C) 2014 Tech Receptives (<http://techreceptives.com>).
from . import account_move
from . import chart_template
from . import res_company
from . import res_partner

View file

@ -0,0 +1,11 @@
# -*- coding: utf-8 -*-
from odoo import fields, models
class AccountMove(models.Model):
_inherit = 'account.move'
l10n_sg_permit_number = fields.Char(string="Permit No.")
l10n_sg_permit_number_date = fields.Date(string="Date of permit number")

View file

@ -0,0 +1,15 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class AccountChartTemplate(models.Model):
_inherit = 'account.chart.template'
def _load(self, company):
res = super()._load(company)
if company.chart_template_id == self.env.ref('l10n_sg.sg_chart_template'):
company.write({
'account_sale_tax_id': self.env.ref(f'l10n_sg.{company.id}_sg_sale_tax_sr_9').id,
'account_purchase_tax_id': self.env.ref(f'l10n_sg.{company.id}_sg_purchase_tax_tx8_9').id,
})
return res

View file

@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
from odoo import fields, models
class ResCompany(models.Model):
_name = 'res.company'
_description = 'Companies'
_inherit = 'res.company'
l10n_sg_unique_entity_number = fields.Char(string='UEN', related="partner_id.l10n_sg_unique_entity_number", readonly=False)
def _get_view(self, view_id=None, view_type='form', **options):
arch, view = super()._get_view(view_id, view_type, **options)
company_vat_label = self.env.company.country_id.vat_label
if company_vat_label:
for node in arch.iterfind(".//field[@name='vat']"):
node.set("string", company_vat_label)
return arch, view

View file

@ -0,0 +1,9 @@
# -*- coding: utf-8 -*-
from odoo import fields, models
class ResPartner(models.Model):
_name = 'res.partner'
_inherit = 'res.partner'
l10n_sg_unique_entity_number = fields.Char(string='UEN')