[MERGE] forward port branch 9.0 up to 6d2bf44fee
This commit is contained in:
@@ -567,7 +567,7 @@ class AccountTaxGroup(models.Model):
|
||||
class AccountTax(models.Model):
|
||||
_name = 'account.tax'
|
||||
_description = 'Tax'
|
||||
_order = 'sequence'
|
||||
_order = 'sequence,id'
|
||||
|
||||
@api.model
|
||||
def _default_tax_group(self):
|
||||
|
||||
@@ -1358,6 +1358,8 @@ class MailThread(models.AbstractModel):
|
||||
mail module, and should not contain security or generic html cleaning.
|
||||
Indeed those aspects should be covered by the html_sanitize method
|
||||
located in tools. """
|
||||
if not body:
|
||||
return body, attachments
|
||||
root = lxml.html.fromstring(body)
|
||||
postprocessed = False
|
||||
to_remove = []
|
||||
@@ -1392,7 +1394,7 @@ class MailThread(models.AbstractModel):
|
||||
# Content-Type: multipart/related;
|
||||
# boundary="_004_3f1e4da175f349248b8d43cdeb9866f1AMSPR06MB343eurprd06pro_";
|
||||
# type="text/html"
|
||||
if not message.is_multipart() or message.get('content-type', '').startswith("text/"):
|
||||
if message.get_content_maintype() == 'text':
|
||||
encoding = message.get_content_charset()
|
||||
body = message.get_payload(decode=True)
|
||||
body = tools.ustr(body, encoding, errors='replace')
|
||||
|
||||
@@ -176,6 +176,19 @@ Content-Type: text/html;
|
||||
--Apple-Mail=_9331E12B-8BD2-4EC7-B53E-01F3FBEC9227--
|
||||
"""
|
||||
|
||||
MAIL_SINGLE_BINARY = """X-Original-To: raoul@grosbedon.fr
|
||||
Delivered-To: raoul@grosbedon.fr
|
||||
Received: by mail1.grosbedon.com (Postfix, from userid 10002)
|
||||
id E8166BFACA; Fri, 23 Aug 2013 13:18:01 +0200 (CEST)
|
||||
From: "Bruce Wayne" <bruce@wayneenterprises.com>
|
||||
Content-Type: application/pdf;
|
||||
Content-Disposition: filename=thetruth.pdf
|
||||
Content-Transfer-Encoding: base64
|
||||
Message-Id: <6BB1FAB2-2104-438E-9447-07AE2C8C4A92@sexample.com>
|
||||
Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\))
|
||||
|
||||
SSBhbSB0aGUgQmF0TWFuCg=="""
|
||||
|
||||
|
||||
MAIL_MULTIPART_IMAGE = """X-Original-To: raoul@example.com
|
||||
Delivered-To: micheline@example.com
|
||||
@@ -348,6 +361,10 @@ class TestMailgateway(TestMail):
|
||||
res.get('body', ''),
|
||||
'message_parse: second part of the html version should be in body after parsing multipart/mixed')
|
||||
|
||||
res = self.env['mail.thread'].message_parse(MAIL_SINGLE_BINARY)
|
||||
self.assertEqual(res['body'], '')
|
||||
self.assertEqual(res['attachments'][0][0], 'thetruth.pdf')
|
||||
|
||||
@mute_logger('odoo.addons.mail.models.mail_thread')
|
||||
def test_message_process_cid(self):
|
||||
new_groups = self.format_and_process(MAIL_MULTIPART_IMAGE, subject='My Frogs', to='groups@example.com')
|
||||
|
||||
@@ -1054,10 +1054,10 @@ var ClientListScreenWidget = ScreenWidget.extend({
|
||||
this.$('.searchbox input').on('keypress',function(event){
|
||||
clearTimeout(search_timeout);
|
||||
|
||||
var query = this.value;
|
||||
var searchbox = this;
|
||||
|
||||
search_timeout = setTimeout(function(){
|
||||
self.perform_search(query,event.which === 13);
|
||||
self.perform_search(searchbox.value, event.which === 13);
|
||||
},70);
|
||||
});
|
||||
|
||||
|
||||
@@ -17,8 +17,7 @@ export DEBIAN_FRONTEND=noninteractive
|
||||
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
|
||||
|
||||
|
||||
apt-get update
|
||||
apt-get -y dist-upgrade
|
||||
apt-get update && apt-get -y upgrade
|
||||
# Do not be too fast to upgrade to more recent firmware and kernel than 4.38
|
||||
# Firmware 4.44 seems to prevent the LED mechanism from working
|
||||
|
||||
@@ -39,6 +38,8 @@ rm -rf /usr/share/doc
|
||||
pip install pyusb==1.0.0b1
|
||||
pip install qrcode
|
||||
pip install evdev
|
||||
pip install simplejson
|
||||
pip install unittest2
|
||||
|
||||
# --upgrade because websocket_client in wheezy is bad:
|
||||
# https://github.com/docker/compose/issues/1288
|
||||
@@ -53,7 +54,6 @@ sudo -u postgres createuser -s pi
|
||||
mkdir /var/log/odoo
|
||||
chown pi:pi /var/log/odoo
|
||||
chown pi:pi -R /home/pi/odoo/
|
||||
chmod 770 -R /home/pi/odoo/
|
||||
|
||||
# logrotate is very picky when it comes to file permissions
|
||||
chown -R root:root /etc/logrotate.d/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
wget 'https://downloads.raspberrypi.org/raspbian_lite_latest' -O raspbian.img.zip
|
||||
wget 'http://downloads.raspberrypi.org/raspbian_lite/images/raspbian_lite-2017-07-05/2017-07-05-raspbian-jessie-lite.zip' -O raspbian.img.zip
|
||||
unzip raspbian.img.zip
|
||||
wget 'https://github.com/dhruvvyas90/qemu-rpi-kernel/raw/master/kernel-qemu-4.4.13-jessie' -O kernel-qemu
|
||||
|
||||
@@ -67,7 +67,8 @@ return Widget.extend({
|
||||
values = [];
|
||||
if (this.groupbys.length === 1) data_pt.value = [data_pt.value];
|
||||
for (j = 0; j < data_pt.value.length; j++) {
|
||||
values[j] = this.sanitize_value(data_pt.value[j], data_pt.grouped_on[j]);
|
||||
var field = _.isArray(data_pt.grouped_on) ? data_pt.grouped_on[j] : data_pt.grouped_on;
|
||||
values[j] = this.sanitize_value(data_pt.value[j], field);
|
||||
}
|
||||
value = is_count ? data_pt.length : data_pt.aggregates[this.measure];
|
||||
this.data.push({
|
||||
|
||||
@@ -122,7 +122,11 @@ animation.registry.share = animation.Class.extend({
|
||||
animation.registry.media_video = animation.Class.extend({
|
||||
selector: ".media_iframe_video",
|
||||
start: function () {
|
||||
if (!this.$target.has('> iframe').length) {
|
||||
// TODO: this code should be refactored to make more sense and be better
|
||||
// integrated with Odoo (this refactoring should be done in master).
|
||||
this.$target.find('iframe').remove();
|
||||
|
||||
if (!this.$target.has('.media_iframe_video_size').length) {
|
||||
var editor = '<div class="css_editable_mode_display"> </div>';
|
||||
var size = '<div class="media_iframe_video_size"> </div>';
|
||||
this.$target.html(editor+size);
|
||||
|
||||
@@ -470,7 +470,7 @@
|
||||
<h4 class="modal-title" id="myModalLabel"><strong>Attendees</strong></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="">
|
||||
<div class="container">
|
||||
<t t-set="counter_type" t-value="1"/>
|
||||
<t t-set="counter" t-value="0"/>
|
||||
<t t-foreach="tickets" t-as="ticket">
|
||||
|
||||
Reference in New Issue
Block a user