<div class="gmail_quote"><br>Hi all,<br><br>I have to containers old_container and new_container that accept objects of the same type. The two containers are actually instances of different classes in the same product.<br>
<br>I want to move all the objects from old_container to new_container. I have tried with only one object:<br>
<br>1. To move it with a simple Cut/Paste operation through ZMI: the object is moved successfully, but has missing properties<br>2. I have used Import/Export to move the same object: the object is imported successfully, but also has missing properties<br>

3. Even tried a simple Copy/Paste: same result, no errors but missing properties<br><br>Basically, the code for the object to be moved is like this:<br><br><br>class Country(Discussion, Folder):<br><br>    _properties = (<br>

        Discussion._properties<br>        +<br>        (<br>            {&#39;id&#39;: &#39;body&#39;, &#39;type&#39;: &#39;text&#39;, &#39;mode&#39;: &#39;w&#39;},<br>        )<br>    )<br><br>    def __init__(self, id, title, body, comments, flg_notify):<br>

        <a href="http://self.id" target="_blank">self.id</a> = id<br>        self.title = title<br>        self.body = body<br>        Discussion.__dict__[&#39;__init__&#39;](self, comments, flg_notify)<br><br>    def check_properties(self):<br>

        &quot;&quot;&quot; &quot;&quot;&quot;<br>        print hasattr(self, &#39;body&#39;)<br>        print hasattr(self, &#39;comments&#39;)<br><br>and<br><br>class Discussion:<br><br>    _properties = (<br>        (<br>

            {&#39;id&#39;: &#39;comments&#39;, &#39;type&#39;: &#39;int&#39;, &#39;mode&#39;: &#39;w&#39;},<br>            {&#39;id&#39;: &#39;flg_notify&#39;, &#39;type&#39;: &#39;int&#39;, &#39;mode&#39;: &#39;w&#39;},<br>

        )<br>    )<br><br>    def __init__(self, comments, flg_notify):<br>        self.comments = comments<br>        self.flg_notify = flg_notify<br><br><br>If i run the method check_properties before move/copy/import it prints True+True. After step 1/2/3 the result is True+False. So the missing property is &#39;comments&#39;, that comes from the extended class Discussion. If a I trie to acces the Propeties tab, manage_propertiesForm method, I get:<br>

<br>Traceback (innermost last):<br>  Module ZPublisher.Publish, line 119, in publish<br>  Module ZPublisher.mapply, line 88, in mapply<br>  Module ZPublisher.Publish, line 42, in call_object<br>  Module Shared.DC.Scripts.Bindings, line 313, in __call__<br>

  Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec<br>  Module App.special_dtml, line 178, in _exec<br>  Module DocumentTemplate.DT_In, line 703, in renderwob<br>  Module DocumentTemplate.DT_Let, line 76, in render<br>

  Module DocumentTemplate.DT_Util, line 196, in eval<br>   - __traceback_info__: id<br>  Module &lt;string&gt;, line 0, in ?<br>  Module OFS.PropertyManager, line 151, in getProperty<br>AttributeError: comments<br><br><br>

Am I doing something wrong? Any idea is highly appreciated.<br><br>Thank you very much,<br>Dragos<br><font color="#888888"><br clear="all"><br>-- <br>Dragos Chirila<br><a href="mailto:objectValues@gmail.com" target="_blank">objectValues@gmail.com</a><br>
<a href="tel:%28%2B4%29%200722%20395375" value="+40722395375" target="_blank">(+4) 0722 395375</a><br>
<br>
<div style="display: inline;"></div>
</font></div><br><br>
<div style="visibility: hidden; display: inline;" id="avg_ls_inline_popup"></div><style type="text/css">#avg_ls_inline_popup {  position:absolute;  z-index:9999;  padding: 0px 0px;  margin-left: 0px;  margin-top: 0px;  width: 240px;  overflow: hidden;  word-wrap: break-word;  color: black;  font-size: 10px;  text-align: left;  line-height: 13px;}</style>