-
-
Notifications
You must be signed in to change notification settings - Fork 779
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
[11.0][ADD] account_spread_cost_revenue #715
[11.0][ADD] account_spread_cost_revenue #715
Conversation
I think this is very similar to the cutoff + accrual modules in https://github.com/OCA/account-closing |
@pedrobaeza I cannot find the spread functionality in there. Not sure those modules provide the same functionality. |
OK, I don't know too much about that, but it sounds familiar to me when I read the description of the other modules, so it was only a note. |
Excellent. This feature was clearly missing. However, this feature cannot be based on account asset since:
I am sorry for being so negative but please... not account_asset |
@fclementic2c thanks! I think you misunderstood the credits part of the readme. Part of the code of this module, in particular the one that generates the lines, is inspired from the standard account_asset module: we have to mention this fact in the credits. However this module:
Do I misunderstand your comment? |
The functional idea is the same with account-closing. The main difference that i found, is that the cutoff + accrual modules only creates 1 journal entry (even with multiple months). With the cost spreading module you can create 1 journal entry per period. cutoff + accrual modules: Cost spread: |
So they are basically the same? The maybe it's better to add a new option in the existing modules to allow the spread through months. |
@pedrobaeza It is not really the same. The closing modules are for finance closing procedure. You decide at the end of the year how you want to register accrual cutoff, more something that an accountant would do. The spreading module is for the split of the cost and revenue during entering the invoice. This provide the user the ability to spread the amounts to his liking. Also @fclementic2c is missing this feature. So I suggest to keep these 2 separate. 1 for the closing procedure. |
OK, but it's a pity that they don't share code as the internals are the same, although functionally speaking they are for different purposes. |
I did a test. I have several comments @astirpe :
Let me give a example: a "1 year offices cleaning contract" from 01/01/2018 to 31/12/2018 - amount 12000 eur Cost spreading: In december (last month of the fy) all spread accounts balance must be = 0.
Frederic |
@fclementic2c thank you very much for trying out this module. Thank you also for the constructive review you made. Indeed the solution you are proposing is the proper one and I'm already working on it. I'll keep you updated with the progress. |
@fclementic2c About:
In the Netherlands it is common practise to not do the full move of the spread to the cost. We find these kind of journal entries too much and it adds extra noise. I agree that the French ways is also correct, because at the end the balance of the accounts are zero. So to clarify question
Accounting in the Netherlands
So I would propose to make these way of accounting optional. |
For companies already using the account_asset_management module, the account_asset_management_method_number_end modules does the trick, can be configured the french and netherlands way, has reporting and follows the same way of configuring and using it as the financial assets management. The name is confusing though and if the customer only wants to do the cost/revenue spreading than they get too much functionality in their accounting menu. I think that having a similar usage and way of configuring financial assets and cost/revenue spreading has an advantage for the end users but it is clear to me that the current account_asset_management_method_number_end needs to be renamed (at some point in time) and a bit reworked to make it's purpose more clear (and on top of this there is still the ongoing debate to move the 'method number' into the base account_asset_management module). |
This looks very interesting. I've not looked in details yet. A couple of quick toughts nevertheless.
At first glance, I'd say this module should share the same base configuration as the accrual modules in account-closing: https://github.com/OCA/account-closing/blob/11.0/account_cutoff_accrual_base/models/company.py @astirpe would it make sense to you? I suggest moving it to the OCA account-closing as the scope is very similar. @yung-wang Note people actually do revenue/expense spreading using account_cutoff_prepaid: they just do the cutoff + reversal dance once a month, in addition to year end closing. The cutoff module only works after the invoice has been validated, though, while this module allows spreading draft invoices several month before they are received, correct? This also sounds reminiscent to account_invoice_accrual, which only allows one move to accrue a draft invoice. This gives me the idea account_invoice_accrual could maybe support start/end dates. Anyway, I understand some people prefer having an explicit spreading board. |
Not sure if the accrual accounts and journals are the same as the spread accounts and journals. If that is the case, yes: we should share the same base configuration. I would turn the question to our functional guys... Same discourse for moving the module to OCA/account-closing: no-problem but I would like to have a valid functional reason (not just similarities of few lines of code) for doing that.
I'm busy to allow the spreading also while the invoice is not received yet. The module at this moment only allows the spreading when the invoice has been validated. Working on it... |
@luc-demeyer Using the spreading with assets module is confusing, we want to spread invoices without having assets installed. @sbidoul I tried the account-closing modules: You cannot create 2 prepaid cut-offs on the same date. Also you need to have an invoice already existing. So for me the closing modules are not useful for the functionality that we want for spreading. |
@yung-wang Concerning moving the method number to the base module: it will take less time than this discussion but I think that it is important that we first doublecheck the requirement before doing so. I have myself rolled out this module to several Odoo instances in the Netherlands and didn't get the demand for a number based method. If your customer wants 60 monthly depreciations than you can as well teach him to configure an asset profile for monthly depreciations over 5 years. If it's legally allowed in the Netherlands to e.g. depreciate over 'partial' years e.g. 57 monthly depreciations than we need to decide if we want to support this requirement via the base module or a small localisation module. |
Why would you want to? A single cutoff will handle all invoices that have a start/end date.
That is true. You cannot start cutoff from draft invoices. That's why I suggested there might be a use case to have account_invoice_accrual handle start/end dates. But as I said, I'm perfectly fine with having a second method to do this spreading. The only thing is that I'm 99% sure that the configuration is the same, that's why I suggested to move it use the same base module for config, and possibly move it to the account-closing repo. |
Reply to @yung-wang about :
I totally agree with you, it is the same in France or here in Switzerland but I was thinking that is will be to 'messy' to implement it to Odoo this way. If you post the extra entry I am suggesting it is maybe a bit of noise but you do not need to change anything to the invoice line creation method. |
@sbidoul @pedrobaeza It means that they must be clearly separated in different journals. This module will not create draft invoices it is pure accounting. |
@fclementic2c thanks for the clarification. I still think they can share technical methods for creating stuff, but it's up to you to decide this as I don't know too much all this stuff. |
@pedrobaeza They can surely share some methods but I cannot tell which ones :) |
To help you to take this decision, I wrote 2 uses cases we have to handle: Feel free to tell me if I did mistakes (I did it a bit quickly) |
c921b31
to
595a694
Compare
@fclementic2c thank you very much! I just pushed the latest development made on this module, it is now possible to create spreads even when the invoice is not yet received. I want to continue to work on it, so I set its version to "Alpha". |
595a694
to
9f39e9d
Compare
Extra wizard selection ar not translated.
1d2dddc
to
1ee8c7b
Compare
/ocabot merge nobump |
This PR looks fantastic, let's merge it! |
Congratulations, your PR was merged at 19cb143. Thanks a lot for contributing to OCA. ❤️ |
This module allows to spread costs or revenues over custom periods.