mirror of
https://github.com/bringout/oca-ocb-l10n_asia-pacific.git
synced 2026-04-27 02:22:02 +02:00
Initial commit: L10N_Asia Pacific packages
This commit is contained in:
commit
54c86b612c
828 changed files with 58224 additions and 0 deletions
9
odoo-bringout-oca-ocb-l10n_sg/l10n_sg/models/__init__.py
Normal file
9
odoo-bringout-oca-ocb-l10n_sg/l10n_sg/models/__init__.py
Normal 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
|
||||
11
odoo-bringout-oca-ocb-l10n_sg/l10n_sg/models/account_move.py
Normal file
11
odoo-bringout-oca-ocb-l10n_sg/l10n_sg/models/account_move.py
Normal 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")
|
||||
|
|
@ -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
|
||||
18
odoo-bringout-oca-ocb-l10n_sg/l10n_sg/models/res_company.py
Normal file
18
odoo-bringout-oca-ocb-l10n_sg/l10n_sg/models/res_company.py
Normal 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
|
||||
|
|
@ -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')
|
||||
Loading…
Add table
Add a link
Reference in a new issue