[ADD] rental_deposit: implement deposit amount feature for rental products#898
Draft
[ADD] rental_deposit: implement deposit amount feature for rental products#898
Conversation
…ducts -Introduced configuration option to select a deposit product for rental orders -Added Require Deposit checkbox and amount field on rental product form -Automatically add deposit line with specified amount when adding rental product to orders -Display deposit price on website product page, updating with quantity changes -Show deposit amount with currency in order overview and checkout
deso-odoo
reviewed
Jul 31, 2025
deso-odoo
left a comment
There was a problem hiding this comment.
Commit msg title is too long and task id is also missing.
| def _onchange_requires_deposit(self): | ||
| if self.require_deposit: | ||
| param_obj = self.env['ir.config_parameter'].sudo() | ||
| deposit_product_id = param_obj.get_param('rental_deposit.deposit_product_id') |
There was a problem hiding this comment.
Your res_config_settings uses config_parameter='rental_deposit.product_id' but here you read param_obj.get_param('rental_deposit.deposit_product_id'). Shouldn't this key match? Am I missing anything?
Comment on lines
+12
to
+21
| is_deposit_line = fields.Boolean( | ||
| string="Is Deposit Line", | ||
| help="Indicates whether this line is for a rental deposit", | ||
| default=False | ||
| ) | ||
|
|
||
| @api.depends('product_id') | ||
| def _compute_is_deposit_line(self): | ||
| for line in self: | ||
| line.is_deposit_line = line.product_id and line.product_id.is_deposit_product |
There was a problem hiding this comment.
You define _compute_is_deposit_line but never decorate it or assign it to is_deposit_line either remove it or hook it properly.
| for line in self: | ||
| line.is_deposit_line = line.product_id and line.product_id.is_deposit_product | ||
|
|
||
| def _compute_deposit_amount(self): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

-Introduced configuration option to select a deposit product for rental orders -Added Require Deposit checkbox and amount field on rental product form -Automatically add deposit line with specified amount when adding
rental product to orders
-Display deposit price on website product page, updating with quantity changes -Show deposit amount with currency in order overview and checkout