*added l10n_lu module
*improved account module: removed company_id on template bzr revid: qdp@tinyerp.com-20081013163957-augmjoi7436ljyjt
This commit is contained in:
parent
cf5b038e23
commit
2d1f0eb1b5
|
@ -1687,10 +1687,13 @@ class account_tax_code_template(osv.osv):
|
|||
'info': fields.text('Description'),
|
||||
'parent_id': fields.many2one('account.tax.code.template', 'Parent Code', select=True),
|
||||
'child_ids': fields.one2many('account.tax.code.template', 'parent_id', 'Childs Codes'),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True),
|
||||
'sign': fields.float('Sign for parent', required=True),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'sign': lambda *args: 1.0,
|
||||
}
|
||||
|
||||
def name_get(self, cr, uid, ids, context=None):
|
||||
if not len(ids):
|
||||
return []
|
||||
|
@ -1700,17 +1703,6 @@ class account_tax_code_template(osv.osv):
|
|||
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):
|
||||
|
@ -1926,6 +1918,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
|
|||
|
||||
#deactivate 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 = []
|
||||
|
|
|
@ -1568,7 +1568,6 @@
|
|||
<field name="arch" type="xml">
|
||||
<form string="Account Tax Code Template">
|
||||
<field name="name" select="1"/>
|
||||
<field name="company_id"/>
|
||||
<field name="code" select="1"/>
|
||||
<field name="parent_id" select="1"/>
|
||||
<field name="sign"/>
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
#
|
||||
# Generated by the Tiny ERP module recorder !
|
||||
#
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"name" : "l10n_lu",
|
||||
"version" : "1.0",
|
||||
"author" : "Tiny",
|
||||
"website" : "http://tinyerp.com",
|
||||
"category" : "Vertical Modules/Parametrization",
|
||||
"description": """
|
||||
This module install
|
||||
*the KLUWER Chart of Accounts,
|
||||
*the Tax Code Chart for Luxembourg
|
||||
*the main taxes used in Luxembourg""",
|
||||
"depends" : ["l10n_be","base"],
|
||||
"init_xml" : [ ],
|
||||
"demo_xml" : [ ],
|
||||
"update_xml" : ["l10n_lu_data.xml"],
|
||||
"installable": True
|
||||
}
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue