Merge lp://qastaging/~elbati/account-consolidation/adding_account_parallel_currency_7 into lp://qastaging/~account-core-editors/account-consolidation/7.0

Proposed by Lorenzo Battistini
Status: Merged
Merged at revision: 18
Proposed branch: lp://qastaging/~elbati/account-consolidation/adding_account_parallel_currency_7
Merge into: lp://qastaging/~account-core-editors/account-consolidation/7.0
Diff against target: 1601 lines (+1527/-0)
14 files modified
account_parallel_currency/AUTHORS.txt (+1/-0)
account_parallel_currency/__init__.py (+23/-0)
account_parallel_currency/__openerp__.py (+56/-0)
account_parallel_currency/account.py (+505/-0)
account_parallel_currency/account_demo.xml (+504/-0)
account_parallel_currency/account_view.xml (+64/-0)
account_parallel_currency/company_view.xml (+16/-0)
account_parallel_currency/res_company.py (+33/-0)
account_parallel_currency/security/security.xml (+11/-0)
account_parallel_currency/test/customer_invoice.yml (+143/-0)
account_parallel_currency/test/mapping_parallel_accounts.yml (+25/-0)
account_parallel_currency/wizard/__init__.py (+22/-0)
account_parallel_currency/wizard/do_mapping.py (+92/-0)
account_parallel_currency/wizard/do_mapping.xml (+32/-0)
To merge this branch: bzr merge lp://qastaging/~elbati/account-consolidation/adding_account_parallel_currency_7
Reviewer Review Type Date Requested Status
Maxime Chambreuil (http://www.savoirfairelinux.com) code review Approve
Stefan Rijnhart (Opener) Approve
Review via email: mp+151723@code.qastaging.launchpad.net

Description of the change

This module handles parallel accounting entries based on different currencies.
It is useful for companies who have to manage accounting with more than one currency at the same time. For instance, companies who have to produce balances on different currencies.

In order to use the module, you have to define one company for each parallel chart of accounts. Then you have to map parallel accounts and parallel journals through the related forms.

A 'Parallel Account Mapping' wizard is provided. It is intended to be run when the same chart of account is used for the parallel companies. It allows to automatically map the 'master' account to 'parallel' accounts, based on account code.

When posting new journal entries, the system checks the configured parallel accounts and automatically generates the parallel entries.
For each user, it is possible to configure a 'parallel user' (that should be associated to a dummy parent company), used to carry out the parallel registrations. This allows to keep the companies separate, so that users of the master company don't see secondary company data (e.g. currencies and journals) but the system uses his parallel user in order to perform the parallel registrations

To post a comment you must log in.
Revision history for this message
Frederic Clementi - Camptocamp (frederic-clementi) wrote :

Hi Lorenzzo,

Sorry for the question : this looks very interesting but I cannot find any cases/example in real situation where this could be a must have...
I mean, why would you duplicate the entire accounting books of the company instead of simply do a report or a view which convert account balances ?
Any legal reason ? unless a segregation of duties issue maybe ?

Thanks

Frederic

Revision history for this message
Nhomar - Vauxoo (nhomar) wrote :

Hi Lorenzo,

We have same question, we frequently use Consolidated accounts to build consolidation reports, some specific or generical reason or accounting Good practice to support the development?

For sure i had some times this idea in my mind because when you have some customers you think in several options to solve the problem, but i never developed because Consolidated acounts works for me.

Regards, and Kudos for you contribution

Revision history for this message
Lorenzo Battistini (elbati) wrote :

On 03/18/2013 01:15 PM, Frederic Clementi - Camptocamp.com wrote:
> Hi Lorenzzo,
>
> Sorry for the question : this looks very interesting but I cannot find any cases/example in real situation where this could be a must have...
> I mean, why would you duplicate the entire accounting books of the company instead of simply do a report or a view which convert account balances ?
> Any legal reason ? unless a segregation of duties issue maybe ?

Hi Frederic and Nhomar,

simply converting balances can be insufficient if you have to consider
historical rates.

Just found a recent publication
<http://www.altenburger.ch/uploads/tx_altenburger/mc_2013_Revisione_del_diritto_contabile_svizzero.pdf>
(Italian) about Swiss accounting law.

The interesting part:

"To facilitate the international companies, moreover, the accounts can
be held in one of the national languages ​​(German, French, Italian)
and, in addition to the CHF, other currencies are accepted - crucial for
the company activities - such as Euro or USD, with an indication,
however, of the values ​​in CHF too"

22. By Lorenzo Battistini

[FIX] using _logger.warning

23. By Lorenzo Battistini

[fix] string formatting

24. By Lorenzo Battistini

[add] sync_parallel_accounts method: automatically write/create parallel accounts when writing account

25. By Lorenzo Battistini

[ADD] tests

26. By Lorenzo Battistini

[MERGE] tax codes handling

27. By Lorenzo Battistini

[add] Parallel accounts summary

28. By Lorenzo Battistini

[ref] create_parallel_accounts

29. By Lorenzo Battistini

[fix] useless code

30. By Lorenzo Battistini

[fix] allow mapping for normal users

31. By Lorenzo Battistini

[add] runtime tax codes sync

32. By Lorenzo Battistini

[add] comment

33. By Lorenzo Battistini

[add] parallel accounts at creation

34. By Lorenzo Battistini

[imp]messages

35. By Lorenzo Battistini

[imp] error message

36. By Lorenzo Battistini

[imp] error message

37. By Lorenzo Battistini

[fix] impossible to change parent account

38. By Lorenzo Battistini

[FIX] searching parallel period by code

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

This has been the oldest proposal on the community projects for some time now, maybe because of the relatively rare business case, and the large amount of code impacting the core of the accounting system. So I'll have ago. I think I can understand the particular business case of this module, and the code does look good. Tests are provided too, so I think this should be fine.

It would be nice to know whether this module has already been used in production by now?

One nit:

l.174..185 + l.535..536 is a bit tiresome. Can you make this a list comprehension or at least iterate over a list of fields?

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Forgot to assign review status, make that 'needs information'

review: Needs Information
Revision history for this message
Maxime Chambreuil (http://www.savoirfairelinux.com) (max3903) wrote :

Thanks Lorenzo.

Can you please run autopep8 on your module ?

review: Needs Fixing (code review)
Revision history for this message
Lorenzo Battistini (elbati) wrote :

On 09/08/2013 08:17 AM, Stefan Rijnhart (Therp) wrote:
> It would be nice to know whether this module has already been used in production by now?

Hello Stefan.

The module has been used in production from this winter.

Unfortunately, we could not verify deeply the data accuracy yet. We will
probably do it at the end the year.

39. By Lorenzo Battistini

[IMP] some PEP8

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Thanks for the info, and for updating the code style a little bit.

review: Approve
Revision history for this message
Lorenzo Battistini (elbati) wrote :

On 09/29/2013 08:30 PM, Stefan Rijnhart (Therp) wrote:
> and for updating the code style a little bit

I had no time to complete it for now..

Revision history for this message
Maxime Chambreuil (http://www.savoirfairelinux.com) (max3903) :
review: Approve (code review)
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

> I had no time to complete it for now..

That's quite alright by me for now. I think this proposal has been waiting long enough.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches