This question has been flagged
1 Reply
6693 Views

I've been reading the following doc:


https://www.odoo.com/documentation/user/9.0/point_of_sale/restaurant/print.html


From what i understand we are assuming one posbox for each printer.


Current supported printer are USB from EscPOS .


My idea would be to improve the code allowing to use one posbox and many IP Printers.


I could then define that :


Receipt Printer has ip xxx.xxx.xxx.200

Kicthen Printer has ip xxx.xxx.xxx.201

Beverage Printer has ip xxx.xxx.xxx.202

Or even that a Receipt printer is an IP Fiscal Printer


How would you suggest to proceed in this way ?


I'd love to improve the code and release it to the community


Kind Regards

Avatar
Discard
Best Answer

i connected the hw_escpos to my network printer, i got the connected message on hw_proxy and the printed message, so escpos is communicating with my printer via 9100 socket but i could not print the recipe also restaurant command

her is the code of what i changed in escpos  controller.main :

//////////

class EscposDriver(Thread):

    def __init__(self):

        Thread.__init__(self) self.queue = Queue() self.lock = Lock() self.status = {'status':'connecting', 'messages':[]}

        def lockedstart(self):

        with self.lock:

            if not self.isAlive():

                self.daemon = True self.start() def get_escpos_printer(self):

        self.set_status('connected','Connected to network printer')

         #return Usb(0x1cbe,0x0002)

         return Network("192.168.43.100",9100)        

            def get_status(self):

        self.push_task('status') return self.status


////////////

also as you see i connect my usb printer directly with Usb(0x1cbe,0x0002) / 0x1cbe=idvendor    0x0002=idproduct

Best regards

Avatar
Discard