diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index bcdb0d725c9..8f61e951073 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -255,7 +255,7 @@ - + diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index 432f1b4e2c6..2e5cdce5e84 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -843,7 +843,12 @@ class account_move_line(osv.osv): ret.append(ret_line) return ret - def list_partners_to_reconcile(self, cr, uid, context=None): + + def list_partners_to_reconcile(self, cr, uid, context=None, filter_domain=False): + line_ids = [] + if filter_domain: + line_ids = self.search(cr, uid, filter_domain, context=context) + where_clause = filter_domain and "AND l.id = ANY(%s)" or "" cr.execute( """SELECT partner_id FROM ( SELECT l.partner_id, p.last_reconciliation_date, SUM(l.debit) AS debit, SUM(l.credit) AS credit, MAX(l.create_date) AS max_date @@ -853,10 +858,12 @@ class account_move_line(osv.osv): WHERE a.reconcile IS TRUE AND l.reconcile_id IS NULL AND l.state <> 'draft' + %s GROUP BY l.partner_id, p.last_reconciliation_date ) AS s WHERE debit > 0 AND credit > 0 AND (last_reconciliation_date IS NULL OR max_date > last_reconciliation_date) - ORDER BY last_reconciliation_date""") + ORDER BY last_reconciliation_date""" + % where_clause, (line_ids,)) ids = [x[0] for x in cr.fetchall()] if not ids: return [] diff --git a/addons/account/static/src/js/account_widgets.js b/addons/account/static/src/js/account_widgets.js index 3e13ec789bc..146ba5eadc8 100644 --- a/addons/account/static/src/js/account_widgets.js +++ b/addons/account/static/src/js/account_widgets.js @@ -1755,7 +1755,7 @@ openerp.account = function (instance) { this.last_group_by = group_by; this.old_search = _.bind(this._super, this); var mod = new instance.web.Model("account.move.line", context, domain); - return mod.call("list_partners_to_reconcile", []).then(function(result) { + return mod.call("list_partners_to_reconcile", [context, domain]).then(function(result) { var current = self.current_partner !== null ? self.partners[self.current_partner][0] : null; self.partners = result; var index = _.find(_.range(self.partners.length), function(el) { diff --git a/addons/mrp_repair/mrp_repair_view.xml b/addons/mrp_repair/mrp_repair_view.xml index 2f160cf1aef..01502e8bc13 100644 --- a/addons/mrp_repair/mrp_repair_view.xml +++ b/addons/mrp_repair/mrp_repair_view.xml @@ -167,6 +167,7 @@ + diff --git a/addons/web/static/src/js/formats.js b/addons/web/static/src/js/formats.js index 22131d4d53f..28637289429 100644 --- a/addons/web/static/src/js/formats.js +++ b/addons/web/static/src/js/formats.js @@ -238,10 +238,6 @@ instance.web.parse_value = function (value, descriptor, value_if_empty) { throw new Error(_.str.sprintf(_t("'%s' is not a correct integer"), value)); return tmp; case 'float': - tmp = Number(value); - if (!isNaN(tmp)) - return tmp; - var tmp2 = value; do { tmp = tmp2;