[MERGE] forward port branch saas-14 up to 6773d3644e
This commit is contained in:
@@ -810,7 +810,7 @@
|
|||||||
<field name="inherit_id" ref="hr.view_employee_filter"/>
|
<field name="inherit_id" ref="hr.view_employee_filter"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//field[@name='department_id']" position="after">
|
<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>
|
</xpath>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|||||||
@@ -389,7 +389,7 @@ var ImageDialog = Widget.extend({
|
|||||||
$form.find('.well > span').remove();
|
$form.find('.well > span').remove();
|
||||||
$form.find('.well > div').show();
|
$form.find('.well > div').show();
|
||||||
_.each(attachments, function (record) {
|
_.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));
|
record.is_document = !(/gif|jpe|jpg|png/.test(record.mimetype));
|
||||||
});
|
});
|
||||||
if (error || !attachments.length) {
|
if (error || !attachments.length) {
|
||||||
@@ -446,7 +446,7 @@ var ImageDialog = Widget.extend({
|
|||||||
return (r.url || r.id);
|
return (r.url || r.id);
|
||||||
});
|
});
|
||||||
_.each(this.records, function (record) {
|
_.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));
|
record.is_document = !(/gif|jpe|jpg|png/.test(record.mimetype));
|
||||||
});
|
});
|
||||||
this.display_attachments();
|
this.display_attachments();
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ from lxml import etree, html
|
|||||||
import re
|
import re
|
||||||
import traceback
|
import traceback
|
||||||
from itertools import count
|
from itertools import count
|
||||||
|
from psycopg2.extensions import TransactionRollbackError
|
||||||
from textwrap import dedent
|
from textwrap import dedent
|
||||||
import werkzeug
|
import werkzeug
|
||||||
from werkzeug.utils import escape as _escape
|
from werkzeug.utils import escape as _escape
|
||||||
@@ -315,7 +316,7 @@ class QWeb(object):
|
|||||||
values = dict(self.default_values(), **values)
|
values = dict(self.default_values(), **values)
|
||||||
try:
|
try:
|
||||||
return compiled(self, append, values, options, log)
|
return compiled(self, append, values, options, log)
|
||||||
except QWebException, e:
|
except (QWebException, TransactionRollbackError) as e:
|
||||||
raise e
|
raise e
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
path = log['last_path_node']
|
path = log['last_path_node']
|
||||||
|
|||||||
Reference in New Issue
Block a user