I guess raise error is the only option we have here? Or is it possible to add another wizard view to select or search for product name?
OTOH raise error would drop the user to the standard interface anyway, there they can search for products by name.
This is not a behavior that every POS will want. So for me it must be implemented in a separate module.
Why is it 1? How about product with a UoM that is not in Units category.
What about barcode which include the quantity?
For me using barcode should be more strict than guessing with record name.
The POS should be configured to accept only specific code. The input should be validated before being used to search the exact matching product.
I think if the search has more than one result, there should be an error message.
Also the POS should support scanning gift card (and in the future promotion coupon).
What are other behaviours? What is the issue of having a scan code and not using it?
Because when its a weigth they usually have a balance to put the product and enter the code on the balance. Also the balance are creting the pos receipt. So I do not think other UoM will be using the scanner.
On the other hand, as the barcode is printed on each product. If you have multiple units its common to scan them one by one.
We can try to parse if the code is Code128 using python-stdnum and read if if available.
I’m just mentioning Code128 because I do not know other barcodes that include the quantity. But as far as they can be parsed it won’t be an issue.
I’m wondering if the scan widget should scan which type of product to be scanned. Otherwise we can pick a promotion coupon when the user scaned a product with the same code. Of course that won’t be an issue using EAN code but it can be when using products for formats.
OF course, if we allow to configure the code that should be used for the product, we should provide a report for printing the barcode of a product. So the user is able to print it and add it to the product.
IIRC I already asked you to include a barcode report on product when support to print barcodes was added but It was rejected do not remember why.
What exactly does this mean? How should this work?
On a sale point, barcodes are useful for countable units. When you buy 1 kg flour, you buy one package with 1 kg flour. When you go to the fresh food counter and buy 750g Tomatos, you get one (bag with a) barcode with the price for the 742g Tomatoes. Do you mean this with the quantity?
I haven’t read the GS1 specification for a long time but IIRC there are also bar code that specify the total amount (for example when you weight an apple, the barcode generated will sometimes contain the product identifier and the weight and sometimes the product identifier and the amount, I guess other combinations are possible).
I would like to add some elements about barcode types.
The kind of barcode depends a lot of the usage case:
in retail, you usually have only barcode with track the item (1 barcode = 1 package)
in food retail, you could find some barcode with price or weight information (1 barcode = item code + price/weight info encoded)
in industry, you could have more elaborated barcodes with packaging information (1 barcode = item code + quantity + …)
I am relatively familiar with retail (as I have such configuration, but i don’t use Tryton for the point of sale retail), and usually all products are purchased with a barcode already printed (I am in France, so it is EAN13 barcode type). so I don’t control what the supplier did with the barcode and I need to cope with it.