[Zope] Re: Function reindexObject()
julian
jules12af at aol.com
Thu May 31 03:53:47 EDT 2007
Thanks ;) but it's no really what I want sorry
I work like that :
__________________________________
|ZMI(zope 2.7) |
| |
|Product : Document, my_product...| Export script
| |--------------> A file with all data
|_________________________________| of product (text)
|
|
|
________________________ Import script |
|ZMI(zope2.9) |<-------------------------------
|Product : Document,.. | (reindexObject)
| |
|______________________|
So, the export script copy all data of a product in a text file (whit
accessor : getID,etTitle, getText...). Each line of this file is the
datas of a product, next lines are other products.
The import script run very well, I transform each line of the text file
to a correspondant product as zope2.7. But I want put each new product
in the same repertory as zope 2.7. So how say to each product in my
import script where it must be copy.
This import script:
-------------------------------------------------------------------------
id = self.generateUniqueId('J_product')
self.invokeFactory('J_product', id)
mct = getattr(self, id)
mct.setTitle(row[1])
mct.setJ_product_descriptif(row[2])
mct.setJ_product_web(row[3])
## add images ##
im = recup_image(mesimages,compteur,"")
if im != 'no_image':
mct.setJ_product_image(im)
self.portal_workflow.doActionFor(mct,"publish", comment="")
self.reindexObject()
----------------------------------------------------------------------------
My subject is reindexObject because I think it's this function that put
the new Object (product) in ZMI. I don't know :s
Maybe I should make a line like that :
mct.setDirectory("/SITES/plone_mySite/repertory1/")
repertory1 is where I want put the object (I have in my text file
generated with export script, the url of each product).
So, It's nothing if nobody understand ;) but I would like.
More information about the Zope
mailing list