Skip to Content
Menu
This question has been flagged
2 Replies
668 Views

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

Avatar
Discard

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, 

Best Answer

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.

Avatar
Discard
Author Best Answer

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.

Avatar
Discard
Related Posts Replies Views Activity
1
Feb 25
623
1
Nov 24
720
1
Apr 24
1234
0
Mar 24
738
1
Apr 24
948