summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxmo-odoo <xmo-odoo@users.noreply.github.com>2015-10-02 15:36:13 +0200
committerxmo-odoo <xmo-odoo@users.noreply.github.com>2015-10-02 15:36:13 +0200
commit249d0215c6c2ee06ce3bcaf54a0df5c7efe2e244 (patch)
tree4d79085124f4ba781efee7d79918810fb9402628
parent7352b34f0dc8139d4764cbda890000d454afbb53 (diff)
[FIX] website: saving new menu items
simplejson and the builtin json module apparently differ in how they decide to optimise decoding JSON strings to str rather than unicode python strings, so check for basestring rather than one or the other. This may also depend on the Python version. Closes #8726
-rw-r--r--addons/website/models/website.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website/models/website.py b/addons/website/models/website.py
index f0c73c61b2f..cb18b26acf0 100644
--- a/addons/website/models/website.py
+++ b/addons/website/models/website.py
@@ -627,7 +627,7 @@ class website_menu(osv.osv):
self.unlink(cr, uid, to_delete, context=context)
for menu in data['data']:
mid = menu['id']
- if isinstance(mid, str):
+ if isinstance(mid, basestring):
new_id = self.create(cr, uid, {'name': menu['name']}, context=context)
replace_id(mid, new_id)
for menu in data['data']: