Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🛡️ web_website incomparable values int and bool #705

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion web_website/__manifest__.py
Expand Up @@ -6,7 +6,7 @@
"category": "Hidden",
# "live_test_url": "",
"images": [],
"version": "11.0.3.0.1",
"version": "11.0.3.0.2",
"application": False,

"author": "IT-Projects LLC, Ivan Yelizariev",
Expand Down
4 changes: 4 additions & 0 deletions web_website/doc/changelog.rst
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion web_website/models/ir_property.py
Expand Up @@ -108,7 +108,8 @@ 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)
# it's important, that website_id cannot be False -- otherwise, an error is raised on SQL request
website_id = self._context.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 or None
Expand Down