* Improved, bugfixed, updated and upgraded the generating of chart of accounts from a chart template

* Modified the pcmn_belgium.xml data accordingly
* Removed the demo data for the l10n_be module
* Added toolbar attribute to Chart of Taxes

pushed jvo's work:
* Bugfix :page=Properties error solved for Partner through Delivery Module.
* Displayed the menulabel for Taxes Report
* Removed root account type
* Added toolbar attribute to charts of account.

bzr revid: qdp@tinyerp.com-20080903132027-v4sfbpgmb9f3z58s
This commit is contained in:
qdp 2008-09-03 15:20:27 +02:00
commit 3af1f636de
7 changed files with 1457 additions and 1052 deletions

View File

@ -341,13 +341,21 @@ class account_account(osv.osv):
res.append((record['id'],name ))
return res
def copy(self, cr, uid, id, default={}, context={}):
def copy(self, cr, uid, id, default={}, context={},done_list=[]):
account = self.browse(cr, uid, id, context=context)
new_child_ids = []
if not default:
default={}
default=default.copy()
default['parent_id'] = False
if account.id in done_list:
return False
done_list.append(account.id)
if account:
for child in account.child_id:
new_child_ids.append(self.copy(cr, uid, child.id, default, context=context))
child_ids=self.copy(cr, uid, child.id, default, context=context,done_list=done_list)
if child_ids:
new_child_ids.append(child_ids)
default['child_id'] = [(6, 0, new_child_ids)]
else:
default['child_id'] = False
@ -1642,9 +1650,10 @@ class account_tax_template(osv.osv):
account_tax_template()
class account_account_template(osv.osv):
_name='account.account.template'
_description ='Templates for Accounts'
_order = "code"
_name = "account.account.template"
_description ='Templates for Accounts'
_columns = {
'name': fields.char('Name', size=128, required=True, select=True),
'sign': fields.selection([(-1, 'Negative'), (1, 'Positive')], 'Sign', required=True, help='Allows to change the displayed amount of the balance to see positive results instead of negative ones in expenses accounts.'),
@ -1654,6 +1663,9 @@ class account_account_template(osv.osv):
'reconcile': fields.boolean('Allow Reconciliation', help="Check this option if the user can make a reconciliation of the entries in this account."),
'shortcut': fields.char('Shortcut', size=12),
'note': fields.text('Note'),
'parent_id': fields.many2one('account.account.template','Parent Account Template', ondelete='cascade'),
'child_parent_ids':fields.one2many('account.account.template','parent_id','Children'),
'tax_ids': fields.many2many('account.tax.template', 'account_account_template_tax_rel','account_id','tax_id', 'Default Taxes'),
}
_defaults = {
@ -1665,7 +1677,7 @@ class account_account_template(osv.osv):
def _check_recursion(self, cr, uid, ids):
level = 100
while len(ids):
cr.execute('select distinct parent_id from account_account_template_rel where child_id in ('+','.join(map(str,ids))+')')
cr.execute('select parent_id from account_account_template where id in ('+','.join(map(str,ids))+')')
ids = filter(None, map(lambda x:x[0], cr.fetchall()))
if not level:
return False
@ -1673,7 +1685,7 @@ class account_account_template(osv.osv):
return True
_constraints = [
(_check_recursion, 'Error ! You can not create recursive accounts.', ['parent_id'])
(_check_recursion, 'Error ! You can not create recursive account templates.', ['parent_id'])
]
@ -1685,51 +1697,120 @@ class account_account_template(osv.osv):
for record in reads:
name = record['name']
if record['code']:
name = record['code']+' - '+name
name = record['code']+' '+name
res.append((record['id'],name ))
return res
account_account_template()
class account_tax_code_template(osv.osv):
_name = 'account.tax.code.template'
_description = 'Tax Code Template'
_order = 'code'
_columns = {
'name': fields.char('Tax Case Name', size=64, required=True),
'code': fields.char('Case Code', size=16),
'info': fields.text('Description'),
'parent_id': fields.many2one('account.tax.code.template', 'Parent Code', select=True),
'company_id': fields.many2one('res.company', 'Company', required=True),
'sign': fields.float('Sign for parent', required=True),
}
def name_get(self, cr, uid, ids, context=None):
if not len(ids):
return []
if isinstance(ids, (int, long)):
ids = [ids]
reads = self.read(cr, uid, ids, ['name','code'], context, load='_classic_write')
return [(x['id'], (x['code'] and x['code'] + ' - ' or '') + x['name']) \
for x in reads]
def _default_company(self, cr, uid, context={}):
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
if user.company_id:
return user.company_id.id
return self.pool.get('res.company').search(cr, uid, [('parent_id', '=', False)])[0]
_defaults = {
'company_id': _default_company,
'sign': lambda *args: 1.0,
}
def _check_recursion(self, cr, uid, ids):
level = 100
while len(ids):
cr.execute('select distinct parent_id from account_tax_code_template where id in ('+','.join(map(str,ids))+')')
ids = filter(None, map(lambda x:x[0], cr.fetchall()))
if not level:
return False
level -= 1
return True
_constraints = [
(_check_recursion, 'Error ! You can not create recursive accounts.', ['parent_id'])
]
_order = 'code,name'
account_tax_code_template()
class account_chart_template(osv.osv):
_name="account.chart.template"
_description= "Templates for Account Chart"
_columns={
'name': fields.char('Name', size=64, required=True),
'account_root_id': fields.many2one('account.account.template','Root Account',required=True),
'tax_code_root_id': fields.many2one('account.tax.code.template','Root Tax Code',required=True,domain=[('parent_id','=',False)]),
'tax_template_ids': fields.one2many('account.tax.template', 'chart_template_id', 'Tax Template List', help='List of all the taxes that have to be installed by the wizard'),
'bank_account_view_id': fields.many2one('account.account.template','Bank Account',required=True),
'property_account_receivable': fields.many2one('account.account.template','Receivable Account'),
'property_account_payable': fields.many2one('account.account.template','Payable Account'),
'property_account_expense_categ': fields.many2one('account.account.template','Expense Category Account'),
'property_account_income_categ': fields.many2one('account.account.template','Income Category Account'),
'property_account_tax': fields.many2one('account.account.template','Default Tax on Partner'),
'property_account_expense': fields.many2one('account.account.template','Expense Account on Product Template'),
'property_account_income': fields.many2one('account.account.template','Income Account on Product Template'),
}
account_chart_template()
class account_tax_template(osv.osv):
_name = 'account.tax.template'
_description = 'Templates for Taxes'
_columns = {
'chart_template_id': fields.many2one('account.chart.template', 'Chart Template', required=True),
'name': fields.char('Tax Name', size=64, required=True),
'sequence': fields.integer('Sequence', required=True, help="The sequence field is used to order the taxes lines from the lowest sequences to the higher ones. The order is important if you have a tax that have several tax children. In this case, the evaluation order is important."),
# 'amount': fields.float('Amount', required=True, digits=(14,4)),
'amount': fields.float('Amount', required=True, digits=(14,4)),
# 'type': fields.selection( [('percent','Percent'), ('fixed','Fixed'), ('none','None'), ('code','Python Code')], 'Tax Type', required=True),
'type': fields.selection( [('percent','Percent'), ('fixed','Fixed'), ('none','None')],'Tax Type', required=True),
# 'applicable_type': fields.selection( [('true','True'), ('code','Python Code')], 'Applicable Type', required=True),
'applicable_type': fields.selection( [('true','True'), ('code','Python Code')], 'Applicable Type', required=True),
'domain':fields.char('Domain', size=32, help="This field is only used if you develop your own module allowing developers to create specific taxes in a custom domain."),
# 'account_collected_id':fields.many2one('account.account.template', 'Invoice Tax Account'),
# 'account_paid_id':fields.many2one('account.account.template', 'Refund Tax Account'),
# 'parent_id':fields.many2one('account.tax.template', 'Parent Tax Account', select=True),
# 'child_ids':fields.one2many('account.tax.template', 'parent_id', 'Childs Tax Account'),
# 'child_depend':fields.boolean('Tax on Childs', help="Indicate if the tax computation is based on the value computed for the computation of child taxes or based on the total amount."),
# 'python_compute':fields.text('Python Code'),
# 'python_compute_inv':fields.text('Python Code (reverse)'),
# 'python_applicable':fields.text('Python Code'),
'account_collected_id':fields.many2one('account.account.template', 'Invoice Tax Account'),
'account_paid_id':fields.many2one('account.account.template', 'Refund Tax Account'),
'parent_id':fields.many2one('account.tax.template', 'Parent Tax Account', select=True),
'child_depend':fields.boolean('Tax on Childs', help="Indicate if the tax computation is based on the value computed for the computation of child taxes or based on the total amount."),
'python_compute':fields.text('Python Code'),
'python_compute_inv':fields.text('Python Code (reverse)'),
'python_applicable':fields.text('Python Code'),
'tax_group': fields.selection([('vat','VAT'),('other','Other')], 'Tax Group', help="If a default tax if given in the partner it only override taxes from account (or product) of the same group."),
#
# Fields used for the VAT declaration
#
# 'base_code_id': fields.many2one('account.tax.code', 'Base Code', help="Use this code for the VAT declaration."),
# 'tax_code_id': fields.many2one('account.tax.code', 'Tax Code', help="Use this code for the VAT declaration."),
# 'base_sign': fields.float('Base Code Sign', help="Usually 1 or -1."),
# 'tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1."),
'base_code_id': fields.many2one('account.tax.code.template', 'Base Code', help="Use this code for the VAT declaration."),
'tax_code_id': fields.many2one('account.tax.code.template', 'Tax Code', help="Use this code for the VAT declaration."),
'base_sign': fields.float('Base Code Sign', help="Usually 1 or -1."),
'tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1."),
# Same fields for refund invoices
# 'ref_base_code_id': fields.many2one('account.tax.code', 'Base Code', help="Use this code for the VAT declaration."),
# 'ref_tax_code_id': fields.many2one('account.tax.code', 'Tax Code', help="Use this code for the VAT declaration."),
# 'ref_base_sign': fields.float('Base Code Sign', help="Usually 1 or -1."),
# 'ref_tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1."),
# 'include_base_amount': fields.boolean('Include in base amount', help="Indicate if the amount of tax must be included in the base amount for the computation of the next taxes."),
'ref_base_code_id': fields.many2one('account.tax.code.template', 'Base Code', help="Use this code for the VAT declaration."),
'ref_tax_code_id': fields.many2one('account.tax.code.template', 'Tax Code', help="Use this code for the VAT declaration."),
'ref_base_sign': fields.float('Base Code Sign', help="Usually 1 or -1."),
'ref_tax_sign': fields.float('Tax Code Sign', help="Usually 1 or -1."),
'include_base_amount': fields.boolean('Include in base amount', help="Indicate if the amount of tax must be included in the base amount for the computation of the next taxes."),
'description': fields.char('Internal Name', size=32),
}
@ -1742,41 +1823,260 @@ class account_tax_template(osv.osv):
res.append((record['id'],name ))
return res
def _default_company(self, cr, uid, context={}):
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
if user.company_id:
return user.company_id.id
return self.pool.get('res.company').search(cr, uid, [('parent_id', '=', False)])[0]
_defaults = {
# 'python_compute': lambda *a: '''# price_unit\n# address : res.partner.address object or False\n# product : product.product object or None\n# partner : res.partner object or None\n\nresult = price_unit * 0.10''',
# 'python_compute_inv': lambda *a: '''# price_unit\n# address : res.partner.address object or False\n# product : product.product object or False\n\nresult = price_unit * 0.10''',
# 'applicable_type': lambda *a: 'true',
'python_compute': lambda *a: '''# price_unit\n# address : res.partner.address object or False\n# product : product.product object or None\n# partner : res.partner object or None\n\nresult = price_unit * 0.10''',
'python_compute_inv': lambda *a: '''# price_unit\n# address : res.partner.address object or False\n# product : product.product object or False\n\nresult = price_unit * 0.10''',
'applicable_type': lambda *a: 'true',
'type': lambda *a: 'percent',
# 'amount': lambda *a: 0,
'amount': lambda *a: 0,
'sequence': lambda *a: 1,
'tax_group': lambda *a: 'vat',
# 'ref_tax_sign': lambda *a: 1,
# 'ref_base_sign': lambda *a: 1,
# 'tax_sign': lambda *a: 1,
# 'base_sign': lambda *a: 1,
# 'include_base_amount': lambda *a: False,
# 'company_id': _default_company,
'ref_tax_sign': lambda *a: 1,
'ref_base_sign': lambda *a: 1,
'tax_sign': lambda *a: 1,
'base_sign': lambda *a: 1,
'include_base_amount': lambda *a: False,
}
_order = 'sequence'
account_tax_template()
class account_chart_template(osv.osv):
_name="account.chart.template"
_description= "Templates for Account Chart"
# Multi charts of Accounts wizard
_columns={
'name': fields.char('Name', size=64, required=True),
'account_root_id': fields.many2one('account.account.template','Root Account',required=True),
'bank_account_view_id': fields.many2one('account.account.template','Bank Account',required=True),
'property_receivable_id': fields.many2one('account.account.template','Receivable Account'),
'property_payable_id': fields.many2one('account.account.template','Payable Account'),
'property_account_expense_categ_id': fields.many2one('account.account.template','Expense Category Account'),
'property_account_income_categ_id': fields.many2one('account.account.template','Income Category Account'),
class wizard_multi_charts_accounts(osv.osv_memory):
_name='wizard.multi.charts.accounts'
_columns = {
'company_id':fields.many2one('res.company','Company',required=True),
'chart_template_id': fields.many2one('account.chart.template','Chart Template',required=True),
'bank_accounts_id': fields.one2many('account.bank.accounts.wizard', 'bank_account_id', 'Bank Accounts',required=True),
}
account_chart_template()
#global seq
#seq=0
def action_create(self, cr, uid, ids, context=None):
obj_multi = self.browse(cr,uid,ids[0])
obj_acc = self.pool.get('account.account')
obj_acc_tax = self.pool.get('account.tax')
obj_journal = self.pool.get('account.journal')
obj_acc_template = self.pool.get('account.account.template')
# Creating Account
obj_acc_root = obj_multi.chart_template_id.account_root_id
tax_code_root_id = obj_multi.chart_template_id.tax_code_root_id.id
company_id = obj_multi.company_id.id
#new code
acc_template_ref = {}
tax_template_ref = {}
tax_code_template_ref = {}
todo_dict = {}
#create all the tax code
children_tax_code_template = self.pool.get('account.tax.code.template').search(cr, uid, [('parent_id','child_of',[tax_code_root_id])], order='id')
for tax_code_template in self.pool.get('account.tax.code.template').browse(cr, uid, children_tax_code_template):
#if tax_code_root_id == tax_code_template.id:
# name = obj_multi.company_id.name
#else:
# name = tax_code_template.name
vals={
'name': (tax_code_root_id == tax_code_template.id) and obj_multi.company_id.name or tax_code_template.name,
'code': tax_code_template.code,
'info': tax_code_template.info,
'parent_id': tax_code_template.parent_id and tax_code_template_ref[tax_code_template.parent_id.id] or False,
'company_id': company_id,
'sign': tax_code_template.sign,
}
new_tax_code = self.pool.get('account.tax.code').create(cr,uid,vals)
#recording the new tax code to do the mapping
tax_code_template_ref[tax_code_template.id] = new_tax_code
#create all the tax
for tax in obj_multi.chart_template_id.tax_template_ids:
#create it
vals_tax = {
'name':tax.name,
'sequence': tax.sequence,
'amount':tax.amount,
'type':tax.type,
'applicable_type': tax.applicable_type,
'domain':tax.domain,
'parent_id': tax.parent_id and tax_template_ref[tax.parent_id.id] or False,
'child_depend': tax.child_depend,
'python_compute': tax.python_compute,
'python_compute_inv': tax.python_compute_inv,
'python_applicable': tax.python_applicable,
'tax_group':tax.tax_group,
'base_code_id': tax.base_code_id and tax_code_template_ref[tax.base_code_id.id] or False,
'tax_code_id': tax.tax_code_id and tax_code_template_ref[tax.tax_code_id.id] or False,
'base_sign': tax.base_sign,
'tax_sign': tax.tax_sign,
'ref_base_code_id': tax.ref_base_code_id and tax_code_template_ref[tax.ref_base_code_id.id] or False,
'ref_tax_code_id': tax.ref_tax_code_id and tax_code_template_ref[tax.ref_tax_code_id.id] or False,
'ref_base_sign': tax.ref_base_sign,
'ref_tax_sign': tax.ref_tax_sign,
'include_base_amount': tax.include_base_amount,
'description':tax.description,
'company_id': company_id,
}
new_tax = obj_acc_tax.create(cr,uid,vals_tax)
#as the accounts have not been created yet, we have to wait before filling these fields
todo_dict[new_tax] = {
'account_collected_id': tax.account_collected_id and tax.account_collected_id.id or False,
'account_paid_id': tax.account_paid_id and tax.account_paid_id.id or False,
}
tax_template_ref[tax.id] = new_tax
#desactivate the parent_store functionnality on account_account for rapidity purpose
self.pool._init = True
children_acc_template = obj_acc_template.search(cr, uid, [('parent_id','child_of',[obj_acc_root.id])])
for account_template in obj_acc_template.browse(cr, uid, children_acc_template):
tax_ids = []
for tax in account_template.tax_ids:
tax_ids.append(tax_template_ref[tax.id])
#create the account_account
vals={
'name': (obj_acc_root.id == account_template.id) and obj_multi.company_id.name or account_template.name,
'sign': account_template.sign,
'currency_id': account_template.currency_id and account_template.currency_id.id or False,
'code': account_template.code,
'type': account_template.type,
'reconcile': account_template.reconcile,
'shortcut': account_template.shortcut,
'note': account_template.note,
'parent_id': account_template.parent_id and acc_template_ref[account_template.parent_id.id] or False,
'tax_ids': [(6,0,tax_ids)],
'company_id': company_id,
}
new_account = obj_acc.create(cr,uid,vals)
acc_template_ref[account_template.id] = new_account
#reactivate the parent_store functionnality on account_account
self.pool._init = False
self.pool.get('account.account')._parent_store_compute(cr)
for key,value in todo_dict.items():
if value['account_collected_id'] or value['account_paid_id']:
obj_acc_tax.write(cr, uid, [key], vals={
'account_collected_id': value['account_collected_id'],
'account_paid_id': value['account_paid_id'],
})
# Creating Journals
vals_journal={}
view_id = self.pool.get('account.journal.view').search(cr,uid,[('name','=','Journal View')])[0]
seq_id = self.pool.get('ir.sequence').search(cr,uid,[('code','=','account.journal')])[0]
seq_code = self.pool.get('ir.sequence').get(cr, uid, 'account.journal')
vals_journal['view_id']=view_id
vals_journal['sequence_id']=seq_id
#Sales Journal
vals_journal['name'] = 'Sales Journal '+ str(seq_code)
vals_journal['type'] = 'sale'
vals_journal['code'] = 'SAJ' + str(seq_code)
if obj_multi.chart_template_id.property_account_receivable:
vals_journal['default_credit_account_id'] = acc_template_ref[obj_multi.chart_template_id.property_account_receivable.id]
vals_journal['default_debit_account_id'] = acc_template_ref[obj_multi.chart_template_id.property_account_receivable.id]
obj_journal.create(cr,uid,vals_journal)
# Purchase Journal
vals_journal['name']='Purchase Journal '+ str(seq_code)
vals_journal['type']='purchase'
vals_journal['code']='EXJ' + str(seq_code)
if obj_multi.chart_template_id.property_account_payable:
vals_journal['default_credit_account_id'] = acc_template_ref[obj_multi.chart_template_id.property_account_payable.id]
vals_journal['default_debit_account_id'] = acc_template_ref[obj_multi.chart_template_id.property_account_payable.id]
obj_journal.create(cr,uid,vals_journal)
# Bank Journals
view_id_cash = self.pool.get('account.journal.view').search(cr,uid,[('name','=','Cash Journal View')])[0]
view_id_cur = self.pool.get('account.journal.view').search(cr,uid,[('name','=','Multi-Currency Cash Journal View')])[0]
ref_acc_bank = obj_multi.chart_template_id.bank_account_view_id
current_num = 0
for line in obj_multi.bank_accounts_id:
#create the account_account for this bank journal
tmp = self.pool.get('res.partner.bank').name_get(cr, uid, [line.acc_no.id])[0][1]
vals={
'name': line.acc_no.bank and line.acc_no.bank.name+' '+tmp or tmp,
'sign': ref_acc_bank.sign,
'currency_id': line.currency_id and line.currency_id.id or False,
'code': ref_acc_bank.code+str(current_num),
'type': 'cash',
'reconcile': True,
'parent_id': acc_template_ref[ref_acc_bank.id] or False,
'company_id': company_id,
}
acc_cash_id = obj_acc.create(cr,uid,vals)
#create the bank journal
vals_journal['name']='Bank Journal '+ str(current_num)
vals_journal['code']='BNK' + str(current_num)
vals_journal['sequence_id'] = seq_id
vals_journal['type'] = 'cash'
if line.currency_id:
vals_journal['view_id'] = view_id_cur
vals_journal['currency'] = line.currency_id.id
else:
vals_journal['view_id'] = view_id_cash
vals_journal['default_credit_account_id'] = acc_cash_id
vals_journal['default_debit_account_id']= acc_cash_id
obj_journal.create(cr,uid,vals_journal)
current_num += 1
#create the properties
property_obj = self.pool.get('ir.property')
fields_obj = self.pool.get('ir.model.fields')
todo_list = [('property_account_receivable','res.partner','account.account'), ('property_account_payable','res.partner','account.account'),('property_account_expense_categ','product.category','account.account'),('property_account_income_categ','product.category','account.account'),('property_account_tax','res.partner','account.tax'),('property_account_expense','product.template','account.account'),('property_account_income','product.template','account.account')]
for record in todo_list:
r = []
r = property_obj.search(cr, uid, [('name','like', record[0] ),('company_id','=',company_id)])
account = getattr(obj_multi.chart_template_id, record[0])
field = fields_obj.search(cr, uid, [('name','=',record[0]),('model','=',record[1]),('relation','=',record[2])])
vals = {
'name': record[0],
'company_id': company_id,
'fields_id': field[0],
'value': account and 'account.account,'+str(acc_template_ref[account.id]) or False,
}
if r:
#the property exist: modify it
property_obj.write(cr, uid, r, vals)
else:
#create the property
print "create the property",record[0]," for ",company_id
property_obj.create(cr, uid, vals)
return {}
wizard_multi_charts_accounts()
class account_bank_accounts_wizard(osv.osv_memory):
_name='account.bank.accounts.wizard'
_columns = {
'acc_no':fields.many2one('res.partner.bank','Account No.',required=True),
'bank_account_id':fields.many2one('wizard.multi.charts.accounts', 'Bank Account', required=True),
'currency_id':fields.many2one('res.currency', 'Currency'),
}
account_bank_accounts_wizard()
class wizard_account_chart_duplicate(osv.osv_memory):
"""

View File

@ -13,26 +13,26 @@
<report auto="False" id="account_invoices" model="account.invoice" name="account.invoice" rml="account/report/invoice.rml" string="Invoices"/>
<report id="account_transfers" model="account.transfer" name="account.transfer" string="Transfers" xml="account/report/transfer.xml" xsl="account/report/transfer.xsl"/>
<report auto="False" id="account_intracom" menu="False" model="account.move.line" name="account.intracom" string="IntraCom"/>
<report id="account_move_line_list" model="account.tax.code" name="account.tax.code.entries" rml="account/report/account_tax_code.rml" string="All Entries"/>
<report auto="False" id="account_vat_declaration" menu="False" model="account.tax.code" name="account.vat.declaration" rml="account/report/tax_report.rml" string="Taxes report"/>
<menuitem
id="menu_tax_report"
string="Taxes Reports"
name="Taxes Reports"
parent="account.menu_finance_reporting"/>
<wizard
id="wizard_vat_declaration"
menu="False"
model="account.tax.code"
name="account.vat.declaration"
<wizard
id="wizard_vat_declaration"
menu="False"
model="account.tax.code"
name="account.vat.declaration"
string="Print Taxes Report"/>
<menuitem
action="wizard_vat_declaration"
id="menu_wizard_vat_declaration"
parent="menu_tax_report"
action="wizard_vat_declaration"
id="menu_wizard_vat_declaration"
parent="menu_tax_report"
type="wizard"/>
@ -44,11 +44,11 @@
<field name="view_id" ref="view_tax_code_tree"/>
</record>
<menuitem
action="action_tax_code_tree"
action="action_tax_code_tree"
id="menu_action_tax_code_tree"
parent="menu_tax_report"
sequence="12"/>
<!--
<report id="analytic_journal"

View File

@ -154,7 +154,7 @@
<field name="type">tree</field>
<field name="field_parent">child_id</field>
<field name="arch" type="xml">
<tree string="Chart of accounts">
<tree string="Chart of accounts" toolbar="1">
<field name="code"/>
<field name="name"/>
<field name="debit"/>
@ -250,8 +250,8 @@
<page string="General Information">
<field name="view_id"/>
<field name="sequence_id"/>
<field name="default_debit_account_id"/>
<field name="default_credit_account_id"/>
<field name="default_debit_account_id" attrs="{'required':[('type','=','cash')]}"/>
<field name="default_credit_account_id" attrs="{'required':[('type','=','cash')]}"/>
<field name="currency"/>
<field name="user_id" groups="base.group_extended"/>
<newline/>
@ -491,7 +491,7 @@
<field name="type">tree</field>
<field name="field_parent">child_ids</field>
<field name="arch" type="xml">
<tree string="Account Tax Code">
<tree string="Account Tax Code" toolbar="1">
<field name="name"/>
<field name="code"/>
<field name="sum"/>
@ -1478,15 +1478,16 @@
<form string="Account Template">
<notebook>
<page string="General Information">
<field colspan="2" name="name" select="1"/>
<!-- <field name="company_id" colspan="2" />-->
<newline/>
<field name="type" select="1"/>
<field name="name"/>
<field name="code" select="1"/>
<newline/>
<field name="parent_id" select="1"/>
<field name="type" select="1"/>
<field name="shortcut"/>
<field name="sign"/>
<field name="currency_id" select="2"/>
<field name="reconcile"/>
<field name="tax_ids" colspan="4"/>
</page>
<page string="Notes">
<field colspan="4" name="note" nolabel="1"/>
@ -1496,6 +1497,18 @@
</field>
</record>
<record id="view_account_template_tree" model="ir.ui.view">
<field name="name">account.account.template.tree</field>
<field name="model">account.account.template</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Account Template">
<field name="code"/>
<field name="name"/>
</tree>
</field>
</record>
<record id="action_account_template_form" model="ir.actions.act_window">
<field name="name">Account Templates</field>
<field name="res_model">account.account.template</field>
@ -1513,14 +1526,16 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Chart of Accounts Template">
<field colspan="4" name="name" select="1"/>
<newline/>
<field name="name" select="1"/>
<field name="account_root_id" select="1"/>
<field name="bank_account_view_id" select="1"/>
<field name="property_receivable_id"/>
<field name="property_payable_id"/>
<field name="property_account_expense_categ_id" />
<field name="property_account_income_categ_id"/>
<field name="tax_code_root_id"/>
<field name="tax_template_ids" colspan="4" readonly="1" />
<separator string="Properties" colspan="4"/>
<field name="property_account_receivable"/>
<field name="property_account_payable"/>
<field name="property_account_expense_categ" />
<field name="property_account_income_categ"/>
</form>
</field>
</record>
@ -1532,6 +1547,7 @@
<tree string="Chart of Accounts Template">
<field name="name"/>
<field name="account_root_id"/>
<field name="tax_code_root_id"/>
<field name="bank_account_view_id"/>
</tree>
</field>
@ -1553,14 +1569,15 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Account Tax Template">
<field colspan="4" name="name" select="1"/>
<field name="name" select="1"/>
<field name="company_id"/>
<newline/>
<field name="description" select="1" colspan="4"/>
<newline/>
<field name="sequence" select="1"/>
<field name="type"/>
<field name="domain" groups="base.group_extended"/>
<field name="tax_group" />
<newline/>
<field name="type"/>
<field name="amount"/>
<field name="domain" groups="base.group_extended"/>
</form>
</field>
</record>
@ -1570,6 +1587,7 @@
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Account Tax Template">
<field name="name" />
<field name="description"/>
</tree>
</field>
@ -1583,6 +1601,48 @@
<menuitem action="action_account_tax_template_form" id="menu_action_account_tax_template_form" parent="account_account_template_menu"/>
<!-- Wizard for Multi Charts of Accounts -->
<record id="view_wizard_multi_chart" model="ir.ui.view">
<field name="name">Create Multiple Charts of Accounts</field>
<field name="model">wizard.multi.charts.accounts</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Create Multiple Charts of Accounts">
<field name="company_id" />
<field name="chart_template_id" />
<field colspan="4" mode="tree" name="bank_accounts_id" nolabel="1" widget="one2many_list">
<form string="Bank Information">
<field name="acc_no"/>
<field name="currency_id"/>
</form>
<tree editable="bottom" string="Bank Information">
<field name="acc_no"/>
<field name="currency_id"/>
</tree>
</field>
<group col="4" colspan="4">
<button icon="gtk-cancel" special="cancel" type="object" string="Cancel"/>
<button icon="gtk-ok" name="action_create" string="Create" type="object"/>
</group>
</form>
</field>
</record>
<record id="action_wizard_multi_chart" model="ir.actions.act_window">
<field name="name">Create Multiple Charts of Accounts</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">wizard.multi.charts.accounts</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<menuitem parent="account.menu_finance_configuration" action="action_wizard_multi_chart" id="menu_wizard"/>
<!-- wizard account duplicate chart -->
<record id="view_wizard_account_duplicate_chart" model="ir.ui.view">
<field name="name">wizard.account.chart.duplicate.form</field>

View File

@ -22,11 +22,11 @@
<field name="code">view</field>
<field name="close_method">none</field>
</record>
<record id="account_type_root" model="account.account.type">
<!--<record id="account_type_root" model="account.account.type">
<field name="name">Root</field>
<field name="code">root</field>
<field name="close_method">none</field>
</record>
</record>-->
<record id="account_type_consolidation" model="account.account.type">
<field name="name">Consolidation</field>
<field name="code">consolidation</field>

View File

@ -7,9 +7,11 @@
<field name="type">form</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<page string="Properties" position="inside">
<separator string="Deliveries" colspan="4"/>
<field name="property_delivery_carrier"/>
<page string="Sales &amp; Purchases" position="inside">
<group colspan="2" col="2">
<separator string="Deliveries" colspan="4"/>
<field name="property_delivery_carrier"/>
</group>
</page>
</field>
</record>

View File

@ -34,7 +34,10 @@
"depends" : ["account", "account_report", "base_vat", "base_iban",
"account_chart"],
"init_xml" : [],
"demo_xml" : ["account_demo.xml","account.report.report.csv"],
"demo_xml" : [
# "account_demo.xml",
"account.report.report.csv"
],
"update_xml" : ["account_pcmn_belgium.xml","l10n_be_wizard.xml", "l10n_be_sequence.xml"],
"installable": True
}

File diff suppressed because it is too large Load Diff