summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJigar Vaghela <jva@odoo.com>2021-02-10 11:08:56 +0000
committerJigar Vaghela <jva@odoo.com>2021-03-05 14:04:23 +0000
commitf4136c3188e4f5df68a01f57d7d09ecf96be63b6 (patch)
treee56ede74efd301f7f112086153fcd774497ee9eb
parent3ed730ae7669a082ffca38d8d873785756703801 (diff)
[FIX] l10n_in_sale: place of supply base on delivery address
Before this commit: place of supply always set from customer address. After this commit: place of supply is set by delivery address closes odoo/odoo#67372 Opw: 2456095 X-original-commit: dd141a882478c2e3684638321f36b952bcac3858 Signed-off-by: Josse Colpaert <jco@openerp.com>
-rw-r--r--addons/l10n_in_sale/report/account_invoice_report.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/addons/l10n_in_sale/report/account_invoice_report.py b/addons/l10n_in_sale/report/account_invoice_report.py
index 16834b44fe0..1150be0c13a 100644
--- a/addons/l10n_in_sale/report/account_invoice_report.py
+++ b/addons/l10n_in_sale/report/account_invoice_report.py
@@ -7,6 +7,16 @@ from odoo import models
class L10nInAccountInvoiceReport(models.Model):
_inherit = "l10n_in.account.invoice.report"
+ def _from(self):
+ from_str = super(L10nInAccountInvoiceReport, self)._from()
+ return from_str.replace(
+ "LEFT JOIN res_country_state ps ON ps.id = p.state_id",
+ """
+ LEFT JOIN res_partner dp ON dp.id = am.partner_shipping_id
+ LEFT JOIN res_country_state ps ON ps.id = dp.state_id
+ """
+ )
+
def _where(self):
where_str = super(L10nInAccountInvoiceReport, self)._where()
where_str += """ AND (aml.product_id IS NULL or aml.product_id != COALESCE(