-
-
Notifications
You must be signed in to change notification settings - Fork 767
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
[15.0][ENH] account_asset_management: default salvage value #1567
[15.0][ENH] account_asset_management: default salvage value #1567
Conversation
c213b38
to
b5c4c42
Compare
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.
Functional Test 👍
b5c4c42
to
6f9db98
Compare
6f9db98
to
3a0d847
Compare
3a0d847
to
aedd8ed
Compare
Hello @OCA/accounting-maintainers, I would like your feedback on this pull request. |
Hi, Saran, I think this can be more valuable if expressed in percentage instead. I don't know any case where a fixed value is required. |
@Saran440 |
14bae7e
to
34900cf
Compare
@pedrobaeza @luc-demeyer Thank you for your advise Now, I change salvage value in asset profile can config with percentage or fixed amount. For use case:
|
27fd808
to
6f96ba9
Compare
This PR has the |
@@ -446,7 +461,7 @@ def create(self, vals): | |||
asset = super().create(vals) | |||
if self.env.context.get("create_asset_from_move_line"): | |||
# Trigger compute of depreciation_base | |||
asset.salvage_value = 0.0 | |||
asset.salvage_value = asset._get_salvage_value_profile() |
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.
One doubt: is this really needed? If you remove these lines, I think it will work with the new compute.
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.
Thank you for your review. I have already deleted it as it was not needed.
This PR enables the configuration of salvage value in the asset profile. Users can configure it with a fixed amount or a percentage of the salvage value.
6f96ba9
to
ad4fbed
Compare
/ocabot merge minor |
Hey, thanks for contributing! Proceeding to merge this for you. |
Congratulations, your PR was merged at 5c38b65. Thanks a lot for contributing to OCA. ❤️ |
This PR adds the field Salvage Value in the asset profile for default salvage value when creating the asset.
Example