[FIX] Made changes in account.py and installer.py inorder to get the company information while loading account module
lp bug: https://launchpad.net/bugs/822976 fixed bzr revid: bde@tinyerp.com-20110810060607-9gltlhrpiwyqu3yv
This commit is contained in:
parent
097b76d372
commit
8de161c243
|
@ -1331,7 +1331,7 @@ class account_move(osv.osv):
|
||||||
|
|
||||||
def _centralise(self, cr, uid, move, mode, context=None):
|
def _centralise(self, cr, uid, move, mode, context=None):
|
||||||
assert mode in ('debit', 'credit'), 'Invalid Mode' #to prevent sql injection
|
assert mode in ('debit', 'credit'), 'Invalid Mode' #to prevent sql injection
|
||||||
currency_obj = self.pool.get('res.currency')
|
currency_obj = self.pool.get('res.currency')
|
||||||
if context is None:
|
if context is None:
|
||||||
context = {}
|
context = {}
|
||||||
|
|
||||||
|
@ -1593,7 +1593,7 @@ class account_tax_code(osv.osv):
|
||||||
(parent_ids,) + where_params)
|
(parent_ids,) + where_params)
|
||||||
res=dict(cr.fetchall())
|
res=dict(cr.fetchall())
|
||||||
obj_precision = self.pool.get('decimal.precision')
|
obj_precision = self.pool.get('decimal.precision')
|
||||||
res2 = {}
|
res2 = {}
|
||||||
for record in self.browse(cr, uid, ids, context=context):
|
for record in self.browse(cr, uid, ids, context=context):
|
||||||
def _rec_get(record):
|
def _rec_get(record):
|
||||||
amount = res.get(record.id, 0.0)
|
amount = res.get(record.id, 0.0)
|
||||||
|
@ -2699,7 +2699,7 @@ class wizard_multi_charts_accounts(osv.osv_memory):
|
||||||
unconfigured_cmp = list(set(company_ids)-set(configured_cmp))
|
unconfigured_cmp = list(set(company_ids)-set(configured_cmp))
|
||||||
for field in res['fields']:
|
for field in res['fields']:
|
||||||
if field == 'company_id':
|
if field == 'company_id':
|
||||||
res['fields'][field]['domain'] = unconfigured_cmp
|
res['fields'][field]['domain'] = [('id','in',unconfigured_cmp)]
|
||||||
res['fields'][field]['selection'] = [('', '')]
|
res['fields'][field]['selection'] = [('', '')]
|
||||||
if unconfigured_cmp:
|
if unconfigured_cmp:
|
||||||
cmp_select = [(line.id, line.name) for line in self.pool.get('res.company').browse(cr, uid, unconfigured_cmp)]
|
cmp_select = [(line.id, line.name) for line in self.pool.get('res.company').browse(cr, uid, unconfigured_cmp)]
|
||||||
|
|
|
@ -100,7 +100,7 @@ class account_installer(osv.osv_memory):
|
||||||
unconfigured_cmp = list(set(company_ids)-set(configured_cmp))
|
unconfigured_cmp = list(set(company_ids)-set(configured_cmp))
|
||||||
for field in res['fields']:
|
for field in res['fields']:
|
||||||
if field == 'company_id':
|
if field == 'company_id':
|
||||||
res['fields'][field]['domain'] = unconfigured_cmp
|
res['fields'][field]['domain'] = [('id','in',unconfigured_cmp)]
|
||||||
res['fields'][field]['selection'] = [('', '')]
|
res['fields'][field]['selection'] = [('', '')]
|
||||||
if unconfigured_cmp:
|
if unconfigured_cmp:
|
||||||
cmp_select = [(line.id, line.name) for line in self.pool.get('res.company').browse(cr, uid, unconfigured_cmp)]
|
cmp_select = [(line.id, line.name) for line in self.pool.get('res.company').browse(cr, uid, unconfigured_cmp)]
|
||||||
|
|
Loading…
Reference in New Issue