diff --git a/addons/delivery/sale.py b/addons/delivery/sale.py
index 63f04ef534b..f440ccdcbe1 100644
--- a/addons/delivery/sale.py
+++ b/addons/delivery/sale.py
@@ -85,8 +85,7 @@ class sale_order(osv.Model):
if order.company_id.currency_id.id != order.pricelist_id.currency_id.id:
price_unit = currency_obj.compute(cr, uid, order.company_id.currency_id.id, order.pricelist_id.currency_id.id,
price_unit, context=dict(context or {}, date=order.date_order))
- #create the sale order line
- line_id = line_obj.create(cr, uid, {
+ values = {
'order_id': order.id,
'name': grid.carrier_id.name,
'product_uom_qty': 1,
@@ -94,7 +93,10 @@ class sale_order(osv.Model):
'product_id': grid.carrier_id.product_id.id,
'price_unit': price_unit,
'tax_id': [(6, 0, taxes_ids)],
- 'is_delivery': True
- }, context=context)
+ 'is_delivery': True,
+ }
+ if order.order_line:
+ values['sequence'] = order.order_line[-1].sequence + 1
+ line_id = line_obj.create(cr, uid, values, context=context)
line_ids.append(line_id)
return line_ids
diff --git a/addons/event/email_template.xml b/addons/event/email_template.xml
index 75686a842ef..0f6c7231a46 100644
--- a/addons/event/email_template.xml
+++ b/addons/event/email_template.xml
@@ -7,6 +7,7 @@
${(object.event_id.organizer_id.email or object.event_id.user_id.email or '')|safe}
${object.email|safe}
+ ${object.partner_id.lang}
${object.event_id.reply_to|safe}
Your subscription at ${object.event_id.name}
Hello ${object.name},
@@ -21,6 +22,7 @@ You will automatically receive an email providing you more practical information
${(object.event_id.organizer_id.email or object.event_id.user_id.email or '')|safe}
${object.partner_id.email or object.email|safe}
+ ${object.partner_id.lang}
${object.event_id.reply_to|safe}
Reminder of event ${object.event_id.name}
Hello ${object.name},
@@ -35,6 +37,7 @@ For any further information please contact our event department.
${(object.event_id.organizer_id.email or object.event_id.user_id.email or '')|safe}
${object.partner_id.email or object.email|safe}
+ ${object.partner_id.lang}
${object.event_id.reply_to|safe}
Thanks for attending ${object.event_id.name}
Hello ${object.name},
diff --git a/addons/hw_escpos/controllers/main.py b/addons/hw_escpos/controllers/main.py
index 0b0f58027ab..d3635e47d0b 100644
--- a/addons/hw_escpos/controllers/main.py
+++ b/addons/hw_escpos/controllers/main.py
@@ -76,6 +76,14 @@ class EscposDriver(Thread):
printers = usb.core.find(find_all=True, custom_match=FindUsbClass(7))
+ # Currently we ask customers to put the STAR TSP650II into
+ # 'USB Mode' Vendor class instead of Printer class. When set
+ # to Printer class it doesn't show up under Linux at
+ # all. Vendor class does work, but that means that it's not
+ # going to have an interfaceClass 7.
+ if not printers:
+ printers = usb.core.find(find_all=True, idVendor=0x0519)
+
for printer in printers:
connected.append({
'vendor': printer.idVendor,
diff --git a/addons/hw_escpos/escpos/exceptions.py b/addons/hw_escpos/escpos/exceptions.py
index 51d860f1368..1bec14d5e00 100644
--- a/addons/hw_escpos/escpos/exceptions.py
+++ b/addons/hw_escpos/escpos/exceptions.py
@@ -86,7 +86,7 @@ class NoStatusError(Error):
self.resultcode = 70
def __str__(self):
- return "Impossible to get status from the printer"
+ return "Impossible to get status from the printer: " + str(self.msg)
class TicketNotPrinted(Error):
def __init__(self, msg=""):
@@ -95,7 +95,7 @@ class TicketNotPrinted(Error):
self.resultcode = 80
def __str__(self):
- return "A part of the ticket was not been printed"
+ return "A part of the ticket was not been printed: " + str(self.msg)
class NoDeviceError(Error):
def __init__(self, msg=""):
@@ -104,7 +104,7 @@ class NoDeviceError(Error):
self.resultcode = 90
def __str__(self):
- return "Impossible to find the printer Device"
+ return str(self.msg)
class HandleDeviceError(Error):
def __init__(self, msg=""):
@@ -113,4 +113,4 @@ class HandleDeviceError(Error):
self.resultcode = 100
def __str__(self):
- return "Impossible to handle device"
+ return str(self.msg)
diff --git a/addons/hw_escpos/escpos/printer.py b/addons/hw_escpos/escpos/printer.py
index 37a530d8373..1f32875a5cb 100644
--- a/addons/hw_escpos/escpos/printer.py
+++ b/addons/hw_escpos/escpos/printer.py
@@ -58,7 +58,7 @@ class Usb(Escpos):
return True
except usb.core.USBError as e:
i += 1
- if i > 100:
+ if i > 10:
return False
sleep(0.1)
diff --git a/addons/hw_proxy/controllers/main.py b/addons/hw_proxy/controllers/main.py
index eb95527efcd..173cfd599fe 100644
--- a/addons/hw_proxy/controllers/main.py
+++ b/addons/hw_proxy/controllers/main.py
@@ -108,24 +108,7 @@ class Proxy(http.Controller):
if count == 0:
resp += "No USB Device Found
"
- resp += "\n"
- resp += """
- Add New Printer
-
- Copy and paste your printer's device description in the form below. You can find
- your printer's description in the device list above. If you find that your printer works
- well, please send your printer's description to
- support@openerp.com so that we can add it to the default list of supported devices.
-
-
- Reset To Defaults
- If the added devices cause problems, you can Reset the
- device list to factory default. This operation cannot be undone.
- """
- resp += "