diff --git a/npg_bank_account_reconciliation/account_move_line.py b/npg_bank_account_reconciliation/account_move_line.py
index 2e1808282..56912bf87 100644
--- a/npg_bank_account_reconciliation/account_move_line.py
+++ b/npg_bank_account_reconciliation/account_move_line.py
@@ -26,12 +26,12 @@ class account_move_line(osv.osv):
_inherit='account.move.line'
_columns = {
- 'cleared_bank_account': fields.boolean('Cleared? ', help='Check if the transaction has cleared from the bank'),
- 'bank_acc_rec_statement_id': fields.many2one('bank.acc.rec.statement', 'Bank Acc Rec Statement', help="The Bank Acc Rec Statement linked with the journal item"),
- 'draft_assigned_to_statement': fields.boolean('Assigned to Statement? ', help='Check if the move line is assigned to statement lines')
+ 'cleared_bank_account': fields.boolean('Cleared? ', help='Check if the transaction has cleared from the bank'),
+ 'bank_acc_rec_statement_id': fields.many2one('bank.acc.rec.statement', 'Bank Acc Rec Statement', help="The Bank Acc Rec Statement linked with the journal item"),
+ 'draft_assigned_to_statement': fields.boolean('Assigned to Statement? ', help='Check if the move line is assigned to statement lines')
}
-account_move_line()
+account_move_line()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
diff --git a/npg_bank_account_reconciliation/npg_bank_account_reconciliation.py b/npg_bank_account_reconciliation/npg_bank_account_reconciliation.py
index c9082d98c..c7d984e33 100644
--- a/npg_bank_account_reconciliation/npg_bank_account_reconciliation.py
+++ b/npg_bank_account_reconciliation/npg_bank_account_reconciliation.py
@@ -21,8 +21,8 @@
##############################################################################
import time
-from osv import fields, osv
-from tools.translate import _
+from openerp.osv import fields, osv
+from openerp.tools.translate import _
import decimal_precision as dp
class bank_acc_rec_statement(osv.osv):
@@ -186,7 +186,10 @@ class bank_acc_rec_statement(osv.osv):
res[statement.id]['cleared_balance'] = round(res[statement.id]['sum_of_debits'] - res[statement.id]['sum_of_credits'], account_precision)
res[statement.id]['difference'] = round((statement.ending_balance - statement.starting_balance) - res[statement.id]['cleared_balance'], account_precision)
return res
-
+
+ def refresh_record(self, cr, uid, ids, context=None):
+ return self.write(cr, uid, ids, {}, context=context)
+
def onchange_account_id(self, cr, uid, ids, account_id, ending_date, suppress_ending_date_filter, context=None):
account_move_line_obj = self.pool.get('account.move.line')
statement_line_obj = self.pool.get('bank.acc.rec.statement.line')
@@ -300,8 +303,7 @@ class bank_acc_rec_statement_line(osv.osv):
# Prevent manually adding new statement line.
# This would allow only onchange method to pre-populate statement lines based on the filter rules.
if not vals.get('move_line_id', False):
- raise osv.except_osv(_('Processing Error'),\
- _('You cannot add any new bank statement line manually as of this revision!'))
+ raise osv.except_osv(_('Processing Error'),_('You cannot add any new bank statement line manually as of this revision!'))
account_move_line_obj.write(cr, uid, [vals['move_line_id']], {'draft_assigned_to_statement': True}, context=context)
return super(bank_acc_rec_statement_line, self).create(cr, uid, vals, context=context)
diff --git a/npg_bank_account_reconciliation/npg_bank_account_reconciliation_view.xml b/npg_bank_account_reconciliation/npg_bank_account_reconciliation_view.xml
index bd5e10717..5546746df 100644
--- a/npg_bank_account_reconciliation/npg_bank_account_reconciliation_view.xml
+++ b/npg_bank_account_reconciliation/npg_bank_account_reconciliation_view.xml
@@ -30,7 +30,8 @@
-
+
+
@@ -45,6 +46,7 @@
+
+