Skip to content

Commit

Permalink
[RFT] pos_product_available
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Franco committed May 8, 2024
1 parent 99e5047 commit 99bfde6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
4 changes: 2 additions & 2 deletions pos_product_available/README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
================
===============================================
Point of Sale - Products Available for each POS
================
===============================================

Description
===========
Expand Down
2 changes: 1 addition & 1 deletion pos_product_available/models/product.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ class ProductTemplate(models.Model):
_description = "Point of Sale Visible Product"

pos_center_ids = fields.Many2many(
comodel_name="pos.config", string="POS Available", store=True
"pos.config", string="POS Available", store=True
)
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,9 @@ odoo.define("pos_product_available.ProductsWidget", function (require) {
products = this.env.pos.db.get_product_by_category(
this.selectedCategoryId
);
products.forEach(function (product) {
available_product_ids.forEach(function (product_available) {
if (product.product_tmpl_id == product_available) {
list.push(product);
}
});
});
list = products.filter(product =>
available_product_ids.includes(product.product_tmpl_id)
);
} else {
list = this.env.pos.db.get_product_by_category(
this.selectedCategoryId
Expand Down

0 comments on commit 99bfde6

Please sign in to comment.