<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>

    <!-- To solve bug 1240265, we have to delete all fiscal position templates before each update.
         The valid ones will be re-created later during the update.
         /!\ This must be executed *before* loading the fiscal position templates!! -->
    <delete model="account.fiscal.position.template" search="[('chart_template_id','=',ref('l10n_fr_pcg_chart_template'))]"/>


    <!-- = = = = = = = = = = = = = = = -->
    <!-- Fiscal Position Templates     -->
    <!-- = = = = = = = = = = = = = = = -->

<!-- Position Géographique du partenaire -->
        <record id="fiscal_position_template_intraeub2b" model="account.fiscal.position.template">
            <field name="name">Intra-EU B2B</field>
            <field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
            <field name="note">French VAT exemption according to articles 262 ter I (for products) and/or 283-2 (for services) of "CGI"</field>
        </record>

        <record id="fiscal_position_template_import_export" model="account.fiscal.position.template">
            <field name="name">Import/Export + DOM-TOM</field>
            <field name="chart_template_id" ref="l10n_fr_pcg_chart_template"/>
            <field name="note">French VAT exemption according to articles 262 I of "CGI"</field>
        </record>


    <!-- = = = = = = = = = = = = = = = -->
    <!-- Fiscal Position Tax Templates -->
    <!-- = = = = = = = = = = = = = = = -->

<!-- Par défaut, les produits doivent être paramétrés pour utiliser les taxes, paramétrées pour des numéro de comptes (nationaux) -->

<!-- Zone Intracommunautaire B2B -->
<!-- ventes -->
<!-- Taux Normal -->
        <record id="fp_tax_template_intraeub2b_vt_normale" model="account.fiscal.position.tax.template">
            <field name="position_id" ref="fiscal_position_template_intraeub2b" />
            <field name="tax_src_id" ref="tva_normale" />
            <field name="tax_dest_id" ref="tva_intra_0" />
        </record>
<!-- Taux DOM-TOM -->
        <record id="fp_tax_template_intraeub2b_vt_specifique" model="account.fiscal.position.tax.template">
            <field name="position_id" ref="fiscal_position_template_intraeub2b" />
            <field name="tax_src_id" ref="tva_specifique" />
            <field name="tax_dest_id" ref="tva_intra_0" />
        </record>
<!-- Taux Intermédiaire -->
        <record id="fp_tax_template_intraeub2b_vt_intermediaire" model="account.fiscal.position.tax.template">
            <field name="position_id" ref="fiscal_position_template_intraeub2b" />
            <field name="tax_src_id" ref="tva_intermediaire" />
            <field name="tax_dest_id" ref="tva_intra_0" />
        </record>
<!-- Taux réduit -->
        <record id="fp_tax_template_intraeub2b_vt_reduite" model="account.fiscal.position.tax.template">
            <field name="position_id" ref="fiscal_position_template_intraeub2b" />
            <field name="tax_src_id" ref="tva_reduite" />
            <field name="tax_dest_id" ref="tva_intra_0" />
        </record>
<!-- Taux super réduit -->
        <record id="fp_tax_template_intraeub2b_vt_super_reduite" model="account.fiscal.position.tax.template">
            <field name="position_id" ref="fiscal_position_template_intraeub2b" />
            <field name="tax_src_id" ref="tva_super_reduite" />
            <field name="tax_dest_id" ref="tva_intra_0" />
        </record>
<!-- achats -->
<!-- Taux Normal -->
        <record id="fp_tax_template_intraeub2b_ha_normale_deduc" model="account.fiscal.position.tax.template">
            <field name="position_id" ref="fiscal_position_template_intraeub2b" />
            <field name="tax_src_id" ref="tva_acq_normale" />
            <field name="tax_dest_id" ref="tva_intra_normale" />
        </record>
        <record id="fp_tax_template_intraeub2b_ha_normale_acq" model="account.fiscal.position.tax.template">
            <field name="position_id" ref="fiscal_position_template_intraeub2b" />
            <field name="tax_src_id" ref="tva_acq_normale" />
            <field name="tax_dest_id" ref="tva_acq_intra_normale" />
        </record>
<!-- Taux DOM-TOM -->
        <record id="fp_tax_template_intraeub2b_ha_specifique_deduc" model="account.fiscal.position.tax.template">
            <field name="position_id" ref="fiscal_position_template_intraeub2b" />
            <field name="tax_src_id" ref="tva_acq_specifique" />
            <field name="tax_dest_id" ref="tva_intra_specifique" />
        </record>
        <record id="fp_tax_template_intraeub2b_ha_specifique_acq" model="account.fiscal.position.tax.template">
            <field name="position_id" ref="fiscal_position_template_intraeub2b" />
            <field name="tax_src_id" ref="tva_acq_specifique" />
            <field name="tax_dest_id" ref="tva_acq_intra_specifique" />
        </record>
<!-- Taux Intermédiaire -->
        <record id="fp_tax_template_intraeub2b_ha_intermediaire_deduc" model="account.fiscal.position.tax.template">
            <field name="position_id" ref="fiscal_position_template_intraeub2b" />
            <field name="tax_src_id" ref="tva_acq_intermediaire" />
            <field name="tax_dest_id" ref="tva_intra_intermediaire" />
        </record>
        <record id="fp_tax_template_intraeub2b_ha_intermediaire_acq" model="account.fiscal.position.tax.template">
            <field name="position_id" ref="fiscal_position_template_intraeub2b" />
            <field name="tax_src_id" ref="tva_acq_intermediaire" />
            <field name="tax_dest_id" ref="tva_acq_intra_intermediaire" />
        </record>
<!-- Taux réduit -->
        <record id="fp_tax_template_intraeub2b_ha_reduite_deduc" model="account.fiscal.position.tax.template">
            <field name="position_id" ref="fiscal_position_template_intraeub2b" />
            <field name="tax_src_id" ref="tva_acq_reduite" />
            <field name="tax_dest_id" ref="tva_intra_reduite" />
        </record>
        <record id="fp_tax_template_intraeub2b_ha_reduite_acq" model="account.fiscal.position.tax.template">
            <field name="position_id" ref="fiscal_position_template_intraeub2b" />
            <field name="tax_src_id" ref="tva_acq_reduite" />
            <field name="tax_dest_id" ref="tva_acq_intra_reduite" />
        </record>
<!-- Taux super réduit -->
        <record id="fp_tax_template_intraeub2b_ha_super_reduite_deduc" model="account.fiscal.position.tax.template">
            <field name="position_id" ref="fiscal_position_template_intraeub2b" />
            <field name="tax_src_id" ref="tva_acq_super_reduite" />
            <field name="tax_dest_id" ref="tva_intra_super_reduite" />
        </record>
        <record id="fp_tax_template_intraeub2b_ha_super_reduite_acq" model="account.fiscal.position.tax.template">
            <field name="position_id" ref="fiscal_position_template_intraeub2b" />
            <field name="tax_src_id" ref="tva_acq_super_reduite" />
            <field name="tax_dest_id" ref="tva_acq_intra_super_reduite" />
        </record>

<!-- Import/Export + DOM/TOM -->
<!-- ventes -->
<!-- Taux Normal -->
        <record id="fp_tax_template_impexp_vt_normale" model="account.fiscal.position.tax.template">
            <field name="position_id" ref="fiscal_position_template_import_export" />
            <field name="tax_src_id" ref="tva_normale" />
            <field name="tax_dest_id" ref="tva_export_0" />
        </record>
<!-- Taux DOM-TOM -->
        <record id="fp_tax_template_impexp_vt_specifique" model="account.fiscal.position.tax.template">
            <field name="position_id" ref="fiscal_position_template_import_export" />
            <field name="tax_src_id" ref="tva_specifique" />
            <field name="tax_dest_id" ref="tva_export_0" />
        </record>
<!-- Taux Intermédiare -->
        <record id="fp_tax_template_impexp_vt_intermediaire" model="account.fiscal.position.tax.template">
            <field name="position_id" ref="fiscal_position_template_import_export" />
            <field name="tax_src_id" ref="tva_intermediaire" />
            <field name="tax_dest_id" ref="tva_export_0" />
        </record>
<!-- Taux Réduit -->
        <record id="fp_tax_template_impexp_vt_reduite" model="account.fiscal.position.tax.template">
            <field name="position_id" ref="fiscal_position_template_import_export" />
            <field name="tax_src_id" ref="tva_reduite" />
            <field name="tax_dest_id" ref="tva_export_0" />
        </record>
<!-- Taux super réduit -->
        <record id="fp_tax_template_impexp_vt_super_reduite" model="account.fiscal.position.tax.template">
            <field name="position_id" ref="fiscal_position_template_import_export" />
            <field name="tax_src_id" ref="tva_super_reduite" />
            <field name="tax_dest_id" ref="tva_export_0" />
        </record>

<!-- achats -->
<!-- Taux Normal -->
        <record id="fp_tax_template_impexp_ha_normale" model="account.fiscal.position.tax.template">
            <field name="position_id" ref="fiscal_position_template_import_export" />
            <field name="tax_src_id" ref="tva_acq_normale" />
            <field name="tax_dest_id" ref="tva_import_0" />
        </record>
<!-- Taux DOM-TOM -->
        <record id="fp_tax_template_impexp_ha_specifique" model="account.fiscal.position.tax.template">
            <field name="position_id" ref="fiscal_position_template_import_export" />
            <field name="tax_src_id" ref="tva_acq_specifique" />
            <field name="tax_dest_id" ref="tva_import_0" />
        </record>
<!-- Taux Intermédiare -->
        <record id="fp_tax_template_impexp_ha_intermediaire" model="account.fiscal.position.tax.template">
            <field name="position_id" ref="fiscal_position_template_import_export" />
            <field name="tax_src_id" ref="tva_acq_intermediaire" />
            <field name="tax_dest_id" ref="tva_import_0" />
        </record>
<!-- Taux Réduit -->
        <record id="fp_tax_template_impexp_ha_reduite" model="account.fiscal.position.tax.template">
            <field name="position_id" ref="fiscal_position_template_import_export" />
            <field name="tax_src_id" ref="tva_acq_reduite" />
            <field name="tax_dest_id" ref="tva_import_0" />
        </record>
<!-- Taux super réduit -->
        <record id="fp_tax_template_impexp_ha_super_reduite" model="account.fiscal.position.tax.template">
            <field name="position_id" ref="fiscal_position_template_import_export" />
            <field name="tax_src_id" ref="tva_acq_super_reduite" />
            <field name="tax_dest_id" ref="tva_import_0" />
        </record>

    </data>
</openerp>
