[MERGE] forward port branch 10.0 up to 1d0940d96f

This commit is contained in:
Christophe Simonis
2018-09-05 17:27:13 +02:00
3 changed files with 5 additions and 4 deletions
@@ -810,7 +810,7 @@
<field name="inherit_id" ref="hr.view_employee_filter"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='department_id']" position="after">
<filter name="newly_hired_employee" string="New Hired" domain="[('newly_hired_employee', '=', True)]"/>
<filter name="newly_hired_employee" string="New Hired" domain="[('newly_hired_employee', '=', True)]" groups="hr_recruitment.group_hr_recruitment_user"/>
</xpath>
</field>
</record>
+2 -2
View File
@@ -390,7 +390,7 @@ var ImageDialog = Widget.extend({
$form.find('.well > span').remove();
$form.find('.well > div').show();
_.each(attachments, function (record) {
record.src = record.url || '/web/image/' + record.id;
record.src = record.url || _.str.sprintf('/web/image/%s/%s', record.id, encodeURI(record.name)); // Name is added for SEO purposes
record.is_document = !(/gif|jpe|jpg|png/.test(record.mimetype));
});
if (error || !attachments.length) {
@@ -447,7 +447,7 @@ var ImageDialog = Widget.extend({
return (r.url || r.id);
});
_.each(this.records, function (record) {
record.src = record.url || '/web/image/' + record.id;
record.src = record.url || _.str.sprintf('/web/image/%s/%s', record.id, encodeURI(record.name)); // Name is added for SEO purposes
record.is_document = !(/gif|jpe|jpg|png/.test(record.mimetype));
});
this.display_attachments();
+2 -1
View File
@@ -5,6 +5,7 @@ from lxml import etree, html
import re
import traceback
from itertools import count
from psycopg2.extensions import TransactionRollbackError
from textwrap import dedent
import werkzeug
from werkzeug.utils import escape as _escape
@@ -315,7 +316,7 @@ class QWeb(object):
values = dict(self.default_values(), **values)
try:
return compiled(self, append, values, options, log)
except QWebException, e:
except (QWebException, TransactionRollbackError) as e:
raise e
except Exception, e:
path = log['last_path_node']