From af86f029c92b7cf4f4f0d2d7a86003f821adbfb4 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Sun, 10 May 2015 10:25:05 +0200 Subject: [PATCH] [FIX] account: Translation of journal name The journal name showed in the pop over of the reconciliation bank statement wizard must be in the language of the user. opw:634378 --- addons/account/account_bank_statement.py | 2 +- addons/account/static/src/js/account_widgets.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index a6f2c6d6eb0..72a907876b9 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -588,7 +588,7 @@ class account_bank_statement_line(osv.osv): domain += [(amount_field, '<', 0), (amount_field, '>', (sign * amount))] else: domain += [(amount_field, '>', 0), (amount_field, '<', (sign * amount))] - mv_lines = self.get_move_lines_for_reconciliation(cr, uid, st_line, excluded_ids=excluded_ids, limit=5, additional_domain=domain) + mv_lines = self.get_move_lines_for_reconciliation(cr, uid, st_line, excluded_ids=excluded_ids, limit=5, additional_domain=domain, context=context) ret = [] total = 0 for line in mv_lines: diff --git a/addons/account/static/src/js/account_widgets.js b/addons/account/static/src/js/account_widgets.js index bbef41e98ed..64d7beaf8f3 100644 --- a/addons/account/static/src/js/account_widgets.js +++ b/addons/account/static/src/js/account_widgets.js @@ -233,7 +233,7 @@ openerp.account = function (instance) { // Display the reconciliations return self.model_bank_statement_line - .call("get_data_for_reconciliations", [reconciliations_to_show]) + .call("get_data_for_reconciliations", [reconciliations_to_show], {context:self.session.user_context}) .then(function (data) { var child_promises = []; while ((datum = data.shift()) !== undefined) @@ -1594,7 +1594,7 @@ openerp.account = function (instance) { limit += 1; // Let's fetch 1 more item than requested if (limit > 0) { return self.model_bank_statement_line - .call("get_move_lines_for_reconciliation_by_statement_line_id", [self.st_line.id, excluded_ids, self.filter, offset, limit]) + .call("get_move_lines_for_reconciliation_by_statement_line_id", [self.st_line.id, excluded_ids, self.filter, offset, limit], {context:self.session.user_context}) .then(function (lines) { _.each(lines, function(line) { self.decorateMoveLine(line, self.st_line.currency_id) }, self); // If we could fetch 1 more item than what we'll display, that means there are move lines left to be displayed (so we enable the pager)