diff --git a/addons/account_asset/views/account_asset_views.xml b/addons/account_asset/views/account_asset_views.xml
index 6689500c0ac..2c316483e38 100644
--- a/addons/account_asset/views/account_asset_views.xml
+++ b/addons/account_asset/views/account_asset_views.xml
@@ -133,7 +133,7 @@
-
+
diff --git a/addons/l10n_pl/data/account_tax_data.xml b/addons/l10n_pl/data/account_tax_data.xml
index a4fece19af2..5173dfde702 100644
--- a/addons/l10n_pl/data/account_tax_data.xml
+++ b/addons/l10n_pl/data/account_tax_data.xml
@@ -253,7 +253,7 @@
sale
-
+
diff --git a/addons/point_of_sale/i18n/point_of_sale.pot b/addons/point_of_sale/i18n/point_of_sale.pot
index 5e049ffd5ab..85d762fca2b 100644
--- a/addons/point_of_sale/i18n/point_of_sale.pot
+++ b/addons/point_of_sale/i18n/point_of_sale.pot
@@ -1315,6 +1315,13 @@ msgstr ""
msgid "Group Journal Items"
msgstr ""
+#. module: point_of_sale
+#. openerp-web
+#: code:addons/point_of_sale/static/src/js/models.js:135
+#, python-format
+msgid "HTTPS connection to IoT Box failed"
+msgstr ""
+
#. module: point_of_sale
#. openerp-web
#: code:addons/point_of_sale/static/src/xml/pos.xml:1327
@@ -1637,6 +1644,13 @@ msgstr ""
msgid "Make Payment"
msgstr ""
+#. module: point_of_sale
+#. openerp-web
+#: code:addons/point_of_sale/static/src/js/models.js:137
+#, python-format
+msgid "Make sure you are using IoT Box v18.12 or higher. Navigate to %s to accept the certificate of your IoT Box."
+msgstr ""
+
#. module: point_of_sale
#: model:res.groups,name:point_of_sale.group_pos_manager
msgid "Manager"
diff --git a/addons/point_of_sale/static/src/js/chrome.js b/addons/point_of_sale/static/src/js/chrome.js
index ee7e4d9d9de..3c2bf4519a1 100644
--- a/addons/point_of_sale/static/src/js/chrome.js
+++ b/addons/point_of_sale/static/src/js/chrome.js
@@ -630,9 +630,6 @@ var Chrome = PosBaseWidget.extend({
if(err.message === 'XmlHttpRequestError '){
title = 'Network Failure (XmlHttpRequestError)';
body = 'The Point of Sale could not be loaded due to a network problem.\n Please check your internet connection.';
- }else if(err.message === 'TLSError'){
- title = 'Https connection to IoT Box failed';
- body = 'Make sure you are using IoT Box v18.10 or higher.\n\n Navigate to ' + err.url + ' to accept the certificate of your IoT Box.';
}else if(err.code === 200){
title = err.data.message;
body = err.data.debug;
diff --git a/addons/point_of_sale/static/src/js/models.js b/addons/point_of_sale/static/src/js/models.js
index 2fe1efe8bfa..5e00712be0d 100644
--- a/addons/point_of_sale/static/src/js/models.js
+++ b/addons/point_of_sale/static/src/js/models.js
@@ -129,11 +129,16 @@ exports.PosModel = Backbone.Model.extend({
done.resolve();
},
function(statusText, url){
- if (statusText == 'error' && window.location.protocol == 'https:') {
- var error = {message: 'TLSError', url: url};
- self.chrome.loading_error(error);
- } else {
- done.resolve();
+ var show_loading_error = (self.gui.current_screen === null);
+ done.resolve();
+ if (show_loading_error && statusText == 'error' && window.location.protocol == 'https:') {
+ self.gui.show_popup('alert', {
+ title: _t('HTTPS connection to IoT Box failed'),
+ body: _.str.sprintf(
+ _t('Make sure you are using IoT Box v18.12 or higher. Navigate to %s to accept the certificate of your IoT Box.'),
+ url
+ ),
+ });
}
});
return done;
diff --git a/addons/product/models/product.py b/addons/product/models/product.py
index 9d3d8d86b58..00e9d5522bf 100644
--- a/addons/product/models/product.py
+++ b/addons/product/models/product.py
@@ -10,6 +10,7 @@ from odoo.osv import expression
import odoo.addons.decimal_precision as dp
+
class ProductCategory(models.Model):
_name = "product.category"
_description = "Product Category"
@@ -520,7 +521,10 @@ class ProductProduct(models.Model):
if date is None:
date = fields.Date.today()
res = self.env['product.supplierinfo']
- for seller in self.seller_ids:
+ sellers = self.seller_ids
+ if self.env.context.get('force_company'):
+ sellers = sellers.filtered(lambda s: not s.company_id or s.company_id.id == self.env.context['force_company'])
+ for seller in sellers:
# Set quantity in UoM of seller
quantity_uom_seller = quantity
if quantity_uom_seller and uom_id and uom_id != seller.product_uom:
diff --git a/addons/purchase/models/purchase.py b/addons/purchase/models/purchase.py
index f2c807ec9b8..e2d3562950c 100644
--- a/addons/purchase/models/purchase.py
+++ b/addons/purchase/models/purchase.py
@@ -956,7 +956,7 @@ class ProcurementOrder(models.Model):
Purchase Order created to satisfy the given procurement. """
self.ensure_one()
- seller = self.product_id._select_seller(
+ seller = self.product_id.with_context(force_company=self.company_id.id)._select_seller(
partner_id=partner,
quantity=self.product_qty,
date=fields.Date.to_string(schedule_date),
@@ -969,7 +969,7 @@ class ProcurementOrder(models.Model):
self.ensure_one()
procurement_uom_po_qty = self.product_uom._compute_quantity(self.product_qty, self.product_id.uom_po_id)
- seller = self.product_id._select_seller(
+ seller = self.product_id.with_context(force_company=self.company_id.id)._select_seller(
partner_id=supplier.name,
quantity=procurement_uom_po_qty,
date=po.date_order and po.date_order[:10],
diff --git a/addons/web_editor/static/src/js/widgets.js b/addons/web_editor/static/src/js/widgets.js
index 25b2385222f..a9f7538a036 100644
--- a/addons/web_editor/static/src/js/widgets.js
+++ b/addons/web_editor/static/src/js/widgets.js
@@ -768,7 +768,7 @@ function createVideoNode(url, options) {
options = options || {};
// video url patterns(youtube, instagram, vimeo, dailymotion, youku)
- var ytRegExp = /^(?:(?:https?:)?\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((\w|-){11})(?:\S+)?$/;
+ var ytRegExp = /^(?:(?:https?:)?\/\/)?(?:www\.)?(?:youtu\.be\/|youtube(-nocookie)?\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=))((?:\w|-){11})(?:\S+)?$/;
var ytMatch = url.match(ytRegExp);
var igRegExp = /\/\/instagram.com\/p\/(.[a-zA-Z0-9]*)/;
@@ -787,10 +787,10 @@ function createVideoNode(url, options) {
var youkuMatch = url.match(youkuRegExp);
var $video = $('