OCA / account-financial-tools

Odoo Accountant Financial Tools and Utils
GNU Affero General Public License v3.0
303 stars 749 forks source link

account_asset_management: half year depreciation #1801

Open crispyduck00 opened 7 months ago

crispyduck00 commented 7 months ago

In some countries there exists a half year asset calculation. (e.g. Austria)

So if the asset starts to be used in the second half of the year (<= 01 July) then for the first year the deprecation amount is just the half.

Example: Number of years 3, start of using is the 30.09.2023, amount 3000€ depreciation: 2023.12.31: 3000€ / 3 / 2 = 500€ depreciation: 2024.12.31: 1000€ depreciation: 2025.12.31: 1000€ depreciation: 2026.12.31: 500€

Describe the solution you'd like Like Prorata Temporis, a additional checkbox to enable this feature and automatic calculate according it.

Describe alternatives you've considered Possibility to manual adapt the depreciations

luc-demeyer commented 7 months ago

It doesn't look too difficult to implement this but I suggest to add a usability group for this feature so that users outside Austria are not getting confused with an option that look rather exotic to me. Are there countries other than Austria requiring this ?

A 'manual' bypass would be to set the asset start date to 2023.07.01 but that's not a very nice solution (accounting entries will be ok but asset report will show wrong start date).

crispyduck00 commented 7 months ago

Hi @luc-demeyer

I am not aware of other countries where it is the same.

I tried already to enable prorata and set the date to 2023.07.01, but as 07.01. is not exact half of the year, this does not result in 3000€ / 3 / 2 = 500€.

I also tried manually chaining the value of the first depreciation, but then the reduced amount of the first year will be added to the second one. Also played with several other options, like increasing it to 4 years and changing the values manually, but as not all values (e.g. depreciated.value) can be modified this does also not work.

Nice would be to be able to set it with a checkbox like prorata.

It just came in my mind that there are also some other special cases. For example is there a quite new regulation that for buildings in the first year the triple amount can be depreciated, and in the second year the double. The following years again regular linear.

e.g. 40 Years for a budling, which results in 2,5% per year and in the first year it can be 7,5%, in the second one 5% and afterwards the regular 2,5%. I have no idea how this could be archived with the actual module.

So maybe the best to cover all possibilities would be a better or different way to edit the computed depreciation board. So changing the value of the first year will not change the yearly rate of the following years, but instead the last year, or add, or remove a year on the end to come to 0.

Not sure if it is clear what I mean, and if this is possible with some modifications.

So for example 3Y 3000€:

Year | depreciated.value | amount | remaining_value

default: 2023 | 0€ | 1000€ | 2000€ 2024 | 1000€ | 1000€ | 1000€ 2025 | 2000€ | 1000€ | 0€

editing 2023 (lowering the amount to 1/2): 2023 | 0€ | 500€ | 2500€ 2024 | 2500€ | 1000€ | 1500€ 2025 | 1500€ | 1000€ | 500€ 2026 | 500€ | 500€ | 0€

editing 2023 (higher amount) and editing afterwards 2024 (lower amount): 2023 | 0€ | 1050€ | 1950€ 2024 | 1950€ | 900€ | 1050€ 2025 | 1050€ | 1000€ | 50€ 2025 | 50€ | 50€ | 0€

So chaining depreciation amount of one year, will not chainage the amount on the following years, instead on the end of the period.

Br, cd

luc-demeyer commented 7 months ago

@crispyduck00 manually editing the depreciation board should do the job, but is imho not a workable solution since in that case it's easier to manage your fixed assets via a spreadsheet. If you have development resources available: make a PR to cover your half year use case. Eventually a second one for the building use case (maybe this one can be covered via degressive-linear).

crispyduck00 commented 7 months ago

Hi,

my programming skills are very limited.

I just checked your pr [IMP]asset management: compensate deviation via last entry #1785, Which does basically the job when enabling prorata and editing the first entry.

Then I also played a bit chainging the prorata function just to test how easy it can be implemented.

This works and uses when prorata is enabled a factor of 0,5 and also shows then 184 days (01.07. to 31.12.) for the first year.

Now I need to find out how to add this as a extra checkbox. And unfortunately I have no Idea how to add this correctly as a pull request to git.

image