[MERGE] forward port branch 10.0 up to 2ef43281c2

This commit is contained in:
Christophe Simonis
2017-03-13 16:22:57 +01:00
49 changed files with 567 additions and 931 deletions
@@ -266,12 +266,12 @@ class AccountBankStatement(models.Model):
""" Changes statement state to Running."""
for statement in self:
if not statement.name:
context = {'ir_sequence_date', statement.date}
context = {'ir_sequence_date': statement.date}
if statement.journal_id.sequence_id:
st_number = statement.journal_id.sequence_id.with_context(context).next_by_id()
st_number = statement.journal_id.sequence_id.with_context(**context).next_by_id()
else:
SequenceObj = self.env['ir.sequence']
st_number = SequenceObj.with_context(context).next_by_code('account.bank.statement')
st_number = SequenceObj.with_context(**context).next_by_code('account.bank.statement')
statement.name = st_number
statement.state = 'open'
+1 -1
View File
@@ -1053,7 +1053,7 @@
class="oe_link"
type="object"
string="-> View partially reconciled entries"
attrs="{'invisible': ['|', ('full_reconcile_id', '=', True), '&', ('matched_debit_ids', '=', []),('matched_credit_ids', '=', [])]}">
attrs="{'invisible': ['|', ('full_reconcile_id', '!=', False), '&', ('matched_debit_ids', '=', []),('matched_credit_ids', '=', [])]}">
</button>
</div>
</group>
+2
View File
@@ -171,6 +171,8 @@
<xpath expr="//h2" position="replace">
<h2>
<span>Duplicate</span>
<span t-if="o.type == 'out_refund'">refund</span>
<span t-if="o.type == 'out_invoice'">invoice</span>
<span t-field="o.number"/>
</h2>
</xpath>
+2
View File
@@ -181,6 +181,8 @@ var DashBoard = form_common.FormWidget.extend({
action = result,
view_mode = action_attrs.view_mode;
if (!action) { return; }
// evaluate action_attrs context and domain
action_attrs.context_string = action_attrs.context;
action_attrs.context = pyeval.eval(
+52 -15
View File
@@ -527,9 +527,23 @@ class Meeting(models.Model):
return partners
@api.multi
def _get_recurrent_date_by_event(self):
""" Get recurrent dates based on Rule string and all event where recurrent_id is child """
def _get_recurrent_dates_by_event(self):
""" Get recurrent start and stop dates based on Rule string"""
start_dates = self._get_recurrent_date_by_event(date_field='start')
stop_dates = self._get_recurrent_date_by_event(date_field='stop')
return zip(start_dates, stop_dates)
@api.multi
def _get_recurrent_date_by_event(self, date_field='start'):
""" Get recurrent dates based on Rule string and all event where recurrent_id is child
date_field: the field containing the reference date information for recurrency computation
"""
self.ensure_one()
if date_field in self._fields.keys() and self._fields[date_field].type in ('date', 'datetime'):
reference_date = self[date_field]
else:
reference_date = self.start
def todate(date):
val = parser.parse(''.join((re.compile('\d')).findall(date)))
@@ -539,14 +553,14 @@ class Meeting(models.Model):
return val.astimezone(timezone)
timezone = pytz.timezone(self._context.get('tz') or 'UTC')
startdate = pytz.UTC.localize(fields.Datetime.from_string(self.start)) # Add "+hh:mm" timezone
if not startdate:
startdate = datetime.now()
event_date = pytz.UTC.localize(fields.Datetime.from_string(reference_date)) # Add "+hh:mm" timezone
if not event_date:
event_date = datetime.now()
# Convert the start date to saved timezone (or context tz) as it'll
# Convert the event date to saved timezone (or context tz) as it'll
# define the correct hour/day asked by the user to repeat for recurrence.
startdate = startdate.astimezone(timezone) # transform "+hh:mm" timezone
rset1 = rrule.rrulestr(str(self.rrule), dtstart=startdate, forceset=True)
event_date = event_date.astimezone(timezone) # transform "+hh:mm" timezone
rset1 = rrule.rrulestr(str(self.rrule), dtstart=event_date, forceset=True)
recurring_meetings = self.search([('recurrent_id', '=', self.id), '|', ('active', '=', False), ('active', '=', True)])
for meeting in recurring_meetings:
@@ -998,27 +1012,38 @@ class Meeting(models.Model):
result.append(meeting.id)
result_data.append(meeting.get_search_fields(order_fields))
continue
rdates = meeting._get_recurrent_date_by_event()
rdates = meeting._get_recurrent_dates_by_event()
for r_date in rdates:
for r_start_date, r_stop_date in rdates:
# fix domain evaluation
# step 1: check date and replace expression by True or False, replace other expressions by True
# step 2: evaluation of & and |
# check if there are one False
pile = []
ok = True
r_date = r_start_date # default for empty domain
for arg in domain:
if str(arg[0]) in ('start', 'stop', 'final_date'):
if str(arg[0]) == 'start':
r_date = r_start_date
else:
r_date = r_stop_date
if arg[2] and len(arg[2]) > len(r_date.strftime(DEFAULT_SERVER_DATE_FORMAT)):
dformat = DEFAULT_SERVER_DATETIME_FORMAT
else:
dformat = DEFAULT_SERVER_DATE_FORMAT
if (arg[1] == '='):
ok = r_date.strftime('%Y-%m-%d') == arg[2]
ok = r_date.strftime(dformat) == arg[2]
if (arg[1] == '>'):
ok = r_date.strftime('%Y-%m-%d') > arg[2]
ok = r_date.strftime(dformat) > arg[2]
if (arg[1] == '<'):
ok = r_date.strftime('%Y-%m-%d') < arg[2]
ok = r_date.strftime(dformat) < arg[2]
if (arg[1] == '>='):
ok = r_date.strftime('%Y-%m-%d') >= arg[2]
ok = r_date.strftime(dformat) >= arg[2]
if (arg[1] == '<='):
ok = r_date.strftime('%Y-%m-%d') <= arg[2]
ok = r_date.strftime(dformat) <= arg[2]
if (arg[1] == '!='):
ok = r_date.strftime(dformat) != arg[2]
pile.append(ok)
elif str(arg) == str('&') or str(arg) == str('|'):
pile.append(arg)
@@ -1534,6 +1559,18 @@ class Meeting(models.Model):
if not self._context.get('virtual_id', True):
return super(Meeting, self).search(new_args, offset=offset, limit=limit, order=order, count=count)
if any(arg[0] == 'start' for arg in args) and \
not any(arg[0] in ('stop', 'final_date') for arg in args):
# domain with a start filter but with no stop clause should be extended
# e.g. start=2017-01-01, count=5 => virtual occurences must be included in ('start', '>', '2017-01-02')
start_args = new_args
new_args = []
for arg in start_args:
new_arg = arg
if arg[0] in ('start_date', 'start_datetime', 'start',):
new_args += ['|', '&', ('recurrency', '=', 1), ('final_date', arg[1], arg[2])]
new_args.append(new_arg)
# offset, limit, order and count must be treated separately as we may need to deal with virtual ids
events = super(Meeting, self).search(new_args, offset=0, limit=0, order=None, count=False)
events = self.browse(events.get_recurrent_ids(args, order=order))
@@ -96,3 +96,52 @@ class TestRecurrentEvent(common.TransactionCase):
# I update the description of two meetings, and check that both have been updated
self.calendar_event_sprint_review.write({'description': "Some description"})
self.assertEqual(self.calendar_event_sprint_review.description, "Some description", "Event %d has not been updated" % self.calendar_event_sprint_review.id)
def test_recurrent_meeting4(self):
# I create a weekly meeting till a particular end date.
self.CalendarEvent.create({
'start': '2017-01-22 11:47:00',
'stop': '2017-01-22 12:47:00',
'day': 0.0,
'duration': 1.0,
'final_date': '2017-06-30',
'end_type': 'end_date',
'fr': True,
'mo': True,
'th': True,
'tu': True,
'we': True,
'name': 'Review code with programmer',
'recurrency': True,
'rrule_type': 'weekly'
})
# I search for a recurrent weekly meetings that take place at a given date.
meetings_count = self.CalendarEvent.with_context({'virtual_id': True}).search_count([
('start', '<=', '2017-01-24'), ('stop', '>=', '2017-01-24'), ('name', '=', 'Review code with programmer')
])
self.assertEqual(meetings_count, 1, 'Recurrent weekly meetings are not found using date filter !')
# I search for a recurrent weekly meetings that take place at a given date and time.
meetings_count = self.CalendarEvent.with_context({'virtual_id': True}).search_count([
('start', '<=', '2017-01-24 11:55:00'), ('stop', '>=', '2017-01-24 11:55:00'), ('name', '=', 'Review code with programmer')
])
self.assertEqual(meetings_count, 1, 'Recurrent weekly meetings are not found using time filter !')
# I search using the filter 'start date is set'
meetings_count = self.CalendarEvent.with_context({'virtual_id': True}).search_count([
('start', '!=', False), ('stop', '>=', '2017-06-30 11:55:00'), ('name', '=', 'Review code with programmer')
])
self.assertEqual(meetings_count, 1, "Last recurrent weekly meetings are not found using 'is set' filter !")
# I search for a recurrent weekly meetings that take place at a given date and time.
meetings_count = self.CalendarEvent.with_context({'virtual_id': True}).search_count([
('start', '<=', '2017-01-24 11:55:00'), ('stop', '>=', '2017-01-24 15:55:00')
])
self.assertEqual(meetings_count, 0, 'Too late recurrent meetings are found using time filter !')
# I search using a start filter but no stop
meetings_count = self.CalendarEvent.with_context({'virtual_id': True}).search_count([
('start', '>=', '2017-06-30 08:00:00'), ('name', '=', 'Review code with programmer')
])
self.assertEqual(meetings_count, 1, "Last recurrent weekly meetings are not found without stop filter !")
+7 -10
View File
@@ -466,24 +466,21 @@ class Lead(models.Model):
"""
title = "%s : %s\n" % (_('Merged opportunity') if self.type == 'opportunity' else _('Merged lead'), self.name)
body = [title]
for field_name in fields:
field = self._fields.get(field_name)
if field is None:
continue
value = self[field_name]
if field.type == 'selection':
fields = self.env['ir.model.fields'].search([('name', 'in', fields or []), ('model_id.model', '=', self._name)])
for field in fields:
value = self[field.name]
if field.ttype == 'selection':
value = dict(field.get_values(self.env)).get(value, value)
elif field.type == 'many2one':
elif field.ttype == 'many2one':
if value:
value = value.sudo().name_get()[0][1]
elif field.type == 'many2many':
elif field.ttype == 'many2many':
if value:
value = ','.join(
val.name_get()[0][1]
for val in value.sudo()
)
body.append("%s: %s" % (field.string, value or ''))
body.append("%s: %s" % (field.field_description, value or ''))
return "<br/>".join(body + ['<br/>'])
@api.multi
+1
View File
@@ -146,6 +146,7 @@
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_case_form_view_oppor"/>
<field name="domain">[('type','=','opportunity')]</field>
<field name="context">{
'search_default_team_id': [active_id],
+4 -2
View File
@@ -5,7 +5,7 @@ import re
from odoo import api, fields, models, _
from odoo.exceptions import UserError
from odoo.tools import email_split
from odoo.tools import email_split, float_is_zero
import odoo.addons.decimal_precision as dp
@@ -511,7 +511,9 @@ class HrExpenseSheet(models.Model):
if any(not sheet.journal_id for sheet in self):
raise UserError(_("Expenses must have an expense journal specified to generate accounting entries."))
res = self.mapped('expense_line_ids').action_move_create()
res = self.mapped('expense_line_ids')\
.filtered(lambda r: not float_is_zero(r.total_amount, precision_rounding=(r.currency_id or self.env.user.company_id.currency_id).rounding))\
.action_move_create()
if not self.accounting_date:
self.accounting_date = self.account_move_id.date
+6
View File
@@ -20,6 +20,12 @@
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])]</field>
</record>
<record id="hr_expense_report_comp_rule" model="ir.rule">
<field name="name">Expense Report multi company rule</field>
<field name="model_id" ref="model_hr_expense_sheet"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id', '=', False), ('company_id', 'child_of', [user.company_id.id])]</field>
</record>
</data>
</odoo>
@@ -152,7 +152,7 @@ class HrTimesheetSheet(models.Model):
analytic_timesheet_toremove = self.env['account.analytic.line']
for sheet in self:
analytic_timesheet_toremove += sheet.timesheet_ids
analytic_timesheet_toremove += sheet.timesheet_ids.filtered(lambda t: not t.task_id)
analytic_timesheet_toremove.unlink()
return super(HrTimesheetSheet, self).unlink()
@@ -126,7 +126,6 @@
<script type="text/javascript" src="/web/static/src/js/framework/local_storage.js"></script>
<script type="text/javascript" src="/web/static/src/js/framework/qweb.js"></script>
<script type="text/javascript" src="/web/static/src/js/services/core.js"></script>
<script type="text/javascript" src="/web/static/src/js/services/session.js"></script>
<!-- Bus, Mail, Livechat -->
<script type="text/javascript" src="/bus/static/src/js/bus.js"></script>
<script type="text/javascript" src="/mail/static/src/js/chat_window.js"></script>
+5 -1
View File
@@ -1,4 +1,8 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# Copyright (C) 2007-2014 Jeff Wang(<http://jeff@osbzr.com>).
# Copyright (C) 2008-2008 凯源吕鑫 lvxin@gmail.com <basic chart data>
# 维智众源 oldrev@gmail.com <states data>
# Copyright (C) 2012-2012 南京盈通 ccdos@intoerp.com <small business chart>
# Copyright (C) 2008-now 开阖软件 jeff@osbzr.com < PM and LTS >
# Copyright (C) 2017-now jeffery9@gmail.com
+17 -8
View File
@@ -5,26 +5,35 @@
# 维智众源 oldrev@gmail.com <states data>
# Copyright (C) 2012-2012 南京盈通 ccdos@intoerp.com <small business chart>
# Copyright (C) 2008-now 开阖软件 jeff@osbzr.com < PM and LTS >
# Copyright (C) 2017-now jeffery9@gmail.com
{
'name': '中国会计科目表-企业会计准则',
'version': '1.8',
'name': '会计科目表 - 中国企业会计准则',
'version': '2.0',
'category': 'Localization',
'author': 'www.openerp-china.org',
'maintainer': 'jeff@osbzr.com',
'website': 'http://openerp-china.org',
'author': ['lvxin@gmail.co', 'oldrev@gmail.co', 'ccdos@intoerp.com', 'jeff@osbzr.com', 'jeffery9@gmail.com'],
'website': 'http://shine-it.net',
'description': """
Including the following data in the Accounting Standards for Business Enterprises
包含企业会计准则以下数据
科目类型\会计科目表模板\增值税\辅助核算类别\管理会计凭证簿\财务会计凭证簿
* Chart of Accounts
* 科目表模板
添加中文省份数据
* Account templates
* 科目模板
增加小企业会计科目表
* Tax templates
* 税金模板
""",
'depends': ['l10n_cn'],
'data': [
'data/l10n_cn_standard_chart_data.xml',
'data/account.account.template.csv',
'data/account_tax_templates.xml',
'data/account_chart_template_data.xml',
'data/account_chart_template_data.yml',
],
'license': 'GPL-3',
@@ -0,0 +1,174 @@
id,code,name,reconcile,user_type_id/id,chart_template_id/id
account_1011,1011,存放同业,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1012,1012,其他货币资金,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1021,1021,结算备付金,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1031,1031,存出保证金,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1101,1101,交易性金融资产,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1111,1111,买入返售金融资产,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1121,1121,应收票据,TRUE,account.data_account_type_receivable,l10n_chart_china_standard_business
account_1122,1122,应收账款,TRUE,account.data_account_type_receivable,l10n_chart_china_standard_business
account_1123,1123,预付账款,TRUE,account.data_account_type_receivable,l10n_chart_china_standard_business
account_1131,1131,应收股利,TRUE,account.data_account_type_receivable,l10n_chart_china_standard_business
account_1132,1132,应收利息,TRUE,account.data_account_type_receivable,l10n_chart_china_standard_business
account_1201,1201,应收代位追偿款,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1211,1211,应收分保账款,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1212,1212,应收分保合同准备金,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1221,1221,其他应收款,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1231,1231,坏账准备,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1301,1301,贴现资产,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1302,1302,拆出资金,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1303,1303,贷款,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1304,1304,贷款损失准备,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1311,1311,代理兑付证券,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1321,1321,代理业务资产,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1401,1401,材料采购,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1402,1402,在途物资,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1403,1403,原材料,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1404,1404,材料成本差异,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1405,1405,库存商品,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1406,1406,发出商品,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1407,1407,商品进销差价,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1408,1408,委托加工物资,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1411,1411,周转材料,FALSE,account.data_account_type_non_current_assets,l10n_chart_china_standard_business
account_1421,1421,消耗性生物资产,FALSE,account.data_account_type_non_current_assets,l10n_chart_china_standard_business
account_1431,1431,贵金属,FALSE,account.data_account_type_non_current_assets,l10n_chart_china_standard_business
account_1441,1441,抵债资产,FALSE,account.data_account_type_non_current_assets,l10n_chart_china_standard_business
account_1451,1451,损余物资,FALSE,account.data_account_type_non_current_assets,l10n_chart_china_standard_business
account_1461,1461,融资租赁资产,FALSE,account.data_account_type_non_current_assets,l10n_chart_china_standard_business
account_1471,1471,存货跌价准备,FALSE,account.data_account_type_non_current_assets,l10n_chart_china_standard_business
account_1501,1501,持有至到期投资,FALSE,account.data_account_type_non_current_assets,l10n_chart_china_standard_business
account_1502,1502,持有至到期投资减值准备,FALSE,account.data_account_type_non_current_assets,l10n_chart_china_standard_business
account_1503,1503,可供出售金融资产,FALSE,account.data_account_type_non_current_assets,l10n_chart_china_standard_business
account_1511,1511,长期股权投资,FALSE,account.data_account_type_non_current_assets,l10n_chart_china_standard_business
account_1512,1512,长期股权投资减值准备,FALSE,account.data_account_type_non_current_assets,l10n_chart_china_standard_business
account_1521,1521,投资性房地产,FALSE,account.data_account_type_non_current_assets,l10n_chart_china_standard_business
account_1531,1531,长期应收款,FALSE,account.data_account_type_non_current_assets,l10n_chart_china_standard_business
account_1532,1532,未实现融资收益,FALSE,account.data_account_type_non_current_assets,l10n_chart_china_standard_business
account_1541,1541,存出资本保证金,FALSE,account.data_account_type_non_current_assets,l10n_chart_china_standard_business
account_1601,1601,固定资产,FALSE,account.data_account_type_fixed_assets,l10n_chart_china_standard_business
account_1602,1602,累计折旧,FALSE,account.data_account_type_fixed_assets,l10n_chart_china_standard_business
account_1603,1603,固定资产减值准备,FALSE,account.data_account_type_fixed_assets,l10n_chart_china_standard_business
account_1604,1604,在建工程,FALSE,account.data_account_type_fixed_assets,l10n_chart_china_standard_business
account_1605,1605,工程物资,FALSE,account.data_account_type_fixed_assets,l10n_chart_china_standard_business
account_1606,1606,固定资产清理,FALSE,account.data_account_type_fixed_assets,l10n_chart_china_standard_business
account_1611,1611,未担保余值,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1621,1621,生产性生物资产,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1622,1622,生产性生物资产累计折旧,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1623,1623,公益性生物资产,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1631,1631,油气资产,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1632,1632,累计折耗,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1701,1701,无形资产,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1702,1702,累计摊销,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1703,1703,无形资产减值准备,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1711,1711,商誉,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1801,1801,长期待摊费用,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1811,1811,递延所得税资产,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1821,1821,独立账户资产,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_1901,1901,待处理财产损溢,FALSE,account.data_account_type_current_assets,l10n_chart_china_standard_business
account_2001,2001,短期借款,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2002,2002,存入保证金,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2003,2003,拆入资金,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2004,2004,向中央银行借款,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2011,2011,吸收存款,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2012,2012,同业存放,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2021,2021,贴现负债,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2101,2101,交易性金融负债,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2111,2111,卖出回购金融资产款,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2201,2201,应付票据,TRUE,account.data_account_type_payable,l10n_chart_china_standard_business
account_2202,2202,应付账款,TRUE,account.data_account_type_payable,l10n_chart_china_standard_business
account_2203,2203,预收账款,TRUE,account.data_account_type_payable,l10n_chart_china_standard_business
account_2211,2211,应付职工薪酬,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2221,2221,应交税费,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2221_1_1,2221.01.01,进项税额,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2221_1_2,2221.01.02,已交税金,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2221_1_3,2221.01.03,转出未交增值税,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2221_1_4,2221.01.04,减免税款,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2221_1_5,2221.01.05,销项税额,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2221_1_6,2221.01.06,出口退税,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2221_1_7,2221.01.07,进项税额转出,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2221_1_8,2221.01.08,出口抵减内销产品应纳税额,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2221_1_9,2221.01.09,转出多交增值税,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2221_1_10,2221.01.10,未交增值税,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2221_2,2221.02,应交营业税,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2221_3,2221.03,应交消费税,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2221_4,2221.04,应交资源税,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2221_5,2221.05,应交所得税,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2221_6,2221.06,应交土地增值税,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2221_7,2221.07,应交城市维护建设税,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2221_8,2221.08,应交房产税,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2221_9,2221.09,应交土地使用税,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2221_10,2221.10,应交车船使用税,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2221_11,2221.11,应交个人所得税,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2231,2231,应付利息,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2232,2232,应付股利,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2241,2241,其他应付款,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2251,2251,应付保单红利,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2261,2261,应付分保账款,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2311,2311,代理买卖证券款,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2312,2312,代理承销证券款,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2313,2313,代理兑付证券款,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2314,2314,代理业务负债,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2401,2401,递延收益,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2501,2501,长期借款,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2502,2502,应付债券,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2601,2601,未到期责任准备金,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2602,2602,保险责任准备金,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2611,2611,保户储金,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2621,2621,独立账户负债,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2701,2701,长期应付款,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2702,2702,未确认融资费用,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2711,2711,专项应付款,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2801,2801,预计负债,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_2901,2901,递延所得税负债,FALSE,account.data_account_type_current_liabilities,l10n_chart_china_standard_business
account_3001,3001,清算资金往来,FALSE,l10n_cn.user_type_all,l10n_chart_china_standard_business
account_3002,3002,货币兑换,FALSE,l10n_cn.user_type_all,l10n_chart_china_standard_business
account_3101,3101,衍生工具,FALSE,l10n_cn.user_type_all,l10n_chart_china_standard_business
account_3201,3201,套期工具,FALSE,l10n_cn.user_type_all,l10n_chart_china_standard_business
account_3202,3202,被套期项目,FALSE,l10n_cn.user_type_all,l10n_chart_china_standard_business
account_4001,4001,实收资本,FALSE,account.data_account_type_equity,l10n_chart_china_standard_business
account_4002,4002,资本公积,FALSE,account.data_account_type_equity,l10n_chart_china_standard_business
account_4101,4101,盈余公积,FALSE,account.data_account_type_equity,l10n_chart_china_standard_business
account_4102,4102,一般风险准备,FALSE,account.data_account_type_equity,l10n_chart_china_standard_business
account_4103,4103,本年利润,FALSE,account.data_account_type_equity,l10n_chart_china_standard_business
account_4104,4104,利润分配,FALSE,account.data_account_type_equity,l10n_chart_china_standard_business
account_4201,4201,库存股,FALSE,account.data_account_type_equity,l10n_chart_china_standard_business
account_5001,5001,生产成本,FALSE,l10n_cn.user_type_all,l10n_chart_china_standard_business
account_5101,5101,制造费用,FALSE,l10n_cn.user_type_all,l10n_chart_china_standard_business
account_5201,5201,劳务成本,FALSE,l10n_cn.user_type_all,l10n_chart_china_standard_business
account_5301,5301,研发支出,FALSE,l10n_cn.user_type_all,l10n_chart_china_standard_business
account_5401,5401,工程施工,FALSE,l10n_cn.user_type_all,l10n_chart_china_standard_business
account_5402,5402,工程结算,FALSE,l10n_cn.user_type_all,l10n_chart_china_standard_business
account_5403,5403,机械作业,FALSE,l10n_cn.user_type_all,l10n_chart_china_standard_business
account_6001,6001,主营业务收入,FALSE,account.data_account_type_revenue,l10n_chart_china_standard_business
account_6011,6011,利息收入,FALSE,account.data_account_type_revenue,l10n_chart_china_standard_business
account_6021,6021,手续费及佣金收入,FALSE,account.data_account_type_revenue,l10n_chart_china_standard_business
account_6031,6031,保费收入,FALSE,account.data_account_type_revenue,l10n_chart_china_standard_business
account_6041,6041,租赁收入,FALSE,account.data_account_type_revenue,l10n_chart_china_standard_business
account_6051,6051,其他业务收入,FALSE,account.data_account_type_revenue,l10n_chart_china_standard_business
account_6061,6061,汇兑损益,FALSE,account.data_account_type_revenue,l10n_chart_china_standard_business
account_6101,6101,公允价值变动损益,FALSE,account.data_account_type_revenue,l10n_chart_china_standard_business
account_6111,6111,投资收益,FALSE,account.data_account_type_revenue,l10n_chart_china_standard_business
account_6201,6201,摊回保险责任准备金,FALSE,account.data_account_type_expenses,l10n_chart_china_standard_business
account_6202,6202,摊回赔付支出,FALSE,account.data_account_type_expenses,l10n_chart_china_standard_business
account_6203,6203,摊回分保费用,FALSE,account.data_account_type_expenses,l10n_chart_china_standard_business
account_6301,6301,营业外收入,FALSE,account.data_account_type_expenses,l10n_chart_china_standard_business
account_6401,6401,主营业务成本,FALSE,account.data_account_type_expenses,l10n_chart_china_standard_business
account_6402,6402,其他业务成本,FALSE,account.data_account_type_expenses,l10n_chart_china_standard_business
account_6403,6403,营业税金及附加,FALSE,account.data_account_type_expenses,l10n_chart_china_standard_business
account_6411,6411,利息支出,FALSE,account.data_account_type_expenses,l10n_chart_china_standard_business
account_6421,6421,手续费及佣金支出,FALSE,account.data_account_type_expenses,l10n_chart_china_standard_business
account_6501,6501,提取未到期责任准备金,FALSE,account.data_account_type_expenses,l10n_chart_china_standard_business
account_6502,6502,提取保险责任准备金,FALSE,account.data_account_type_expenses,l10n_chart_china_standard_business
account_6511,6511,赔付支出,FALSE,account.data_account_type_expenses,l10n_chart_china_standard_business
account_6521,6521,保单红利支出,FALSE,account.data_account_type_expenses,l10n_chart_china_standard_business
account_6531,6531,退保金,FALSE,account.data_account_type_expenses,l10n_chart_china_standard_business
account_6541,6541,分出保费,FALSE,account.data_account_type_expenses,l10n_chart_china_standard_business
account_6542,6542,分保费用,FALSE,account.data_account_type_expenses,l10n_chart_china_standard_business
account_6601,6601,销售费用,FALSE,account.data_account_type_expenses,l10n_chart_china_standard_business
account_6602,6602,管理费用,FALSE,account.data_account_type_expenses,l10n_chart_china_standard_business
account_6603,6603,财务费用,FALSE,account.data_account_type_expenses,l10n_chart_china_standard_business
account_6604,6604,勘探费用,FALSE,account.data_account_type_expenses,l10n_chart_china_standard_business
account_6701,6701,资产减值损失,FALSE,account.data_account_type_expenses,l10n_chart_china_standard_business
account_6711,6711,营业外支出,FALSE,account.data_account_type_expenses,l10n_chart_china_standard_business
account_6801,6801,所得税费用,FALSE,account.data_account_type_expenses,l10n_chart_china_standard_business
account_6901,6901,以前年度损益调整,FALSE,account.data_account_type_expenses,l10n_chart_china_standard_business
1 id code name reconcile user_type_id/id chart_template_id/id
2 account_1011 1011 存放同业 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
3 account_1012 1012 其他货币资金 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
4 account_1021 1021 结算备付金 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
5 account_1031 1031 存出保证金 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
6 account_1101 1101 交易性金融资产 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
7 account_1111 1111 买入返售金融资产 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
8 account_1121 1121 应收票据 TRUE account.data_account_type_receivable l10n_chart_china_standard_business
9 account_1122 1122 应收账款 TRUE account.data_account_type_receivable l10n_chart_china_standard_business
10 account_1123 1123 预付账款 TRUE account.data_account_type_receivable l10n_chart_china_standard_business
11 account_1131 1131 应收股利 TRUE account.data_account_type_receivable l10n_chart_china_standard_business
12 account_1132 1132 应收利息 TRUE account.data_account_type_receivable l10n_chart_china_standard_business
13 account_1201 1201 应收代位追偿款 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
14 account_1211 1211 应收分保账款 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
15 account_1212 1212 应收分保合同准备金 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
16 account_1221 1221 其他应收款 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
17 account_1231 1231 坏账准备 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
18 account_1301 1301 贴现资产 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
19 account_1302 1302 拆出资金 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
20 account_1303 1303 贷款 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
21 account_1304 1304 贷款损失准备 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
22 account_1311 1311 代理兑付证券 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
23 account_1321 1321 代理业务资产 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
24 account_1401 1401 材料采购 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
25 account_1402 1402 在途物资 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
26 account_1403 1403 原材料 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
27 account_1404 1404 材料成本差异 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
28 account_1405 1405 库存商品 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
29 account_1406 1406 发出商品 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
30 account_1407 1407 商品进销差价 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
31 account_1408 1408 委托加工物资 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
32 account_1411 1411 周转材料 FALSE account.data_account_type_non_current_assets l10n_chart_china_standard_business
33 account_1421 1421 消耗性生物资产 FALSE account.data_account_type_non_current_assets l10n_chart_china_standard_business
34 account_1431 1431 贵金属 FALSE account.data_account_type_non_current_assets l10n_chart_china_standard_business
35 account_1441 1441 抵债资产 FALSE account.data_account_type_non_current_assets l10n_chart_china_standard_business
36 account_1451 1451 损余物资 FALSE account.data_account_type_non_current_assets l10n_chart_china_standard_business
37 account_1461 1461 融资租赁资产 FALSE account.data_account_type_non_current_assets l10n_chart_china_standard_business
38 account_1471 1471 存货跌价准备 FALSE account.data_account_type_non_current_assets l10n_chart_china_standard_business
39 account_1501 1501 持有至到期投资 FALSE account.data_account_type_non_current_assets l10n_chart_china_standard_business
40 account_1502 1502 持有至到期投资减值准备 FALSE account.data_account_type_non_current_assets l10n_chart_china_standard_business
41 account_1503 1503 可供出售金融资产 FALSE account.data_account_type_non_current_assets l10n_chart_china_standard_business
42 account_1511 1511 长期股权投资 FALSE account.data_account_type_non_current_assets l10n_chart_china_standard_business
43 account_1512 1512 长期股权投资减值准备 FALSE account.data_account_type_non_current_assets l10n_chart_china_standard_business
44 account_1521 1521 投资性房地产 FALSE account.data_account_type_non_current_assets l10n_chart_china_standard_business
45 account_1531 1531 长期应收款 FALSE account.data_account_type_non_current_assets l10n_chart_china_standard_business
46 account_1532 1532 未实现融资收益 FALSE account.data_account_type_non_current_assets l10n_chart_china_standard_business
47 account_1541 1541 存出资本保证金 FALSE account.data_account_type_non_current_assets l10n_chart_china_standard_business
48 account_1601 1601 固定资产 FALSE account.data_account_type_fixed_assets l10n_chart_china_standard_business
49 account_1602 1602 累计折旧 FALSE account.data_account_type_fixed_assets l10n_chart_china_standard_business
50 account_1603 1603 固定资产减值准备 FALSE account.data_account_type_fixed_assets l10n_chart_china_standard_business
51 account_1604 1604 在建工程 FALSE account.data_account_type_fixed_assets l10n_chart_china_standard_business
52 account_1605 1605 工程物资 FALSE account.data_account_type_fixed_assets l10n_chart_china_standard_business
53 account_1606 1606 固定资产清理 FALSE account.data_account_type_fixed_assets l10n_chart_china_standard_business
54 account_1611 1611 未担保余值 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
55 account_1621 1621 生产性生物资产 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
56 account_1622 1622 生产性生物资产累计折旧 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
57 account_1623 1623 公益性生物资产 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
58 account_1631 1631 油气资产 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
59 account_1632 1632 累计折耗 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
60 account_1701 1701 无形资产 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
61 account_1702 1702 累计摊销 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
62 account_1703 1703 无形资产减值准备 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
63 account_1711 1711 商誉 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
64 account_1801 1801 长期待摊费用 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
65 account_1811 1811 递延所得税资产 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
66 account_1821 1821 独立账户资产 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
67 account_1901 1901 待处理财产损溢 FALSE account.data_account_type_current_assets l10n_chart_china_standard_business
68 account_2001 2001 短期借款 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
69 account_2002 2002 存入保证金 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
70 account_2003 2003 拆入资金 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
71 account_2004 2004 向中央银行借款 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
72 account_2011 2011 吸收存款 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
73 account_2012 2012 同业存放 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
74 account_2021 2021 贴现负债 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
75 account_2101 2101 交易性金融负债 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
76 account_2111 2111 卖出回购金融资产款 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
77 account_2201 2201 应付票据 TRUE account.data_account_type_payable l10n_chart_china_standard_business
78 account_2202 2202 应付账款 TRUE account.data_account_type_payable l10n_chart_china_standard_business
79 account_2203 2203 预收账款 TRUE account.data_account_type_payable l10n_chart_china_standard_business
80 account_2211 2211 应付职工薪酬 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
81 account_2221 2221 应交税费 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
82 account_2221_1_1 2221.01.01 进项税额 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
83 account_2221_1_2 2221.01.02 已交税金 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
84 account_2221_1_3 2221.01.03 转出未交增值税 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
85 account_2221_1_4 2221.01.04 减免税款 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
86 account_2221_1_5 2221.01.05 销项税额 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
87 account_2221_1_6 2221.01.06 出口退税 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
88 account_2221_1_7 2221.01.07 进项税额转出 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
89 account_2221_1_8 2221.01.08 出口抵减内销产品应纳税额 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
90 account_2221_1_9 2221.01.09 转出多交增值税 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
91 account_2221_1_10 2221.01.10 未交增值税 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
92 account_2221_2 2221.02 应交营业税 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
93 account_2221_3 2221.03 应交消费税 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
94 account_2221_4 2221.04 应交资源税 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
95 account_2221_5 2221.05 应交所得税 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
96 account_2221_6 2221.06 应交土地增值税 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
97 account_2221_7 2221.07 应交城市维护建设税 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
98 account_2221_8 2221.08 应交房产税 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
99 account_2221_9 2221.09 应交土地使用税 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
100 account_2221_10 2221.10 应交车船使用税 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
101 account_2221_11 2221.11 应交个人所得税 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
102 account_2231 2231 应付利息 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
103 account_2232 2232 应付股利 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
104 account_2241 2241 其他应付款 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
105 account_2251 2251 应付保单红利 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
106 account_2261 2261 应付分保账款 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
107 account_2311 2311 代理买卖证券款 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
108 account_2312 2312 代理承销证券款 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
109 account_2313 2313 代理兑付证券款 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
110 account_2314 2314 代理业务负债 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
111 account_2401 2401 递延收益 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
112 account_2501 2501 长期借款 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
113 account_2502 2502 应付债券 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
114 account_2601 2601 未到期责任准备金 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
115 account_2602 2602 保险责任准备金 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
116 account_2611 2611 保户储金 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
117 account_2621 2621 独立账户负债 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
118 account_2701 2701 长期应付款 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
119 account_2702 2702 未确认融资费用 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
120 account_2711 2711 专项应付款 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
121 account_2801 2801 预计负债 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
122 account_2901 2901 递延所得税负债 FALSE account.data_account_type_current_liabilities l10n_chart_china_standard_business
123 account_3001 3001 清算资金往来 FALSE l10n_cn.user_type_all l10n_chart_china_standard_business
124 account_3002 3002 货币兑换 FALSE l10n_cn.user_type_all l10n_chart_china_standard_business
125 account_3101 3101 衍生工具 FALSE l10n_cn.user_type_all l10n_chart_china_standard_business
126 account_3201 3201 套期工具 FALSE l10n_cn.user_type_all l10n_chart_china_standard_business
127 account_3202 3202 被套期项目 FALSE l10n_cn.user_type_all l10n_chart_china_standard_business
128 account_4001 4001 实收资本 FALSE account.data_account_type_equity l10n_chart_china_standard_business
129 account_4002 4002 资本公积 FALSE account.data_account_type_equity l10n_chart_china_standard_business
130 account_4101 4101 盈余公积 FALSE account.data_account_type_equity l10n_chart_china_standard_business
131 account_4102 4102 一般风险准备 FALSE account.data_account_type_equity l10n_chart_china_standard_business
132 account_4103 4103 本年利润 FALSE account.data_account_type_equity l10n_chart_china_standard_business
133 account_4104 4104 利润分配 FALSE account.data_account_type_equity l10n_chart_china_standard_business
134 account_4201 4201 库存股 FALSE account.data_account_type_equity l10n_chart_china_standard_business
135 account_5001 5001 生产成本 FALSE l10n_cn.user_type_all l10n_chart_china_standard_business
136 account_5101 5101 制造费用 FALSE l10n_cn.user_type_all l10n_chart_china_standard_business
137 account_5201 5201 劳务成本 FALSE l10n_cn.user_type_all l10n_chart_china_standard_business
138 account_5301 5301 研发支出 FALSE l10n_cn.user_type_all l10n_chart_china_standard_business
139 account_5401 5401 工程施工 FALSE l10n_cn.user_type_all l10n_chart_china_standard_business
140 account_5402 5402 工程结算 FALSE l10n_cn.user_type_all l10n_chart_china_standard_business
141 account_5403 5403 机械作业 FALSE l10n_cn.user_type_all l10n_chart_china_standard_business
142 account_6001 6001 主营业务收入 FALSE account.data_account_type_revenue l10n_chart_china_standard_business
143 account_6011 6011 利息收入 FALSE account.data_account_type_revenue l10n_chart_china_standard_business
144 account_6021 6021 手续费及佣金收入 FALSE account.data_account_type_revenue l10n_chart_china_standard_business
145 account_6031 6031 保费收入 FALSE account.data_account_type_revenue l10n_chart_china_standard_business
146 account_6041 6041 租赁收入 FALSE account.data_account_type_revenue l10n_chart_china_standard_business
147 account_6051 6051 其他业务收入 FALSE account.data_account_type_revenue l10n_chart_china_standard_business
148 account_6061 6061 汇兑损益 FALSE account.data_account_type_revenue l10n_chart_china_standard_business
149 account_6101 6101 公允价值变动损益 FALSE account.data_account_type_revenue l10n_chart_china_standard_business
150 account_6111 6111 投资收益 FALSE account.data_account_type_revenue l10n_chart_china_standard_business
151 account_6201 6201 摊回保险责任准备金 FALSE account.data_account_type_expenses l10n_chart_china_standard_business
152 account_6202 6202 摊回赔付支出 FALSE account.data_account_type_expenses l10n_chart_china_standard_business
153 account_6203 6203 摊回分保费用 FALSE account.data_account_type_expenses l10n_chart_china_standard_business
154 account_6301 6301 营业外收入 FALSE account.data_account_type_expenses l10n_chart_china_standard_business
155 account_6401 6401 主营业务成本 FALSE account.data_account_type_expenses l10n_chart_china_standard_business
156 account_6402 6402 其他业务成本 FALSE account.data_account_type_expenses l10n_chart_china_standard_business
157 account_6403 6403 营业税金及附加 FALSE account.data_account_type_expenses l10n_chart_china_standard_business
158 account_6411 6411 利息支出 FALSE account.data_account_type_expenses l10n_chart_china_standard_business
159 account_6421 6421 手续费及佣金支出 FALSE account.data_account_type_expenses l10n_chart_china_standard_business
160 account_6501 6501 提取未到期责任准备金 FALSE account.data_account_type_expenses l10n_chart_china_standard_business
161 account_6502 6502 提取保险责任准备金 FALSE account.data_account_type_expenses l10n_chart_china_standard_business
162 account_6511 6511 赔付支出 FALSE account.data_account_type_expenses l10n_chart_china_standard_business
163 account_6521 6521 保单红利支出 FALSE account.data_account_type_expenses l10n_chart_china_standard_business
164 account_6531 6531 退保金 FALSE account.data_account_type_expenses l10n_chart_china_standard_business
165 account_6541 6541 分出保费 FALSE account.data_account_type_expenses l10n_chart_china_standard_business
166 account_6542 6542 分保费用 FALSE account.data_account_type_expenses l10n_chart_china_standard_business
167 account_6601 6601 销售费用 FALSE account.data_account_type_expenses l10n_chart_china_standard_business
168 account_6602 6602 管理费用 FALSE account.data_account_type_expenses l10n_chart_china_standard_business
169 account_6603 6603 财务费用 FALSE account.data_account_type_expenses l10n_chart_china_standard_business
170 account_6604 6604 勘探费用 FALSE account.data_account_type_expenses l10n_chart_china_standard_business
171 account_6701 6701 资产减值损失 FALSE account.data_account_type_expenses l10n_chart_china_standard_business
172 account_6711 6711 营业外支出 FALSE account.data_account_type_expenses l10n_chart_china_standard_business
173 account_6801 6801 所得税费用 FALSE account.data_account_type_expenses l10n_chart_china_standard_business
174 account_6901 6901 以前年度损益调整 FALSE account.data_account_type_expenses l10n_chart_china_standard_business
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record id="l10n_chart_china_standard_business" model="account.chart.template">
<field name="property_account_receivable_id" ref="account_1122" />
<field name="property_account_payable_id" ref="account_2202" />
<field name="property_account_expense_categ_id" ref="account_6401" />
<field name="property_account_income_categ_id" ref="account_6001" />
<field name="income_currency_exchange_account_id" ref="account_6061" />
<field name="expense_currency_exchange_account_id" ref="account_6061" />
</record>
<record id="l10n_chart_china_standard_business_value" model="ir.values">
<field name="name">中国会计科目表 (财会[2006]3号《企业会计准则》)</field>
<field name="model">account.chart.template</field>
<field name="key">default</field>
<field name="res_id" ref="l10n_chart_china_standard_business" />
<field name="value" ref="base.CNY" />
</record>
</data>
</odoo>
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<!-- Account Tax -->
<record id="tag1" model="account.account.tag">
<field name="name">增值税17%销项税</field>
<field name="applicability">taxes</field>
</record>
<record id="tag2" model="account.account.tag">
<field name="name">增值税17%进项税</field>
<field name="applicability">taxes</field>
</record>
<record id="vats_standard_business" model="account.tax.template">
<field name="name">增值税17%销项税 - 中国会计科目表-企业会计准则</field>
<field name="amount_type">percent</field>
<field name="amount" eval="17" />
<field name="type_tax_use">sale</field>
<field name="account_id" ref="account_2221_1_5" />
<field name="refund_account_id" ref="account_2221_1_5" />
<field name="tag_ids" eval="[(6, 0, [ref('tag1')])]" />
<field name="chart_template_id" ref="l10n_chart_china_standard_business" />
</record>
<record id="vatp_standard_business" model="account.tax.template">
<field name="name">增值税17%进项税 - 中国会计科目表-企业会计准则</field>
<field name="amount" eval="17" />
<field name="type_tax_use">purchase</field>
<field name="amount_type">percent</field>
<field name="account_id" ref="account_2221_1_1" />
<field name="refund_account_id" ref="account_2221_1_1" />
<field name="tag_ids" eval="[(6, 0, [ref('tag2')])]" />
<field name="chart_template_id" ref="l10n_chart_china_standard_business" />
</record>
</data>
</odoo>
@@ -1,794 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!--
Copyright (C) 2008-2008 凯源吕鑫 lvxin@gmail.com <basic chart data>
Copyright (C) 2008-now 开阖软件 jeff@osbzr.com < PM and LTS >
会计科目表模板
-->
<data noupdate="1">
<record id="chart10003" model="account.account.template">
<record id="account_1003" model="account.account.template">
<field name="name">转让帐户</field>
<field name="code">1003</field>
<field name="reconcile" eval="True"/>
<field name="user_type_id" ref="account.data_account_type_current_assets"/>
<field name="reconcile" eval="True" />
<field name="user_type_id" ref="account.data_account_type_current_assets" />
</record>
<!-- Chart template -->
<record id="l10n_chart_china_standard_business" model="account.chart.template">
<field name="name">中国会计科目表 (财会[2006]3号《企业会计准则》</field>
<field name="code_digits" eval="4"/>
<field name="currency_id" ref="base.CNY"/>
<field name="name">中国会计科目表 (财会[2006]3号《企业会计准则》</field>
<field name="code_digits" eval="4" />
<field name="currency_id" ref="base.CNY" />
<field name="cash_account_code_prefix">1001</field>
<field name="bank_account_code_prefix">1002</field>
<field name="transfer_account_id" ref="chart10003"/>
<field name="transfer_account_id" ref="account_1003" />
</record>
<record id="chart10003" model="account.account.template">
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
<record id="account_1003" model="account.account.template">
<field name="chart_template_id" ref="l10n_chart_china_standard_business" />
</record>
<!-- 会计科目 -->
<record id="chart1015" model="account.account.template">
<field name="code">1015</field>
<field name="name">其他货币资金</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_assets"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart1101" model="account.account.template">
<field name="code">1101</field>
<field name="name">交易性金融资产</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_assets"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart1121" model="account.account.template">
<field name="code">1121</field>
<field name="name">应收票据</field>
<field name="reconcile" eval="True"/>
<field name="user_type_id" ref="account.data_account_type_current_assets"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart1122" model="account.account.template">
<field name="code">1122</field>
<field name="name">应收账款</field>
<field name="reconcile" eval="True"/>
<field name="user_type_id" ref="account.data_account_type_receivable"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart1123" model="account.account.template">
<field name="code">1123</field>
<field name="name">预付账款</field>
<field name="reconcile" eval="True"/>
<field name="user_type_id" ref="account.data_account_type_receivable"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart1131" model="account.account.template">
<field name="code">1131</field>
<field name="name">应收股利</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_assets"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart1132" model="account.account.template">
<field name="code">1132</field>
<field name="name">应收利息</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_assets"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart1231" model="account.account.template">
<field name="code">1231</field>
<field name="name">其他应收款</field>
<field name="reconcile" eval="True"/>
<field name="user_type_id" ref="account.data_account_type_current_assets"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart1241" model="account.account.template">
<field name="code">1241</field>
<field name="name">坏账准备</field>
<field name="reconcile" eval="True"/>
<field name="user_type_id" ref="account.data_account_type_receivable"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart1401" model="account.account.template">
<field name="code">1401</field>
<field name="name">材料采购</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart1402" model="account.account.template">
<field name="code">1402</field>
<field name="name">在途物资</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart1403" model="account.account.template">
<field name="code">1403</field>
<field name="name">原材料</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart1404" model="account.account.template">
<field name="code">1404</field>
<field name="name">材料成本差异</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart1406" model="account.account.template">
<field name="code">1406</field>
<field name="name">库存商品</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart1407" model="account.account.template">
<field name="code">1407</field>
<field name="name">发出商品</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart1410" model="account.account.template">
<field name="code">1410</field>
<field name="name">商品进销差价</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart1411" model="account.account.template">
<field name="code">1411</field>
<field name="name">委托加工物资</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart1412" model="account.account.template">
<field name="code">1412</field>
<field name="name">包装物及低值易耗品</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart1461" model="account.account.template">
<field name="code">1461</field>
<field name="name">存货跌价准备</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart1501" model="account.account.template">
<field name="code">1501</field>
<field name="name">待摊费用</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_assets"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart1521" model="account.account.template">
<field name="code">1521</field>
<field name="name">持有至到期投资</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_assets"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart1522" model="account.account.template">
<field name="code">1522</field>
<field name="name">持有至到期投资减值准备</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_assets"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart1524" model="account.account.template">
<field name="code">1524</field>
<field name="name">长期股权投资</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_assets"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart1525" model="account.account.template">
<field name="code">1525</field>
<field name="name">长期投资减值准备</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_assets"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart1421" model="account.account.template">
<field name="code">1531</field>
<field name="name">长期应收款</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_assets"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart1601" model="account.account.template">
<field name="code">1601</field>
<field name="name">固定资产</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_assets"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart1602" model="account.account.template">
<field name="code">1602</field>
<field name="name">累计折旧</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_assets"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart1603" model="account.account.template">
<field name="code">1603</field>
<field name="name">固定资产减值准备</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_assets"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart1604" model="account.account.template">
<field name="code">1604</field>
<field name="name">在建工程</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_assets"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart1605" model="account.account.template">
<field name="code">1605</field>
<field name="name">工程物资</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_assets"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart1606" model="account.account.template">
<field name="code">1606</field>
<field name="name">固定资产清理</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_non_current_assets"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart1701" model="account.account.template">
<field name="code">1701</field>
<field name="name">无形资产</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_assets"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart1703" model="account.account.template">
<field name="code">1703</field>
<field name="name">无形资产减值准备</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_assets"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart1711" model="account.account.template">
<field name="code">1711</field>
<field name="name">商誉</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_assets"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart1801" model="account.account.template">
<field name="code">1801</field>
<field name="name">长期待摊费用</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_assets"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart1811" model="account.account.template">
<field name="code">1811</field>
<field name="name">递延所得税资产</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_assets"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart1901" model="account.account.template">
<field name="code">1901</field>
<field name="name">待处理财产损溢</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart2001" model="account.account.template">
<field name="code">2001</field>
<field name="name">短期借款</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart2101" model="account.account.template">
<field name="code">2101</field>
<field name="name">交易性金融负债</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart2201" model="account.account.template">
<field name="code">2201</field>
<field name="name">应付票据</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart2202" model="account.account.template">
<field name="code">2202</field>
<field name="name">应付账款</field>
<field name="reconcile" eval="True"/>
<field name="user_type_id" ref="account.data_account_type_payable"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart2205" model="account.account.template">
<field name="code">2205</field>
<field name="name">预收账款</field>
<field name="reconcile" eval="True"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart2211" model="account.account.template">
<field name="code">2211</field>
<field name="name">应付职工薪酬</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart22210101" model="account.account.template">
<field name="code">22210101</field>
<field name="name">进项税额</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart22210102" model="account.account.template">
<field name="code">22210102</field>
<field name="name">已交税金</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart22210103" model="account.account.template">
<field name="code">22210103</field>
<field name="name">转出未交增值税</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart22210104" model="account.account.template">
<field name="code">22210104</field>
<field name="name">减免税款</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart22210105" model="account.account.template">
<field name="code">22210105</field>
<field name="name">销项税额</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart22210106" model="account.account.template">
<field name="code">22210106</field>
<field name="name">出口退税</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart22210107" model="account.account.template">
<field name="code">22210107</field>
<field name="name">进项税额转出</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart22210108" model="account.account.template">
<field name="code">22210108</field>
<field name="name">出口抵减内销产品应纳税额</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart22210109" model="account.account.template">
<field name="code">22210109</field>
<field name="name">转出多交增值税</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart22210110" model="account.account.template">
<field name="code">22210110</field>
<field name="name">未交增值税</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart222102" model="account.account.template">
<field name="code">222102</field>
<field name="name">应交营业税</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart222103" model="account.account.template">
<field name="code">222103</field>
<field name="name">应交消费税</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart222104" model="account.account.template">
<field name="code">222104</field>
<field name="name">应交资源税</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart222105" model="account.account.template">
<field name="code">222105</field>
<field name="name">应交所得税</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart222106" model="account.account.template">
<field name="code">222106</field>
<field name="name">应交土地增值税</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart222107" model="account.account.template">
<field name="code">222107</field>
<field name="name">应交城市维护建设税</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart222108" model="account.account.template">
<field name="code">222108</field>
<field name="name">应交房产税</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart222109" model="account.account.template">
<field name="code">222109</field>
<field name="name">应交土地使用税</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart222110" model="account.account.template">
<field name="code">222110</field>
<field name="name">应交车船使用税</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart222111" model="account.account.template">
<field name="code">222111</field>
<field name="name">应交个人所得税</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart2231" model="account.account.template">
<field name="code">2231</field>
<field name="name">应付股利</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart2232" model="account.account.template">
<field name="code">2232</field>
<field name="name">应付利息</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart2241" model="account.account.template">
<field name="code">2241</field>
<field name="name">其他应付款</field>
<field name="reconcile" eval="True"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart2401" model="account.account.template">
<field name="code">2401</field>
<field name="name">预提费用</field>
<field name="reconcile" eval="True"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart2601" model="account.account.template">
<field name="code">2601</field>
<field name="name">长期借款</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart2602" model="account.account.template">
<field name="code">2602</field>
<field name="name">长期债券</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart2801" model="account.account.template">
<field name="code">2801</field>
<field name="name">长期应付款</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart2901" model="account.account.template">
<field name="code">2901</field>
<field name="name">递延所得税负债</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart3101" model="account.account.template">
<field name="code">3101</field>
<field name="name">衍生工具</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="l10n_cn.user_type_all"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart3102" model="account.account.template">
<field name="code">3102</field>
<field name="name">套期工具</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="l10n_cn.user_type_all"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart3202" model="account.account.template">
<field name="code">3202</field>
<field name="name">被套期项目</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="l10n_cn.user_type_all"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart4001" model="account.account.template">
<field name="code">4001</field>
<field name="name">实收资本</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart4002" model="account.account.template">
<field name="code">4002</field>
<field name="name">资本公积</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart4101" model="account.account.template">
<field name="code">4101</field>
<field name="name">盈余公积</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart4103" model="account.account.template">
<field name="code">4103</field>
<field name="name">本年利润</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart4104" model="account.account.template">
<field name="code">4104</field>
<field name="name">利润分配</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart4201" model="account.account.template">
<field name="code">4201</field>
<field name="name">库存股</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="l10n_cn.user_type_all"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart5001" model="account.account.template">
<field name="code">5001</field>
<field name="name">生产成本</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="l10n_cn.user_type_all"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart5101" model="account.account.template">
<field name="code">5101</field>
<field name="name">制造费用</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="l10n_cn.user_type_all"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart5201" model="account.account.template">
<field name="code">5201</field>
<field name="name">劳务成本</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="l10n_cn.user_type_all"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart5301" model="account.account.template">
<field name="code">5301</field>
<field name="name">研发支出</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="l10n_cn.user_type_all"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart6001" model="account.account.template">
<field name="code">6001</field>
<field name="name">主营业务收入</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_revenue"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart6051" model="account.account.template">
<field name="code">6051</field>
<field name="name">其他业务收入</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_revenue"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart6101" model="account.account.template">
<field name="code">6101</field>
<field name="name">公允价值变动损益</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_revenue"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart6111" model="account.account.template">
<field name="code">6111</field>
<field name="name">投资收益</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_revenue"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart6301" model="account.account.template">
<field name="code">6301</field>
<field name="name">营业外收入</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_revenue"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart6401" model="account.account.template">
<field name="code">6401</field>
<field name="name">主营业务成本</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart6402" model="account.account.template">
<field name="code">6402</field>
<field name="name">其他业务支出</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_revenue"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart6405" model="account.account.template">
<field name="code">6405</field>
<field name="name">营业税金及附加</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart6601" model="account.account.template">
<field name="code">6601</field>
<field name="name">销售费用</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart6602" model="account.account.template">
<field name="code">6602</field>
<field name="name">管理费用</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart6603" model="account.account.template">
<field name="code">6603</field>
<field name="name">财务费用</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart6701" model="account.account.template">
<field name="code">6701</field>
<field name="name">资产减值损失</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart6711" model="account.account.template">
<field name="code">6711</field>
<field name="name">营业外支出</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart6801" model="account.account.template">
<field name="code">6801</field>
<field name="name">所得税</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart6901" model="account.account.template">
<field name="code">6901</field>
<field name="name">以前年度损益调整</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart7001" model="account.account.template">
<field name="code">7001</field>
<field name="name">增益账户</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="chart7002" model="account.account.template">
<field name="code">7002</field>
<field name="name">损益表</field>
<field name="reconcile" eval="False"/>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="l10n_chart_china_standard_business" model="account.chart.template">
<field name="property_account_receivable_id" ref="chart1122"/>
<field name="property_account_payable_id" ref="chart2202"/>
<field name="property_account_expense_categ_id" ref="chart1401"/>
<field name="property_account_income_categ_id" ref="chart6001"/>
<field name="income_currency_exchange_account_id" ref="chart7001"/>
<field name="expense_currency_exchange_account_id" ref="chart7002"/>
</record>
<record id="l10n_chart_china_standard_business_value" model="ir.values">
<field name="name">中国会计科目表 (财会[2006]3号《企业会计准则》)</field>
<field name="model">account.chart.template</field>
<field name="key">default</field>
<field name="res_id" ref="l10n_chart_china_standard_business"/>
<field name="value" ref="base.CNY"/>
</record>
<!-- Account Tax -->
<record id="tag1" model="account.account.tag">
<field name="name">增值税17%销项税</field>
<field name="applicability">taxes</field>
</record>
<record id="tag2" model="account.account.tag">
<field name="name">增值税17%进项税</field>
<field name="applicability">taxes</field>
</record>
<record id="vats_standard_business" model="account.tax.template">
<field name="name">增值税17%销项税 - 中国会计科目表-企业会计准则</field>
<field name="amount_type">percent</field>
<field name="amount" eval="17"/>
<field name="type_tax_use">sale</field>
<field name="account_id" ref="chart22210105"/>
<field name="refund_account_id" ref="chart22210105"/>
<field name="tag_ids" eval="[(6, 0, [ref('tag1')])]"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
<record id="vatp_standard_business" model="account.tax.template">
<field name="name">增值税17%进项税 - 中国会计科目表-企业会计准则</field>
<field name="amount" eval="17"/>
<field name="type_tax_use">purchase</field>
<field name="amount_type">percent</field>
<field name="account_id" ref="chart22210101"/>
<field name="refund_account_id" ref="chart22210101"/>
<field name="tag_ids" eval="[(6, 0, [ref('tag2')])]"/>
<field name="chart_template_id" ref="l10n_chart_china_standard_business"/>
</record>
</data>
</odoo>
@@ -239,7 +239,7 @@
<record id="pcg_120" model="account.account.template">
<field name="name">Résultat de l'exercice (bénéfice)</field>
<field name="code">120</field>
<field name="user_type_id" ref="account.data_account_type_current_liabilities"/>
<field name="user_type_id" ref="account.data_unaffected_earnings"/>
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
</record>
@@ -4032,6 +4032,13 @@
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
</record>
<record id="pcg_649" model="account.account.template">
<field name="name">Crédit d’Impôt Compétitivité Emploi (CICE)</field>
<field name="code">649</field>
<field name="user_type_id" ref="account.data_account_type_expenses"/>
<field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
</record>
<record id="pcg_6511" model="account.account.template">
<field name="name">Redevances pour concessions brevets, licences, marques, procédés, logiciels </field>
<field name="code">6511</field>
+2
View File
@@ -20,6 +20,8 @@ _logger = logging.getLogger(__name__)
def format_date(env, date, pattern=False):
if not date:
return ''
date = datetime.datetime.strptime(date[:10], tools.DEFAULT_SERVER_DATE_FORMAT)
lang_code = env.context.get('lang') or 'en_US'
if not pattern:
+2 -2
View File
@@ -1364,9 +1364,9 @@ class MailThread(models.AbstractModel):
to_remove.append(node)
if node.tag == 'img' and node.get('src', '').startswith('cid:'):
cid = node.get('src').split(':', 1)[1]
related_attachment = [attach for attach in attachments if len(attach) == 2 and attach[2] == cid]
related_attachment = [attach for attach in attachments if attach[2] and attach[2].get('cid') == cid]
if related_attachment:
node.set('data-filename', related_attachment[0])
node.set('data-filename', related_attachment[0][0])
postprocessed = True
for node in to_remove:
+3 -2
View File
@@ -59,8 +59,9 @@ function _parse_and_transform(nodes, transform_function) {
}).join("");
}
// suggested regexp (gruber url matching regexp, adapted to js, see https://gist.github.com/gruber/8891611)
var url_regexp = /\b((?:https?:\/\/|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi;
// Suggested URL Javascript regex of http://stackoverflow.com/questions/3809401/what-is-a-good-regular-expression-to-match-a-url
// Adapted to make http(s):// not required if (and only if) www. is given. So `should.notmatch` does not match.
var url_regexp = /\b(?:https?:\/\/|(www\.))[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,13}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/gi;
function linkify(text, attrs) {
attrs = attrs || {};
if (attrs.target === undefined) {
@@ -10,3 +10,4 @@ access_mass_mailing_system,mail.mass_mailing.system,model_mail_mass_mailing,base
access_mail_mail_statistics_user,mail.mail.statistics,model_mail_mail_statistics,base.group_user,1,1,1,1
access_mail_mail_statistics_mass_mailing_user,mail.mail.statistics,model_mail_mail_statistics,mass_mailing.group_mass_mailing_user,1,1,1,1
access_mail_statistics_report,mail.statistics.report,model_mail_statistics_report,mass_mailing.group_mass_mailing_user,1,1,1,1
access_utm_source,access_utm_source,utm.model_utm_source,mass_mailing.group_mass_mailing_user,1,1,1,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
10 access_mail_mail_statistics_user mail.mail.statistics model_mail_mail_statistics base.group_user 1 1 1 1
11 access_mail_mail_statistics_mass_mailing_user mail.mail.statistics model_mail_mail_statistics mass_mailing.group_mass_mailing_user 1 1 1 1
12 access_mail_statistics_report mail.statistics.report model_mail_statistics_report mass_mailing.group_mass_mailing_user 1 1 1 1
13 access_utm_source access_utm_source utm.model_utm_source mass_mailing.group_mass_mailing_user 1 1 1 0
+1 -1
View File
@@ -102,7 +102,7 @@ class MrpProductProduce(models.TransientModel):
def check_finished_move_lots(self):
lots = self.env['stock.move.lots']
produce_move = self.production_id.move_finished_ids.filtered(lambda x: x.product_id == self.product_id and x.state not in ('done', 'cancel'))
if produce_move.product_id.tracking != 'none':
if produce_move and produce_move.product_id.tracking != 'none':
if not self.lot_id:
raise UserError(_('You need to provide a lot for the finished product'))
existing_move_lot = produce_move.move_lot_ids.filtered(lambda x: x.lot_id == self.lot_id)
+1 -1
View File
@@ -521,7 +521,7 @@ class RepairFee(models.Model):
index=True, ondelete='cascade', required=True)
name = fields.Char('Description', index=True, required=True)
product_id = fields.Many2one('product.product', 'Product')
product_uom_qty = fields.Float('Quantity', digits=dp.get_precision('Product Unit of Measure'), required=True)
product_uom_qty = fields.Float('Quantity', digits=dp.get_precision('Product Unit of Measure'), required=True, default=1.0)
price_unit = fields.Float('Unit Price', required=True)
product_uom = fields.Many2one('product.uom', 'Product Unit of Measure', required=True)
price_subtotal = fields.Float('Subtotal', compute='_compute_price_subtotal', digits=0)
+11 -11
View File
@@ -221,22 +221,22 @@
<field name="reference"/>
<label for="amount"/>
<div class="o_row">
<field name="amount" class="oe_inline" />
<field name="currency_id" options="{'no_open': True, 'no_create': True}" class="oe_inline" />
<field name="amount"/>
<field name="currency_id" options="{'no_open': True, 'no_create': True}"/>
</div>
<field name="fees"/>
<field name="partner_id"/>
<label for="partner_details" string="Customer Details"/>
<div name="partner_details">
<field name="partner_name" placeholder="Name" attrs="{'readonly': [('partner_id', '!=', False)]}"/>
<field name="partner_address" placeholder="Address" attrs="{'readonly': [('partner_id', '!=', False)]}"/>
<div class="o_row">
<field name="partner_zip" class="oe_inline" placeholder="ZIP" attrs="{'readonly': [('partner_id', '!=', False)]}"/>
<field name="partner_city" class="oe_inline" placeholder="City" attrs="{'readonly': [('partner_id', '!=', False)]}"/>
<div>
<div name="partner_details" class="o_address_format">
<field name="partner_name" placeholder="Name" attrs="{'readonly': [('partner_id', '!=', False)]}" class="o_address_street"/>
<field name="partner_address" placeholder="Address" attrs="{'readonly': [('partner_id', '!=', False)]}" class="o_address_street"/>
<field name="partner_city" placeholder="City" attrs="{'readonly': [('partner_id', '!=', False)]}" class="o_address_city"/>
<field name="partner_zip" placeholder="ZIP" attrs="{'readonly': [('partner_id', '!=', False)]}" class="o_address_zip"/>
<field name="partner_country_id" placeholder="Country" attrs="{'readonly': [('partner_id', '!=', False)]}" class="o_address_country"/>
<field name="partner_lang" attrs="{'readonly': [('partner_id', '!=', False)]}" class="o_address_street"/>
<field name="partner_email" placeholder="E-mail" attrs="{'readonly': [('partner_id', '!=', False)]}" class="o_address_street"/>
</div>
<field name="partner_country_id" placeholder="Country" attrs="{'readonly': [('partner_id', '!=', False)]}"/>
<field name="partner_lang" attrs="{'readonly': [('partner_id', '!=', False)]}"/>
<field name="partner_email" placeholder="E-mail" attrs="{'readonly': [('partner_id', '!=', False)]}"/>
</div>
</group>
<group>
@@ -25,16 +25,16 @@
</t>
</t>
<t t-jquery="tbody tr.paymentline.selected">
this.removeAttr("class");
this.attr('t-attf-class', 'paymentline selected #{line.mercury_swipe_pending ? "o_pos_mercury_swipe_pending" : ""}');
this.removeAttr('class');
this.attr('t-attf-class', 'paymentline selected #{line.mercury_swipe_pending ? \'o_pos_mercury_swipe_pending\' : \'\'}');
</t>
<t t-jquery="tbody tr.paymentline[t-att-data-cid*='line.cid']">
this.removeAttr("class");
this.attr('t-attf-class', 'paymentline #{line.mercury_swipe_pending ? "o_pos_mercury_swipe_pending" : ""}');
this.removeAttr('class');
this.attr('t-attf-class', 'paymentline #{line.mercury_swipe_pending ? \'o_pos_mercury_swipe_pending\' : \'\'}');
</t>
<t t-jquery="tbody tr td.col-tendered.edit">
this.removeAttr("class");
this.attr('t-attf-class', 'col-tendered edit #{line.mercury_swipe_pending ? "o_pos_mercury_swipe_pending" : ""}');
this.removeAttr('class');
this.attr('t-attf-class', 'col-tendered edit #{line.mercury_swipe_pending ? \'o_pos_mercury_swipe_pending\' : \'\'}');
</t>
</t>
@@ -81,7 +81,7 @@
<span t-if="record.default_code.value">[<field name="default_code"/>]</span>
<field name="name"/>
</strong>
<div t-if="record.product_variant_count.value &gt; 1">
<div t-if="record.product_variant_count.value &gt; 1" groups="product.group_product_variant">
<strong>
<t t-esc="record.product_variant_count.value"/> Variants
</strong>
+59 -48
View File
@@ -601,59 +601,70 @@ class PurchaseOrderLine(models.Model):
price_unit = order.currency_id.compute(price_unit, order.company_id.currency_id, round=False)
return price_unit
@api.multi
def _prepare_stock_moves(self, picking):
""" Prepare the stock moves data for one order line. This function returns a list of
dictionary ready to be used in stock.move's create()
"""
self.ensure_one()
res = []
if self.product_id.type not in ['product', 'consu']:
return res
qty = 0.0
price_unit = self._get_stock_move_price_unit()
for move in self.move_ids.filtered(lambda x: x.state != 'cancel'):
qty += move.product_qty
template = {
'name': self.name or '',
'product_id': self.product_id.id,
'product_uom': self.product_uom.id,
'date': self.order_id.date_order,
'date_expected': self.date_planned,
'location_id': self.order_id.partner_id.property_stock_supplier.id,
'location_dest_id': self.order_id._get_destination_location(),
'picking_id': picking.id,
'partner_id': self.order_id.dest_address_id.id,
'move_dest_id': False,
'state': 'draft',
'purchase_line_id': self.id,
'company_id': self.order_id.company_id.id,
'price_unit': price_unit,
'picking_type_id': self.order_id.picking_type_id.id,
'group_id': self.order_id.group_id.id,
'procurement_id': False,
'origin': self.order_id.name,
'route_ids': self.order_id.picking_type_id.warehouse_id and [(6, 0, [x.id for x in self.order_id.picking_type_id.warehouse_id.route_ids])] or [],
'warehouse_id': self.order_id.picking_type_id.warehouse_id.id,
}
# Fullfill all related procurements with this po line
diff_quantity = self.product_qty - qty
for procurement in self.procurement_ids:
# If the procurement has some moves already, we should deduct their quantity
sum_existing_moves = sum(x.product_qty for x in procurement.move_ids if x.state != 'cancel')
existing_proc_qty = procurement.product_id.uom_id._compute_quantity(sum_existing_moves, procurement.product_uom)
procurement_qty = procurement.product_uom._compute_quantity(procurement.product_qty, self.product_uom) - existing_proc_qty
if float_compare(procurement_qty, 0.0, precision_rounding=procurement.product_uom.rounding) > 0 and float_compare(diff_quantity, 0.0, precision_rounding=self.product_uom.rounding) > 0:
tmp = template.copy()
tmp.update({
'product_uom_qty': min(procurement_qty, diff_quantity),
'move_dest_id': procurement.move_dest_id.id, # move destination is same as procurement destination
'procurement_id': procurement.id,
'propagate': procurement.rule_id.propagate,
})
res.append(tmp)
diff_quantity -= min(procurement_qty, diff_quantity)
if float_compare(diff_quantity, 0.0, precision_rounding=self.product_uom.rounding) > 0:
template['product_uom_qty'] = diff_quantity
res.append(template)
return res
@api.multi
def _create_stock_moves(self, picking):
moves = self.env['stock.move']
done = self.env['stock.move'].browse()
for line in self:
if line.product_id.type not in ['product', 'consu']:
continue
qty = 0.0
price_unit = line._get_stock_move_price_unit()
for move in line.move_ids.filtered(lambda x: x.state != 'cancel'):
qty += move.product_qty
template = {
'name': line.name or '',
'product_id': line.product_id.id,
'product_uom': line.product_uom.id,
'date': line.order_id.date_order,
'date_expected': line.date_planned,
'location_id': line.order_id.partner_id.property_stock_supplier.id,
'location_dest_id': line.order_id._get_destination_location(),
'picking_id': picking.id,
'partner_id': line.order_id.dest_address_id.id,
'move_dest_id': False,
'state': 'draft',
'purchase_line_id': line.id,
'company_id': line.order_id.company_id.id,
'price_unit': price_unit,
'picking_type_id': line.order_id.picking_type_id.id,
'group_id': line.order_id.group_id.id,
'procurement_id': False,
'origin': line.order_id.name,
'route_ids': line.order_id.picking_type_id.warehouse_id and [(6, 0, [x.id for x in line.order_id.picking_type_id.warehouse_id.route_ids])] or [],
'warehouse_id':line.order_id.picking_type_id.warehouse_id.id,
}
# Fullfill all related procurements with this po line
diff_quantity = line.product_qty - qty
for procurement in line.procurement_ids:
# If the procurement has some moves already, we should deduct their quantity
sum_existing_moves = sum(x.product_qty for x in procurement.move_ids if x.state != 'cancel')
existing_proc_qty = procurement.product_id.uom_id._compute_quantity(sum_existing_moves, procurement.product_uom)
procurement_qty = procurement.product_uom._compute_quantity(procurement.product_qty, line.product_uom) - existing_proc_qty
if float_compare(procurement_qty, 0.0, precision_rounding=procurement.product_uom.rounding) > 0 and float_compare(diff_quantity, 0.0, precision_rounding=line.product_uom.rounding) > 0:
tmp = template.copy()
tmp.update({
'product_uom_qty': min(procurement_qty, diff_quantity),
'move_dest_id': procurement.move_dest_id.id, #move destination is same as procurement destination
'procurement_id': procurement.id,
'propagate': procurement.rule_id.propagate,
})
done += moves.create(tmp)
diff_quantity -= min(procurement_qty, diff_quantity)
if float_compare(diff_quantity, 0.0, precision_rounding=line.product_uom.rounding) > 0:
template['product_uom_qty'] = diff_quantity
done += moves.create(template)
for val in line._prepare_stock_moves(picking):
done += moves.create(val)
return done
@api.multi
+1
View File
@@ -210,6 +210,7 @@
<page string="Products">
<field name="order_line" attrs="{'readonly': [('state', 'in', ('done', 'cancel'))]}">
<tree string="Purchase Order Lines" editable="bottom">
<field name="currency_id" invisible="1"/>
<field name="state" invisible="1"/>
<field name="sequence" widget="handle"/>
<field name="product_id" attrs="{'readonly': [('state', 'in', ('purchase', 'to approve','done', 'cancel'))]}" context="{'partner_id':parent.partner_id, 'quantity':product_qty,'uom':product_uom, 'company_id': parent.company_id}"/>
+15 -15
View File
@@ -300,34 +300,34 @@ class ResourceCalendar(models.Model):
# Computes start_dt, end_dt (with default values if not set) + off-interval work limits
work_limits = []
if start_dt is None and end_dt is not None:
start_dt = end_dt.replace(hour=0, minute=0, second=0)
start_dt = end_dt.replace(hour=0, minute=0, second=0, microsecond=0)
elif start_dt is None:
start_dt = datetime.datetime.now().replace(hour=0, minute=0, second=0)
start_dt = datetime.datetime.now().replace(hour=0, minute=0, second=0, microsecond=0)
else:
work_limits.append((start_dt.replace(hour=0, minute=0, second=0), start_dt))
work_limits.append((start_dt.replace(hour=0, minute=0, second=0, microsecond=0), start_dt))
if end_dt is None:
end_dt = start_dt.replace(hour=23, minute=59, second=59)
end_dt = start_dt.replace(hour=23, minute=59, second=59, microsecond=999999)
else:
work_limits.append((end_dt, end_dt.replace(hour=23, minute=59, second=59)))
work_limits.append((end_dt, end_dt.replace(hour=23, minute=59, second=59, microsecond=999999)))
assert start_dt.date() == end_dt.date(), 'get_working_intervals_of_day is restricted to one day'
intervals = []
work_dt = start_dt.replace(hour=0, minute=0, second=0)
work_dt = start_dt.replace(hour=0, minute=0, second=0, microsecond=0)
# no calendar: try to use the default_interval, then return directly
if not self:
working_interval = []
if default_interval:
working_interval = (start_dt.replace(hour=default_interval[0], minute=0, second=0),
start_dt.replace(hour=default_interval[1], minute=0, second=0))
working_interval = (start_dt.replace(hour=default_interval[0], minute=0, second=0, microsecond=0),
start_dt.replace(hour=default_interval[1], minute=0, second=0, microsecond=0))
intervals = self.interval_remove_leaves(working_interval, work_limits)
return intervals
working_intervals = []
tz_info = fields.Datetime.context_timestamp(self, work_dt).tzinfo
for calendar_working_day in self.get_attendances_for_weekday(start_dt):
dt_f = work_dt.replace(hour=0, minute=0, second=0) + timedelta(seconds=(calendar_working_day.hour_from * 3600))
dt_t = work_dt.replace(hour=0, minute=0, second=0) + timedelta(seconds=(calendar_working_day.hour_to * 3600))
dt_f = work_dt.replace(hour=0, minute=0, second=0, microsecond=0) + timedelta(seconds=(calendar_working_day.hour_from * 3600))
dt_t = work_dt.replace(hour=0, minute=0, second=0, microsecond=0) + timedelta(seconds=(calendar_working_day.hour_to * 3600))
# adapt tz
working_interval = (
@@ -369,12 +369,12 @@ class ResourceCalendar(models.Model):
resource_id=None, default_interval=None):
hours = 0.0
for day in rrule.rrule(rrule.DAILY, dtstart=start_dt,
until=(end_dt + timedelta(days=1)).replace(hour=0, minute=0, second=0),
until=(end_dt + timedelta(days=1)).replace(hour=0, minute=0, second=0, microsecond=0),
byweekday=self.get_weekdays()):
day_start_dt = day.replace(hour=0, minute=0, second=0)
day_start_dt = day.replace(hour=0, minute=0, second=0, microsecond=0)
if start_dt and day.date() == start_dt.date():
day_start_dt = start_dt
day_end_dt = day.replace(hour=23, minute=59, second=59)
day_end_dt = day.replace(hour=23, minute=59, second=59, microsecond=999999)
if end_dt and day.date() == end_dt.date():
day_end_dt = end_dt
hours += self.get_working_hours_of_date(
@@ -528,7 +528,7 @@ class ResourceCalendar(models.Model):
intervals = []
planned_days = 0
iterations = 0
current_datetime = day_date.replace(hour=0, minute=0, second=0)
current_datetime = day_date.replace(hour=0, minute=0, second=0, microsecond=0)
while planned_days < days and iterations < 100:
working_intervals = self.get_working_intervals_of_day(
@@ -585,7 +585,7 @@ class ResourceCalendar(models.Model):
saas-3, counts leave hours instead of all-day leaves."""
return self.schedule_hours(
hours * -1.0,
day_dt=dt_from.replace(minute=0, second=0),
day_dt=dt_from.replace(minute=0, second=0, microsecond=0),
compute_leaves=True, resource_id=resource,
default_interval=(8, 16)
)
+1 -1
View File
@@ -664,7 +664,7 @@ class SaleOrderLine(models.Model):
vals = line._prepare_order_line_procurement(group_id=line.order_id.procurement_group_id.id)
vals['product_qty'] = line.product_uom_qty - qty
new_proc = self.env["procurement.order"].create(vals)
new_proc = self.env["procurement.order"].with_context(procurement_autorun_defer=True).create(vals)
new_proc.message_post_with_view('mail.message_origin_link',
values={'self': new_proc, 'origin': line.order_id},
subtype_id=self.env.ref('mail.mt_note').id)
+1
View File
@@ -290,6 +290,7 @@
<field name="state" invisible="1"/>
<field name="invoice_status" invisible="1"/>
<field name="customer_lead" invisible="1"/>
<field name="currency_id" invisible="1"/>
</tree>
<kanban class="o_kanban_mobile">
<field name="product_id"/>
+3 -2
View File
@@ -111,8 +111,9 @@ class SaleOrderLine(models.Model):
def _compute_qty_delivered_updateable(self):
for line in self:
if line.product_id.type not in ('consu', 'product'):
return super(SaleOrderLine, self)._compute_qty_delivered_updateable()
line.qty_delivered_updateable = False
super(SaleOrderLine, line)._compute_qty_delivered_updateable()
else:
line.qty_delivered_updateable = False
@api.onchange('product_id')
def _onchange_product_id_set_customer_lead(self):
+6 -5
View File
@@ -65,11 +65,12 @@ class StockPicking(models.Model):
res = super(StockPicking, self)._create_backorder(backorder_moves)
for picking in self.filtered(lambda pick: pick.picking_type_id.code == 'outgoing'):
backorder = picking.search([('backorder_id', '=', picking.id)])
order = self.env['sale.order'].search([('procurement_group_id', '=', backorder.group_id.id)])
backorder.message_post_with_view(
'mail.message_origin_link',
values={'self': backorder, 'origin': order},
subtype_id=self.env.ref('mail.mt_note').id)
if backorder.group_id: # origin from a sale
order = self.env['sale.order'].search([('procurement_group_id', '=', backorder.group_id.id)])
backorder.message_post_with_view(
'mail.message_origin_link',
values={'self': backorder, 'origin': order},
subtype_id=self.env.ref('mail.mt_note').id)
return res
+1 -1
View File
@@ -527,7 +527,7 @@ class Warehouse(models.Model):
routes = self.env['stock.location.route'].search([('supplier_wh_id', '=', self.id)])
pulls = Pull.search(['&', ('route_id', 'in', routes.ids), ('location_id.usage', '=', 'transit')])
pulls.write({
'location_src_id': new_location,
'location_src_id': new_location.id,
'procure_method': change_to_multiple and "make_to_order" or "make_to_stock"})
if not change_to_multiple:
# If single delivery we should create the necessary MTO rules for the resupply
@@ -21,8 +21,8 @@
</div>
</group>
<group string="Locations" groups="stock.group_stock_multi_locations">
<field name="location_id" domain="[('id', 'child_of', picking_source_location_id)]"/>
<field name="location_dest_id" domain="[('id', 'child_of', picking_destination_location_id)]"/>
<field name="location_id" domain="[('id', 'child_of', picking_source_location_id)]" options="{'no_create': True}"/>
<field name="location_dest_id" domain="[('id', 'child_of', picking_destination_location_id)]" options="{'no_create': True}"/>
</group>
<group string="Packages" groups="stock.group_tracking_lot">
<field name="package_id" attrs="{'required': [('product_id', '=', False)]}" domain="[('location_id', '=', location_id)]" context="{'default_location_id': location_id}"/>
+1 -2
View File
@@ -34,7 +34,6 @@ class StockWarehouseOrderpoint(models.Model):
"""
# TDE FIXME: unused context key 'no_round_hours' removed
# Check if orderpoint has last execution date and calculate if we need to calculate again already
Calendar = self.env["resource.calendar"]
Attendance = self.env["resource.calendar.attendance"]
group = False
date = False
@@ -46,7 +45,7 @@ class StockWarehouseOrderpoint(models.Model):
else:
new_date = datetime.utcnow()
# TDE note: I bet accessing interval[2] will crash, no ? this code seems very louche
intervals = Calendar._schedule_days(self.purchase_calendar_id.id, 1, new_date, compute_leaves=True)
intervals = self.purchase_calendar_id._schedule_days(1, new_date, compute_leaves=True)
for interval in intervals:
# If last execution date, interval should start after it in order not to execute the same orderpoint twice
# TODO: Make the interval a little bigger
+2 -1
View File
@@ -327,7 +327,8 @@ QWeb2.Engine = (function() {
if (self.tools.trim(text_node.nodeValue)) {
return self.tools.exception("Error: text is not allowed between branching directives");
}
text_node.remove();
// IE <= 11.0 doesn't support ChildNode.remove
text_node.parentNode.removeChild(text_node);
}
} else {
return self.tools.exception("Error: t-elif and t-else directives must be preceded by a t-if or t-elif directive");
+5 -3
View File
@@ -639,11 +639,11 @@ var FormView = View.extend(common.FieldManagerMixin, {
}
},
disable_button: function () {
this.$('.oe_form_buttons').add(this.$buttons).find('button').addClass('o_disabled').prop('disabled', true);
this.$('.oe_form_buttons,.o_statusbar_buttons').add(this.$buttons).find('button').addClass('o_disabled').prop('disabled', true);
this.is_disabled = true;
},
enable_button: function () {
this.$('.oe_form_buttons').add(this.$buttons).find('button.o_disabled').removeClass('o_disabled').prop('disabled', false);
this.$('.oe_form_buttons,.o_statusbar_buttons').add(this.$buttons).find('button.o_disabled').removeClass('o_disabled').prop('disabled', false);
this.is_disabled = false;
},
on_button_save: function() {
@@ -657,8 +657,10 @@ var FormView = View.extend(common.FieldManagerMixin, {
return self.reload().then(function() {
self.to_view_mode();
core.bus.trigger('form_view_saved', self);
}).always(function() {
self.enable_button();
});
}).always(function(){
}).fail(function(){
self.enable_button();
});
},
@@ -202,7 +202,7 @@ var KanbanSelection = common.AbstractField.extend({
prepare_dropdown_selection: function() {
var self = this;
var _data = [];
var current_stage_id = self.view.datarecord.stage_id[0];
var current_stage_id = self.view.datarecord.stage_id && self.view.datarecord.stage_id[0];
var stage_data = {
id: current_stage_id,
legend_normal: self.view.datarecord.legend_normal || undefined,
@@ -641,6 +641,9 @@ ListView.include(/** @lends instance.web.ListView# */{
if (saveInfo.created) {
return self.start_edition();
}
if (!options) {
options = {};
}
options.wraparound = !self.is_action_enabled('create');
var record = self.records[next_record](saveInfo.record, options);
if (record === undefined) {
+1 -1
View File
@@ -168,7 +168,7 @@ class Website(Home):
sitemaps.unlink()
pages = 0
locs = request.website.sudo(user=request.website.user_id.id).enumerate_pages()
locs = request.website.with_context(use_public_user=True).enumerate_pages()
while True:
values = {
'locs': islice(locs, 0, LOC_PER_SITEMAP),
+3 -1
View File
@@ -196,9 +196,9 @@ class Http(models.AbstractModel):
if request.lang != request.website.default_lang_code:
path.insert(1, request.lang)
path = '/'.join(path) or '/'
request.context = context
redirect = request.redirect(path + '?' + request.httprequest.query_string)
redirect.set_cookie('website_lang', request.lang)
request.context = context
return redirect
elif url_lang:
request.uid = None
@@ -363,6 +363,8 @@ class ModelConverter(ir.ir_http.ModelConverter):
def generate(self, query=None, args=None):
Model = request.env[self.model]
if request.context.get('use_public_user'):
Model = Model.sudo(request.website.user_id.id)
domain = safe_eval(self.domain, (args or {}).copy())
if query:
domain.append((Model._rec_name, 'ilike', '%' + query + '%'))
@@ -50,7 +50,7 @@ class WebsiteEventTrackController(http.Controller):
for loc in locations.keys():
if locations[loc] and (locations[loc][-1][2] > start_date):
locations[loc][-1][3] += 1
elif not locations[loc] or locations[loc][-1][2] < start_date:
elif not locations[loc] or locations[loc][-1][2] <= start_date:
locations[loc].append([False, locations[loc] and locations[loc][-1][2] or dates[0][0], start_date, 1])
dates[-1][1][loc] = locations[loc][-1]
forcetr = not bool(location)
+7
View File
@@ -338,6 +338,13 @@ actual arch.
if view.type == 'qweb' and view.groups_id:
raise ValidationError(_("Qweb view cannot have 'Groups' define on the record. Use 'groups' attributes inside the view definition"))
@api.constrains('inherit_id')
def _check_000_inheritance(self):
# NOTE: constraints methods are check alphabetically. Always ensure this method will be
# called before other constraint metheods to avoid infinite loop in `read_combined`.
if not self._check_recursion(parent='inherit_id'):
raise ValidationError(_('You cannot create recursive inherited views.'))
_sql_constraints = [
('inheritance_mode',
"CHECK (mode != 'extension' OR inherit_id IS NOT NULL)",
+8
View File
@@ -1,6 +1,8 @@
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from ast import literal_eval
from odoo import api, fields, models, tools, _
from odoo.exceptions import AccessError, MissingError
from odoo.tools import pickle
@@ -132,6 +134,12 @@ class IrValues(models.Model):
context.pop(self.CONCURRENCY_CHECK_FIELD, None)
for record in self.with_context(context):
value = record.value_unpickle
# Only char-like fields should be written directly. Other types should be converted to
# their appropriate type first.
if record.model in self.env and record.name in self.env[record.model]._fields:
field = self.env[record.model]._fields[record.name]
if field.type not in ['char', 'text', 'html', 'selection']:
value = literal_eval(value)
if record.key == 'default':
value = pickle.dumps(value)
record.value = value
+20 -1
View File
@@ -8,6 +8,7 @@ from lxml import etree
from lxml.builder import E
from psycopg2 import IntegrityError
from odoo.exceptions import ValidationError
from odoo.tests import common
from odoo.tools import mute_logger
@@ -231,6 +232,24 @@ class TestViewInheritance(ViewCase):
self.assertFalse(self.View.default_view(model='does.not.exist', view_type='form'))
self.assertFalse(self.View.default_view(model=self.model, view_type='graph'))
def test_no_recursion(self):
r1 = self.makeView('R1')
with self.assertRaises(ValidationError), self.cr.savepoint():
r1.write({'inherit_id': r1.id})
r2 = self.makeView('R2', r1.id)
r3 = self.makeView('R3', r2.id)
with self.assertRaises(ValidationError), self.cr.savepoint():
r2.write({'inherit_id': r3.id})
with self.assertRaises(ValidationError), self.cr.savepoint():
r1.write({'inherit_id': r3.id})
with self.assertRaises(ValidationError), self.cr.savepoint():
r1.write({
'inherit_id': r1.id,
'arch': self.arch_for('itself', parent=True),
})
class TestApplyInheritanceSpecs(ViewCase):
""" Applies a sequence of inheritance specification nodes to a base
@@ -1309,4 +1328,4 @@ class TestQWebRender(ViewCase):
content1 = self.env['ir.qweb'].with_context(check_view_ids=[view1.id, view2.id, view3.id]).render('base.dummy')
content3 = self.env['ir.qweb'].with_context(check_view_ids=[view1.id, view2.id, view3.id]).render('base.dummy_primary_ext')
self.assertNotEqual(content1, content3)
self.assertNotEqual(content1, content3)
+1
View File
@@ -40,3 +40,4 @@ Werkzeug==0.11.11
wsgiref==0.1.2
XlsxWriter==0.9.3
xlwt==1.1.2
xlrd==1.0.0