diff --git a/addons/account/report/account_overdue_report.py b/addons/account/report/account_overdue_report.py index 0fb7529e20b..fd032197233 100644 --- a/addons/account/report/account_overdue_report.py +++ b/addons/account/report/account_overdue_report.py @@ -25,7 +25,7 @@ class ReportOverdue(models.AbstractModel): "FROM account_move_line l " "JOIN account_account_type at ON (l.user_type_id = at.id) " "JOIN account_move m ON (l.move_id = m.id) " - "WHERE l.partner_id IN %s AND at.type IN ('receivable', 'payable') GROUP BY l.date, l.name, l.ref, l.date_maturity, l.partner_id, at.type, l.blocked, l.amount_currency, l.currency_id, l.move_id, m.name", (((fields.date.today(), ) + (tuple(partner_ids),)))) + "WHERE l.partner_id IN %s AND at.type IN ('receivable', 'payable') AND NOT l.reconciled GROUP BY l.date, l.name, l.ref, l.date_maturity, l.partner_id, at.type, l.blocked, l.amount_currency, l.currency_id, l.move_id, m.name", (((fields.date.today(), ) + (tuple(partner_ids),)))) for row in self.env.cr.dictfetchall(): res[row.pop('partner_id')].append(row) return res diff --git a/addons/crm/wizard/base_partner_merge.py b/addons/crm/wizard/base_partner_merge.py index 18fd4c6a3e6..27f3f3e002d 100644 --- a/addons/crm/wizard/base_partner_merge.py +++ b/addons/crm/wizard/base_partner_merge.py @@ -489,13 +489,19 @@ class MergePartnerAutomatic(models.TransientModel): counter = 0 for min_id, aggr_ids in self._cr.fetchall(): - # exclude partner according to options - if model_mapping and self._partner_use_in(aggr_ids, model_mapping): + # To ensure that the used partners are accessible by the user + partners = self.env['res.partner'].search([('id', 'in', aggr_ids)]) + if len(partners) < 2: continue + + # exclude partner according to options + if model_mapping and self._partner_use_in(partners.ids, model_mapping): + continue + self.env['base.partner.merge.line'].create({ 'wizard_id': self.id, 'min_id': min_id, - 'aggr_ids': aggr_ids, + 'aggr_ids': partners.ids, }) counter += 1 diff --git a/addons/sale/models/sale.py b/addons/sale/models/sale.py index aca9f0660d1..4902c4d6fb2 100644 --- a/addons/sale/models/sale.py +++ b/addons/sale/models/sale.py @@ -345,7 +345,7 @@ class SaleOrder(models.Model): vals = {} if order.name not in invoices[group_key].origin.split(', '): vals['origin'] = invoices[group_key].origin + ', ' + order.name - if order.client_order_ref and order.client_order_ref not in invoices[group_key].name.split(', '): + if order.client_order_ref and order.client_order_ref not in invoices[group_key].name.split(', ') and order.client_order_ref != invoices[group_key].name: vals['name'] = invoices[group_key].name + ', ' + order.client_order_ref invoices[group_key].write(vals) if line.qty_to_invoice > 0: diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 432f473de1d..cd7b93a549f 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -646,8 +646,6 @@ class Database(http.Controller): @http.route('/web/database/create', type='http', auth="none", methods=['POST'], csrf=False) def create(self, master_pwd, name, lang, password, **post): try: - if not re.match('^[a-zA-Z][a-zA-Z0-9_]+$', name): - raise Exception(_('Invalid database name. Only alphanumerical characters and underscore are allowed.')) # country code could be = "False" which is actually True in python country_code = post.get('country_code') or False dispatch_rpc('db', 'create_database', [master_pwd, name, bool(post.get('demo')), lang, password, post['login'], country_code]) @@ -660,8 +658,6 @@ class Database(http.Controller): @http.route('/web/database/duplicate', type='http', auth="none", methods=['POST'], csrf=False) def duplicate(self, master_pwd, name, new_name): try: - if not re.match('^[a-zA-Z][a-zA-Z0-9_]+$', new_name): - raise Exception(_('Invalid database name. Only alphanumerical characters and underscore are allowed.')) dispatch_rpc('db', 'duplicate_database', [master_pwd, name, new_name]) return http.local_redirect('/web/database/manager') except Exception, e: diff --git a/addons/web/static/lib/qweb/qweb2.js b/addons/web/static/lib/qweb/qweb2.js index 1e854a6960c..378c5eb6023 100644 --- a/addons/web/static/lib/qweb/qweb2.js +++ b/addons/web/static/lib/qweb/qweb2.js @@ -129,12 +129,15 @@ var QWeb2 = { } return r.join(''); } else { + // avoid XMLSerializer with text node for IE + if (node.nodeType == 3) { + return node.data; + } if (typeof XMLSerializer !== 'undefined') { return (new XMLSerializer()).serializeToString(node); } else { switch(node.nodeType) { case 1: return node.outerHTML; - case 3: return node.data; case 4: return ''; case 8: return ''; } diff --git a/addons/web/views/database_manager.html b/addons/web/views/database_manager.html index ff78eddd6e3..7cef4678e8d 100644 --- a/addons/web/views/database_manager.html +++ b/addons/web/views/database_manager.html @@ -61,7 +61,7 @@