diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index da377b7f796..07340dab2ab 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -1114,7 +1114,7 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web. ids = value; } new instance.web.Model(column.relation) - .call('name_get', [ids, this.dataset.context]).done(function (names) { + .call('name_get', [ids, this.dataset.get_context()]).done(function (names) { // FIXME: nth horrible hack in this poor listview record.set(column.id + '__display', _(names).pluck(1).join(', ')); diff --git a/openerp/osv/expression.py b/openerp/osv/expression.py index b01f3ad8826..1f4de9c1012 100644 --- a/openerp/osv/expression.py +++ b/openerp/osv/expression.py @@ -1150,7 +1150,7 @@ class expression(object): else: # Must not happen raise ValueError("Invalid domain term %r" % (leaf,)) - elif right == False and (left in model._columns) and model._columns[left]._type == "boolean" and (operator == '='): + elif (left in model._columns) and model._columns[left]._type == "boolean" and ((operator == '=' and right is False) or (operator == '!=' and right is True)): query = '(%s."%s" IS NULL or %s."%s" = false )' % (table_alias, left, table_alias, left) params = [] @@ -1158,7 +1158,8 @@ class expression(object): query = '%s."%s" IS NULL ' % (table_alias, left) params = [] - elif right == False and (left in model._columns) and model._columns[left]._type == "boolean" and (operator == '!='): + elif (left in model._columns) and model._columns[left]._type == "boolean" and ((operator == '!=' and right is False) or (operator == '==' and right is True)): + query = '(%s."%s" IS NOT NULL and %s."%s" != false)' % (table_alias, left, table_alias, left) params = [] diff --git a/openerp/tools/mail.py b/openerp/tools/mail.py index d793de3089b..c8adb4e9585 100644 --- a/openerp/tools/mail.py +++ b/openerp/tools/mail.py @@ -318,7 +318,7 @@ def html_email_clean(html, remove=False, shorten=False, max_length=300, expand_o root = lxml.html.fromstring(html) quote_tags = re.compile(r'(\n(>)+[^\n\r]*)') - signature = re.compile(r'([-]{2,}[\s]?[\r\n]{1,2}[\s\S]+)') + signature = re.compile(r'(^[-]{2,}[\s]?[\r\n]{1,2}[\s\S]+)', re.M) for node in root.iter(): # remove all tails and replace them by a span element, because managing text and tails can be a pain in the ass if node.tail: