Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

16.0 mig fiscal company account #57

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 103 additions & 0 deletions fiscal_company_account/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
=============
CAE - Account
=============

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:9a71613e835148f3da9011b8a176fc70bf9cb2a379cf653c36b31e7055c0df86
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-grap%2Fodoo--addons--cae-lightgray.png?logo=github
:target: https://github.com/grap/odoo-addons-cae/tree/12.0/fiscal_company_account
:alt: grap/odoo-addons-cae

|badge1| |badge2| |badge3|

This module extend Odoo functionnalities, regarding companies features to
manage CAE (Coopearatives of Activities and Employment) that is a special
status for french companies.

**Features**

* Add constrains on ``account.bank.statement``, ``account.invoice``
``account.move``, ``account.move.line``, ``account.payment`` models
that prevent to create such items on a fiscal mother company.

* Account property propagation:
* Following fields property are propagated in all the fiscal child company:
* product_category / property_account_income_categ_id;
* product_category / property_account_expense_categ_id;

**Table of contents**

.. contents::
:local:

Development
===========

* For the migration to V>12, take care of the tax.filtered occurences in
Odoo and OCA modules.
There are a lot of ``filtered(lambda x: x.company_id == current_company)``
in Odoo. The module ``fiscal_company_account`` alter the behaviour of the function
``filtered`` of the ``account.tax`` module, to filter on the mother fiscal company.
However, the changes is imperfect, and multiple filters (company and not company filters)
will fail.
During migration, please run:
``rgrep "tax.*filtered.*company_id"``

Known issues / Roadmap
======================

* the odoo accounting dashboard is disabled, because all the data are bad
computed. (by SQL request), so security access is not possible.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/grap/odoo-addons-cae/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/grap/odoo-addons-cae/issues/new?body=module:%20fiscal_company_account%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* GRAP

Contributors
~~~~~~~~~~~~

* Julien WESTE
* Sylvain LE GAL <https://twitter.com/legalsylvain>

Other credits
~~~~~~~~~~~~~

The development of this module has been financially supported by:

* GRAP, Groupement Régional Alimentaire de Proximité (http://www.grap.coop)

Porting from odoo V8 to odoo V10 has been funded by :
* BABEL.COOP, leverage cooperation through the digital age (<http://babel.coop>)

Maintainers
~~~~~~~~~~~

This module is part of the `grap/odoo-addons-cae <https://github.com/grap/odoo-addons-cae/tree/12.0/fiscal_company_account>`_ project on GitHub.

You are welcome to contribute.
1 change: 1 addition & 0 deletions fiscal_company_account/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
31 changes: 31 additions & 0 deletions fiscal_company_account/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright (C) 2013-Today: GRAP (http://www.grap.coop)
# @author: Julien WESTE
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{
"name": "CAE - Account",
"version": "16.0.1.0.0",
"category": "CAE",
"summary": "Glue Module between CAE and Account modules",
"author": "GRAP",
"website": "https://github.com/grap/odoo-addons-cae",
"license": "AGPL-3",
"depends": ["fiscal_company_base", "account"],
"data": [
"security/ir_rule.xml",
# "views/menu.xml",
# "views/view_account_move.xml",
# "views/view_res_partner.xml",
],
"demo": [
"demo/res_groups.xml",
"demo/account_account.xml",
"demo/account_journal.xml",
"demo/account_tax.xml",
"demo/res_partner.xml",
"demo/ir_property.xml",
],
"installable": True,
"auto_install": True,
}
104 changes: 104 additions & 0 deletions fiscal_company_account/demo/account_account.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2013-Today GRAP (http://www.grap.coop)
@author Julien Weste
@author: Sylvain LE GAL (https://twitter.com/legalsylvain)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>

<record model="account.account" id="account_payable_cae">
<field name="company_id" ref="fiscal_company_base.company_fiscal_mother"/>
<field name="code">401CAE</field>
<field name="name">CAE - Payable - (test) </field>
<field name="account_type">liability_payable</field>
<field name="reconcile" eval="True" />
</record>

<record model="account.account" id="account_receivable_cae">
<field name="company_id" ref="fiscal_company_base.company_fiscal_mother"/>
<field name="code">411CAE</field>
<field name="name">CAE - Receivable - (test) </field>
<field name="account_type">asset_receivable</field>
<field name="reconcile" eval="True" />
</record>

<record model="account.account" id="account_custom_payable_cae">
<field name="company_id" ref="fiscal_company_base.company_fiscal_mother"/>
<field name="code">401CAECUSTOM</field>
<field name="name">CAE - Custom Payable - (test) </field>
<field name="account_type">liability_payable</field>
<field name="reconcile" eval="True" />
</record>

<record model="account.account" id="account_custom_receivable_cae">
<field name="company_id" ref="fiscal_company_base.company_fiscal_mother"/>
<field name="code">411CAECUSTOM</field>
<field name="name">CAE - Custom Receivable - (test) </field>
<field name="account_type">asset_receivable</field>
<field name="reconcile" eval="True" />
</record>

<record model="account.account" id="account_vat_deductible_cae">
<field name="company_id" ref="fiscal_company_base.company_fiscal_mother"/>
<field name="code">4456CAE</field>
<field name="name">CAE - VAT Received - (test) </field>
<field name="account_type">liability_current</field>
<field name="reconcile" eval="True" />
</record>

<record model="account.account" id="account_vat_received_cae">
<field name="company_id" ref="fiscal_company_base.company_fiscal_mother"/>
<field name="code">4457CAE</field>
<field name="name">CAE - VAT Deductible - (test) </field>
<field name="account_type">liability_current</field>
<field name="reconcile" eval="True" />
</record>

<!-- Bank and Cash Part -->
<record model="account.account" id="account_bank_default_cae">
<field name="company_id" ref="fiscal_company_base.company_fiscal_mother"/>
<field name="code">512CAEBANKDEFAULT</field>
<field name="name">CAE - Bank (Default Account) - (test)</field>
<field name="account_type">asset_cash</field>
</record>

<record model="account.account" id="account_bank_suspense_cae">
<field name="company_id" ref="fiscal_company_base.company_fiscal_mother"/>
<field name="code">512CAEBANKSUSPENSE</field>
<field name="name">CAE - Bank (Suspense Account) - (test)</field>
<field name="account_type">asset_current</field>
</record>

<record model="account.account" id="account_bank_payment_cae">
<field name="company_id" ref="fiscal_company_base.company_fiscal_mother"/>
<field name="code">512CAEBANKPAYMENT</field>
<field name="name">CAE - Bank (Payment Account) - (test)</field>
<field name="account_type">asset_current</field>
<field name="reconcile" eval="True"/>
</record>

<record model="account.account" id="account_cash_cae">
<field name="company_id" ref="fiscal_company_base.company_fiscal_mother"/>
<field name="code">581CAE</field>
<field name="name">CAE - Cash - (test)</field>
<field name="account_type">asset_cash</field>
</record>

<!-- Expense Part-->
<record model="account.account" id="account_expense_cae">
<field name="company_id" ref="fiscal_company_base.company_fiscal_mother"/>
<field name="code">607CAE</field>
<field name="name">CAE - Expenses - (test)</field>
<field name="account_type">expense</field>
</record>

<!-- Income Part-->
<record model="account.account" id="account_income_cae">
<field name="company_id" ref="fiscal_company_base.company_fiscal_mother"/>
<field name="code">707CAE</field>
<field name="name">CAE - Product Sales - (test)</field>
<field name="account_type">income</field>
</record>

</odoo>
43 changes: 43 additions & 0 deletions fiscal_company_account/demo/account_journal.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2013-Today GRAP (http://www.grap.coop)
@author Julien Weste
@author: Sylvain LE GAL (https://twitter.com/legalsylvain)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>

<record model="account.journal" id="journal_purchase">
<field name="company_id" ref="fiscal_company_base.company_fiscal_mother"/>
<field name="code">CAE_PURCHASE</field>
<field name="name">CAE - Purchase Journal - (test)</field>
<field name="type">purchase</field>
</record>

<record model="account.journal" id="journal_sale">
<field name="company_id" ref="fiscal_company_base.company_fiscal_mother"/>
<field name="code">CAE_SALE</field>
<field name="name">CAE - Sale Journal - (test)</field>
<field name="type">sale</field>
</record>

<record model="account.journal" id="journal_bank">
<field name="company_id" ref="fiscal_company_base.company_fiscal_mother"/>
<field name="code">CAE_BANK</field>
<field name="name">CAE - Bank Journal - (test)</field>
<field name="type">bank</field>
<field name="default_account_id" ref="account_bank_default_cae"/>
<field name="suspense_account_id" ref="account_bank_suspense_cae"/>
</record>

<function model="account.payment.method.line" name="write">
<value model="account.payment.method.line" eval="obj().env.ref('fiscal_company_account.journal_bank').inbound_payment_method_line_ids.id"/>
<value eval="{'payment_account_id': ref('fiscal_company_account.account_bank_payment_cae')}"/>
</function>

<function model="account.payment.method.line" name="write">
<value model="account.payment.method.line" eval="obj().env.ref('fiscal_company_account.journal_bank').outbound_payment_method_line_ids.id"/>
<value eval="{'payment_account_id': ref('fiscal_company_account.account_bank_payment_cae')}"/>
</function>

</odoo>
Loading
Loading