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):
|
||||
"""
|
||||
数据初始化,只在安装后执行,更新时不执行
|
||||
此处不执行,只是记录,该数据已处理完成
|
||||
注意 account.account 中 code 处理已不同,主要用 json 存在 code_store 中,故要不可使用 sql,
|
||||
同时 group_id 已为 compute 字段,无需设置
|
||||
|
||||
"""
|
||||
# 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);")
|
||||
|
||||
env.cr.execute("UPDATE account_account set group_id = "
|
||||
"(select id from account_group where account_group.code_prefix_start=trim(substring(account_account.code from 1 for 1)) limit 1);")
|
||||
env.cr.commit()
|
||||
# for g in [
|
||||
# env.ref('l10n_cn_standard_latest.account_group_1'),
|
||||
# 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
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ msgstr ""
|
||||
#. odoo-python
|
||||
#: code:addons/l10n_cn_standard_latest/models/template_cn_standard.py:0
|
||||
#, python-format
|
||||
msgid "2024中国企业会计科目表-odoo17"
|
||||
msgid "2025中国企业会计科目表-odoo18"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_cn_standard_latest
|
||||
|
||||
@@ -20,7 +20,7 @@ class AccountChartTemplate(models.AbstractModel):
|
||||
@template('cn_standard')
|
||||
def _get_cn_standard_template_data(self):
|
||||
return {
|
||||
'name': _('2024中国企业会计科目表-odoo17'),
|
||||
'name': _('2025中国企业会计科目表-odoo18'),
|
||||
'code_digits': 4,
|
||||
'property_account_receivable_id': 'account_1122',
|
||||
'property_account_payable_id': 'account_2202',
|
||||
|
||||
@@ -2,13 +2,9 @@
|
||||
<odoo>
|
||||
<data>
|
||||
<template id="external_layout_boxed" inherit_id="web.external_layout_boxed" primary="True">
|
||||
<xpath expr="//div[hasclass('o_boxed_header')]" position="replace">
|
||||
<div class="o_boxed_header">
|
||||
<div class="row mb8">
|
||||
<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>
|
||||
<xpath expr="//img[hasclass('o_company_logo_big')]/.." position="replace">
|
||||
<div class="col-3">
|
||||
<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>
|
||||
</xpath>
|
||||
</template>
|
||||
@@ -16,7 +12,6 @@
|
||||
<template id="report_voucher_document">
|
||||
<t t-set="o" t-value="o.with_context(lang=lang)" />
|
||||
<t t-set="company" t-value="o.company_id"/>
|
||||
|
||||
<t t-call="l10n_cn_standard_latest.external_layout_boxed">
|
||||
<div class="page">
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<field name="model">account.account</field>
|
||||
<field name="inherit_id" ref="account.view_account_list"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//tree" position="attributes">
|
||||
<xpath expr="//list" position="attributes">
|
||||
<attribute name="default_order">code</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='account_type']" position="after">
|
||||
|
||||
Reference in New Issue
Block a user