Richard PALO
unread,Jul 16, 2017, 6:20:40 AM7/16/17Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to tryton
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