19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:31:28 +01:00
parent ff721d030e
commit 7721452493
1826 changed files with 124775 additions and 274114 deletions

View file

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import template_no
from . import account_journal
from . import account_move
from . import account_tax
from . import res_partner
from . import res_company

View file

@ -8,5 +8,5 @@ class AccountJournal(models.Model):
_inherit = 'account.journal'
invoice_reference_model = fields.Selection(selection_add=[
('no', 'Norway')
('no', 'Norway (000001024000083)')
], ondelete={'no': lambda recs: recs.write({'invoice_reference_model': 'odoo'})})

View file

@ -0,0 +1,7 @@
from odoo import models, fields
class AccountTax(models.Model):
_inherit = 'account.tax'
l10n_no_standard_code = fields.Char(string='Standard Tax Code', help='The Norwegian tax system has a code for standard taxes, to use when reporting to them.')

View file

@ -6,3 +6,12 @@ class ResPartner(models.Model):
_inherit = 'res.partner'
l10n_no_bronnoysund_number = fields.Char(string='Register of Legal Entities (Brønnøysund Register Center)', size=9)
def _deduce_country_code(self):
if self.l10n_no_bronnoysund_number:
return 'NO'
return super()._deduce_country_code()
def _peppol_eas_endpoint_depends(self):
# extends account_edi_ubl_cii
return super()._peppol_eas_endpoint_depends() + ['l10n_no_bronnoysund_number']

View file

@ -0,0 +1,35 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
from odoo.addons.account.models.chart_template import template
class AccountChartTemplate(models.AbstractModel):
_inherit = 'account.chart.template'
@template('no')
def _get_no_template_data(self):
return {
'code_digits': '4',
'property_account_receivable_id': 'chart1500',
'property_account_payable_id': 'chart2400',
}
@template('no', 'res.company')
def _get_no_res_company(self):
return {
self.env.company.id: {
'account_fiscal_country_id': 'base.no',
'bank_account_code_prefix': '1920',
'cash_account_code_prefix': '1900',
'transfer_account_code_prefix': '1940',
'account_default_pos_receivable_account_id': 'chart1500',
'income_currency_exchange_account_id': 'chart8060',
'expense_currency_exchange_account_id': 'chart8160',
'account_journal_early_pay_discount_loss_account_id': 'chart4372',
'account_journal_early_pay_discount_gain_account_id': 'chart3082',
'account_sale_tax_id': 'tax3',
'account_purchase_tax_id': 'tax2',
'expense_account_id': 'chart4000',
'income_account_id': 'chart3000',
},
}