Normalize json domain for tree state
JSON string could be different for the same object because of spaces. issue4027 review11331005
This commit is contained in:
1 parent
fc2fa94e1c
commit
7a283a20c3
1 file changed
+7
@@ -3,6 +3,11 @@
|
||||
import os
|
||||
import sys
|
||||
import logging
|
||||
try:
|
||||
import simplejson as json
|
||||
except ImportError:
|
||||
import json
|
||||
|
||||
from lxml import etree
|
||||
from trytond.model import ModelView, ModelSQL, fields
|
||||
from trytond import backend
|
||||
@@ -354,6 +359,8 @@ class ViewTreeState(ModelSQL, ModelView):
|
||||
|
||||
@classmethod
|
||||
def get(cls, model, domain, child_name):
|
||||
# Normalize the json domain
|
||||
domain = json.dumps(json.loads(domain))
|
||||
current_user = Transaction().user
|
||||
with Transaction().set_user(0):
|
||||
try:
|
||||
|
||||
Reference in new issue
Block a user