Permalink
Browse files

🚑 errores related to incorrect getting website id for the sql request

  • Loading branch information...
KolushovAlexandr committed Dec 21, 2018
1 parent 0386cbc commit f29f6d1756e5a5df7d5e85a8fc6c0c3147fdc4a9
Showing with 7 additions and 3 deletions.
  1. +1 −1 web_website/__manifest__.py
  2. +4 −0 web_website/doc/changelog.rst
  3. +2 −2 web_website/models/ir_property.py
@@ -7,7 +7,7 @@
"category": "Hidden",
# "live_test_url": "",
"images": [],
"version": "12.0.3.0.1",
"version": "12.0.3.0.2",
"application": False,

"author": "IT-Projects LLC, Ivan Yelizariev",
@@ -1,3 +1,7 @@
`3.0.2`
-------
- **Fix:** Error related to incorrect SQL request

`3.0.1`
-------
- **Fix:** Incorrect website priority after odoo updates https://github.com/odoo/odoo/commit/b6d32de31e0e18a506ae06dc27561d1d078f3ab1
@@ -108,10 +108,10 @@ def get_multi(self, name, model, ids):
# It has the same idea and structure, but sql request and set record value method are changed
if not ids:
return {}
website_id = self._context.get('website_id', None)
website_id = self._get_website_id() or None
field = self.env[model]._fields[name]
field_id = self.env['ir.model.fields']._get(model, name).id
company_id = self._context.get('force_company') or self.env['res.company']._company_default_get(model, field_id).id
company_id = self._context.get('force_company') or self.env['res.company']._company_default_get(model, field_id).id or None

if field.type == 'many2one':
comodel = self.env[field.comodel_name]

0 comments on commit f29f6d1

Please sign in to comment.