Skip to content

Commit

Permalink
Merge pull request #704 from KolushovAlexandr/11.0-stock_picking_barc…
Browse files Browse the repository at this point in the history
…ode-session

🛡️ integer is incomparable with bool
  • Loading branch information
Ivan Yelizariev committed Dec 19, 2018
2 parents 5986e46 + d616e1c commit ffffa2a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion web_debranding/tests/test_developer_mode_menu_elements.py
Expand Up @@ -26,11 +26,15 @@ def test_01_remove_developer_mode_menu_elements(self):
console.log('page is loading');
return;
}
setTimeout(function(){
// request ..../res.users/is_admin may take some time
// TODO: add a way to check that it's a time to check result (variable on loading in web_debranding/static/src/js/user_menu.js ?)
if ($('li a[data-menu="debug"]').length > 0 || $('li a[data-menu="debugassets"]').length > 0) {
console.log('error', 'Developer mode menu elements are displayed for not admin user');
console.log('error', 'Developer mode menu elements are displayed for non-admin user');
} else {
console.log('ok');
}
}, 1000);
}, 1000);
})
"""
Expand Down
2 changes: 1 addition & 1 deletion web_website/models/ir_property.py
Expand Up @@ -111,7 +111,7 @@ def get_multi(self, name, model, ids):
website_id = self._context.get('website_id', 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]
Expand Down

0 comments on commit ffffa2a

Please sign in to comment.