Skip to content

[16.0][ADD] rental_base_extension, sale_rental_extension#857

Open
eantones wants to merge 13 commits into16.0from
16.0-add-rental_base_extension
Open

[16.0][ADD] rental_base_extension, sale_rental_extension#857
eantones wants to merge 13 commits into16.0from
16.0-add-rental_base_extension

Conversation

@eantones
Copy link
Member

@eantones eantones commented Mar 5, 2026

Summary

rental_base_extension

  • Move Rental Positions menu from Configuration (debug-only) to top-level Rentals menu, visible to all sales users
  • Filter product dropdown on rental order lines to only show rental products (those with rented_product_id set)
  • Catalan and Spanish translations

sale_rental_extension

  • Kanban and calendar views for rental positions with state badges, partner avatar with image zoom on hover
  • "Today" filter and state searchpanel
  • Configurable rental signature terms per company (Settings → Rental → Signature) — Supersedes [16.0][ADD] stock_picking_signature #858
  • Custom signature dialog with "Confirm & Sign" button on rental delivery orders
  • SCSS fix to prevent zoom popup flickering
  • Catalan and Spanish translations

@eantones eantones changed the title [WIP][16.0][ADD] rental_base_extension [16.0][ADD] rental_base_extension Mar 5, 2026
@eantones eantones force-pushed the 16.0-add-rental_base_extension branch from 97f1de6 to 8845385 Compare March 5, 2026 23:41
@codecov
Copy link

codecov bot commented Mar 6, 2026

Codecov Report

❌ Patch coverage is 56.16438% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 43.31%. Comparing base (8114287) to head (e815f22).

Files with missing lines Patch % Lines
sale_rental_extension/models/sale_order.py 44.23% 28 Missing and 1 partial ⚠️
sale_rental_extension/models/stock_picking.py 62.50% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             16.0     #857      +/-   ##
==========================================
+ Coverage   43.15%   43.31%   +0.15%     
==========================================
  Files         302      308       +6     
  Lines        6029     6102      +73     
  Branches      965      977      +12     
==========================================
+ Hits         2602     2643      +41     
- Misses       3414     3445      +31     
- Partials       13       14       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@eantones eantones force-pushed the 16.0-add-rental_base_extension branch 6 times, most recently from f01de84 to f0f7cff Compare March 6, 2026 08:30
eantones added 6 commits March 9, 2026 22:38
Move Rental Positions screen from Configuration/Debug to the top-level
Rentals menu, making it accessible to all sales users without needing
debug mode.
…lines

Restrict the product selector on sale order lines to only show rental
service products (those linked to a rented product via rented_product_id),
preventing users from accidentally selecting non-rental products when
creating rental orders.
Provide complete ca.po and es.po translations covering all field labels,
menus, messages and help texts for the rental_base module.
Add kanban and calendar views for rental positions with state badges,
partner avatar with image zoom on hover, "Today" filter and state
searchpanel. Include SCSS fix to prevent zoom popup flickering by
disabling pointer-events on the popover overlay.
…liveries

Add configurable rental signature terms on company level with a settings
page (Settings → Rental → Signature). Patch the signature widget to show
a custom dialog with the configured terms rendered as HTML and a
"Confirm & Sign" button when signing rental delivery orders. Add
is_rental_picking computed field on stock.picking to detect rental
deliveries.
Provide ca.po and es.po translations covering field labels, view titles,
signature dialog text and settings descriptions for the module.
@eantones eantones force-pushed the 16.0-add-rental_base_extension branch from f0f7cff to c242574 Compare March 9, 2026 21:57
@eantones eantones changed the title [16.0][ADD] rental_base_extension [16.0][ADD] rental_base_extension, sale_rental_extension Mar 9, 2026
eantones added 6 commits March 9, 2026 23:02
Allow grouping rental positions by rented product in the search view,
making it easier to see all rentals for a specific product at a glance.
The rental checkbox only applies to stockable products (physical items
that can be rented out). Hide it on service products where it has no
effect — rental services are identified by their rented_product_id link,
not by this boolean.
…ervice

Only show the "Create Rental Service" button on product forms when the
product is stockable and has the "Can be Rented" checkbox enabled. This
enforces a clear workflow: first mark the product as rentable, then
create the rental service.
…section

Move rental-related fields (rented_product_id, rental_service_ids,
rental_service_tmpl_ids and "Create Rental Service" button) out of the
Sale group into a new "Rentals" group section on both product.product
and product.template forms.

The original fields in the sale group are hidden with invisible="1" and
the new section is only visible on stockable products that have the
"Can be Rented" flag enabled. On the template form the section also
hides when there are multiple variants (product_variant_count > 1).
…ns and add translations

Hide the entire "Can be Rented" wrapper div (field + label) on service
products by targeting the parent div with an XPath predicate. The Odoo
16 form renderer does not evaluate attrs modifiers on standalone <label>
elements in the options area, so hiding only the field left the label
text visible.

Split the Rentals section into two groups: "Rental" (singular) for
service products showing the related rented product, and "Rentals"
(plural) for stockable products showing the rental services grid and
the "Create Rental Service" button. Add colspan="2" to the service
fields for full-width display.

Add Catalan and Spanish translations for the new group titles, button
text and merge source references for existing "Rental"/"Rentals"
entries to avoid PO duplicates.
Remove the sale order form view that inherited from rental_base and
the menu item that moved Rental Positions to the top-level menu:

- Delete sale_views.xml: the product domain filter on order lines is
  now handled by the dedicated rental form in sale_rental_extension,
  and the Rental Positions menu stays in its original location
  (Configuration) as defined by rental_base
- Update manifest to remove the deleted file
- Update summary to reflect current scope (product form only)
@eantones eantones force-pushed the 16.0-add-rental_base_extension branch from b78bb8a to affbd5e Compare March 16, 2026 23:47
…racking

Create a complete set of dedicated views for rental orders, following
the same architecture as Odoo Enterprise's sale_renting module. This
cleanly separates rental views from the standard sale order views.

Deactivate rental_base's 5 inherited views that modified the standard
sale order form, restoring it to its original state. Also deactivate
sale_rental's menu item from the Sale app and rental_base's separate
Quotations/Orders menus (redundant with our unified Orders view).

New computed fields on sale.order:
- rental_status: lifecycle tracking (Quotation, Quotation Sent,
  Reserved, Pickedup, Returned, Cancelled) computed from the
  linked sale.rental record states
- is_rental_order: True if any order line is a rental
- next_action_date: pickup or return date depending on status
- is_late: True when next_action_date is past due
- rental_duration: days between start and end dates

Dedicated views (all standalone, not inheriting standard sale views):
- Form (mode=primary): rental status badge at top-right using raw
  Bootstrap divs (Enterprise-style), with late pickup/return variants
  in red. Rental period daterange, duration, Update Times button,
  product filter for rental products only, inline editable order lines
  with product_uom_qty hidden when rental
- Tree: Order, Customer, Total (bold, blue when to invoice), Status
  badge with color coding per state
- Kanban: customer name + amount at top, SO number + next action date
  with late warning below, status badge and customer avatar at bottom,
  flexbox layout to anchor bottom row regardless of content height
- Search: My Orders, Rentals, To Do Today, To Pickup, To Return, Late
  filters (Today + Pickup/Return separated for AND logic), Pickup/Return
  date filters, Group By status/salesperson/customer, dual searchpanel
  (rental status + invoice status with fa-retweet icon)

Menu structure (Enterprise-style):
- Rentals > Orders > Orders / To Do Today > Pickup / Return

Catalan and Spanish translations for all new strings.
@eantones eantones force-pushed the 16.0-add-rental_base_extension branch from affbd5e to e815f22 Compare March 16, 2026 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant