[MERGE] forward port of branch 7.0 up to 3a1c693
This commit is contained in:
commit
47b2f7ea9e
|
@ -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(', '));
|
||||
|
|
|
@ -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 = []
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue