diff --git a/addons/mail/models/mail_channel.py b/addons/mail/models/mail_channel.py index 63bd82a5f87..9abaf4f1499 100644 --- a/addons/mail/models/mail_channel.py +++ b/addons/mail/models/mail_channel.py @@ -197,7 +197,7 @@ class Channel(models.Model): # http://blogs.technet.com/b/exchange/archive/2006/10/06/3395024.aspx headers['X-Auto-Response-Suppress'] = 'OOF' if self.alias_domain and self.alias_name: - headers['List-Id'] = '%s.%s' % (self.alias_name, self.alias_domain) + headers['List-Id'] = '<%s.%s>' % (self.alias_name, self.alias_domain) headers['List-Post'] = '' % (self.alias_name, self.alias_domain) # Avoid users thinking it was a personal message # X-Forge-To: will replace To: after SMTP envelope is determined by ir.mail.server diff --git a/addons/point_of_sale/models/pos_order.py b/addons/point_of_sale/models/pos_order.py index 805763c4c5e..1c242f8d585 100644 --- a/addons/point_of_sale/models/pos_order.py +++ b/addons/point_of_sale/models/pos_order.py @@ -197,10 +197,14 @@ class PosOrder(models.Model): return InvoiceLine.sudo().create(inv_line) def _create_account_move_line(self, session=None, move=None): - def _flatten_tax_and_children(taxes): + def _flatten_tax_and_children(taxes, group_done=None): children = self.env['account.tax'] - for tax in taxes: - children |= _flatten_tax_and_children(tax.children_tax_ids) + if group_done is None: + group_done = set() + for tax in taxes.filtered(lambda t: t.amount_type == 'group'): + if tax.id not in group_done: + group_done.add(tax.id) + children |= _flatten_tax_and_children(tax.children_tax_ids, group_done) return taxes + children # Tricky, via the workflow, we only have one id in the ids variable diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js index 2d61f4b63a9..e64e12ffd38 100644 --- a/addons/point_of_sale/static/src/js/screens.js +++ b/addons/point_of_sale/static/src/js/screens.js @@ -1228,9 +1228,14 @@ var ClientListScreenWidget = ScreenWidget.extend({ self.saved_client_details(partner_id); },function(err,event){ event.preventDefault(); + var error_body = _t('Your Internet connection is probably down.'); + if (err.data) { + var except = err.data; + error_body = except.arguments && except.arguments[0] || except.message || error_body; + } self.gui.show_popup('error',{ 'title': _t('Error: Could not Save Changes'), - 'body': _t('Your Internet connection is probably down.'), + 'body': error_body, }); }); }, diff --git a/addons/stock/models/product.py b/addons/stock/models/product.py index c0094aea3c3..7adcdb992e0 100644 --- a/addons/stock/models/product.py +++ b/addons/stock/models/product.py @@ -371,8 +371,14 @@ class Product(models.Model): @api.multi def write(self, values): res = super(Product, self).write(values) - if 'active' in values and not values['active'] and self.mapped('orderpoint_ids').filtered(lambda r: r.active): - raise UserError(_('You still have some active reordering rules on this product. Please archive or delete them first.')) + if 'active' in values and not values['active']: + products = self.mapped('orderpoint_ids').filtered(lambda r: r.active).mapped('product_id') + if products: + msg = _('You still have some active reordering rules on this product. Please archive or delete them first.') + msg += '\n\n' + for product in products: + msg += '- %s \n' % product.display_name + raise UserError(msg) return res class ProductTemplate(models.Model):