diff --git a/addons/product/report/product_pricelist.py b/addons/product/report/product_pricelist.py
index e6ccde44d8e..abdb705c529 100644
--- a/addons/product/report/product_pricelist.py
+++ b/addons/product/report/product_pricelist.py
@@ -28,7 +28,8 @@ class report_product_pricelist(models.AbstractModel):
}
def _get_quantity(self, data):
- return sorted([data['form'][key] for key in data['form'] if key.startswith('qty') and data['form'][key]])
+ form = data and data.get('form') or {}
+ return sorted([form[key] for key in form if key.startswith('qty') and form[key]])
def _get_categories(self, pricelist, products, quantities):
categ_data = []
diff --git a/addons/website_sale_comparison/static/src/js/website_sale_comparison.js b/addons/website_sale_comparison/static/src/js/website_sale_comparison.js
index a52d548cb77..45b2b60d8e6 100644
--- a/addons/website_sale_comparison/static/src/js/website_sale_comparison.js
+++ b/addons/website_sale_comparison/static/src/js/website_sale_comparison.js
@@ -1,6 +1,7 @@
odoo.define('website_sale_comparison.comparison', function (require) {
'use strict';
+var concurrency = require('web.concurrency');
var core = require('web.core');
var utils = require('web.utils');
var Widget = require('web.Widget');
@@ -31,6 +32,7 @@ var ProductComparison = Widget.extend(ProductConfiguratorMixin, {
this.product_data = {};
this.comparelist_product_ids = JSON.parse(utils.get_cookie('comparelist_product_ids') || '[]');
this.product_compare_limit = 4;
+ this.guard = new concurrency.Mutex();
},
/**
* @override
@@ -157,6 +159,9 @@ var ProductComparison = Widget.extend(ProductConfiguratorMixin, {
* @private
*/
_addNewProducts: function (product_id) {
+ this.guard.exec(this._addNewProductsImpl.bind(this, product_id));
+ },
+ _addNewProductsImpl: function (product_id) {
var self = this;
$('.o_product_feature_panel').addClass('d-md-block');
if (!_.contains(self.comparelist_product_ids, product_id)) {
@@ -164,8 +169,9 @@ var ProductComparison = Widget.extend(ProductConfiguratorMixin, {
if (_.has(self.product_data, product_id)){
self._updateContent();
} else {
- self._loadProducts([product_id]).then(function () {
+ return self._loadProducts([product_id]).then(function () {
self._updateContent();
+ self._updateCookie();
});
}
}
@@ -192,6 +198,9 @@ var ProductComparison = Widget.extend(ProductConfiguratorMixin, {
* @private
*/
_removeFromComparelist: function (e) {
+ this.guard.exec(this._removeFromComparelistImpl.bind(this, e));
+ },
+ _removeFromComparelistImpl: function (e) {
this.comparelist_product_ids = _.without(this.comparelist_product_ids, $(e.currentTarget).data('product_product_id'));
$(e.currentTarget).parents('.o_product_row').remove();
this._updateCookie();
diff --git a/odoo/addons/base/data/res_currency_data.xml b/odoo/addons/base/data/res_currency_data.xml
index 02e933c3f40..3ff94812022 100644
--- a/odoo/addons/base/data/res_currency_data.xml
+++ b/odoo/addons/base/data/res_currency_data.xml
@@ -222,6 +222,7 @@
¥
1.00
+ before
Yen
Cen
diff --git a/odoo/addons/base/models/ir_actions.py b/odoo/addons/base/models/ir_actions.py
index 6d84e6f1381..d67a1098a51 100644
--- a/odoo/addons/base/models/ir_actions.py
+++ b/odoo/addons/base/models/ir_actions.py
@@ -248,7 +248,10 @@ class IrActionsActWindow(models.Model):
existing = self.filtered(lambda rec: rec.id in ids)
if len(existing) < len(self):
# mark missing records in cache with a failed value
- exc = MissingError(_("Record does not exist or has been deleted."))
+ exc = MissingError(
+ _("Record does not exist or has been deleted.")
+ + '\n\n({} {}, {} {})'.format(_('Records:'), (self - existing).ids[:6], _('User:'), self._uid)
+ )
for record in (self - existing):
record._cache.set_failed(self._fields, exc)
return existing
diff --git a/odoo/addons/base/models/ir_model.py b/odoo/addons/base/models/ir_model.py
index bac517908a5..a7c66ae773d 100644
--- a/odoo/addons/base/models/ir_model.py
+++ b/odoo/addons/base/models/ir_model.py
@@ -1267,6 +1267,7 @@ class IrModelAccess(models.Model):
else:
msg_tail = _("Please contact your system administrator if you think this is an error.") + "\n\n(" + _("Document model") + ": %s)"
msg_params = (model,)
+ msg_tail += ' - ({} {}, {} {})'.format(_('Operation:'), mode, _('User:'), self._uid)
_logger.info('Access Denied by ACLs for operation: %s, uid: %s, model: %s', mode, self._uid, model)
msg = '%s %s' % (msg_heads[mode], msg_tail)
raise AccessError(msg % msg_params)