Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
3830 Tampilan

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
Buang
Jawaban Terbai

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
Buang
Penulis

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

Penulis

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

Post Terkait Replies Tampilan Aktivitas
2
Mei 18
5269
1
Mar 18
3228
0
Nov 17
4189
1
Mei 17
2648
1
Des 16
3244