summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2015-09-23 14:34:26 +0200
committerChristophe Simonis <chs@odoo.com>2015-09-23 14:34:26 +0200
commit57168a9e90066ed6b3d274d5032a20bef342a00f (patch)
treee6af71b6199d1e4bbd808580285242ceb4afde77 /addons/web/static/src
parent2bbf3c516df41842302c10326fd6bcd14168a89d (diff)
parenta669433326430caab705ede8d48eecda16d3ee10 (diff)
[MERGE] forward port of branch saas-6 up to a669433
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/views/pivot_view.js2
-rw-r--r--addons/web/static/src/js/widgets/date_picker.js10
2 files changed, 9 insertions, 3 deletions
diff --git a/addons/web/static/src/js/views/pivot_view.js b/addons/web/static/src/js/views/pivot_view.js
index 1357f8ab278..e6fff652026 100644
--- a/addons/web/static/src/js/views/pivot_view.js
+++ b/addons/web/static/src/js/views/pivot_view.js
@@ -617,7 +617,7 @@ var PivotView = View.extend({
display_total = this.main_col.width > 1;
var groupby_labels = _.map(this.main_row.groupbys, function (gb) {
- return self.groupable_fields[gb.split(':')[0]].string;
+ return self.fields[gb.split(':')[0]].string;
});
var measure_types = this.active_measures.map(function (name) {
return self.measures[name].type;
diff --git a/addons/web/static/src/js/widgets/date_picker.js b/addons/web/static/src/js/widgets/date_picker.js
index 17436831d6d..d8d2b131516 100644
--- a/addons/web/static/src/js/widgets/date_picker.js
+++ b/addons/web/static/src/js/widgets/date_picker.js
@@ -84,12 +84,18 @@ var DateTimeWidget = Widget.extend({
set_datetime_default: function(){
//when opening datetimepicker the date and time by default should be the one from
//the input field if any or the current day otherwise
- if (this.type_of_date === 'datetime') {
+ if (_.contains(['datetime', 'date'], this.type_of_date)) {
var value = moment().second(0);
if (this.$input.val().length !== 0 && this.is_valid_()){
value = this.$input.val();
}
- this.$('.oe_datepicker_main').data('DateTimePicker').setValue(value);
+ var dt = this.$('.oe_datepicker_main').data('DateTimePicker');
+ // temporarily set pickTime to true to bypass datetimepicker hiding on setValue
+ // see https://github.com/Eonasdan/bootstrap-datetimepicker/issues/603
+ var saved_picktime = dt.options.pickTime;
+ dt.options.pickTime = true;
+ dt.setValue(value);
+ dt.options.pickTime = saved_picktime;
}
},
change_datetime: function(e) {