diff --git a/addons/board/controllers.py b/addons/board/controllers.py
index 6eb0890ea46..f0486f59736 100644
--- a/addons/board/controllers.py
+++ b/addons/board/controllers.py
@@ -13,7 +13,7 @@ class Board(Controller):
# Retrieve the 'My Dashboard' action from its xmlid
action = request.env['ir.model.data'].get_object('board', 'open_board_my_dash_action')
- if action and action['res_model'] == 'board.board' and action['views'][0][1] == 'form':
+ if action and action['res_model'] == 'board.board' and action['views'][0][1] == 'form' and action_id:
# Maybe should check the content instead of model board.board ?
view_id = action['views'][0][0]
board = request.env[action['res_model']].fields_view_get(view_id, 'form')
diff --git a/addons/board/static/src/js/dashboard.js b/addons/board/static/src/js/dashboard.js
index a743cb6562f..3cd376893c4 100644
--- a/addons/board/static/src/js/dashboard.js
+++ b/addons/board/static/src/js/dashboard.js
@@ -409,7 +409,7 @@ FavoriteMenu.include({
name = self.$add_dashboard_input.val();
return self.rpc('/board/add_to_dashboard', {
- action_id: self.action_id,
+ action_id: self.action_id || false,
context_to_save: c,
domain: d,
view_mode: self.view_manager.active_view.type,
diff --git a/addons/stock_account/wizard/stock_valuation_history.py b/addons/stock_account/wizard/stock_valuation_history.py
index 65169c6dc13..de07661f6cc 100644
--- a/addons/stock_account/wizard/stock_valuation_history.py
+++ b/addons/stock_account/wizard/stock_valuation_history.py
@@ -26,15 +26,22 @@ class wizard_valuation_history(osv.osv_memory):
ctx['history_date'] = data['date']
ctx['search_default_group_by_product'] = True
ctx['search_default_group_by_location'] = True
- return {
- 'domain': "[('date', '<=', '" + data['date'] + "')]",
- 'name': _('Stock Value At Date'),
- 'view_type': 'form',
- 'view_mode': 'tree',
- 'res_model': 'stock.history',
- 'type': 'ir.actions.act_window',
- 'context': ctx,
- }
+
+ action = self.pool.get('ir.model.data').xmlid_to_object(cr, uid, 'stock_account.action_stock_history', context=context)
+ if not action:
+ action = {
+ 'view_type': 'form',
+ 'view_mode': 'tree,graph,pivot',
+ 'res_model': 'stock.history',
+ 'type': 'ir.actions.act_window',
+ }
+ else:
+ action = action[0].read()[0]
+
+ action['domain'] = "[('date', '<=', '" + data['date'] + "')]"
+ action['name'] = _('Stock Value At Date')
+ action['context'] = ctx
+ return action
class stock_history(osv.osv):
diff --git a/addons/stock_account/wizard/stock_valuation_history_view.xml b/addons/stock_account/wizard/stock_valuation_history_view.xml
index 4955e193e9d..a67c0e37ef9 100644
--- a/addons/stock_account/wizard/stock_valuation_history_view.xml
+++ b/addons/stock_account/wizard/stock_valuation_history_view.xml
@@ -92,6 +92,11 @@
+
+ Stock History
+ stock.history
+ form
+ tree,graph,pivot
+
-
diff --git a/addons/web/static/src/js/framework/formats.js b/addons/web/static/src/js/framework/formats.js
index 90cecd5398d..bddc40f424d 100644
--- a/addons/web/static/src/js/framework/formats.js
+++ b/addons/web/static/src/js/framework/formats.js
@@ -161,26 +161,30 @@ function parse_value (value, descriptor, value_if_empty) {
return parse_value(value, {type: "float"});
case 'datetime':
var datetime = moment(value, [date_pattern + ' ' + time_pattern, date_pattern_wo_zero + ' ' + time_pattern_wo_zero, moment.ISO_8601], true);
- if (datetime.isValid())
+ if (datetime.isValid() && datetime.year() >= 1900)
return time.datetime_to_str(datetime.toDate());
datetime = moment(value, [date_pattern + ' ' + time_pattern, date_pattern_wo_zero + ' ' + time_pattern_wo_zero, moment.ISO_8601]);
if (datetime.isValid()) {
if (datetime.year() === 0) {
datetime.year(moment.utc().year());
}
- return time.datetime_to_str(datetime.toDate());
+ if (datetime.year() >= 1900) {
+ return time.datetime_to_str(datetime.toDate());
+ }
}
throw new Error(_.str.sprintf(_t("'%s' is not a correct datetime"), value));
case 'date':
var date = moment(value, [date_pattern, date_pattern_wo_zero, moment.ISO_8601], true);
- if (date.isValid())
+ if (date.isValid() && date.year() >= 1900)
return time.date_to_str(date.toDate());
date = moment(value, [date_pattern, date_pattern_wo_zero, moment.ISO_8601]);
if (date.isValid()) {
if (date.year() === 0) {
date.year(moment.utc().year());
}
- return time.date_to_str(date.toDate());
+ if (date.year() >= 1900) {
+ return time.date_to_str(date.toDate());
+ }
}
throw new Error(_.str.sprintf(_t("'%s' is not a correct date"), value));
case 'time':
diff --git a/addons/web/static/src/js/views/form_relational_widgets.js b/addons/web/static/src/js/views/form_relational_widgets.js
index 1a3f9e6a1cc..9a24eef6ae5 100644
--- a/addons/web/static/src/js/views/form_relational_widgets.js
+++ b/addons/web/static/src/js/views/form_relational_widgets.js
@@ -1061,8 +1061,10 @@ var One2ManyListView = X2ManyListView.extend({
this._dataset_changed = false;
});
- this.on('warning', this, function(e) { // In case of a one2many, we do not want any warning which comes from the editor
- e.stop_propagation();
+ this.on('warning', this, function(e) { // In case of editable list view, we do not want any warning which comes from the editor
+ if (this.editable()) {
+ e.stop_propagation();
+ }
});
},
do_add_record: function () {
diff --git a/addons/website_customer/controllers/main.py b/addons/website_customer/controllers/main.py
index d5a0dc1052c..a2cfe416458 100644
--- a/addons/website_customer/controllers/main.py
+++ b/addons/website_customer/controllers/main.py
@@ -42,7 +42,7 @@ class WebsiteCustomer(http.Controller):
if tag_id:
tag_id = unslug(tag_id)[1] or 0
- domain += [('tag_ids', 'in', tag_id)]
+ domain += [('website_tag_ids', 'in', tag_id)]
# group by country, based on customers found with the search(domain)
countries = partner_obj.read_group(
diff --git a/addons/website_sale/static/src/js/website_sale.js b/addons/website_sale/static/src/js/website_sale.js
index 094185c91da..894849244d5 100644
--- a/addons/website_sale/static/src/js/website_sale.js
+++ b/addons/website_sale/static/src/js/website_sale.js
@@ -255,7 +255,7 @@ $('.oe_website_sale').each(function () {
var precision = 2;
if ($(".decimal_precision").length) {
- precision = parseInt($(".decimal_precision").first().data('precision'));
+ precision = parseInt($(".decimal_precision").last().data('precision'));
}
var formatted = _.str.sprintf('%.' + precision + 'f', price).split('.');
formatted[0] = utils.insert_thousand_seps(formatted[0]);
diff --git a/addons/website_sale/views/templates.xml b/addons/website_sale/views/templates.xml
index d61c514bb89..ac73d9d8b4b 100644
--- a/addons/website_sale/views/templates.xml
+++ b/addons/website_sale/views/templates.xml
@@ -422,8 +422,7 @@
-
+