Author: Charles Brunet
Posted: 2012-05-03 at 09:23:01
Ok, it works now! For the records, here is how I did:
- In biz/Attribute.py:
> self.AutoPopulatePK = False
> self.FillLinkFromParent = True
> self.LinkField = "Contact"
- My import script looks like this:
> self.bizContact = app.biz.Contact(app.dbConnection)
> self.bizAttribute = app.biz.Attribute(app.dbConnection)
> self.bizContact.addChild(self.bizAttribute)
> for contact in rows:
> self.bizContact.new()
> self.bizContact.setFieldVals(contact)
> for attr in attributes:
> self.bizAttribute.new()
> self.bizAttribute.setFieldVals(attr) # Don't touch to 'Contact'
> field here
> self.bizContact.saveAll()
Thank you for your help,
Charles.
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
_______________________________________________
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/CAJPgzxnmVNUD0wV0EK3axAzr40dYuo7wYA99YZNSABS=RXJc-g@mail.gmail.com