Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
2 Antworten
803 Ansichten

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
Verwerfen

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, 

Beste Antwort

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
Verwerfen
Autor Beste Antwort

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
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Feb. 25
945
1
Nov. 24
963
1
Apr. 24
1497
0
März 24
974
1
Apr. 24
1205