View source | Discuss this page | Page history | Printable version   

POS - Adding Tag-Along Items

With the help of Jeff Breeden and Mikel Irurita, I created a script for OpenbravoPOS to allow tag-along items like "crv". Below will describe how to set that up.

First, for the product that needs the tag-along item we add a property:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE properties SYSTEM "">
    <entry key="CRV">0.05</entry>

Next, under Maintenance>>Resources>>Ticket.Buttons, we added:

<event key="ticket.change" code="event.change.crv" />

And created a script called "event.change.crv" with:

import com.openbravo.pos.ticket.TicketLineInfo;
index = sales.getSelectedIndex();
if (index >= 0) {  
    line = ticket.getLine(index);
    double crv = Double.parseDouble(line.getProperty("CRV", "0"));  
    if (crv > 0) {
    ticket.insertLine(index + 1,
            new TicketLineInfo(
        sales.setSelectedIndex(index + 1);

Retrieved from ""

This page has been accessed 7,759 times. This page was last modified on 25 October 2009, at 00:24. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.