Permalink
Browse files

Merge pull request #706 from KolushovAlexandr/12.0-web_website-sql_er…

…rores

🚑 errores related to incorrect getting website id for the s…
  • Loading branch information...
yelizariev committed Dec 21, 2018
2 parents 0386cbc + f29f6d1 commit 3ee046c1b1fc48441e4822f9ae57bb878077ca3e
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 3ee046c

Please sign in to comment.