Hello Guys, I'm facing a challenge in sale order product matrix. At above you can see, I added two SelectMenu owl component. By which I can show and hide my table rows and columns. The actually facility also include adding a new variant too. I've give a screenshot below.
The New variant even added to the backend if I clicked the "Add New "XL" button. But it's not added/showing in the table. as because the dialog render the template for the first time only. If I just close the dialog and re-open it from the sale order line button it's also render the newly added variant too(for both, color and Size). Here is my patched code given below for creation of variants. I will love the help from you guys. This is the ProductmatrixDialog from product_matrix module.
patch(ProductMatrixDialog.prototype, {});onCreateColor(newValue){
this.orm.call('sale.order.upload.wizard','add_new_variant',[this.props.record.model.config.resId,this.props.product_template_id,'Color',newValue]).then((data) => { });
newValue = "New Color Added: " + newValue +".";
this.notificationService.add(_t(newValue), {
title: "Success",
type: "success"
});
},
onCreateSize(newValue){
this.orm.call('sale.order.upload.wizard','add_new_variant',[this.props.record.model.config.resId,this.props.product_template_id,'Size',newValue]).then((data) => {});
newValue = "New Size Added: " + newValue +".";
this.notificationService.add(_t(newValue), {
title: "Success",
type: "success"
});
this.props.close()
},