diff --git a/addons/point_of_sale/models/pos_session.py b/addons/point_of_sale/models/pos_session.py index 33be30f5450..c587c16f99c 100644 --- a/addons/point_of_sale/models/pos_session.py +++ b/addons/point_of_sale/models/pos_session.py @@ -2096,7 +2096,11 @@ class PosSession(models.Model): return partners def find_product_by_barcode(self, barcode): - product = self.env['product.product'].search([['barcode', '=', barcode], ['sale_ok', '=', True]]) + product = self.env['product.product'].search([ + ('barcode', '=', barcode), + ('sale_ok', '=', True), + ('available_in_pos', '=', True), + ]) if product: return {'product_id': [product.id]} diff --git a/addons/point_of_sale/static/src/app/screens/product_screen/product_screen.js b/addons/point_of_sale/static/src/app/screens/product_screen/product_screen.js index 69a1433db7a..4799edc2ec3 100644 --- a/addons/point_of_sale/static/src/app/screens/product_screen/product_screen.js +++ b/addons/point_of_sale/static/src/app/screens/product_screen/product_screen.js @@ -174,7 +174,7 @@ export class ProductScreen extends ControlButtonsMixin(Component) { [odoo.pos_session_id, code.base_code], ); if (product_id.length) { - await this.pos._addProducts(product_id); + await this.pos._addProducts(product_id, false); if (packaging.length) { this.pos.db.add_packagings(packaging); }