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

[17.0][MIG] account_multicurrency_revaluation #301

Closed
Closed
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
172 changes: 172 additions & 0 deletions account_multicurrency_revaluation/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
=========================
Multicurrency revaluation
=========================

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

.. |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-OCA%2Faccount--closing-lightgray.png?logo=github
:target: https://github.com/OCA/account-closing/tree/17.0/account_multicurrency_revaluation
:alt: OCA/account-closing
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/account-closing-17-0/account-closing-17-0-account_multicurrency_revaluation
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/account-closing&target_branch=17.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module was written to extend the functionality of the accounting
module to support the multicurrency and to allow you to generate
automatically revaluation journal entries.

**Table of contents**

.. contents::
:local:

Configuration
=============

Due to the various legislation according the country, in the Accounting
settings you can set the way you want to generate revaluation journal
entries.

The user that can access to the edition of the 'Provision B.S loss
account' and 'Provision P&L accounts' need to be in the security group
'Additional provisioning entries posting'.

Please, find below advised account settings for 3 countries:

For UK (Revaluation)
--------------------

(l10n_uk Chart of account)

::

LOSS GAIN
Revaluation account [7700] [7700]
Provision B.S account [ ] [ ]
Provision P&L account [ ] [ ]

For CH (Provision)
------------------

(l10n_ch Chart of account)

::

LOSS GAIN
Revaluation account [ ] [ ]
Provision B.S account [2331] [2331]
Provision P&L account [3906] [4906]

For FR
------

(l10n_fr Chart of account)

::

LOSS GAIN
Revaluation account [ 476] [ 477]
Provision B.S account [1515] [ ]
Provision P&L account [6865] [ ]

Usage
=====

To use this module, you need to:

- Check *Allow currency revaluation* on accounts you want to revaluate.
- Open the wizard 'Invoicing > Reporting > Closing Entries > Currency
Revaluation Report' to generate the revaluation journal entries. It
adjusts account balance having *Allow currency revaluation* checked.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-closing/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/OCA/account-closing/issues/new?body=module:%20account_multicurrency_revaluation%0Aversion:%2017.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
-------

* Camptocamp

Contributors
------------

- Alexandre Fayolle
- Alexis de Lattre
- Frédéric Clementi
- Guewen Baconnier @ Camptocamp
- Joel Grand-Guillaume
- Kinner Vachhani
- Matt Choplin <[email protected]>
- Matthieu Dietrich
- moylop260
- Stéphane Bidoul
- Vincent Renaville
- Yannick Vaucher
- Akim Juillerat
- Aleksander Milinkevich
- Asta Kasinskaite
- `CorporateHub <https://corporatehub.eu/>`__:

- Alexey Pelykh <[email protected]>

- `Tecnativa <https://www.tecnativa.com>`__:

- Pedro M. Baeza
- Ernesto Tejeda

- Phuc (Tran Thanh) <[email protected]>
- `ForgeFlow <https://www.forgeflow.com>`__:

- Jordi Masvidal
- Guillem Casassas

Other credits
-------------

The development of this module has been financially supported by:

- Camptocamp

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/account-closing <https://github.com/OCA/account-closing/tree/17.0/account_multicurrency_revaluation>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions account_multicurrency_revaluation/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import wizard
from . import model
from . import report
37 changes: 37 additions & 0 deletions account_multicurrency_revaluation/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "Multicurrency revaluation",
"version": "17.0.1.0.0",
"category": "Finance",
"summary": "Manage revaluation for multicurrency environment",
"author": "Camptocamp, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-closing",
"license": "AGPL-3",
"depends": ["account"],
"demo": [
"demo/res_partner.xml",
"demo/res_company.xml",
"demo/res_currency_rate.xml",
"demo/account_account.xml",
"demo/account_journal.xml",
"demo/account_analytic.xml",
],
"data": [
"views/res_config_settings.xml",
"security/account_multicurrency_revaluation_groups.xml",
"security/ir.model.access.csv",
"views/account_account.xml",
"views/account_move.xml",
"views/account_move_line.xml",
"wizard/print_currency_unrealized_report_view.xml",
"wizard/wizard_currency_revaluation_view.xml",
"wizard/wizard_reverse_currency_revaluation_view.xml",
"report/currency_unrealized_report.xml",
"templates/currency_unrealized_report.xml",
],
"assets": {
"web.report_assets_common": [
"account_multicurrency_revaluation/static/src/css/reports.css",
],
},
"installable": True,
}
85 changes: 85 additions & 0 deletions account_multicurrency_revaluation/demo/account_account.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="demo_acc_liquidity_eur" model="account.account">
<field name="name">Account Liquidity EURO</field>
<field name="code">accliq.eur</field>
<field name="account_type">asset_cash</field>
<field name="currency_revaluation">True</field>
<field name="currency_id" ref="base.EUR" />
<field name="company_id" ref="res_company_reval" />
</record>
<record id="acc_reval_loss" model="account.account">
<field name="name">Reval Loss</field>
<field name="code">XR001</field>
<field name="account_type">asset_current</field>
<field name="company_id" ref="res_company_reval" />
</record>
<record id="acc_reval_gain" model="account.account">
<field name="name">Reval Gain</field>
<field name="code">XR002</field>
<field name="account_type">asset_current</field>
<field name="company_id" ref="res_company_reval" />
</record>
<record id="acc_prov_bs_loss" model="account.account">
<field name="name">Prov B.S Loss</field>
<field name="code">XPBS001</field>
<field name="account_type">asset_current</field>
<field name="company_id" ref="res_company_reval" />
</record>
<record id="acc_prov_bs_gain" model="account.account">
<field name="name">Prov B.S Gain</field>
<field name="code">XPBS002</field>
<field name="account_type">asset_current</field>
<field name="company_id" ref="res_company_reval" />
</record>
<record id="acc_prov_pl_loss" model="account.account">
<field name="name">Prov P L Loss</field>
<field name="code">XPPL001</field>
<field name="account_type">expense</field>
<field name="company_id" ref="res_company_reval" />
</record>
<record id="acc_prov_pl_gain" model="account.account">
<field name="name">Prov P L Gain</field>
<field name="code">XPPL002</field>
<field name="account_type">income</field>
<field name="company_id" ref="res_company_reval" />
</record>
<record id="demo_acc_payable" model="account.account">
<field name="name">Account Payable</field>
<field name="code">accpay</field>
<field name="account_type">liability_payable</field>
<field name="currency_revaluation">True</field>
<field name="reconcile">True</field>
<field name="company_id" ref="res_company_reval" />
</record>
<record id="demo_acc_revenue" model="account.account">
<field name="name">Account Revenue</field>
<field name="code">accrev</field>
<field name="account_type">income</field>
<field name="currency_revaluation">True</field>
<field name="company_id" ref="res_company_reval" />
</record>
<record id="demo_acc_suspense" model="account.account">
<field name="name">Account Suspense</field>
<field name="code">accsus</field>
<field name="account_type">income</field>
<field name="currency_revaluation">True</field>
<field name="company_id" ref="res_company_reval" />
</record>
<record id="demo_acc_liquidity_usd" model="account.account">
<field name="name">Account Liquidity USD</field>
<field name="code">accliq.usd</field>
<field name="account_type">asset_cash</field>
<field name="currency_revaluation">True</field>
<field name="currency_id" ref="base.USD" />
<field name="company_id" ref="res_company_reval" />
</record>
<record id="demo_acc_liquidity_gbp" model="account.account">
<field name="name">Account Liquidity GBP</field>
<field name="code">accliq.gbp</field>
<field name="account_type">asset_cash</field>
<field name="currency_revaluation">True</field>
<field name="currency_id" ref="base.GBP" />
<field name="company_id" ref="res_company_reval" />
</record>
</odoo>
15 changes: 15 additions & 0 deletions account_multicurrency_revaluation/demo/account_analytic.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="analytic_plan_revaluation" model="account.analytic.plan">
<field name="name">Revaluation</field>
</record>
<record id="acc_analytic" model="account.analytic.account">
<field name="name">Analytic Account</field>
<field name="code">XA001</field>
<field name="company_id" ref="res_company_reval" />
<field
name="plan_id"
ref="account_multicurrency_revaluation.analytic_plan_revaluation"
/>
</record>
</odoo>
29 changes: 29 additions & 0 deletions account_multicurrency_revaluation/demo/account_journal.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="reval_journal" model="account.journal">
<field name="name">Revaluation Journal</field>
<field name="code">RJ</field>
<field name="type">general</field>
<field name="company_id" ref="res_company_reval" />
</record>
<record id="bank_journal_usd" model="account.journal">
<field name="name">Bank Journal USD</field>
<field name="code">BJ USD</field>
<field name="type">bank</field>
<field name="currency_id" ref="base.USD" />
<field name="company_id" ref="res_company_reval" />
</record>
<record id="bank_journal_gbp" model="account.journal">
<field name="name">Bank Journal GBP</field>
<field name="code">BJ GBP</field>
<field name="type">bank</field>
<field name="currency_id" ref="base.GBP" />
<field name="company_id" ref="res_company_reval" />
</record>
<record id="sales_journal" model="account.journal">
<field name="name">A Sales Journal</field>
<field name="code">SJ</field>
<field name="type">sale</field>
<field name="company_id" ref="res_company_reval" />
</record>
</odoo>
8 changes: 8 additions & 0 deletions account_multicurrency_revaluation/demo/res_company.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="res_company_reval" model="res.company">
<field name="currency_id" ref="base.EUR" />
<field name="partner_id" ref="res_partner_reval" />
<field name="name">Revaluation Company</field>
</record>
</odoo>
21 changes: 21 additions & 0 deletions account_multicurrency_revaluation/demo/res_currency_rate.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record model="res.currency.rate" id="currency_rate_gbp_01">
<field eval="time.strftime('%Y-01-15')" name="name" />
<field name="rate">2</field>
<field name="currency_id" ref="base.GBP" />
<field name="company_id" ref="res_company_reval" />
</record>
<record model="res.currency.rate" id="currency_rate_gbp_02">
<field eval="time.strftime('%Y-02-15')" name="name" />
<field name="rate">4</field>
<field name="currency_id" ref="base.GBP" />
<field name="company_id" ref="res_company_reval" />
</record>
<record model="res.currency.rate" id="currency_rate_gbp_03">
<field eval="time.strftime('%Y-03-15')" name="name" />
<field name="rate">2.5</field>
<field name="currency_id" ref="base.GBP" />
<field name="company_id" ref="res_company_reval" />
</record>
</odoo>
15 changes: 15 additions & 0 deletions account_multicurrency_revaluation/demo/res_partner.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="res_partner_reval" model="res.partner">
<field name="name">Revaluation Company</field>
<field eval="1" name="is_company" />
<field eval="1" name="active" />
<field name="street">90 Streets Avenue</field>
<field name="country_id" ref="base.ch" />
<field name="zip">1000</field>
<field name="city">Lausanne</field>
<field name="email">[email protected]</field>
<field name="phone">+41 12 345 67 89</field>
<field name="website">www.revaluationcompany.com</field>
</record>
</odoo>
Loading
Loading