summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2017-08-09 13:57:30 +0200
committerChristophe Simonis <chs@odoo.com>2017-08-09 13:57:30 +0200
commit6a767a8900c9bbcb25960d1330a9724ef4ceefee (patch)
tree7ac280d9815e084fc66b19bd1b33ccce6c3f848d
parenta6917c22b3e4008f71407170587872b9aba24068 (diff)
parent3d119c44f3e3f9cdff178b0441d03b3c0b193904 (diff)
[MERGE] forward port branch 9.0 up to 3d119c44f3e
-rw-r--r--addons/account/models/account_invoice.py6
-rw-r--r--addons/point_of_sale/models/pos_order.py2
-rw-r--r--addons/website_portal_sale/views/templates.xml2
3 files changed, 5 insertions, 5 deletions
diff --git a/addons/account/models/account_invoice.py b/addons/account/models/account_invoice.py
index 1eb08906e47..4cddc629a26 100644
--- a/addons/account/models/account_invoice.py
+++ b/addons/account/models/account_invoice.py
@@ -704,7 +704,6 @@ class AccountInvoice(models.Model):
if tax.amount_type == "group":
for child_tax in tax.children_tax_ids:
done_taxes.append(child_tax.id)
- done_taxes.append(tax.id)
res.append({
'invoice_tax_line_id': tax_line.id,
'tax_line_id': tax_line.tax_id.id,
@@ -716,8 +715,9 @@ class AccountInvoice(models.Model):
'account_id': tax_line.account_id.id,
'account_analytic_id': tax_line.account_analytic_id.id,
'invoice_id': self.id,
- 'tax_ids': [(6, 0, done_taxes)] if tax_line.tax_id.include_base_amount else []
+ 'tax_ids': [(6, 0, list(done_taxes))] if tax_line.tax_id.include_base_amount else []
})
+ done_taxes.append(tax.id)
return res
def inv_line_characteristic_hashcode(self, invoice_line):
@@ -870,7 +870,7 @@ class AccountInvoice(models.Model):
return {
'date_maturity': line.get('date_maturity', False),
'partner_id': part,
- 'name': line['name'][:64],
+ 'name': line['name'],
'debit': line['price'] > 0 and line['price'],
'credit': line['price'] < 0 and -line['price'],
'account_id': line['account_id'],
diff --git a/addons/point_of_sale/models/pos_order.py b/addons/point_of_sale/models/pos_order.py
index aea768357a0..3d6fd0af7e5 100644
--- a/addons/point_of_sale/models/pos_order.py
+++ b/addons/point_of_sale/models/pos_order.py
@@ -733,7 +733,7 @@ class PosOrderLine(models.Model):
def create(self, values):
if values.get('order_id') and not values.get('name'):
# set name based on the sequence specified on the config
- config_id = self.env['pos.order'].browse(values['order_id']).session_id.config_id.id
+ config_id = self.order_id.browse(values['order_id']).session_id.config_id.id
# HACK: sequence created in the same transaction as the config
# cf TODO master is pos.config create
# remove me saas-15
diff --git a/addons/website_portal_sale/views/templates.xml b/addons/website_portal_sale/views/templates.xml
index 04c82fe7f41..73753f682e1 100644
--- a/addons/website_portal_sale/views/templates.xml
+++ b/addons/website_portal_sale/views/templates.xml
@@ -250,7 +250,7 @@
<t t-foreach="order.order_line" t-as="ol">
<div class="row orders_vertical_align">
<div class="col-md-1 text-center">
- <img t-att-src="'/web/image/product.product/%s/image_small/48x48' % ol.product_id.id"/>
+ <img t-att-src="ol.product_id.image_small and ('data:image/png;base64,' + ol.product_id.image_small) or '/web/static/src/img/placeholder.png'"/>
</div>
<div id='product_name' class="col-md-5">
<span t-esc="ol.product_id.name"/>