Commit f75f5d15 authored by Aurel's avatar Aurel

fix diffObject with a given bt


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4958 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c111b3a5
...@@ -2935,7 +2935,7 @@ class MessageTranslationTemplateItem(BaseTemplateItem): ...@@ -2935,7 +2935,7 @@ class MessageTranslationTemplateItem(BaseTemplateItem):
obj = self._objects[key] obj = self._objects[key]
path = os.path.join(root_path, key) path = os.path.join(root_path, key)
bta.addFolder(name=path) bta.addFolder(name=path)
f = open(path+'/translation.po', 'wt') f = open(path+os.sep+'translation.po', 'wt')
f.write(str(obj)) f.write(str(obj))
f.close() f.close()
...@@ -3756,14 +3756,14 @@ Business Template is a set of definitions, such as skins, portal types and categ ...@@ -3756,14 +3756,14 @@ Business Template is a set of definitions, such as skins, portal types and categ
item_name = class_name_dict[object_class] item_name = class_name_dict[object_class]
new_bt =self new_bt =self
installed_bt = self.getInstalledBusinessTemplate(title=self.getTitle())
if installed_bt == new_bt:
return 'No diff at reinstall'
# compare with a given business template # compare with a given business template
bt2_id = kw.get('compare_with', None) bt2_id = kw.get('compare_with', None)
if bt2_id is not None: if bt2_id is not None:
installed_bt = self.portal_templates._getOb(bt2_id) installed_bt = self.portal_templates._getOb(bt2_id)
else:
installed_bt = self.getInstalledBusinessTemplate(title=self.getTitle())
if installed_bt == new_bt:
return 'No diff at reinstall'
new_item = getattr(new_bt, item_name) new_item = getattr(new_bt, item_name)
installed_item = getattr(installed_bt, item_name) installed_item = getattr(installed_bt, item_name)
......
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