From 792a402126b1ea45c8f1f38374a02e7f834fb286 Mon Sep 17 00:00:00 2001 From: qdp-odoo Date: Tue, 8 Aug 2017 10:29:57 +0200 Subject: [PATCH 1/4] [FIX] account: fix tax_ids computation on aml creation from invoice. In case of a tax affecting subsequent taxes, the tax_ids field was wrongly set which led to errors in VAT reports. OPW 757072. --- addons/account/models/account_invoice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account/models/account_invoice.py b/addons/account/models/account_invoice.py index 122d04a45ec..c379cadaf4c 100644 --- a/addons/account/models/account_invoice.py +++ b/addons/account/models/account_invoice.py @@ -697,7 +697,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, @@ -709,8 +708,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): From ea2568b19c7f94d7ca08487b11ba35cb9974f5e2 Mon Sep 17 00:00:00 2001 From: "Lucas Perais (lpe)" Date: Mon, 7 Aug 2017 13:15:11 +0200 Subject: [PATCH 2/4] [FIX] website_portal_sale: image on a portal SO should always be displayed before this commit, when a portal SO was done with a product that hasn't been "website_published", a placeholder was displayed instead of the image After this commit, the correct product image is displayed in base64 (always image_small though) OPW 760880 Closes #18709 --- addons/website_portal_sale/views/templates.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@
- +
From a31820d0cb780108ff1f4a0d322ca8e3bd180da3 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Tue, 8 Aug 2017 10:22:46 +0200 Subject: [PATCH 3/4] [FIX] account: Only 64 characters for the name of an entry When creating a customer invoice with description/reference with more than 64 characters, the description was cut to generate the name of the account move lines. But it's possible to create an entry with more than 64 characters as name by the interface. The limitation is deprecated. opw:760316 --- addons/account/models/account_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/models/account_invoice.py b/addons/account/models/account_invoice.py index c379cadaf4c..4010cf25fc4 100644 --- a/addons/account/models/account_invoice.py +++ b/addons/account/models/account_invoice.py @@ -862,7 +862,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'], From 3d119c44f3e3f9cdff178b0441d03b3c0b193904 Mon Sep 17 00:00:00 2001 From: "Lucas Perais (lpe)" Date: Wed, 9 Aug 2017 11:01:34 +0200 Subject: [PATCH 4/4] [FIX] point_of_sale: correct inheriting from pos_order_line being an issue Before this commit, when creating a pos_order_line_pro_forma, which inherits from pos_order_line but in a different table, the create confused an overriden field (order_id) When pos_blackbox was installed, pro forma lines would search for an pos_order instead of a pos_order_proforma upon their creation This commit allows an inheritant of pos_order_line to use the super.create function OPW 745685 Closes #18755 --- addons/point_of_sale/point_of_sale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index 5da48b11878..7e94c36ff31 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -1572,7 +1572,7 @@ class pos_order_line(osv.osv): 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