mirror of
https://github.com/guohuadeng/app-odoo.git
synced 2025-02-23 04:11:36 +02:00
fix 会计科目
This commit is contained in:
@@ -27,13 +27,24 @@ def pre_init_hook(env):
|
|||||||
def post_init_hook(env):
|
def post_init_hook(env):
|
||||||
"""
|
"""
|
||||||
数据初始化,只在安装后执行,更新时不执行
|
数据初始化,只在安装后执行,更新时不执行
|
||||||
此处不执行,只是记录,该数据已处理完成
|
注意 account.account 中 code 处理已不同,主要用 json 存在 code_store 中,故要不可使用 sql,
|
||||||
|
同时 group_id 已为 compute 字段,无需设置
|
||||||
|
|
||||||
"""
|
"""
|
||||||
# cr.execute("UPDATE account_account_template set group_id = "
|
# cr.execute("UPDATE account_account_template set group_id = "
|
||||||
# "(select id from account_group where account_group.code_prefix_start=trim(substring(account_account_template.code from 1 for 1)) limit 1);")
|
# "(select id from account_group where account_group.code_prefix_start=trim(substring(account_account_template.code from 1 for 1)) limit 1);")
|
||||||
|
|
||||||
env.cr.execute("UPDATE account_account set group_id = "
|
# for g in [
|
||||||
"(select id from account_group where account_group.code_prefix_start=trim(substring(account_account.code from 1 for 1)) limit 1);")
|
# env.ref('l10n_cn_standard_latest.account_group_1'),
|
||||||
env.cr.commit()
|
# env.ref('l10n_cn_standard_latest.account_group_2'),
|
||||||
|
# env.ref('l10n_cn_standard_latest.account_group_3'),
|
||||||
|
# env.ref('l10n_cn_standard_latest.account_group_4'),
|
||||||
|
# env.ref('l10n_cn_standard_latest.account_group_5'),
|
||||||
|
# env.ref('l10n_cn_standard_latest.account_group_6'),
|
||||||
|
# ]:
|
||||||
|
# res = env['account.account'].search([('code', 'like', g.code_prefix_start + '%')])
|
||||||
|
# if res:
|
||||||
|
# res.write({'group_id': g.id})
|
||||||
|
# env.cr.commit()
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ msgstr ""
|
|||||||
#. odoo-python
|
#. odoo-python
|
||||||
#: code:addons/l10n_cn_standard_latest/models/template_cn_standard.py:0
|
#: code:addons/l10n_cn_standard_latest/models/template_cn_standard.py:0
|
||||||
#, python-format
|
#, python-format
|
||||||
msgid "2024中国企业会计科目表-odoo17"
|
msgid "2025中国企业会计科目表-odoo18"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. module: l10n_cn_standard_latest
|
#. module: l10n_cn_standard_latest
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ class AccountChartTemplate(models.AbstractModel):
|
|||||||
@template('cn_standard')
|
@template('cn_standard')
|
||||||
def _get_cn_standard_template_data(self):
|
def _get_cn_standard_template_data(self):
|
||||||
return {
|
return {
|
||||||
'name': _('2024中国企业会计科目表-odoo17'),
|
'name': _('2025中国企业会计科目表-odoo18'),
|
||||||
'code_digits': 4,
|
'code_digits': 4,
|
||||||
'property_account_receivable_id': 'account_1122',
|
'property_account_receivable_id': 'account_1122',
|
||||||
'property_account_payable_id': 'account_2202',
|
'property_account_payable_id': 'account_2202',
|
||||||
|
|||||||
@@ -2,13 +2,9 @@
|
|||||||
<odoo>
|
<odoo>
|
||||||
<data>
|
<data>
|
||||||
<template id="external_layout_boxed" inherit_id="web.external_layout_boxed" primary="True">
|
<template id="external_layout_boxed" inherit_id="web.external_layout_boxed" primary="True">
|
||||||
<xpath expr="//div[hasclass('o_boxed_header')]" position="replace">
|
<xpath expr="//img[hasclass('o_company_logo_big')]/.." position="replace">
|
||||||
<div class="o_boxed_header">
|
<div class="col-3">
|
||||||
<div class="row mb8">
|
<img t-if="company.logo" class="o_company_logo_big" t-att-src="image_data_uri(company.logo)" style="max-height: 45px;" alt="Logo"/>
|
||||||
<div class="col-3 mb4">
|
|
||||||
<img t-if="company.logo" t-att-src="image_data_uri(company.logo)" style="max-height: 45px;" alt="Logo"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
@@ -16,7 +12,6 @@
|
|||||||
<template id="report_voucher_document">
|
<template id="report_voucher_document">
|
||||||
<t t-set="o" t-value="o.with_context(lang=lang)" />
|
<t t-set="o" t-value="o.with_context(lang=lang)" />
|
||||||
<t t-set="company" t-value="o.company_id"/>
|
<t t-set="company" t-value="o.company_id"/>
|
||||||
|
|
||||||
<t t-call="l10n_cn_standard_latest.external_layout_boxed">
|
<t t-call="l10n_cn_standard_latest.external_layout_boxed">
|
||||||
<div class="page">
|
<div class="page">
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<field name="model">account.account</field>
|
<field name="model">account.account</field>
|
||||||
<field name="inherit_id" ref="account.view_account_list"/>
|
<field name="inherit_id" ref="account.view_account_list"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//tree" position="attributes">
|
<xpath expr="//list" position="attributes">
|
||||||
<attribute name="default_order">code</attribute>
|
<attribute name="default_order">code</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
<xpath expr="//field[@name='account_type']" position="after">
|
<xpath expr="//field[@name='account_type']" position="after">
|
||||||
|
|||||||
Reference in New Issue
Block a user