Open alcarpio15 opened 8 years ago
@moylop260 , @zaoral , @nhomar : Is there's anything else I should have in mind while I work on the Override?
The best to answer is @hbto
I can give you my opinion for a cool override methods in order to avoid conflicts with other override inherit for cases where is imposible use a normal inherit with super
+ my functionality
@alcarpio15
This will apply in all decisions on this development:
Regards.
As needed to conclude creating the Method to compute the Initial Adjustment, the main step to take now is to apply the Adjustment Factor on the Depreciation Lines provided by Odoo's Native Asset Module.
Unfortunately, there's an aspect of how Odoo natively handles the computing of an Asset's Depreciation Board that might clash severely with the process: The fact its Compute Method assumes the Depreciation happens in a Yearly basis when an Asset has no posted entries to its name (a common event when adding historical Asset data), despite the Asset Model's innate capability to also set the Depreciation Intervals to a shorter amount of months might lead to the awkward situation where an Asset can end up being depreciated months before its actual purchase.
And while there's the Prorata Temporis field to anchor an Asset to its purchase date, it also changes the Depreciation to work on a near Daily basis, which trades an extreme for another and the way said Depreciation gets computed might not fit some cases.
So the main thing to do is to ensure the Method can be more aware of the length of months between two Depreciation Dates and can pick an Initial Depreciation Date that reflects that awareness.
Now, some key counseling and second opinions is desired regarding how to deal with this issue before implementing a solution given a few factors:
It's assumed the Depreciation Lines and the Price Indexes the Adjustment Factors are based on might not share the same amount of months that make up their respective intervals, so as the Initial Adjustment Method would be strongly focusing on exploring a List of Relevant Price Indexes to create its Initial Adjustment Lines, it would need to be able of picking the closest Depreciation Date to the Adjustment Date associated to each element of said List.
(Previous Depr. Date <= Adjust. Date < Next Depr. Date)