summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2015-12-08 12:16:00 +0100
committerChristophe Simonis <chs@odoo.com>2015-12-08 12:16:00 +0100
commit47b2f7ea9ed082d2bd8ce4e1a9fb331d864b0f5a (patch)
tree935dcd36e57ce4b2c06a631727689aecbec828d3
parent1660daf2fb19c5a99bb4e8df05c5bf7721e45cf8 (diff)
parent3a1c693259a26e42479c1d403446899c88c20d55 (diff)
[MERGE] forward port of branch 7.0 up to 3a1c693
-rw-r--r--addons/web/static/src/js/view_list.js2
-rw-r--r--openerp/osv/expression.py5
-rw-r--r--openerp/tools/mail.py2
3 files changed, 5 insertions, 4 deletions
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: