Re: [tryton-dev] import_data and model account with account_account_type (RESEND)

2018-04-22 Thread Cédric Krier
On 2018-04-21 10:23, Cédric Krier wrote: > On 2018-04-21 09:09, Richard PALO wrote: > > but get_rec_name() returns the hierarchy of names when there is a parent > > type, > > case not treated for but which is *always* the case for > > account_account_type. > > Indeed, it will be good to

Re: [tryton-dev] import_data and model account with account_account_type (RESEND)

2018-04-21 Thread Richard PALO
Le 21/04/2018 à 10:23, Cédric Krier a écrit : On 2018-04-21 09:09, Richard PALO wrote: but get_rec_name() returns the hierarchy of names when there is a parent type, case not treated for but which is *always* the case for account_account_type. Indeed, it will be good to customize the

Re: [tryton-dev] import_data and model account with account_account_type (RESEND)

2018-04-21 Thread Cédric Krier
On 2018-04-21 09:09, Richard PALO wrote: > but get_rec_name() returns the hierarchy of names when there is a parent type, > case not treated for but which is *always* the case for account_account_type. Indeed, it will be good to customize the search_rec_name like in party.category. > If I set on

Re: [tryton-dev] import_data and model account with account_account_type (RESEND)

2018-04-21 Thread Richard PALO
Le 20/04/2018 à 20:22, Richard PALO a écrit : Le 20/04/2018 à 20:15, Richard PALO a écrit : Thanks, I'm finding the correct account.account.type instance now with the following simplified snippet: md, = ModelData.find(['fs_id', '=', data[-1]]) at, =

Re: [tryton-dev] import_data and model account with account_account_type (RESEND)

2018-04-20 Thread Richard PALO
Le 20/04/2018 à 20:15, Richard PALO a écrit : Thanks, I'm finding the correct account.account.type instance now with the following simplified snippet: md, = ModelData.find(['fs_id', '=', data[-1]]) at, = AccountType.find(['template', '=', md.db_id]) But import_data()

Re: [tryton-dev] import_data and model account with account_account_type (RESEND)

2018-04-20 Thread Richard PALO
Le 20/04/2018 à 11:35, Sergi Almacellas Abellana a écrit : You can use the following code to get the db ids: pool = Pool() ModelData = pool.get('ir.model.data') db_id = ModelData.get_id('account_fr', 'creances_autres') And then you can get the type of your company with: Type =

Re: [tryton-dev] import_data and model account with account_account_type (RESEND)

2018-04-20 Thread Sergi Almacellas Abellana
El 19/04/18 a les 18:14, Richard PALO ha escrit: > Le 19/04/2018 à 17:38, Cédric Krier a écrit : >> On 2018-04-18 17:40, Richard PALO wrote: >>> In the French plan, there are unfortunately 7 instances of >>> account_account_type_template >>> with the name 'Autres'... but in the xml, there are

Re: [tryton-dev] import_data and model account with account_account_type (RESEND)

2018-04-19 Thread Richard PALO
Le 19/04/2018 à 17:38, Cédric Krier a écrit : On 2018-04-18 17:40, Richard PALO wrote: In the French plan, there are unfortunately 7 instances of account_account_type_template with the name 'Autres'... but in the xml, there are indeed unique ID's... Is the mapping of these (xml id => sql id)

Re: [tryton-dev] import_data and model account with account_account_type (RESEND)

2018-04-19 Thread Cédric Krier
On 2018-04-18 17:40, Richard PALO wrote: > In the French plan, there are unfortunately 7 instances of > account_account_type_template > with the name 'Autres'... but in the xml, there are indeed unique ID's... > > Is the mapping of these (xml id => sql id) stored somewhere it can be accessed >

[tryton-dev] import_data and model account with account_account_type (RESEND)

2018-04-18 Thread Richard PALO
In the French plan, there are unfortunately 7 instances of account_account_type_template with the name 'Autres'... but in the xml, there are indeed unique ID's... Is the mapping of these (xml id => sql id) stored somewhere it can be accessed to somehow facilitate import? That is, it would be