[FIX] website_sale: compare id with id instead of record

Before this commit Odoo tries to compare an 'account.fiscal.position' id with an 'account.fiscal.position' record.
This causes a 'Comparing apples and oranges' warning in the logs and is not the right way to do this.
This is a fix for d89fa970e8e5b07f1b9a396e6ee02db7fdd136e4 where this issue was introduced

closes odoo/odoo#63029

X-original-commit: d9a1b28144523ece2c6fa4329f3ae4b7ff4a38ec
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
This commit is contained in:
root
2020-12-08 14:03:53 +00:00
parent 78eecf1a81
commit 91f57b09dc
+1 -1
View File
@@ -264,7 +264,7 @@ class Website(models.Model):
self.env['account.fiscal.position'].sudo()
.with_company(sale_order.company_id.id)
.get_fiscal_position(sale_order.partner_id.id, delivery_id=sale_order.partner_shipping_id.id)
)
).id
if sale_order.fiscal_position_id.id != fpos_id:
sale_order = None