[FIX] product: return id instead of recordset
_get_partner_pricelist could return both a recordset or an ID. While the ORM handles both where the method is called, a migration script relies on an ID being returned. ( migrations/sale_contract/9.saas~13.1.1/pre-models.py", line 24 ) This commit ensures an ID is being returned every time.
This commit is contained in:
@@ -300,7 +300,7 @@ class Pricelist(models.Model):
|
||||
Property = self.env['ir.property'].with_context(force_company=company_id or self.env.user.company_id.id)
|
||||
|
||||
p = Partner.browse(partner_id)
|
||||
pl = Property.get('property_product_pricelist', Partner._name, '%s,%s' % (Partner._name, p.id))
|
||||
pl = Property.get('property_product_pricelist', Partner._name, '%s,%s' % (Partner._name, p.id)).id
|
||||
|
||||
if not pl:
|
||||
if p.country_id.code:
|
||||
|
||||
Reference in New Issue
Block a user