[IMP] account/wizard : small changes in code of _get_company method
bzr revid: psi@tinyerp.co.in-20100426131157-hw8c3sfz4njg10l5
This commit is contained in:
@@ -43,7 +43,7 @@ class account_aged_trial_balance(osv.osv_memory):
|
||||
'Analysis Direction', required=True),
|
||||
}
|
||||
|
||||
def _get_company(self, cr, uid, ids, context=None):
|
||||
def _get_company(self, cr, uid, context=None):
|
||||
user_obj = self.pool.get('res.users')
|
||||
company_obj = self.pool.get('res.company')
|
||||
if context is None:
|
||||
|
||||
@@ -50,7 +50,7 @@ class account_balance_report(osv.osv_memory):
|
||||
'date_to': fields.date('End date', required=True),
|
||||
}
|
||||
|
||||
def _get_company(self, cr, uid, ids, context=None):
|
||||
def _get_company(self, cr, uid, context=None):
|
||||
user_obj = self.pool.get('res.users')
|
||||
company_obj = self.pool.get('res.company')
|
||||
user = user_obj.browse(cr, uid, uid, context=context)
|
||||
|
||||
@@ -50,7 +50,7 @@ class account_general_ledger_report(osv.osv_memory):
|
||||
'date_to': fields.date("End date", required=True)
|
||||
}
|
||||
|
||||
def _get_company(self, cr, uid, ids, context=None):
|
||||
def _get_company(self, cr, uid, context=None):
|
||||
user_obj = self.pool.get('res.users')
|
||||
company_obj = self.pool.get('res.company')
|
||||
if context is None:
|
||||
@@ -63,8 +63,8 @@ class account_general_ledger_report(osv.osv_memory):
|
||||
|
||||
_defaults = {
|
||||
'state' : 'none',
|
||||
'date_from' : lambda *a: time.strftime('%Y-01-01'),
|
||||
'date_to' : lambda *a: time.strftime('%Y-%m-%d'),
|
||||
'date_from' : time.strftime('%Y-01-01'),
|
||||
'date_to' : time.strftime('%Y-%m-%d'),
|
||||
'company_id' : _get_company,
|
||||
'display_account' : 'bal_all',
|
||||
'sortbydate' : 'sort_date',
|
||||
|
||||
@@ -48,7 +48,7 @@ class account_partner_balance(osv.osv_memory):
|
||||
'date2': fields.date('End date', required=True),
|
||||
}
|
||||
|
||||
def _get_company(self, cr, uid, ids, context=None):
|
||||
def _get_company(self, cr, uid, context=None):
|
||||
user_obj = self.pool.get('res.users')
|
||||
company_obj = self.pool.get('res.company')
|
||||
user = user_obj.browse(cr, uid, uid, context=context)
|
||||
@@ -59,9 +59,9 @@ class account_partner_balance(osv.osv_memory):
|
||||
|
||||
_defaults={
|
||||
'state' : 'none',
|
||||
'date1' : lambda *a: time.strftime('%Y-01-01'),
|
||||
'date2' : lambda *a: time.strftime('%Y-%m-%d'),
|
||||
'result_selection' : lambda *a: 'all',
|
||||
'date1' : time.strftime('%Y-01-01'),
|
||||
'date2' : time.strftime('%Y-%m-%d'),
|
||||
'result_selection' : 'all',
|
||||
'soldeinit' : True,
|
||||
'company_id' : _get_company,
|
||||
'fiscalyear' : False,
|
||||
|
||||
@@ -49,7 +49,7 @@ class account_partner_ledger(osv.osv_memory):
|
||||
'date2': fields.date('End date', required=True),
|
||||
}
|
||||
|
||||
def _get_company(self, cr, uid, ids, context=None):
|
||||
def _get_company(self, cr, uid, context=None):
|
||||
user_obj = self.pool.get('res.users')
|
||||
company_obj = self.pool.get('res.company')
|
||||
if context is None:
|
||||
|
||||
Reference in New Issue
Block a user