Continuing my adventure with openerp2tryton, I come across a new challenge.
Part of the migration includes adapting the default accounting plan with a csv file. PM: I am using account_fr for the French PCG. I use the following header:
id,name,active,code,kind,parent,party_required,reconcile,deferral,type
everything seems okay until I get to the VAT accounts (4452xx and 44566x, where "Autres" is not a unique name in account.account.type.template (nor in account.account.type) and thus gives an error. There doesn't seem to be any Parent parsing, so prepending a parent (eg 'Créances d'exploitation\Autres') doesn't seem to work nor does replacing the the 'name' with the id directly (tag nor value)... Looking at the code for import_data() in modelstorage.py I thought I'd try using 'type:id' in the header and 'account_fr.creances_autres' in the value but then I get the following:
psycopg2.IntegrityError: ERREUR: une instruction insert ou update sur la table « account_account » viole la contrainte de clé étrangère « account_account_type_fkey » DETAIL: La clé (type)=(196) n'est pas présente dans la table « account_account_type ».
it appears that import_data uses account.account.type and not account.account.type.template where the db_id retrieved is indeed the id of the type but which appears not to be maintained in account.account.type. Is this a bug in account.account.type structure (that is, losing the valid ids)? Other ideas on how to import these VAT accounts? -- Richard PALO -- You received this message because you are subscribed to the Google Groups "tryton" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton/2454336e-8553-0a0e-0dda-a1a680e083f5%40free.fr.