Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
894 Представления

Hi,


I create a new module that need to insert a new tax in odoo.

My concern if for french chart of account. In the source code of I10n_fr I notice the existence of the file account.tax-fr.csv that seem to contain what I want.

My problem is that I don't find where this file is load and how I could to the same thing in my custom module to load my new tax.


Can anyone help me?


Regards

Аватар
Отменить

Guten Tag 

Ich bin bis 23.09.2024 nicht im Büro. 

In dringenden Angelegenheiten senden Sie bitte Ihre Anfrage an support@nivels.ch oder rufen uns auf unserer Informatik Support Hotline +41 81 511 65 04 an. 

Besten Dank 

Ralf Müller


*********************** 

Dear customer Your answer to your email will be delayed as I’m in holiday until September 23.

In urgent cases please send your inquiry to support@nivels.ch or call our support helpline @ +41 81 511 65 04. 

Best regards, 

Лучший ответ

Hi,

To insert a new tax in Odoo for the French chart of accounts, you can indeed follow a similar approach to how the account.tax-fr.csv file in the l10n_fr module works. CSV files in Odoo are typically loaded during module installation through the data section in the module's manifest file (__manifest__.py).


For example you can refer the following code:

{

    'name': 'Custom Tax Module',

    'version': '17.0.1.0.0',

    'depends': ['account'],

    'data': [

        'data/account.tax.custom.csv',

    ],

}


Hope this helps.

Аватар
Отменить
Автор Лучший ответ

Hello,


Thank you very much. With your help I managed to import my new tax from a csv file. My mistake was not to have added the dependency with the localization module of my country in the manifest file.

Thanks again, you've saved me several hours going round in circles.

Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
февр. 25
1077
1
нояб. 24
1083
1
апр. 24
1598
0
мар. 24
1167
1
апр. 24
1360