Skip to content

Commit

Permalink
[FIX]stock_ux: fix estuctura forecasted_buttons
Browse files Browse the repository at this point in the history
closes #476

Signed-off-by: mem-adhoc <mem@adhoc.com.ar>
  • Loading branch information
jcadhoc committed Apr 25, 2024
1 parent 2a1d50b commit f17a555
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions stock_ux/static/src/forecasted_buttons.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/** @odoo-module **/
import { ForecastedButtons } from "@stock/stock_forecasted/forecasted_buttons";
import { patch } from '@web/core/utils/patch';
import { onWillStart } from "@odoo/owl";

const { onWillStart } = owl;

patch(ForecastedButtons.prototype, 'stock_ux.ForecastedButtons',{
setup() {
this._super.apply();
onWillStart(async () =>{
patch(ForecastedButtons.prototype, {
after() {
this._super.apply(this, arguments); // Llama al método original
onWillStart(async () => {
this.context = this.props.action.context;
this.productId = this.context.active_id;
this.resModel = this.props.resModel || 'product.template';
Expand Down

0 comments on commit f17a555

Please sign in to comment.