RemiFr82
2 months ago
17 changed files with 1098 additions and 0 deletions
-
6l10n_fr_tax_return/__init__.py
-
55l10n_fr_tax_return/__manifest__.py
-
342l10n_fr_tax_return/data/account_tax_return.xml
-
212l10n_fr_tax_return/i18n/fr.po
-
3l10n_fr_tax_return/models/__init__.py
-
10l10n_fr_tax_return/models/account_account.py
-
52l10n_fr_tax_return/models/account_tax_return.py
-
22l10n_fr_tax_return/models/account_tax_return_year.py
-
4l10n_fr_tax_return/security/ir.model.access.csv
-
BINl10n_fr_tax_return/static/description/icon.png
-
93l10n_fr_tax_return/static/description/icon.svg
-
22l10n_fr_tax_return/views/account_account.xml
-
67l10n_fr_tax_return/views/account_tax_return.xml
-
65l10n_fr_tax_return/views/account_tax_return_year.xml
-
1l10n_fr_tax_return/wizards/__init__.py
-
106l10n_fr_tax_return/wizards/tax_return_wizard.py
-
38l10n_fr_tax_return/wizards/tax_return_wizard.xml
@ -0,0 +1,6 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# from . import controllers |
|||
from . import models |
|||
from . import wizards |
|||
|
|||
# from .hooks import pre_init_hook, post_init_hook, uninstall_hook |
@ -0,0 +1,55 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html). |
|||
{ |
|||
"name": "French tax return (2035)", |
|||
"version": "1.0.0", |
|||
"summary": "Computes lines for 2035 BNC declaration", |
|||
"description": """ |
|||
Module description |
|||
""", |
|||
"author": "RemiFr82", |
|||
"contributors": "", |
|||
"maintainer": "RemiFr82", |
|||
"website": "https://remifr82.me", |
|||
"license": "LGPL-3", |
|||
"category": "", |
|||
# "price": 0, |
|||
# "currency": "EUR", |
|||
"application": False, |
|||
"installable": True, |
|||
"auto_install": False, |
|||
# "pre_init_hook": "", |
|||
# "post_init_hook": "", |
|||
# "uninstall_hook": "", |
|||
# "excludes": [], |
|||
# "external_dependencies": [], |
|||
"depends": [ |
|||
"account", |
|||
"l10n_fr", |
|||
], |
|||
"data": [ |
|||
# Base data |
|||
"data/account_tax_return.xml", |
|||
# Security |
|||
# 'security/res_groups.xml', |
|||
"security/ir.model.access.csv", |
|||
# 'security/ir_rule.xml', |
|||
# Views |
|||
"views/account_account.xml", |
|||
"views/account_tax_return.xml", |
|||
"views/account_tax_return_year.xml", |
|||
# Wizards |
|||
"wizards/tax_return_wizard.xml", |
|||
# Reports |
|||
# 'reports/report_templates.xml', |
|||
# 'reports/sql_view.xml', |
|||
], |
|||
"assets": { |
|||
# "reports/report_assets.xml" |
|||
}, |
|||
"css": [], |
|||
"images": [], |
|||
"js": [], |
|||
"test": [], |
|||
"demo": [], |
|||
} |
@ -0,0 +1,342 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
<data noupdate="1"> |
|||
<!-- <data> --> |
|||
|
|||
<!-- Revenue lines --> |
|||
|
|||
<record id="atr_line_ag" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne AG</field> |
|||
<field name="is_sum_line" eval="True" /> |
|||
<field name="line_type">credit</field> |
|||
</record> |
|||
|
|||
<record id="atr_line_af" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne AF</field> |
|||
<field name="add_line_id" ref="atr_line_ag" /> |
|||
<field name="is_sum_line" eval="True" /> |
|||
<field name="line_type">credit</field> |
|||
</record> |
|||
|
|||
<record id="atr_line_ad" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne AD</field> |
|||
<field name="add_line_id" ref="atr_line_ag" /> |
|||
<field name="is_sum_line" eval="True" /> |
|||
<field name="line_type">credit</field> |
|||
</record> |
|||
|
|||
<record id="atr_line_ae" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne AE</field> |
|||
<field name="add_line_id" ref="atr_line_ag" /> |
|||
<field name="is_sum_line" eval="True" /> |
|||
<field name="line_type">credit</field> |
|||
</record> |
|||
|
|||
<record id="atr_line_ac" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne AC</field> |
|||
<field name="sub_line_id" ref="atr_line_ad" /> |
|||
<field name="is_sum_line" eval="True" /> |
|||
<field name="line_type">credit</field> |
|||
</record> |
|||
|
|||
<record id="atr_line_ab" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne AB</field> |
|||
<field name="sub_line_id" ref="atr_line_ad" /> |
|||
<field name="is_sum_line" eval="True" /> |
|||
<field name="line_type">credit</field> |
|||
</record> |
|||
|
|||
<record id="atr_line_aa" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne AA</field> |
|||
<field name="add_line_id" ref="atr_line_ad" /> |
|||
<field name="is_sum_line" eval="True" /> |
|||
<field name="line_type">credit</field> |
|||
</record> |
|||
|
|||
<!-- Expenses lines --> |
|||
|
|||
<record id="atr_line_br" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne BR</field> |
|||
<field name="is_sum_line" eval="True" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_bp" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne BP</field> |
|||
<field name="add_line_id" ref="atr_line_br" /> |
|||
<field name="is_sum_line" eval="True" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_bn" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne BN</field> |
|||
<field name="add_line_id" ref="atr_line_br" /> |
|||
<field name="is_sum_line" eval="True" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_bm" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne BM</field> |
|||
<field name="add_line_id" ref="atr_line_br" /> |
|||
<field name="is_sum_line" eval="True" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_bk" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne BK</field> |
|||
<field name="add_line_id" ref="atr_line_br" /> |
|||
<field name="is_sum_line" eval="True" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_bt" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne BT</field> |
|||
<field name="add_line_id" ref="atr_line_bk" /> |
|||
<field name="is_sum_line" eval="True" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_bu" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne BU</field> |
|||
<field name="add_line_id" ref="atr_line_bk" /> |
|||
<field name="is_sum_line" eval="True" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_bz" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne BZ</field> |
|||
<field name="add_line_id" ref="atr_line_bk" /> |
|||
<field name="is_sum_line" eval="True" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_bj" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne BJ</field> |
|||
<field name="add_line_id" ref="atr_line_br" /> |
|||
<field name="is_sum_line" eval="True" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_bh" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne BH</field> |
|||
<field name="add_line_id" ref="atr_line_br" /> |
|||
<field name="is_sum_line" eval="True" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_bg" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne BG</field> |
|||
<field name="add_line_id" ref="atr_line_br" /> |
|||
<field name="is_sum_line" eval="True" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_bf" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne BF</field> |
|||
<field name="add_line_id" ref="atr_line_br" /> |
|||
<field name="is_sum_line" eval="True" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_bv" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne BV</field> |
|||
<field name="add_line_id" ref="atr_line_br" /> |
|||
<field name="is_sum_line" eval="True" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_bs" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne BS</field> |
|||
<field name="add_line_id" ref="atr_line_br" /> |
|||
<field name="is_sum_line" eval="True" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_jy" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne JY</field> |
|||
<field name="add_line_id" ref="atr_line_br" /> |
|||
<field name="is_sum_line" eval="True" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_bd" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne BD</field> |
|||
<field name="add_line_id" ref="atr_line_br" /> |
|||
<field name="is_sum_line" eval="True" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_bc" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne BC</field> |
|||
<field name="add_line_id" ref="atr_line_br" /> |
|||
<field name="is_sum_line" eval="True" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_bb" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne BB</field> |
|||
<field name="add_line_id" ref="atr_line_br" /> |
|||
<field name="is_sum_line" eval="True" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_ba" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne BA</field> |
|||
<field name="add_line_id" ref="atr_line_br" /> |
|||
<field name="is_sum_line" eval="True" /> |
|||
</record> |
|||
|
|||
<!-- Numbered lines --> |
|||
|
|||
<record id="atr_line_1" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne 1</field> |
|||
<field name="add_line_id" ref="atr_line_aa" /> |
|||
<field name="line_type">credit</field> |
|||
</record> |
|||
|
|||
<record id="atr_line_2" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne 2</field> |
|||
<field name="add_line_id" ref="atr_line_ab" /> |
|||
<field name="line_type">credit</field> |
|||
</record> |
|||
|
|||
<record id="atr_line_3" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne 3</field> |
|||
<field name="add_line_id" ref="atr_line_ac" /> |
|||
<field name="line_type">credit</field> |
|||
</record> |
|||
|
|||
<!-- <record id="atr_line_4" model="account.tax.return" forcecreate="0" > |
|||
<field name="name">Ligne 4</field> |
|||
<field name="line_type">credit</field> |
|||
</record> --> |
|||
|
|||
<record id="atr_line_5" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne 5</field> |
|||
<field name="add_line_id" ref="atr_line_ae" /> |
|||
<field name="line_type">credit</field> |
|||
</record> |
|||
|
|||
<record id="atr_line_6" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne 6</field> |
|||
<field name="add_line_id" ref="atr_line_af" /> |
|||
<field name="line_type">credit</field> |
|||
</record> |
|||
|
|||
<!-- <record id="atr_line_7" model="account.tax.return" forcecreate="0" > |
|||
<field name="name">Ligne 7</field> |
|||
<field name="line_type">credit</field> |
|||
</record> --> |
|||
|
|||
<record id="atr_line_8" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne 8</field> |
|||
<field name="add_line_id" ref="atr_line_ba" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_9" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne 9</field> |
|||
<field name="add_line_id" ref="atr_line_bb" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_10" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne 10</field> |
|||
<field name="add_line_id" ref="atr_line_bc" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_11" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne 11</field> |
|||
<field name="add_line_id" ref="atr_line_bd" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_12" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne 12</field> |
|||
<field name="add_line_id" ref="atr_line_jy" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_13" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne 13</field> |
|||
<field name="add_line_id" ref="atr_line_bs" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_14" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne 14</field> |
|||
<field name="add_line_id" ref="atr_line_bv" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_15" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne 15</field> |
|||
<field name="add_line_id" ref="atr_line_bf" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_16" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne 16</field> |
|||
<field name="add_line_id" ref="atr_line_bg" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_17" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne 17</field> |
|||
<field name="add_line_id" ref="atr_line_bh" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_18" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne 18</field> |
|||
<field name="add_line_id" ref="atr_line_bh" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_19" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne 19</field> |
|||
<field name="add_line_id" ref="atr_line_bh" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_20" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne 20</field> |
|||
<field name="add_line_id" ref="atr_line_bh" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_21" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne 21</field> |
|||
<field name="add_line_id" ref="atr_line_bh" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_22" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne 22</field> |
|||
<field name="add_line_id" ref="atr_line_bh" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_23" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne 23</field> |
|||
<field name="add_line_id" ref="atr_line_bj" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_24" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne 24</field> |
|||
<field name="add_line_id" ref="atr_line_bj" /> |
|||
</record> |
|||
|
|||
<!-- <record id="atr_line_25" model="account.tax.return" forcecreate="0" > |
|||
<field name="name">Ligne 25</field> |
|||
</record> --> |
|||
|
|||
<record id="atr_line_26" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne 26</field> |
|||
<field name="add_line_id" ref="atr_line_bm" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_27" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne 27</field> |
|||
<field name="add_line_id" ref="atr_line_bm" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_28" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne 28</field> |
|||
<field name="add_line_id" ref="atr_line_bm" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_29" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne 29</field> |
|||
<field name="add_line_id" ref="atr_line_bm" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_30" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne 30</field> |
|||
<field name="add_line_id" ref="atr_line_bm" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_31" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne 31</field> |
|||
<field name="add_line_id" ref="atr_line_bn" /> |
|||
</record> |
|||
|
|||
<record id="atr_line_32" model="account.tax.return" forcecreate="0"> |
|||
<field name="name">Ligne 32</field> |
|||
<field name="add_line_id" ref="atr_line_bp" /> |
|||
</record> |
|||
|
|||
<!-- <record id="atr_line_33" model="account.tax.return" forcecreate="0" > |
|||
<field name="name">Ligne 33</field> |
|||
</record> --> |
|||
|
|||
</data> |
|||
</odoo> |
@ -0,0 +1,212 @@ |
|||
# Translation of Odoo Server. |
|||
# This file contains the translation of the following modules: |
|||
# * l10n_fr_tax_return |
|||
# |
|||
msgid "" |
|||
msgstr "" |
|||
"Project-Id-Version: Odoo Server 16.0+e-20230613\n" |
|||
"Report-Msgid-Bugs-To: \n" |
|||
"POT-Creation-Date: 2024-09-21 11:13+0000\n" |
|||
"PO-Revision-Date: 2024-09-21 11:13+0000\n" |
|||
"Last-Translator: \n" |
|||
"Language-Team: \n" |
|||
"MIME-Version: 1.0\n" |
|||
"Content-Type: text/plain; charset=UTF-8\n" |
|||
"Content-Transfer-Encoding: \n" |
|||
"Plural-Forms: \n" |
|||
|
|||
#. module: l10n_fr_tax_return |
|||
#: model:ir.model,name:l10n_fr_tax_return.model_account_account |
|||
msgid "Account" |
|||
msgstr "Compte" |
|||
|
|||
#. module: l10n_fr_tax_return |
|||
#: model:ir.model.fields,field_description:l10n_fr_tax_return.field_account_tax_return__account_ids |
|||
msgid "Accounts to sum" |
|||
msgstr "Comptes à sommer" |
|||
|
|||
#. module: l10n_fr_tax_return |
|||
#: model:ir.model.fields,field_description:l10n_fr_tax_return.field_account_tax_return__add_line_id |
|||
msgid "Added to line" |
|||
msgstr "Ajoutée à la ligne" |
|||
|
|||
#. module: l10n_fr_tax_return |
|||
#: model:ir.model.fields,field_description:l10n_fr_tax_return.field_account_tax_return_year__amount |
|||
msgid "Amount" |
|||
msgstr "" |
|||
|
|||
#. module: l10n_fr_tax_return |
|||
#: model_terms:ir.ui.view,arch_db:l10n_fr_tax_return.tax_return_wizard_view_form |
|||
msgid "Cancel" |
|||
msgstr "Annuler" |
|||
|
|||
#. module: l10n_fr_tax_return |
|||
#: model_terms:ir.ui.view,arch_db:l10n_fr_tax_return.tax_return_wizard_view_form |
|||
msgid "Compute year tax return lines" |
|||
msgstr "Calculer les lignes pour l'année" |
|||
|
|||
#. module: l10n_fr_tax_return |
|||
#: model:ir.model.fields,field_description:l10n_fr_tax_return.field_account_tax_return__create_uid |
|||
#: model:ir.model.fields,field_description:l10n_fr_tax_return.field_account_tax_return_year__create_uid |
|||
#: model:ir.model.fields,field_description:l10n_fr_tax_return.field_tax_return_wizard__create_uid |
|||
msgid "Created by" |
|||
msgstr "Créé par" |
|||
|
|||
#. module: l10n_fr_tax_return |
|||
#: model:ir.model.fields,field_description:l10n_fr_tax_return.field_account_tax_return__create_date |
|||
#: model:ir.model.fields,field_description:l10n_fr_tax_return.field_account_tax_return_year__create_date |
|||
#: model:ir.model.fields,field_description:l10n_fr_tax_return.field_tax_return_wizard__create_date |
|||
msgid "Created on" |
|||
msgstr "Créé le" |
|||
|
|||
#. module: l10n_fr_tax_return |
|||
#. odoo-python |
|||
#: code:addons/l10n_fr_tax_return/models/account_tax_return.py:0 |
|||
#: model:ir.model.fields.selection,name:l10n_fr_tax_return.selection__account_tax_return__line_type__credit |
|||
#: model:ir.model.fields.selection,name:l10n_fr_tax_return.selection__account_tax_return_year__line_type__credit |
|||
#, python-format |
|||
msgid "Credit" |
|||
msgstr "Crédit" |
|||
|
|||
#. module: l10n_fr_tax_return |
|||
#. odoo-python |
|||
#: code:addons/l10n_fr_tax_return/models/account_tax_return.py:0 |
|||
#: model:ir.model.fields.selection,name:l10n_fr_tax_return.selection__account_tax_return__line_type__debit |
|||
#: model:ir.model.fields.selection,name:l10n_fr_tax_return.selection__account_tax_return_year__line_type__debit |
|||
#, python-format |
|||
msgid "Debit" |
|||
msgstr "Débit" |
|||
|
|||
#. module: l10n_fr_tax_return |
|||
#: model:ir.model.fields,field_description:l10n_fr_tax_return.field_account_tax_return__display_name |
|||
#: model:ir.model.fields,field_description:l10n_fr_tax_return.field_account_tax_return_year__display_name |
|||
#: model:ir.model.fields,field_description:l10n_fr_tax_return.field_tax_return_wizard__display_name |
|||
msgid "Display Name" |
|||
msgstr "Nom à afficher" |
|||
|
|||
#. module: l10n_fr_tax_return |
|||
#: model_terms:ir.ui.view,arch_db:l10n_fr_tax_return.account_tax_return_year_view_search |
|||
msgid "Group By" |
|||
msgstr "Regrouper par" |
|||
|
|||
#. module: l10n_fr_tax_return |
|||
#: model:ir.model.fields,field_description:l10n_fr_tax_return.field_account_tax_return__id |
|||
#: model:ir.model.fields,field_description:l10n_fr_tax_return.field_account_tax_return_year__id |
|||
#: model:ir.model.fields,field_description:l10n_fr_tax_return.field_tax_return_wizard__id |
|||
msgid "ID" |
|||
msgstr "" |
|||
|
|||
#. module: l10n_fr_tax_return |
|||
#: model:ir.model.fields,field_description:l10n_fr_tax_return.field_account_tax_return____last_update |
|||
#: model:ir.model.fields,field_description:l10n_fr_tax_return.field_account_tax_return_year____last_update |
|||
#: model:ir.model.fields,field_description:l10n_fr_tax_return.field_tax_return_wizard____last_update |
|||
msgid "Last Modified on" |
|||
msgstr "Dernière modification le" |
|||
|
|||
#. module: l10n_fr_tax_return |
|||
#: model:ir.model.fields,field_description:l10n_fr_tax_return.field_account_tax_return__write_uid |
|||
#: model:ir.model.fields,field_description:l10n_fr_tax_return.field_account_tax_return_year__write_uid |
|||
#: model:ir.model.fields,field_description:l10n_fr_tax_return.field_tax_return_wizard__write_uid |
|||
msgid "Last Updated by" |
|||
msgstr "Dernière mise à jour par" |
|||
|
|||
#. module: l10n_fr_tax_return |
|||
#: model:ir.model.fields,field_description:l10n_fr_tax_return.field_account_tax_return__write_date |
|||
#: model:ir.model.fields,field_description:l10n_fr_tax_return.field_account_tax_return_year__write_date |
|||
#: model:ir.model.fields,field_description:l10n_fr_tax_return.field_tax_return_wizard__write_date |
|||
msgid "Last Updated on" |
|||
msgstr "Dernière mise à jour le" |
|||
|
|||
#. module: l10n_fr_tax_return |
|||
#: model:ir.model.fields,field_description:l10n_fr_tax_return.field_account_tax_return_year__line_id |
|||
msgid "Line" |
|||
msgstr "Ligne" |
|||
|
|||
#. module: l10n_fr_tax_return |
|||
#: model:ir.model.fields,field_description:l10n_fr_tax_return.field_account_tax_return__line_type |
|||
#: model:ir.model.fields,field_description:l10n_fr_tax_return.field_account_tax_return_year__line_type |
|||
msgid "Line Type" |
|||
msgstr "Type de ligne" |
|||
|
|||
#. module: l10n_fr_tax_return |
|||
#: model:ir.model.fields,field_description:l10n_fr_tax_return.field_account_tax_return__sum_line_ids |
|||
msgid "Lines to add" |
|||
msgstr "Lignes à ajouter" |
|||
|
|||
#. module: l10n_fr_tax_return |
|||
#: model:ir.model.fields,field_description:l10n_fr_tax_return.field_account_tax_return__ded_line_ids |
|||
msgid "Lines to substract" |
|||
msgstr "Lignes à soustraire" |
|||
|
|||
#. module: l10n_fr_tax_return |
|||
#. odoo-python |
|||
#: code:addons/l10n_fr_tax_return/wizards/tax_return_wizard.py:0 |
|||
#, python-format |
|||
msgid "" |
|||
"Please set a year in the past and after you started your odoo accounting." |
|||
msgstr "" |
|||
"Merci de renseigner une année postérieure au début de la comptabilité Odoo." |
|||
|
|||
#. module: l10n_fr_tax_return |
|||
#: model:ir.model.fields,field_description:l10n_fr_tax_return.field_account_tax_return__name |
|||
msgid "Reference" |
|||
msgstr "Référence" |
|||
|
|||
#. module: l10n_fr_tax_return |
|||
#: model:ir.model.fields,field_description:l10n_fr_tax_return.field_account_tax_return__sub_line_id |
|||
msgid "Substracted from line" |
|||
msgstr "Déduite de la ligne" |
|||
|
|||
#. module: l10n_fr_tax_return |
|||
#: model:ir.ui.menu,name:l10n_fr_tax_return.tax_return_wizard_menu |
|||
msgid "Tax return compute" |
|||
msgstr "Calcul des lignes" |
|||
|
|||
#. module: l10n_fr_tax_return |
|||
#: model:ir.model,name:l10n_fr_tax_return.model_account_tax_return |
|||
#: model:ir.model.fields,field_description:l10n_fr_tax_return.field_account_account__tax_return_id |
|||
msgid "Tax return line" |
|||
msgstr "Lignes de déclaration" |
|||
|
|||
#. module: l10n_fr_tax_return |
|||
#: model:ir.model,name:l10n_fr_tax_return.model_account_tax_return_year |
|||
msgid "Tax return line year" |
|||
msgstr "Valeurs des lignes" |
|||
|
|||
#. module: l10n_fr_tax_return |
|||
#: model:ir.ui.menu,name:l10n_fr_tax_return.account_tax_return_menu |
|||
msgid "Tax return lines" |
|||
msgstr "Lignes de déclaration" |
|||
|
|||
#. module: l10n_fr_tax_return |
|||
#: model:ir.model,name:l10n_fr_tax_return.model_tax_return_wizard |
|||
msgid "Tax return wizard" |
|||
msgstr "Calcul des lignes de déclaration" |
|||
|
|||
#. module: l10n_fr_tax_return |
|||
#: model:ir.actions.act_window,name:l10n_fr_tax_return.account_tax_return_action |
|||
#: model:ir.actions.act_window,name:l10n_fr_tax_return.account_tax_return_year_action |
|||
msgid "Tax returns" |
|||
msgstr "Lignes de déclaration" |
|||
|
|||
#. module: l10n_fr_tax_return |
|||
#: model:ir.actions.act_window,name:l10n_fr_tax_return.tax_return_wizard_action |
|||
msgid "Tax returns compute" |
|||
msgstr "" |
|||
|
|||
#. module: l10n_fr_tax_return |
|||
#: model:ir.model.fields,field_description:l10n_fr_tax_return.field_account_tax_return__is_sum_line |
|||
msgid "This line is a sum of other lines" |
|||
msgstr "Cette ligne est une somme d'autres lignes" |
|||
|
|||
#. module: l10n_fr_tax_return |
|||
#: model:ir.model.fields,field_description:l10n_fr_tax_return.field_account_tax_return_year__name |
|||
#: model:ir.model.fields,field_description:l10n_fr_tax_return.field_tax_return_wizard__name |
|||
#: model_terms:ir.ui.view,arch_db:l10n_fr_tax_return.account_tax_return_year_view_search |
|||
msgid "Year" |
|||
msgstr "Année" |
|||
|
|||
#. module: l10n_fr_tax_return |
|||
#: model:ir.ui.menu,name:l10n_fr_tax_return.account_tax_return_year_menu |
|||
msgid "Year tax return lines" |
|||
msgstr "Lignes par année" |
@ -0,0 +1,3 @@ |
|||
from . import account_account |
|||
from . import account_tax_return |
|||
from . import account_tax_return_year |
@ -0,0 +1,10 @@ |
|||
from odoo import models, fields |
|||
|
|||
|
|||
class AccountAccount(models.Model): |
|||
_inherit = "account.account" |
|||
|
|||
tax_return_id = fields.Many2one( |
|||
comodel_name="account.tax.return", |
|||
string="Tax return line", |
|||
) |
@ -0,0 +1,52 @@ |
|||
from odoo import models, fields, _ |
|||
|
|||
|
|||
class AccountTaxReturn(models.Model): |
|||
_name = "account.tax.return" |
|||
_description = "Tax return line" |
|||
_order = "line_type, name, id" |
|||
|
|||
name = fields.Char(string="Reference") |
|||
account_ids = fields.One2many( |
|||
comodel_name="account.account", |
|||
inverse_name="tax_return_id", |
|||
string="Accounts to sum", |
|||
) |
|||
line_type = fields.Selection( |
|||
selection=[ |
|||
("credit", _("Credit")), |
|||
("debit", _("Debit")), |
|||
], |
|||
required=True, |
|||
default="debit", |
|||
) |
|||
# Sum between lines |
|||
add_line_id = fields.Many2one( |
|||
comodel_name="account.tax.return", |
|||
string="Added to line", |
|||
) |
|||
sub_line_id = fields.Many2one( |
|||
comodel_name="account.tax.return", |
|||
string="Substracted from line", |
|||
) |
|||
is_sum_line = fields.Boolean(string="This line is a sum of other lines") |
|||
sum_line_ids = fields.One2many( |
|||
comodel_name="account.tax.return", |
|||
inverse_name="add_line_id", |
|||
string="Lines to add", |
|||
) |
|||
ded_line_ids = fields.One2many( |
|||
comodel_name="account.tax.return", |
|||
inverse_name="sub_line_id", |
|||
string="Lines to substract", |
|||
) |
|||
|
|||
def compute_value(self, move_lines=[]): |
|||
self.ensure_one() |
|||
if not self.is_sum_line: |
|||
if self.line_type == "credit": |
|||
return sum(move_lines.mapped(lambda aml: aml.credit - aml.debit)) |
|||
else: |
|||
return sum(move_lines.mapped(lambda aml: aml.debit - aml.credit)) |
|||
else: |
|||
return 0.0 |
@ -0,0 +1,22 @@ |
|||
from odoo import models, fields |
|||
|
|||
|
|||
class AccountTaxReturnYear(models.Model): |
|||
_name = "account.tax.return.year" |
|||
_description = "Tax return line year" |
|||
_order = "name desc, line_id, id" |
|||
|
|||
name = fields.Char(string="Year", size=4) |
|||
line_id = fields.Many2one( |
|||
comodel_name="account.tax.return", |
|||
string="Line", |
|||
required=True, |
|||
ondelete="cascade", |
|||
) |
|||
line_type = fields.Selection( |
|||
related="line_id.line_type", |
|||
) |
|||
amount = fields.Float( |
|||
string="Amount", |
|||
digits="Product Price", |
|||
) |
@ -0,0 +1,4 @@ |
|||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink |
|||
access_account_tax_return_group_account_readonly,Account readonly account.tax.return,model_account_tax_return,account.group_account_readonly,1,1,1,1 |
|||
access_account_tax_return_year_group_account_readonly,Account readonly account.tax.return.year,model_account_tax_return_year,account.group_account_readonly,1,1,1,1 |
|||
access_tax_return_wizard_group_account_readonly,Account readonly tax.return.wizard,model_tax_return_wizard,base.group_user,1,1,1,1 |
After Width: 1539 | Height: 1771 | Size: 182 KiB |
@ -0,0 +1,93 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<!-- Generator: Adobe Illustrator 28.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> |
|||
<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" |
|||
viewBox="0 0 2000 2000" style="enable-background:new 0 0 2000 2000;" xml:space="preserve"> |
|||
<style type="text/css"> |
|||
.st0{fill:url(#SVGID_1_);} |
|||
.st1{opacity:0.288;fill:#5BB4B9;enable-background:new ;} |
|||
.st2{fill:#714B67;stroke:#FFFFFF;stroke-width:2.5312;stroke-linejoin:round;stroke-miterlimit:84.375;} |
|||
.st3{fill:#00A09D;stroke:#FFFFFF;stroke-width:2.5312;stroke-linejoin:round;stroke-miterlimit:84.375;} |
|||
</style> |
|||
<g id="Calque_1_00000161600930838337179250000013767234669113973950_"> |
|||
<g> |
|||
<g> |
|||
<g transform="translate(13 10)"> |
|||
|
|||
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="-856.1276" y1="-992.6924" x2="-877.9248" y2="-975.3946" gradientTransform="matrix(43.9892 0 0 50.6251 39146.6719 50789.9492)"> |
|||
<stop offset="0" style="stop-color:#81D9DD"/> |
|||
<stop offset="1" style="stop-color:#419CA1"/> |
|||
</linearGradient> |
|||
<path class="st0" d="M1747.1,540.7l-749.9-433c-6-3.4-13.3-3.4-19.3,0L228,540.7c-6,3.4-9.6,9.8-9.6,16.7v865.9 |
|||
c0,6.9,3.7,13.3,9.6,16.7l749.9,433c3,1.7,6.3,2.6,9.6,2.6s6.6-0.8,9.6-2.6l749.9-433c6-3.4,9.6-9.8,9.6-16.7v-866 |
|||
C1756.7,550.5,1753,544.1,1747.1,540.7z M256.8,1409V590.7l708.6,409.1l2.8,4.9V1823l-708.7-409.2L256.8,1409z M990.3,148.2 |
|||
L1699,557.3L990.3,966.5h-5.6L276,557.3l708.7-409.1L990.3,148.2L990.3,148.2z M1006.8,1004.7l2.8-4.8l708.6-409.1V1409 |
|||
l-2.8,4.8l-708.6,409.1L1006.8,1004.7L1006.8,1004.7z"/> |
|||
<rect x="970" y="870.2" class="st1" width="35" height="48.1"/> |
|||
<rect x="970" y="485.1" class="st1" width="35" height="48.1"/> |
|||
<rect x="970" y="774" class="st1" width="35" height="48.1"/> |
|||
<rect x="970" y="581.4" class="st1" width="35" height="48.1"/> |
|||
<rect x="970" y="196.3" class="st1" width="35" height="48.1"/> |
|||
<rect x="970" y="292.6" class="st1" width="35" height="48.1"/> |
|||
<rect x="970" y="388.9" class="st1" width="35" height="48.1"/> |
|||
<rect x="970" y="677.7" class="st1" width="35" height="48.1"/> |
|||
|
|||
<rect x="703.4" y="1109.5" transform="matrix(0.8661 -0.4999 0.4999 0.8661 -465.9773 514.5881)" class="st1" width="48.1" height="35"/> |
|||
|
|||
<rect x="620.2" y="1157.7" transform="matrix(0.8661 -0.4999 0.4999 0.8661 -501.1965 479.4498)" class="st1" width="48.1" height="35"/> |
|||
|
|||
<rect x="536.7" y="1205.8" transform="matrix(0.8659 -0.5002 0.5002 0.8659 -536.6949 444.5481)" class="st1" width="48.2" height="35"/> |
|||
|
|||
<rect x="870.1" y="1013.3" transform="matrix(0.8662 -0.4996 0.4996 0.8662 -395.3831 584.6333)" class="st1" width="48.1" height="35"/> |
|||
|
|||
<rect x="786.8" y="1061.3" transform="matrix(0.8659 -0.5002 0.5002 0.8659 -430.897 550.2667)" class="st1" width="48.2" height="35"/> |
|||
|
|||
<rect x="286.6" y="1350.2" transform="matrix(0.8659 -0.5002 0.5002 0.8659 -642.4768 338.7787)" class="st1" width="48.1" height="35"/> |
|||
|
|||
<rect x="453.3" y="1253.8" transform="matrix(0.866 -0.5 0.5 0.866 -571.7071 408.9949)" class="st1" width="48.1" height="35"/> |
|||
|
|||
<rect x="370.1" y="1302.1" transform="matrix(0.8661 -0.4999 0.4999 0.8661 -606.8809 373.7628)" class="st1" width="48.1" height="35"/> |
|||
|
|||
<rect x="1307.6" y="1145.5" transform="matrix(0.5 -0.866 0.866 0.5 -350.2617 1732.3198)" class="st1" width="35" height="48.1"/> |
|||
|
|||
<rect x="1141" y="1049.1" transform="matrix(0.5001 -0.866 0.866 0.5001 -350.2007 1539.6794)" class="st1" width="35" height="48.1"/> |
|||
|
|||
<rect x="1224.4" y="1097.2" transform="matrix(0.4996 -0.8663 0.8663 0.4996 -349.8225 1636.8931)" class="st1" width="35" height="48.1"/> |
|||
|
|||
<rect x="1638.3" y="1342.1" transform="matrix(0.5004 -0.8658 0.8658 0.5004 -349.8787 2112.7935)" class="st1" width="35" height="35"/> |
|||
|
|||
<rect x="1057.5" y="1001" transform="matrix(0.5003 -0.8658 0.8658 0.5003 -350.4254 1443.0403)" class="st1" width="35" height="48.2"/> |
|||
|
|||
<rect x="1474.3" y="1241.7" transform="matrix(0.5003 -0.8658 0.8658 0.5003 -350.5846 1924.1418)" class="st1" width="35" height="48.2"/> |
|||
|
|||
<rect x="1557.8" y="1289.8" transform="matrix(0.5 -0.866 0.866 0.5 -350.1897 2021.1473)" class="st1" width="35" height="48.1"/> |
|||
|
|||
<rect x="1391.1" y="1193.6" transform="matrix(0.4997 -0.8662 0.8662 0.4997 -349.9747 1829.327)" class="st1" width="35" height="48.1"/> |
|||
</g> |
|||
</g> |
|||
</g> |
|||
</g> |
|||
<g id="odoo"> |
|||
<path class="st2" d="M993.2,439.3c-303.8,0-550,246.2-550,550s246.2,550,550,550s550-246.2,550-550S1297,439.3,993.2,439.3z |
|||
M993.2,659.3c182.3,0,330,147.7,330,330s-147.7,330-330,330s-330-147.7-330-330S811,659.3,993.2,659.3z"/> |
|||
</g> |
|||
<g id="kayak"> |
|||
<path class="st3" d="M609.8,957.9c-0.4,14.4,11.8,59.8,23.4,86.8c33.6,75.8,69.2,108.4,220.1,201.6 |
|||
c98.9,60.7,128.1,86.2,151.7,130.9c9.2,17,18.8,40,22,51.1l6,20.3v-44.8c0.8-103.6-28.8-138.3-193.3-229.7 |
|||
c-39.6-21.8-88-51-107.3-64.7c-55.2-39.6-95.4-88.1-115.8-141c0,0-6.7-16.2-6.7-16.2L609.8,957.9z"/> |
|||
<path class="st3" d="M1179.5,540c-5.6,5.6-17.4,11.1-35.1,16.4c-15.4,4.6-35.2,9-59.3,13.2c-151.7,26.3-191.7,46.6-191.7,97.3 |
|||
c0,13.3,6,27.7,29.6,71.8c16.4,30.3,32.4,65.1,36,77.3c10.4,37.7,12,87.3,4.8,149.8c-3.6,31.4-6.8,63.6-7.6,72.1l-0.8,14.8 |
|||
l-56.8-27.7c-81.6-40.3-115.7-61.4-148.1-91.4c-54.8-50.7-76-114.7-64.8-197.5c8.8-68.1,35.2-132.8,70.8-173.1l18.4-21.1l-16,11.8 |
|||
c-68,49.9-109.7,147.2-109.7,257.4c0,84.7,28.4,150.9,88,206c32.4,30,61.6,47.3,140.9,83.6c38,17.8,79.6,38.8,92.8,47 |
|||
c44.8,29.2,84.4,82.5,98.1,132.4l7.2,26.3l4.8-58.4c2.8-32.5,6.8-67.3,8.8-77.3c2-10.4,7.2-40.3,11.2-66.6 |
|||
c10.4-65.1,30.8-112.1,58.4-134.3c25.6-21.1,38.4-14.8,63.6,31.4c22,40.7,38,54.7,74.8,65.1c4.4,1.5,8,13.3,13.2,46.6 |
|||
c6.4,39.9,6.8,50.7,2.4,96.5c-6,61.8-3.6,120.6,6,146.1c10.4,28.1,27.6,51,56.8,74.3l26,21.5l-2.4-38.8 |
|||
c-6.4-85.1-18-150.2-38.4-208.2c-6.8-18.5-16.4-61-22.4-94.7c-15.6-92.1-51.6-255.2-67.6-306.3c-22.4-71.8-53.6-138.2-90.4-192.6 |
|||
c-4.9-7.1-17.3-25.2-17.3-25.2s5.9-7.4,9.3-12.6c3.9-4.8,9.7-15.2,12.5-23.7c2.7-8.3,1.7-18,1.7-18S1183.5,535.9,1179.5,540z |
|||
M1177.1,619.2c36.4,59.2,61.2,128.3,86,240.8c19.2,88,31.2,150.2,29.2,152.4c-4.4,3.7-19.2-25.9-29.2-58.1 |
|||
c-12.8-41.8-21.2-58.1-37.2-72.9c-18-17-37.6-23.7-88-30.7c-58.8-8.1-74-15.2-113.7-52.5c-42.4-39.9-59.6-64.7-62-88.4 |
|||
c-3.6-33.7,9.6-43.6,81.2-62.5c48.4-12.9,71.6-23.3,96.1-42.5c8.8-7,17.8-13.8,17.8-13.8S1167.5,604,1177.1,619.2z"/> |
|||
<path class="st3" d="M1130.6,658.7c0,6.7-4.7,23.2-9.1,33.5c-6.4,14.8-8,27.4-8,61.4c0,34-1.6,45.1-6.8,53.6 |
|||
c-4,5.9-13.2,14.4-13.2,14.4s22.4,3.7,44.4-6.7c52-24.4,55.6-74.3,9.6-139.8c-11-15.6-16.9-20.8-16.9-20.8 |
|||
S1130.6,654.5,1130.6,658.7z"/> |
|||
</g> |
|||
</svg> |
@ -0,0 +1,22 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
|
|||
<record id="view_account_list_inherit_tax_return" model="ir.ui.view"> |
|||
<field name="name">account.account.view.list.inherit</field> |
|||
<field name="model">account.account</field> |
|||
<field name="inherit_id" ref="account.view_account_list" /> |
|||
<field name="arch" type="xml"> |
|||
<field name="group_id" position="after"> |
|||
<field name="tax_return_id" options="{'no_quick_create':1}" /> |
|||
</field> |
|||
</field> |
|||
</record> |
|||
|
|||
<menuitem |
|||
id="account_reports_fr_2035_menu" |
|||
name="Déclaration 2035" |
|||
parent="account.menu_finance_reports" |
|||
sequence="6" |
|||
groups="account.group_account_readonly" /> |
|||
|
|||
</odoo> |
@ -0,0 +1,67 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
|
|||
<record id="account_tax_return_view_form" model="ir.ui.view"> |
|||
<field name="name">account.tax.return.view.form</field> |
|||
<field name="model">account.tax.return</field> |
|||
<field name="arch" type="xml"> |
|||
<form> |
|||
<sheet> |
|||
<group> |
|||
<group name="left"> |
|||
<field name="name" /> |
|||
<field name="account_ids" widget="many2many_tags" options="{'no_create':1}" /> |
|||
<field name="line_type" widget="radio" options="{'horizontal':true}" /> |
|||
</group> |
|||
<group name="right"> |
|||
<field name="add_line_id" attrs="{'invisible': [('sub_line_id','!=',False)]}" /> |
|||
<field name="sub_line_id" attrs="{'invisible': [('add_line_id','!=',False)]}" /> |
|||
<field name="is_sum_line" /> |
|||
<field name="sum_line_ids" attrs="{'invisible': [('is_sum_line','!=',True)]}" widget="many2many_tags" /> |
|||
<field name="ded_line_ids" attrs="{'invisible': [('is_sum_line','!=',True)]}" widget="many2many_tags" /> |
|||
</group> |
|||
</group> |
|||
</sheet> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="account_tax_return_view_tree" model="ir.ui.view"> |
|||
<field name="name">account.tax.return.view.tree</field> |
|||
<field name="model">account.tax.return</field> |
|||
<field name="arch" type="xml"> |
|||
<tree> |
|||
<field name="name" /> |
|||
<field name="account_ids" widget="many2many_tags" /> |
|||
<field name="line_type" /> |
|||
<field name="is_sum_line" /> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="account_tax_return_view_search" model="ir.ui.view"> |
|||
<field name="name">account.tax.return.view.search</field> |
|||
<field name="model">account.tax.return</field> |
|||
<field name="arch" type="xml"> |
|||
<search> |
|||
<field name="name" /> |
|||
</search> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="account_tax_return_action" model="ir.actions.act_window"> |
|||
<field name="name">Tax returns</field> |
|||
<field name="res_model">account.tax.return</field> |
|||
<field name="view_mode">tree,form</field> |
|||
<field name="domain">[]</field> |
|||
<field name="context">{}</field> |
|||
</record> |
|||
|
|||
<menuitem |
|||
id="account_tax_return_menu" |
|||
name="Tax return lines" |
|||
action="account_tax_return_action" |
|||
parent="account_reports_fr_2035_menu" |
|||
sequence="10" /> |
|||
|
|||
</odoo> |
@ -0,0 +1,65 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
|
|||
<record id="account_tax_return_year_view_form" model="ir.ui.view"> |
|||
<field name="name">account.tax.return.year.view.form</field> |
|||
<field name="model">account.tax.return.year</field> |
|||
<field name="arch" type="xml"> |
|||
<form> |
|||
<sheet> |
|||
<group col="6"> |
|||
<field name="name" /> |
|||
<field name="line_id" options="{'no_create':1}" /> |
|||
<field name="line_type" /> |
|||
<field name="amount" /> |
|||
</group> |
|||
</sheet> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="account_tax_return_year_view_tree" model="ir.ui.view"> |
|||
<field name="name">account.tax.return.year.view.tree</field> |
|||
<field name="model">account.tax.return.year</field> |
|||
<field name="arch" type="xml"> |
|||
<tree> |
|||
<field name="name" /> |
|||
<field name="line_id" options="{'no_create':1}" /> |
|||
<field name="line_type" /> |
|||
<field name="amount" /> |
|||
</tree> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="account_tax_return_year_view_search" model="ir.ui.view"> |
|||
<field name="name">account.tax.return.year.view.search</field> |
|||
<field name="model">account.tax.return.year</field> |
|||
<field name="arch" type="xml"> |
|||
<search> |
|||
<field name="name" /> |
|||
<field name="line_type" /> |
|||
<separator /> |
|||
<group expand="0" string="Group By"> |
|||
<filter name="by_year" string="Year" context="{'group_by': 'name'}" /> |
|||
<filter name="by_type" string="Line type" context="{'group_by': 'line_type'}" /> |
|||
</group> |
|||
</search> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="account_tax_return_year_action" model="ir.actions.act_window"> |
|||
<field name="name">Tax returns</field> |
|||
<field name="res_model">account.tax.return.year</field> |
|||
<field name="view_mode">tree,form</field> |
|||
<field name="domain">[]</field> |
|||
<field name="context">{'search_deafault_by_year': 1}</field> |
|||
</record> |
|||
|
|||
<menuitem |
|||
id="account_tax_return_year_menu" |
|||
name="Year tax return lines" |
|||
action="account_tax_return_year_action" |
|||
parent="account_reports_fr_2035_menu" |
|||
sequence="30" /> |
|||
|
|||
</odoo> |
@ -0,0 +1 @@ |
|||
from . import tax_return_wizard |
@ -0,0 +1,106 @@ |
|||
import logging |
|||
from odoo import models, fields, api, _ |
|||
from odoo.exceptions import ValidationError |
|||
|
|||
_logger = logging.getLogger(__name__) |
|||
|
|||
|
|||
class TaxReturnWizard(models.TransientModel): |
|||
_name = "tax.return.wizard" |
|||
_description = "Tax return wizard" |
|||
|
|||
name = fields.Char(string="Year", size=4) |
|||
# is_date_ok = fields.Boolean(string="Year ok", compute="_check_year") |
|||
|
|||
def _check_year(self): |
|||
self.ensure_one() |
|||
if not self.name.isdigit() or int(self.name) >= fields.Date.today().year: |
|||
raise ValidationError( |
|||
_( |
|||
"Please set a year in the past and after you started your odoo accounting." |
|||
) |
|||
) |
|||
# return { |
|||
# "value": { |
|||
# "name": "", |
|||
# }, |
|||
# "warning": { |
|||
# "title": _("Wrong year !"), |
|||
# "massage": _( |
|||
# "Please set a year in the past and after you started your odoo accounting." |
|||
# ), |
|||
# }, |
|||
# } |
|||
|
|||
def execute(self): |
|||
self._check_year() |
|||
start = fields.Date.to_date("{}-01-01".format(self.name)) |
|||
stop = fields.Date.to_date("{}-12-31".format(self.name)) |
|||
AML = self.env["account.move.line"] |
|||
ATR = self.env["account.tax.return"] |
|||
ATRY = self.env["account.tax.return.year"] |
|||
# Reset year lines if already created |
|||
ATRY.search([("name", "=", self.name)]).unlink() |
|||
atr_lines = ATR.search([]) |
|||
atr_sum_lines = atr_lines.filtered("is_sum_line") |
|||
accounts = atr_lines.mapped("account_ids") |
|||
year_amls = AML.search( |
|||
[ |
|||
("date", ">=", start), |
|||
("date", "<=", stop), |
|||
("account_id", "in", accounts.ids), |
|||
("parent_state", "=", "posted"), |
|||
] |
|||
) |
|||
base_vals_list = [] |
|||
for line in atr_lines - atr_sum_lines: |
|||
base_vals_list.append( |
|||
{ |
|||
"name": self.name, |
|||
"line_id": line.id, |
|||
"amount": line.compute_value( |
|||
year_amls.filtered( |
|||
lambda aml: aml.account_id.id in line.account_ids.ids |
|||
) |
|||
), |
|||
} |
|||
) |
|||
year_atry = ATRY.create(base_vals_list) |
|||
while atr_sum_lines: |
|||
summed_lines = ATR |
|||
for line in atr_sum_lines.filtered( |
|||
lambda atr: atr.id |
|||
not in (atr.mapped("add_line_id") | atr.mapped("sub_line_id")).ids |
|||
): |
|||
new_vals = { |
|||
"name": self.name, |
|||
"line_id": line.id, |
|||
"amount": ( |
|||
sum( |
|||
year_atry.filtered( |
|||
lambda atry: atry.line_id.id in line.sum_line_ids.ids |
|||
).mapped("amount") |
|||
) |
|||
or 0.0 |
|||
) |
|||
- ( |
|||
sum( |
|||
year_atry.filtered( |
|||
lambda atry: atry.line_id.id in line.ded_line_ids.ids |
|||
).mapped("amount") |
|||
) |
|||
or 0.0 |
|||
), |
|||
} |
|||
year_atry |= ATRY.create([new_vals]) |
|||
summed_lines |= line |
|||
atr_sum_lines -= summed_lines |
|||
action = self.env.ref( |
|||
"l10n_fr_tax_return.account_tax_return_year_action" |
|||
).read()[0] |
|||
action.update( |
|||
{ |
|||
"context": {"search_default_name": self.name}, |
|||
} |
|||
) |
|||
return action |
@ -0,0 +1,38 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<odoo> |
|||
|
|||
<record id="tax_return_wizard_view_form" model="ir.ui.view"> |
|||
<field name="name">tax.return.wizard.view.form</field> |
|||
<field name="model">tax.return.wizard</field> |
|||
<field name="arch" type="xml"> |
|||
<form> |
|||
<group col="4"> |
|||
<field name="name" /> |
|||
<!-- <field name="is_date_ok" invisible="1" /> --> |
|||
</group> |
|||
<footer> |
|||
<button string="Compute year tax return lines" name="execute" type="object" class="oe_highlight" |
|||
data-hotkey="q" /> |
|||
<button string="Cancel" class="btn btn-secondary" special="cancel" data-hotkey="z" /> |
|||
</footer> |
|||
</form> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="tax_return_wizard_action" model="ir.actions.act_window"> |
|||
<field name="name">Tax returns compute</field> |
|||
<field name="res_model">tax.return.wizard</field> |
|||
<field name="view_mode">form</field> |
|||
<field name="target">new</field> |
|||
<field name="domain">[]</field> |
|||
<field name="context">{}</field> |
|||
</record> |
|||
|
|||
<menuitem |
|||
id="tax_return_wizard_menu" |
|||
name="Tax return compute" |
|||
action="tax_return_wizard_action" |
|||
parent="account_reports_fr_2035_menu" |
|||
sequence="20" /> |
|||
|
|||
</odoo> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue