After Width: | Height: | Size: 138 KiB |
After Width: | Height: | Size: 138 KiB |
After Width: | Height: | Size: 155 KiB |
After Width: | Height: | Size: 158 KiB |
After Width: | Height: | Size: 158 KiB |
After Width: | Height: | Size: 172 KiB |
After Width: | Height: | Size: 155 KiB |
After Width: | Height: | Size: 189 KiB |
After Width: | Height: | Size: 155 KiB |
Before Width: | Height: | Size: 257 KiB After Width: | Height: | Size: 316 KiB |
Before Width: | Height: | Size: 105 KiB |
Before Width: | Height: | Size: 140 KiB |
Before Width: | Height: | Size: 159 KiB |
Before Width: | Height: | Size: 161 KiB |
Before Width: | Height: | Size: 161 KiB |
Before Width: | Height: | Size: 177 KiB |
Before Width: | Height: | Size: 172 KiB |
Before Width: | Height: | Size: 184 KiB |
Before Width: | Height: | Size: 158 KiB |
@ -1,24 +0,0 @@ |
|||
odoo.define('point_of_sale.ProductsWidgetSimple', function (require) { |
|||
'use strict'; |
|||
const Registries = require('point_of_sale.Registries'); |
|||
const ProductsWidget = require('point_of_sale.ProductsWidget'); |
|||
const ProductsWidgetSimple = (ProductsWidget) => |
|||
class extends ProductsWidget { |
|||
setup() { |
|||
super.setup(); |
|||
} |
|||
get productsToDisplay() { |
|||
/* This function is override to remove products showing before hand.*/ |
|||
let list = []; |
|||
if (this.searchWord !== '') { |
|||
list = this.env.pos.db.search_product_in_category( |
|||
this.selectedCategoryId, |
|||
this.searchWord |
|||
); |
|||
} |
|||
return list.sort(function (a, b) { return a.display_name.localeCompare(b.display_name) }); |
|||
} |
|||
}; |
|||
Registries.Component.extend(ProductsWidget, ProductsWidgetSimple); |
|||
return ProductsWidgetSimple; |
|||
}); |