Commit 807745cb authored by Julien Muchembled's avatar Julien Muchembled

Fix modifying translations.

git-svn-id: https://svn.erp5.org/repos/public/erp5/sandbox/portal_types@29239 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 920be763
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python: [(\'\',None)] + [(x,x) for x in here.getPortalObject().Localizer.objectIds()]</string> </value> <value> <string>python: [(\'\',\'\')] + [(x,x) for x in here.getPortalObject().Localizer.objectIds()]</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
51 52
\ No newline at end of file \ No newline at end of file
...@@ -90,6 +90,10 @@ class OldTypesTool(OFSFolder): ...@@ -90,6 +90,10 @@ class OldTypesTool(OFSFolder):
elif k == '_roles': elif k == '_roles':
for role in v: for role in v:
new_type._importRole(role.__getstate__()) new_type._importRole(role.__getstate__())
elif k == '_property_domain_dict':
v = dict((k, t.__class__(property_name=t.property_name,
domain_name=t.property_name))
for k, t in v.iteritems())
else: else:
setattr(new_type, k, v) setattr(new_type, k, v)
......
...@@ -210,7 +210,8 @@ class TranslationInformation(SimpleItem): ...@@ -210,7 +210,8 @@ class TranslationInformation(SimpleItem):
return self.domain_name return self.domain_name
security.declareProtected(ModifyPortalContent, 'edit') security.declareProtected(ModifyPortalContent, 'edit')
def edit(self, **kw): def edit(self, edit_order=(), **kw):
self.__dict__.update(kw) self._p_changed = 1
self.__dict__.update((k, v or None) for k, v in kw.iteritems())
InitializeClass(TranslationInformation) InitializeClass(TranslationInformation)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment