Skip to content

[ADD] rental_deposit: implement deposit amount feature for rental products #898

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

Draft
wants to merge 1 commit into
base: 18.0
Choose a base branch
from

Conversation

rodh-odoo
Copy link

-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

…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
@robodoo
Copy link

robodoo commented Jul 28, 2025

Pull request status dashboard

Copy link

@deso-odoo deso-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

depends on?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants