diff --git a/addons/account/report/partner_balance.py b/addons/account/report/partner_balance.py index 0adb0c85c65..3ef11d4f4a3 100644 --- a/addons/account/report/partner_balance.py +++ b/addons/account/report/partner_balance.py @@ -175,7 +175,7 @@ class partner_balance(report_sxw.rml_parse, common_report_header): "WHERE a.type IN %s " \ "AND a.active", (self.ACCOUNT_TYPE,)) self.account_ids = [a for (a,) in self.cr.fetchall()] - self.soldeinit = data['form']['soldeinit'] # for include initial balance + self.initial_balance = data['form']['initial_balance'] # for include initial balance return super(partner_balance, self).set_context(objects, data, ids, report_type) def lines(self, data): @@ -209,7 +209,7 @@ class partner_balance(report_sxw.rml_parse, common_report_header): res = self.cr.dictfetchall() #For include intial balance.. - if self.soldeinit: + if self.initial_balance: date_init = (datetime.datetime.strptime(self.date_lst[0], "%Y-%m-%d") + timedelta(days=-1)).strftime('%Y-%m-%d') self.cr.execute( "SELECT '1' as type, '' as ref, l.account_id as account_id, '' as account_name, '' as code, '' as name, sum(debit) as debit, sum(credit) as credit, " \ @@ -271,7 +271,7 @@ class partner_balance(report_sxw.rml_parse, common_report_header): ## We will now compute Total subtotal_row = self._add_subtotal(full_account) - if not self.soldeinit: + if not self.initial_balance: return subtotal_row #If include initial balance is selected.. @@ -415,7 +415,7 @@ class partner_balance(report_sxw.rml_parse, common_report_header): "AND l.date IN %s", (tuple(self.account_ids), tuple(self.date_lst))) temp_res = float(self.cr.fetchone()[0] or 0.0) -# if self.soldeinit: +# if self.initial_balance: # date_init = (datetime.datetime.strptime(self.date_lst[0], "%Y-%m-%d") + timedelta(days=-1)).strftime('%Y-%m-%d') # self.cr.execute( # "SELECT sum(debit) " \ @@ -440,7 +440,7 @@ class partner_balance(report_sxw.rml_parse, common_report_header): "AND l.date IN %s", (tuple(self.account_ids), tuple(self.date_lst),)) temp_res = float(self.cr.fetchone()[0] or 0.0) -# if self.soldeinit: +# if self.initial_balance: # date_init = (datetime.datetime.strptime(self.date_lst[0], "%Y-%m-%d") + timedelta(days=-1)).strftime('%Y-%m-%d') # self.cr.execute( # "SELECT sum(credit) " \ @@ -466,7 +466,7 @@ class partner_balance(report_sxw.rml_parse, common_report_header): "AND l.blocked=TRUE ", (tuple(self.account_ids), tuple(self.date_lst),)) temp_res = float(self.cr.fetchone()[0] or 0.0) -# if self.soldeinit: +# if self.initial_balance: # date_init = (datetime.datetime.strptime(self.date_lst[0], "%Y-%m-%d") + timedelta(days=-1)).strftime('%Y-%m-%d') # self.cr.execute( # "SELECT sum(debit-credit) " \ diff --git a/addons/account/report/third_party_ledger.py b/addons/account/report/third_party_ledger.py index bf5bd14a5a2..ef27c1a7023 100644 --- a/addons/account/report/third_party_ledger.py +++ b/addons/account/report/third_party_ledger.py @@ -166,7 +166,7 @@ class third_party_ledger(rml_parse.rml_parse, common_report_header): self.account_ids = [a for (a,) in self.cr.fetchall()] partner_to_use = [] - if self.date_lst and data['form']['soldeinit'] : + if self.date_lst and data['form']['initial_balance'] : self.cr.execute( "SELECT DISTINCT line.partner_id " \ "FROM account_move_line AS line, account_account AS account " \ @@ -212,7 +212,7 @@ class third_party_ledger(rml_parse.rml_parse, common_report_header): else: RECONCILE_TAG = "AND l.reconcile_id IS NULL" -# if data['form']['soldeinit'] : +# if data['form']['initial_balance'] : # # self.cr.execute( # "SELECT l.id,l.date,j.code, l.ref, l.name, l.debit, l.credit " \ @@ -259,7 +259,7 @@ class third_party_ledger(rml_parse.rml_parse, common_report_header): RECONCILE_TAG = " " else: RECONCILE_TAG = "AND reconcile_id IS NULL" - if self.date_lst and data['form']['soldeinit'] : + if self.date_lst and data['form']['initial_balance'] : self.cr.execute( "SELECT sum(debit) " \ "FROM account_move_line " \ @@ -297,7 +297,7 @@ class third_party_ledger(rml_parse.rml_parse, common_report_header): RECONCILE_TAG = " " else: RECONCILE_TAG = "AND reconcile_id IS NULL" - if self.date_lst and data['form']['soldeinit'] : + if self.date_lst and data['form']['initial_balance'] : self.cr.execute( "SELECT sum(credit) " \ "FROM account_move_line " \ @@ -337,7 +337,7 @@ class third_party_ledger(rml_parse.rml_parse, common_report_header): RECONCILE_TAG = " " else: RECONCILE_TAG = "AND reconcile_id IS NULL" - if self.date_lst and data['form']['soldeinit'] : + if self.date_lst and data['form']['initial_balance'] : self.cr.execute( "SELECT sum(debit) " \ "FROM account_move_line " \ @@ -375,7 +375,7 @@ class third_party_ledger(rml_parse.rml_parse, common_report_header): RECONCILE_TAG = " " else: RECONCILE_TAG = "AND reconcile_id IS NULL" - if self.date_lst and data['form']['soldeinit'] : + if self.date_lst and data['form']['initial_balance'] : self.cr.execute( "SELECT sum(credit) " \ "FROM account_move_line " \ diff --git a/addons/account/wizard/account_general_ledger_report_view.xml b/addons/account/wizard/account_general_ledger_report_view.xml index 28d5fca35d0..f98e80fb81f 100644 --- a/addons/account/wizard/account_general_ledger_report_view.xml +++ b/addons/account/wizard/account_general_ledger_report_view.xml @@ -17,7 +17,7 @@ - + diff --git a/addons/account/wizard/account_report_partner_balance.py b/addons/account/wizard/account_report_partner_balance.py index f8035b8c439..cadce66a831 100644 --- a/addons/account/wizard/account_report_partner_balance.py +++ b/addons/account/wizard/account_report_partner_balance.py @@ -29,18 +29,18 @@ class account_partner_balance(osv.osv_memory): _name = 'account.partner.balance' _description = 'Print Account Partner Balance' _columns = { - 'soldeinit': fields.boolean('Include Initial Balances' + 'initial_balance': fields.boolean('Include Initial Balances' ,help='It adds initial balance row on report which display previous sum amount of debit/credit/balance'), } _defaults = { - 'soldeinit': True, + 'initial_balance': True, } def _print_report(self, cr, uid, ids, data, query_line, context=None): if context is None: context = {} data = self.pre_print_report(cr, uid, ids, data, query_line, context=context) - data['form'].update(self.read(cr, uid, ids, ['soldeinit'])[0]) + data['form'].update(self.read(cr, uid, ids, ['initial_balance'])[0]) return { 'type': 'ir.actions.report.xml', 'report_name': 'account.partner.balance', diff --git a/addons/account/wizard/account_report_partner_balance_view.xml b/addons/account/wizard/account_report_partner_balance_view.xml index fc8702ce3ed..c78d2f3f594 100644 --- a/addons/account/wizard/account_report_partner_balance_view.xml +++ b/addons/account/wizard/account_report_partner_balance_view.xml @@ -10,7 +10,7 @@ - + diff --git a/addons/account/wizard/account_report_partner_ledger.py b/addons/account/wizard/account_report_partner_ledger.py index a020ce57800..3b89ebe7ae0 100644 --- a/addons/account/wizard/account_report_partner_ledger.py +++ b/addons/account/wizard/account_report_partner_ledger.py @@ -29,7 +29,7 @@ class account_partner_ledger(osv.osv_memory): _inherit = 'account.common.partner.report' _description = 'Account Partner Ledger' _columns = { - 'soldeinit': fields.boolean('Include initial balances', + 'initial_balance': fields.boolean('Include initial balances', help='It adds initial balance row on report which display previous sum amount of debit/credit/balance'), 'reconcil': fields.boolean('Include Reconciled Entries'), 'page_split': fields.boolean('One Partner Per Page', help='Display Ledger Report with One partner per page'), @@ -37,7 +37,7 @@ class account_partner_ledger(osv.osv_memory): } _defaults = { 'reconcile' : True, - 'soldeinit' : True, + 'initial_balance' : True, 'page_split' : False, } @@ -45,7 +45,7 @@ class account_partner_ledger(osv.osv_memory): if context is None: context = {} data = self.pre_print_report(cr, uid, ids, data, query_line, context=context) - data['form'].update(self.read(cr, uid, ids, ['soldeinit', 'reconcil', 'page_split', 'amount_currency'])[0]) + data['form'].update(self.read(cr, uid, ids, ['initial_balance', 'reconcil', 'page_split', 'amount_currency'])[0]) if data['form']['page_split']: return { 'type': 'ir.actions.report.xml', diff --git a/addons/account/wizard/account_report_partner_ledger_view.xml b/addons/account/wizard/account_report_partner_ledger_view.xml index f117e5000bb..3d712b04973 100644 --- a/addons/account/wizard/account_report_partner_ledger_view.xml +++ b/addons/account/wizard/account_report_partner_ledger_view.xml @@ -10,7 +10,7 @@ - +