mirror of
https://github.com/bringout/oca-ocb-l10n_europe.git
synced 2026-04-27 03:02:00 +02:00
19.0 vanilla
This commit is contained in:
parent
ff721d030e
commit
7721452493
1826 changed files with 124775 additions and 274114 deletions
|
|
@ -1,4 +1,2 @@
|
|||
# coding: utf-8
|
||||
# Copyright 2016 iterativo (https://www.iterativo.do) <info@iterativo.do>
|
||||
|
||||
from . import chart_template
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
from . import template_do
|
||||
|
|
|
|||
|
|
@ -1,49 +0,0 @@
|
|||
# coding: utf-8
|
||||
# Copyright 2016 iterativo (https://www.iterativo.do) <info@iterativo.do>
|
||||
|
||||
from odoo import models, api, _
|
||||
|
||||
|
||||
class AccountChartTemplate(models.Model):
|
||||
_inherit = "account.chart.template"
|
||||
|
||||
@api.model
|
||||
def _get_default_bank_journals_data(self):
|
||||
if self.env.company.account_fiscal_country_id.code == 'DO':
|
||||
return [
|
||||
{'acc_name': _('Cash'), 'account_type': 'cash'},
|
||||
{'acc_name': _('Caja Chica'), 'account_type': 'cash'},
|
||||
{'acc_name': _('Cheques Clientes'), 'account_type': 'cash'},
|
||||
{'acc_name': _('Bank'), 'account_type': 'bank'}
|
||||
]
|
||||
return super(AccountChartTemplate, self)._get_default_bank_journals_data()
|
||||
|
||||
def _prepare_all_journals(self, acc_template_ref, company, journals_dict=None):
|
||||
"""Create fiscal journals for buys"""
|
||||
res = super(AccountChartTemplate, self)._prepare_all_journals(
|
||||
acc_template_ref, company, journals_dict=journals_dict)
|
||||
if not self == self.env.ref('l10n_do.do_chart_template'):
|
||||
return res
|
||||
for journal in res:
|
||||
if journal['code'] == 'FACT':
|
||||
journal['name'] = _('Compras Fiscales')
|
||||
res += [{
|
||||
'type': 'purchase',
|
||||
'name': _('Gastos No Deducibles'),
|
||||
'code': 'GASTO',
|
||||
'company_id': company.id,
|
||||
'show_on_dashboard': True
|
||||
}, {
|
||||
'type': 'purchase',
|
||||
'name': _('Migración CxP'),
|
||||
'code': 'CXP',
|
||||
'company_id': company.id,
|
||||
'show_on_dashboard': True
|
||||
}, {
|
||||
'type': 'sale',
|
||||
'name': _('Migración CxC'),
|
||||
'code': 'CXC',
|
||||
'company_id': company.id,
|
||||
'show_on_dashboard': True
|
||||
}]
|
||||
return res
|
||||
39
odoo-bringout-oca-ocb-l10n_do/l10n_do/models/template_do.py
Normal file
39
odoo-bringout-oca-ocb-l10n_do/l10n_do/models/template_do.py
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
# 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('do')
|
||||
def _get_do_template_data(self):
|
||||
return {
|
||||
'code_digits': '8',
|
||||
'property_account_receivable_id': 'l10n_do_11030201',
|
||||
'property_account_payable_id': 'l10n_do_21010200',
|
||||
'property_stock_valuation_account_id': 'l10n_do_11050100',
|
||||
}
|
||||
|
||||
@template('do', 'res.company')
|
||||
def _get_do_res_company(self):
|
||||
return {
|
||||
self.env.company.id: {
|
||||
'anglo_saxon_accounting': True,
|
||||
'account_fiscal_country_id': 'base.do',
|
||||
'bank_account_code_prefix': '110102',
|
||||
'cash_account_code_prefix': '110101',
|
||||
'transfer_account_code_prefix': '11010100',
|
||||
'account_default_pos_receivable_account_id': 'l10n_do_11030210',
|
||||
'income_currency_exchange_account_id': 'l10n_do_42040100',
|
||||
'expense_currency_exchange_account_id': 'l10n_do_61070800',
|
||||
'account_journal_early_pay_discount_loss_account_id': 'l10n_do_61081000',
|
||||
'account_journal_early_pay_discount_gain_account_id': 'l10n_do_42040400',
|
||||
'default_cash_difference_income_account_id': 'l10n_do_42040400',
|
||||
'default_cash_difference_expense_account_id': 'l10n_do_61081000',
|
||||
'account_sale_tax_id': 'tax_18_sale',
|
||||
'account_purchase_tax_id': 'tax_18_purch',
|
||||
'income_account_id': 'l10n_do_41010100',
|
||||
'expense_account_id': 'l10n_do_51010100',
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue