-
-
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][MIG] account_asset_management_method_number_end : Migration to v11 #704
[11.0][MIG] account_asset_management_method_number_end : Migration to v11 #704
Conversation
|
||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas | ||
:alt: Try me on Runbot | ||
:target: https://runbot.odoo-community.org/runbot/92/10.0 |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
'version': '11.0.1.0.0', | ||
'license': 'AGPL-3', | ||
'author': "Noviat,Odoo Community Association (OCA)", | ||
'website': 'http://www.noviat.com', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class AccountAsset(models.Model): | ||
_inherit = 'account.asset' | ||
|
||
method_number = fields.Integer( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about a mixin to avoid copy/paste? :)
{}, 'init', False, 'test', | ||
self.registry._assertion_report) | ||
|
||
def setUp(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you really need to load this for every test? Otherwise pls use SavepointCase + setUpClass
415ca01
to
df66031
Compare
Why isn't this integrated on main module? |
@pedrobaeza I suppose the reason is an historic one. |
There is good reason to keep this separate. An example: |
Well, the "number of depreciations" methods is a general one that can be used as well for financial assets, and as I saw you on the code sprint, my customers are using it as well as the percentage method. I can agree about the "date end", but at the end, the purpose for what it's used is not the main question, as this adds little overcharge being added to the main module (an if on the appropriated methods), but being more complicated using a modular approach (manifest, new module, new PR...). |
If there is a legal requirement in Spain to support the 'number' method for managing financial assets (hence NOT cost/revenue spreading) than we should add it to the main module. As far as I know financial assets always need to be depreciated based upon fiscal years (full years or pro-rata temporis). The number method allows to depreciate over e.g. 6 months, or 13 months, ... which I think is not allowed (also in Spain) unless those 6 months are accidently the end of the fiscal year. The official addons account_asset module has a (rather large) number of flaws, hence you need to use the number method on the official module in some cases to circumvent the fact that their calculations are not fiscal year based. |
For the spreading of costs and revenues I'm proposing a dedicated module. See PR #715 |
@luc-demeyer @pedrobaeza In the Netherlands it is also allowed to used 'number' or date based (fiscal years), so i would propose to pushed this to the main. Let the end-user decided how they want to manage their financial assets. I worked with a lot of accountants and they prefer to calculate the depreciation of the assets based on numbers (like 5 years x12 = 60 periods). You just fill in the start date of the depreciation and based on the numbers of periods, the system will automatically calculate the depreciation per period. There is already a cost spreading / accrual like functionality. See PR #715 and account-closing |
…t_method_number_end
a51f200
to
fa896ca
Compare
@luc-demeyer Just fixed the travis issue and rebased, so this should be good. |
@grindtildeath hello everybody, will this PR proceed forward to has green CI? |
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
Requires :