Skip to content
Permalink
Browse files

fixup! [IMP] stock, mrp, purchase_stock: RR check forecasted stock

  • Loading branch information
amoyaux committed Dec 2, 2019
1 parent a9c23e3 commit 44fcd29d11505a7c9fc419f6a0449025990ea3f8
Showing with 2 additions and 16 deletions.
  1. +2 −16 addons/stock/static/src/js/stock_orderpoint_lead_days_widget.js
@@ -12,9 +12,6 @@ var time = require('web.time');

var LeadDaysWidget = Widget.extend({
template: 'stock.leadDays',
events: _.extend({}, Widget.prototype.events, {
'click .fa-info-circle': '_onClickButton',
}),

/**
* @override
@@ -51,8 +48,8 @@ var LeadDaysWidget = Widget.extend({
*/
_setPopOver: function () {
this.data.lead_days_date = this.data.lead_days_date.add(this.getSession().getTZOffset(this.data.lead_days_date), 'minutes').format(time.getLangDateFormat());
this.data.today = new moment();
this.data.today = this.data.today.add(this.getSession().getTZOffset(this.data.today), 'minutes').format(time.getLangDateFormat());
var today = new moment();
this.data.today = today.add(this.getSession().getTZOffset(today), 'minutes').format(time.getLangDateFormat());
var $content = $(QWeb.render('stock.leadDaysPopOver', {
data: this.data,
}));
@@ -66,17 +63,6 @@ var LeadDaysWidget = Widget.extend({
};
this.$el.popover(options);
},

//--------------------------------------------------------------------------
// Handlers
//--------------------------------------------------------------------------

_onClickButton: function (ev) {
// We add the property special click on the widget link.
// This hack allows us to trigger the popover (see _setPopOver) without
// triggering the _onRowClicked that opens the order line form view.
this.$el.find('.fa-info-circle').prop('special_click', true);
},
});

widget_registry.add('lead_days_widget', LeadDaysWidget);

0 comments on commit 44fcd29

Please sign in to comment.
You can’t perform that action at this time.