fix #47 l10n_cn_standard_latest14(Serious error in Chinese account type) #47

This commit is contained in:
ivan deng
2021-11-07 19:03:45 +08:00
parent 0d223168a7
commit 0220aa24e8
4 changed files with 22 additions and 27 deletions

View File

@@ -9,7 +9,7 @@
{
'name': '2021最新中国企业会计表.Latest Chinese Accounting.',
'version': '14.21.06.09',
'version': '14.21.11.07',
'author': 'Sunpop.cn',
'category': 'Localization',
'website': 'https://www.sunpop.cn',

View File

@@ -1,4 +1,6 @@
id,code,name,parent_id/id,reconcile,user_type_id/id,tag_ids/id,chart_template_id/id
account_1001,1001,库存现金,,TRUE,account.data_account_type_liquidity,,l10n_chart_china_standard_business_latest
account_1002,1002,银行存款,,TRUE,account.data_account_type_liquidity,tag21,l10n_chart_china_standard_business_latest
account_1003,1003,存放中央银行款项,,TRUE,account.data_account_type_current_assets,tag21,l10n_chart_china_standard_business_latest
account_1011,1011,存放同业,,FALSE,account.data_account_type_current_assets,tag21,l10n_chart_china_standard_business_latest
account_1012,1012,其他货币资金,,FALSE,account.data_account_type_current_assets,,l10n_chart_china_standard_business_latest
@@ -99,7 +101,7 @@ account_2221_6,2221.06,应交所得税,account_2221,FALSE,account.data_account_t
account_2221_7,2221.07,应交土地增值税,account_2221,FALSE,account.data_account_type_current_liabilities,,l10n_chart_china_standard_business_latest
account_2221_8,2221.08,应交城市维护建设税,account_2221,FALSE,account.data_account_type_current_liabilities,,l10n_chart_china_standard_business_latest
account_2221_9,2221.09,应交房产税,account_2221,FALSE,account.data_account_type_current_liabilities,,l10n_chart_china_standard_business_latest
account_2221_10,2221.10,应交土地使用税,account_2221,FALSE,account.data_account_type_current_liabilities,,l10n_chart_china_standard_business_latest
account_2221_10,2221.1,应交土地使用税,account_2221,FALSE,account.data_account_type_current_liabilities,,l10n_chart_china_standard_business_latest
account_2221_11,2221.11,应交车船使用税,account_2221,FALSE,account.data_account_type_current_liabilities,,l10n_chart_china_standard_business_latest
account_2221_12,2221.12,应交个人所得税,account_2221,FALSE,account.data_account_type_current_liabilities,,l10n_chart_china_standard_business_latest
account_2231,2231,应付利息,,FALSE,account.data_account_type_current_liabilities,,l10n_chart_china_standard_business_latest
@@ -135,13 +137,13 @@ account_4102,4102,一般风险准备,,FALSE,account.data_account_type_equity,tag
account_4103,4103,本年利润,,FALSE,account.data_account_type_equity,,l10n_chart_china_standard_business_latest
account_4104,4104,利润分配,,FALSE,account.data_account_type_equity,,l10n_chart_china_standard_business_latest
account_4201,4201,库存股,,FALSE,account.data_account_type_equity,,l10n_chart_china_standard_business_latest
account_5001,5001,生产成本,,FALSE,account.data_account_off_sheet,,l10n_chart_china_standard_business_latest
account_5101,5101,制造费用,,FALSE,account.data_account_off_sheet,,l10n_chart_china_standard_business_latest
account_5201,5201,劳务成本,,FALSE,account.data_account_off_sheet,,l10n_chart_china_standard_business_latest
account_5301,5301,研发支出,,FALSE,account.data_account_off_sheet,,l10n_chart_china_standard_business_latest
account_5401,5401,工程施工,,FALSE,account.data_account_off_sheet,tag30,l10n_chart_china_standard_business_latest
account_5402,5402,工程结算,,FALSE,account.data_account_off_sheet,tag30,l10n_chart_china_standard_business_latest
account_5403,5403,机械作业,,FALSE,account.data_account_off_sheet,tag30,l10n_chart_china_standard_business_latest
account_5001,5001,生产成本,,FALSE,account.data_account_type_direct_costs,,l10n_chart_china_standard_business_latest
account_5101,5101,制造费用,,FALSE,account.data_account_type_direct_costs,,l10n_chart_china_standard_business_latest
account_5201,5201,劳务成本,,FALSE,account.data_account_type_direct_costs,,l10n_chart_china_standard_business_latest
account_5301,5301,研发支出,,FALSE,account.data_account_type_direct_costs,,l10n_chart_china_standard_business_latest
account_5401,5401,工程施工,,FALSE,account.data_account_type_direct_costs,tag30,l10n_chart_china_standard_business_latest
account_5402,5402,工程结算,,FALSE,account.data_account_type_direct_costs,tag30,l10n_chart_china_standard_business_latest
account_5403,5403,机械作业,,FALSE,account.data_account_type_direct_costs,tag30,l10n_chart_china_standard_business_latest
account_6001,6001,主营业务收入,,FALSE,account.data_account_type_revenue,,l10n_chart_china_standard_business_latest
account_6011,6011,利息收入,,FALSE,account.data_account_type_revenue,tag23,l10n_chart_china_standard_business_latest
account_6021,6021,手续费及佣金收入,,FALSE,account.data_account_type_revenue,tag23,l10n_chart_china_standard_business_latest
1 id code name parent_id/id reconcile user_type_id/id tag_ids/id chart_template_id/id
2 account_1001 1001 库存现金 TRUE account.data_account_type_liquidity l10n_chart_china_standard_business_latest
3 account_1002 1002 银行存款 TRUE account.data_account_type_liquidity tag21 l10n_chart_china_standard_business_latest
4 account_1003 1003 存放中央银行款项 TRUE account.data_account_type_current_assets tag21 l10n_chart_china_standard_business_latest
5 account_1011 1011 存放同业 FALSE account.data_account_type_current_assets tag21 l10n_chart_china_standard_business_latest
6 account_1012 1012 其他货币资金 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business_latest
101 account_2221_7 2221.07 应交土地增值税 account_2221 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business_latest
102 account_2221_8 2221.08 应交城市维护建设税 account_2221 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business_latest
103 account_2221_9 2221.09 应交房产税 account_2221 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business_latest
104 account_2221_10 2221.10 2221.1 应交土地使用税 account_2221 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business_latest
105 account_2221_11 2221.11 应交车船使用税 account_2221 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business_latest
106 account_2221_12 2221.12 应交个人所得税 account_2221 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business_latest
107 account_2231 2231 应付利息 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business_latest
137 account_4103 4103 本年利润 FALSE account.data_account_type_equity l10n_chart_china_standard_business_latest
138 account_4104 4104 利润分配 FALSE account.data_account_type_equity l10n_chart_china_standard_business_latest
139 account_4201 4201 库存股 FALSE account.data_account_type_equity l10n_chart_china_standard_business_latest
140 account_5001 5001 生产成本 FALSE account.data_account_off_sheet account.data_account_type_direct_costs l10n_chart_china_standard_business_latest
141 account_5101 5101 制造费用 FALSE account.data_account_off_sheet account.data_account_type_direct_costs l10n_chart_china_standard_business_latest
142 account_5201 5201 劳务成本 FALSE account.data_account_off_sheet account.data_account_type_direct_costs l10n_chart_china_standard_business_latest
143 account_5301 5301 研发支出 FALSE account.data_account_off_sheet account.data_account_type_direct_costs l10n_chart_china_standard_business_latest
144 account_5401 5401 工程施工 FALSE account.data_account_off_sheet account.data_account_type_direct_costs tag30 l10n_chart_china_standard_business_latest
145 account_5402 5402 工程结算 FALSE account.data_account_off_sheet account.data_account_type_direct_costs tag30 l10n_chart_china_standard_business_latest
146 account_5403 5403 机械作业 FALSE account.data_account_off_sheet account.data_account_type_direct_costs tag30 l10n_chart_china_standard_business_latest
147 account_6001 6001 主营业务收入 FALSE account.data_account_type_revenue l10n_chart_china_standard_business_latest
148 account_6011 6011 利息收入 FALSE account.data_account_type_revenue tag23 l10n_chart_china_standard_business_latest
149 account_6021 6021 手续费及佣金收入 FALSE account.data_account_type_revenue tag23 l10n_chart_china_standard_business_latest

View File

@@ -1,7 +1,7 @@
"id","code_prefix_start","code_prefix_end","name"
"account_group_1","1","1","资产类"
"account_group_2","2","2","负债类"
"account_group_3","3","3","共有"
"account_group_4","4","4","所有者权益类"
"account_group_5","5","5","成本类"
"account_group_6","6","6","损益类"
"id","code_prefix","name"
"account_group_1","1","资产类"
"account_group_2","2","负债类"
"account_group_3","3","共同"
"account_group_4","4","所有者权益类"
"account_group_5","5","成本类"
"account_group_6","6","损益类"
1 id code_prefix_start code_prefix code_prefix_end name
2 account_group_1 1 1 1 资产类
3 account_group_2 2 2 2 负债类
4 account_group_3 3 3 3 共有类 共同类
5 account_group_4 4 4 4 所有者权益类
6 account_group_5 5 5 5 成本类
7 account_group_6 6 6 6 损益类

View File

@@ -9,17 +9,6 @@ class AccountJournal(models.Model):
@api.model
def _prepare_liquidity_account(self, name, company, currency_id, type):
'''
This function prepares the value to use for the creation of the default debit and credit accounts of a
liquidity journal (created through the wizard of generating COA from templates for example).
:param name: name of the bank account
:param company: company for which the wizard is running
:param currency_id: ID of the currency in which is the bank account
:param type: either 'cash' or 'bank'
:return: mapping of field names and values
:rtype: dict
'''
digits = 6
chart = self.company_id.chart_template_id
if chart:
@@ -30,6 +19,8 @@ class AccountJournal(models.Model):
else:
account_code_prefix = company.cash_account_code_prefix or company.bank_account_code_prefix or ''
digits = len(account_code_prefix)
# 获取上级
p_account = self.env['account.account'].search([('code', '=', account_code_prefix), ('company_id', '=', company.id)], limit=1)
liquidity_type = self.env.ref('account.data_account_type_liquidity')
return {
@@ -37,5 +28,7 @@ class AccountJournal(models.Model):
'currency_id': currency_id or False,
'code': self.env['account.account']._search_new_account_code(company, digits, account_code_prefix),
'user_type_id': liquidity_type and liquidity_type.id or False,
'parent_id': p_account and p_account.id or False,
'group_id': p_account and p_account.group_id and p_account.group_id.id or False,
'company_id': company.id,
}