Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
3847 Zobrazení

Is there a way to stop POS from grouping items? I want to be able to apply discounts on individual items using barcodes (like a discount voucher) but with the current POS behaviour, it applies discount to all products on the selected line.

Real world example:

Customer orders 3 beers, I enter 3 beers on the POS. Customer hands me a voucher for one free beer (barcode with 100% discount) but the discount is applied to all 3.


Thanks 

Avatar
Zrušit
Nejlepší odpověď

One work-around without having to customize code is to first enter one beer, apply discount, and then add the two last beers.

I see the possible headache when the customer gives you the voucher AFTER you've already added all the beers though..

If you know how to do basic odoo development, removing the if statement from line 1985 in the models.js file (point_of_sale module), and make it always run the "else" clause (in bold), it will stop merging lines. 
This should of course be done by creating a custom module and overriding the the add_product function.

if( last_orderline && last_orderline.can_be_merged_with(line) && options.merge !== false){ 

            last_orderline.merge(line);

        }else{

            this.orderlines.add(line);

        }

Avatar
Zrušit
Autor

Hi Marius

Thanks for the great pointers. I'm only just embarking on the Odoo adventure so custom module development is still in the distance. I might just try monkey-patching first :)

Do you know if this is the sort of thing that can be made with Odoo Studio?

Jim

Autor

EDIT: I managed to achieve the functionality I wanted by simply removing the ! from options.merge !== false

Related Posts Odpovědi Zobrazení Aktivita
2
kvě 18
5270
1
bře 18
3239
0
lis 17
4189
1
kvě 17
2652
1
pro 16
3252