On 02 Jul 06:05, Dale Scott wrote:
> Hi all, 
> 
> On Thursday, 27 March 2014 06:26:21 UTC-6, Paul Leverett wrote:
> >
> >
> > Now that I've go a basic example working I'm a lot happier in progressing 
> > various different imports - thanks for the help
> >
> 
> I'm still trying to get my basic example working before I can be a lot 
> happier... ;-)
> 
> I am trying to import products (parts) and a BOMs from a commercial 
> database application called Parts&Vendors (P&V) (see [8] for an ascii-art 
> BOM tree). After some trial-and-error, I was able to import all the product 
> from P&V using a simplified version of the csv exported from P&V ([1] is 
> the csv as exported from P&V, [2] is the simplified version that I actually 
> imported).
> 
> Problem 1. If I view the detail of a specific product in Tryton (menu 
> Products > Products, select a specific product, "Switch view" to see 
> product detail), and then try to "Switch view" back to the grid view 
> showing all product, Tryton will warn that the record has been modified and 
> ask if I want to save it - even though I did not knowingly edit it. What 
> can cause this?

Some data are not in the right format. So the client after displaying
it, re-format it and detect a change in the value.

> Problem 2. The P&V BOM table includes two foreign key constraints to the 
> P&V part table. Each row in [3] represents a child part on a BOM, PLListID 
> is the PNID of the parent product in [1], and PLPartID is the PNID of a 
> child product on the BOM. Other fields in [3] give the quantity on BOM, the 
> "use-as" UOM, the item number on the BOM listing, etc. Can Tryton import 
> multiple BOMs from a single csv file having this structure? Will someone 
> give me a hint as to the field names?

I did not look to close to your data structure but any way, csv import
only works for very basic/simple cases. Any even a little bit complex
import should be done using a proteus script. Python is an the ETL
(https://en.wikipedia.org/wiki/Extract,_transform,_load)

> Problem 3. P&V product data ([1]) includes a number of attributes not 
> defined in the Tryton product module. I have installed the 
> product-attribute module, created  attributes corresponding to those in P&V 
> (and entered values for several products manually), but I don't understand 
> how to import these attributes from csv. Is it possible to import these 
> additional attributes at the same time as products are imported?

Attributes is a Dict field and there is no format in csv for this kind
of field. But it is supported by proteus.

> I read the Tryton wiki page on Export/Import Limitations ([4]), and the 
> pages on importing csv on the spanish-language Tryton site ([5], [6] and 
> [7]), but right now importing seems very close to magic. Why are two csv 
> files required, one for "Template: name, price..." and another for "product 
> code, description..." ([6]). Perhaps if I understand this, all will be 
> clear (but right now, importing seems more like magic. ;-))

This is because you have to deal with the internal data structure of
Tryton. If you want to understand, you have to read the code of the
Models.

-- 
Cédric Krier - B2CK SPRL
Email/Jabber: [email protected]
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

Attachment: pgp3IrCePLG_d.pgp
Description: PGP signature

Reply via email to