On 21/10/11 01:43 -0700, v7v wrote:
> Hi,
>
> Recently I've tried to migrate data from home-made Access app
> into Tryton 2.0 via CSV import facility, but I've stuck while
> importing
> products (``product`` module). It seems that required ``template``
> field
> (many2one) cannot be created 'on-the-fly'::
> ..
> default_uom: 33
> template: [('create', {'category': 1, 'type': 'stockable',
> 'cost_price_method': 'average', 'default_uom': 1, 'name':
> 'Consulting2'})]
> type: service
> ..
> Error:
> int() argument must be a string or a number, not 'list'
>
> Does it mean that ``many2one`` field's ``rec_name`` has to be
> available
> at import-time? Hmm, I wonder is there a form where these product
> templates can be imported?For Many2One, you must give the id or a string that will excactly match the record when doing a search. You can not create it on the fly. > Another thing is that Product fields inherited from ProductTemplate > are > required when importing from Product form, but they are ignored (or > maybe > overwritten by ProductTemplate field values), thus making them > redundant. You just have to fill the field in Product and don't care about ProductTemplate. > In case that CSV import doesn't provide us feasible solution is there > an > alternative way for importing products (and for other modules, of > course) -- > manual import of 5000+ products doesn't attract me much :(. cvs import is a small tool for simple import. If you need something more flexible, use a script with proteus. -- Cédric Krier B2CK SPRL Rue de Rotterdam, 4 4000 Liège Belgium Tel: +32 472 54 46 59 Email/Jabber: [email protected] Website: http://www.b2ck.com/
pgpfwdhMkKBdN.pgp
Description: PGP signature
