Skip to content

Commit

Permalink
Merge PR OCA#749 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by legalsylvain
  • Loading branch information
OCA-git-bot committed Apr 16, 2022
2 parents b7d9e9d + 35e9162 commit 09b8a83
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions pos_reset_search/static/src/js/ProductScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,24 @@ odoo.define("pos_reset_search.ProductScreen", function (require) {
class extends ProductScreen {
async _clickProduct(event) {
const ProductScreenChildren = this.__owl__.children;

const ProductWidget = ProductScreenChildren.find(
(child) => child.el.className === "products-widget"
);
var ProductWidget = null;
for (const key in ProductScreenChildren) {
if (ProductScreenChildren[key].el.className === "products-widget") {
ProductWidget = ProductScreenChildren[key];
}
}
if (ProductWidget) {
const ProductWidgetChildren = ProductWidget.__owl__.children;

const ProductsWidgetControlPanel = ProductWidgetChildren.find(
(child) => child.el.className === "products-widget-control"
);
var ProductsWidgetControlPanel = null;
for (const key in ProductWidgetChildren) {
if (
ProductWidgetChildren[key].el.className ===
"products-widget-control"
) {
ProductWidget = ProductWidgetChildren[key];
}
}
if (ProductsWidgetControlPanel) {
ProductsWidgetControlPanel.clearSearch();
}
Expand Down

0 comments on commit 09b8a83

Please sign in to comment.