'get_intial_balance':self._get_intial_balance,
'display_initial_balance':self._display_initial_balance,
'display_currency':self._display_currency,
-
})
return string_map
def set_context(self, objects, data, ids, report_type=None):
- self.query = data['form']['query_line']
- self.init_query = data['form']['initial_bal_query']
+ self.query = data['form'].get('query_line', '')
+ self.init_query = data['form'].get('initial_bal_query', '')
+ self.reconcil = data['form'].get('reconcil', True)
+ self.initial_balance = data['form'].get('initial_balance', True)
PARTNER_REQUEST = ''
if (data['model'] == 'res.partner'):
## Si on imprime depuis les partenaires
"FROM account_account a " \
"LEFT JOIN account_account_type t " \
"ON (a.type=t.code) " \
-# "WHERE a.company_id = %s " \
'WHERE a.type IN %s' \
"AND a.active", (tuple(self.ACCOUNT_TYPE), ))
self.account_ids = [a for (a,) in self.cr.fetchall()]
(tuple(self.account_ids),))
res = self.cr.dictfetchall()
-
for res_line in res:
partner_to_use.append(res_line['partner_id'])
new_ids = partner_to_use
def lines(self, partner, data):
full_account = []
- if data['form']['reconcil'] :
+ if self.reconcil:
RECONCILE_TAG = " "
else:
RECONCILE_TAG = "AND l.reconcile_id IS NULL"
def _sum_debit_partner(self, partner, data):
result_tmp = 0.0
- if data['form']['reconcil'] :
+ if self.reconcil :
RECONCILE_TAG = " "
else:
RECONCILE_TAG = "AND reconcile_id IS NULL"
def _sum_credit_partner(self, partner, data):
result_tmp = 0.0
- if data['form']['reconcil'] :
+ if self.reconcil :
RECONCILE_TAG = " "
else:
RECONCILE_TAG = "AND reconcile_id IS NULL"
return 0.0
result_tmp = 0.0
result_init = 0.0
- if data['form']['reconcil'] :
+ if self.reconcil :
RECONCILE_TAG = " "
else:
RECONCILE_TAG = "AND reconcile_id IS NULL"
- if data['form']['initial_balance']:
+ if self.initial_balance:
self.cr.execute(
"SELECT sum(debit) " \
"FROM account_move_line AS l " \
return 0.0
result_tmp = 0.0
result_init = 0.0
- if data['form']['reconcil'] :
+ if self.reconcil :
RECONCILE_TAG = " "
else:
RECONCILE_TAG = "AND reconcile_id IS NULL"
- if data['form']['initial_balance']: #self.date_lst and
+ if self.initial_balance:
self.cr.execute(
"SELECT sum(credit) " \
"FROM account_move_line AS l " \
return currency_total
def _display_initial_balance(self, data):
- if data['form']['initial_balance'] :
+ if self.initial_balance :
return True
return False
'addons/account/report/third_party_ledger_other.rml',parser=third_party_ledger,
header='internal')
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file