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

@ -0,0 +1,4 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from . import template_hu
from . import account_move
from . import res_partner

View file

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, models
class AccountMove(models.Model):
_inherit = 'account.move'
@api.depends('country_code', 'move_type')
def _compute_show_delivery_date(self):
# EXTENDS 'account'
super()._compute_show_delivery_date()
for move in self:
if move.country_code == 'HU':
move.show_delivery_date = move.is_sale_document()
def _post(self, soft=True):
res = super()._post(soft)
for move in self:
if move.country_code == 'HU' and move.is_sale_document() and not move.delivery_date:
move.delivery_date = move.invoice_date
return res

View file

@ -0,0 +1,15 @@
from odoo import api, fields, models
class ResPartner(models.Model):
_inherit = 'res.partner'
l10n_hu_eu_vat = fields.Char(compute='_compute_l10n_hu_eu_vat')
@api.depends('vat')
def _compute_l10n_hu_eu_vat(self):
for partner in self:
if partner.country_code == 'HU' and partner.vat:
partner.l10n_hu_eu_vat = partner._convert_hu_local_to_eu_vat(partner.vat)
else:
partner.l10n_hu_eu_vat = False

View file

@ -0,0 +1,43 @@
# 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('hu')
def _get_hu_template_data(self):
return {
'property_account_receivable_id': 'l10n_hu_311',
'property_account_payable_id': 'l10n_hu_454',
'code_digits': '6',
}
@template('hu', 'res.company')
def _get_hu_res_company(self):
return {
self.env.company.id: {
'account_fiscal_country_id': 'base.hu',
'bank_account_code_prefix': '384',
'cash_account_code_prefix': '381',
'transfer_account_code_prefix': '389',
'income_currency_exchange_account_id': 'l10n_hu_976',
'expense_currency_exchange_account_id': 'l10n_hu_876',
'account_sale_tax_id': 'F27',
'account_purchase_tax_id': 'V27',
'expense_account_id': 'l10n_hu_811',
'income_account_id': 'l10n_hu_911',
'account_stock_journal_id': 'inventory_valuation',
'account_stock_valuation_id': 'l10n_hu_211',
},
}
@template('hu', 'account.account')
def _get_hu_account_account(self):
return {
'l10n_hu_211': {
'account_stock_expense_id': 'l10n_hu_5111',
'account_stock_variation_id': 'l10n_hu_581',
},
}