Skip to content

[ADD] rental_deposit: introduce deposit mechanism for rental products#1322

Draft
vikvi-odoo wants to merge 1 commit into
odoo:19.0from
odoo-dev:19.0-rental-deposit-vikvi
Draft

[ADD] rental_deposit: introduce deposit mechanism for rental products#1322
vikvi-odoo wants to merge 1 commit into
odoo:19.0from
odoo-dev:19.0-rental-deposit-vikvi

Conversation

@vikvi-odoo
Copy link
Copy Markdown

@vikvi-odoo vikvi-odoo commented Jun 4, 2026

Problem
Rental workflows currently lack a proper way to manage security deposits, which are a common requirement for renting high-value or damage-sensitive products. In the absence of a standard mechanism, users rely on manual workarounds such as adding extra order lines or handling deposits outside the system. This leads to inconsistent processes, higher risk of errors, and no clear link between the rented product and its associated deposit. It also impacts the website experience, as customers have no visibility of required deposits before placing an order.

Solution
This PR introduces a structured and configurable deposit mechanism to handle this scenario in a consistent and automated way across both backend and frontend flows.

Key Changes

  • Global Configuration: Added a global deposit product configuration in settings.

  • Product Controls: Allow defining deposit requirement and per-unit amount on products.

  • Automated Orders: Automatically create and manage deposit lines on sale/rental orders.

  • Quantity Sync: Ensure deposit amounts stay in sync with product quantities.

  • Website Extension: Extend the behavior to the website, displaying deposit details to customers.

Result

  • Deposits are always applied when required.

  • No manual adjustments needed.

  • Clear traceability between rental items and deposits.

  • Improved user and customer experience.

- Added deposit_product_id Many2one configuration field to res.config.settings under the sale_renting scope.
- Introduced is_deposit boolean flag and deposit_amount monetary field attributes to the product template model.
- Implemented backend business logic to automatically append corresponding deposit lines onto sale/rental order forms.
- Configured automated compute triggers to synchronize line deposit totals dynamically with shifts in item quantities.
- Extended website storefront by injecting a real-time deposit information section right below the core add-to-cart layout box.
- Baked Python database fields safely into HTML5 dataset parameters.
- Standardized shopping cart rows by changing the display header to 'Deposit for [Product Name]' using strict method selectors.

- Added deposit_product_id Many2one configuration field to res.config.settings under the sale_renting scope.
- Introduced is_deposit boolean flag and deposit_amount monetary field attributes to the product template model.
- Implemented backend business logic to automatically append corresponding deposit lines onto sale/rental order forms.
- Configured automated compute triggers to synchronize line deposit totals dynamically with shifts in item quantities.
- Extended website storefront by injecting a real-time deposit information section right below the core add-to-cart layout box.
- Developed a native frontend public widget to handle quantity value updates and instantly update calculated values in the browser.
- Baked Python database fields safely into HTML5 dataset parameters to avoid string parsing or currency sign conflicts in JavaScript.
- Standardized shopping cart rows by changing the display header to 'Deposit for [Product Name]' using strict method selectors.
- Suppressed manual desktop and mobile item removal actions for deposit rows while keeping default behaviors intact for regular items.
@robodoo
Copy link
Copy Markdown

robodoo commented Jun 4, 2026

Pull request status dashboard

@vikvi-odoo vikvi-odoo requested a review from bit-odoo June 4, 2026 04:38
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.

2 participants