Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
3881 Vizualizări

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 

Imagine profil
Abandonează
Cel mai bun răspuns

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);

        }

Imagine profil
Abandonează
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 Răspunsuri Vizualizări Activitate
2
mai 18
5328
1
mar. 18
3281
0
nov. 17
4218
1
mai 17
2694
1
dec. 16
3286