sale_rental
This page combines editorial guidance with evidence extracted from the selected official branch. Always test the flow with your own permissions and configuration.
Purpose
The Sale Rental Module manages rental order.
The analysis found 7 Python files, 26 XML files, 20 views, 16 actions, 1 menus, and 0 reports.
Functional user guide
Who should use it
This module is relevant to people responsible for sale rental processes, company configuration, and result review. Administrators should participate whenever dependencies, permissions, or sequences are introduced.
What you will be able to do
After configuration, you will be able to identify the records added by sale_rental, execute actions in the correct state, and understand the information shared with other modules.
Requirements and preparation
Before activation, verify company, currency, users, and groups. Install and configure required dependencies first. When real data exists, rehearse activation and upgrades on a restored copy.
Activate dependencies first, review company configuration, and rehearse the complete workflow before production use.
Required dependencies
account— must be installed and configured before testing this module.account_product— must be installed and configured before testing this module.account_invoice— must be installed and configured before testing this module.company— must be installed and configured before testing this module.currency— must be installed and configured before testing this module.ir— must be installed and configured before testing this module.party— must be installed and configured before testing this module.product— must be installed and configured before testing this module.sale— must be installed and configured before testing this module.stock— must be installed and configured before testing this module.
Optional integrations
account_asset— enables an additional integration; test the combination explicitly.
Recommended initial configuration
- Activate the module and sign in again to load menus and permissions.
- Review new company configuration options and defaults.
- Assign groups to test users using least privilege.
- Create small, verifiable master data before bulk imports.
- Run one complete scenario from draft to final state and inspect related records.
Module objects and concepts
- account.invoice: groups 2 model(s), including
account.invoice,account.invoice.line. These records form the information users inspect or modify during the process. - party.erase: groups 1 model(s), including
party.erase. These records form the information users inspect or modify during the process. - party.replace: groups 1 model(s), including
party.replace. These records form the information users inspect or modify during the process. - product.category: groups 2 model(s), including
product.category,product.category.account. These records form the information users inspect or modify during the process. - product.category-customer_rental-account: groups 1 model(s), including
product.category-customer_rental-account.tax. These records form the information users inspect or modify during the process. - product.product: groups 1 model(s), including
product.product. These records form the information users inspect or modify during the process. - product.rental: groups 1 model(s), including
product.rental.price. These records form the information users inspect or modify during the process. - product.template: groups 1 model(s), including
product.template. These records form the information users inspect or modify during the process. - sale.configuration: groups 2 model(s), including
sale.configuration,sale.configuration.sequence. These records form the information users inspect or modify during the process. - sale.rental: groups 11 model(s), including
sale.rental,sale.rental.line,sale.rental.line-account.tax,sale.rental.line-incoming-stock.move,sale.rental.line-outgoing-stock.move. These records form the information users inspect or modify during the process. - stock.location: groups 1 model(s), including
stock.location. These records form the information users inspect or modify during the process. - stock.move: groups 1 model(s), including
stock.move. These records form the information users inspect or modify during the process.
Typical workflow
- Select the correct company and date before creating a document.
- Complete master data before lines or details.
- Use form buttons for state changes; saving is not the same as validating or posting.
- Review warnings, totals, related documents, and traceability.
- Verify effects on dependent modules before closing the process.
Actions, states, and wizards
cancel— action or transition that starts cancel. Check permissions, current state, and related records before running it.confirm— action or transition that starts confirm. Check permissions, current state, and related records before running it.draft— action or transition that starts draft. Check permissions, current state, and related records before running it.invoice— action or transition that starts invoice. Check permissions, current state, and related records before running it.pickup— action or transition that starts pickup. Check permissions, current state, and related records before running it.quote— action or transition that starts quote. Check permissions, current state, and related records before running it.return_— action or transition that starts **return **. Check permissions, current state, and related records before running it.cancelled— action or transition that starts cancelled. Check permissions, current state, and related records before running it.confirmed— action or transition that starts confirmed. Check permissions, current state, and related records before running it.done— action or transition that starts done. Check permissions, current state, and related records before running it.picked up— action or transition that starts picked up. Check permissions, current state, and related records before running it.quotation— action or transition that starts quotation. Check permissions, current state, and related records before running it.sale.rental.pickup— wizard that collects data and performs sale › rental › pickup. Check permissions, current state, and related records before running it.sale.rental.return— wizard that collects data and performs sale › rental › return. Check permissions, current state, and related records before running it.
Controls before production
- Define who creates, reviews, confirms, cancels, and reads.
- Test closed periods, unauthorized users, and incomplete data.
- Verify numbering, currency, rounding, and time zone where applicable.
- Document error correction without direct database edits.
- Include its tables and files in backup and restore procedures.
Troubleshooting
- If a menu is missing, verify activation, module-list update, groups, and a new login session.
- If a field rejects a value, inspect its domain, company, state, and configured dependencies.
- If a button is hidden or disabled, check permissions and valid transitions; never change state with SQL.
- If results differ, reproduce a minimal case and compare related records before and after.
- Keep the full traceback, version, active modules, and minimal data needed to diagnose an error.
Developer guide
Architecture and extension points
The package contains 28 Python classes and declares or extends 25 models. It uses Boolean, Char, Date, DateTime, Float, Function, Many2Many, Many2One, MultiValue, Numeric, One2Many, Selection, TimeDelta. Developers should first determine whether a class creates a model or uses PoolMeta to extend one, preserve super() calls, and avoid duplicating dependency rules.
Registered or extended models
account.invoiceaccount.invoice.lineparty.eraseparty.replaceproduct.categoryproduct.category-customer_rental-account.taxproduct.category.accountproduct.productproduct.rental.priceproduct.templatesale.configurationsale.configuration.sequencesale.rentalsale.rental.linesale.rental.line-account.taxsale.rental.line-incoming-stock.movesale.rental.line-outgoing-stock.movesale.rental.pickupsale.rental.pickup.showsale.rental.pickup.show.linesale.rental.returnsale.rental.return.showsale.rental.return.show.linestock.locationstock.move
Field types used
BooleanCharDateDateTimeFloatFunctionMany2ManyMany2OneMultiValueNumericOne2ManySelectionTimeDelta
Detected classes and public methods
Classes: Category, CategoryAccount, CategoryCustomerRentalTax, Configuration, ConfigurationSequence, DateOrDateTime, Erase, Invoice, InvoiceLine, InvoiceLine_Asset, Location, Move, Product, Rental, RentalLine, RentalLine_Incoming_Move, RentalLine_Outgoing_Move, RentalLine_Tax, RentalPickup, RentalPickupShow, RentalPickupShowLine, RentalPrice, RentalReturn, RentalReturnShow, RentalReturnShowLine, Replace, Template, _RentalShowLine
Methods: account_rental_used(), cancel(), chat_language(), check_erase_company(), check_modification(), check_rental_quantities(), compute_taxes(), compute_unit_price(), confirm(), copy(), create_invoice(), customer_rental_taxes_used(), default_company(), default_currency(), default_rental_per_day(), default_rental_sequence(), default_show(), default_start(), default_state(), default_warehouse(), definition(), delete_moves(), do(), draft(), duration_invoice(), duration_unit(), duration_unit_invoice(), end_invoice(), fields_to_replace(), get(), get_amount(), get_has_lines_to_invoice(), get_has_returnable_lines(), get_invoice_lines(), get_move(), get_moves(), get_rec_name(), get_rental_price(), get_rental_price_uom(), get_rental_states(), get_resources_to_copy(), get_sale_rentals(), get_tax_amount(), get_unit_price(), invoice(), match(), multivalue_model(), on_change_invoice_party(), on_change_lines(), on_change_party(), on_change_planned_end(), on_change_planned_end_day(), on_change_planned_start(), on_change_planned_start_day(), on_change_product(), on_change_quantity(), on_change_unit(), on_change_with_amount(), on_change_with_company(), on_change_with_currency(), on_change_with_duration(), on_change_with_end(), on_change_with_is_assets_depreciable(), on_change_with_planned_amount(), on_change_with_planned_duration(), on_change_with_product(), on_change_with_product_uom_category(), on_change_with_quantity(), on_change_with_rental_state(), on_change_with_start(), on_change_with_unit(), origin_name(), picked_up(), picking_location(), pickup(), planned_duration_unit(), product_name(), quote(), rental_lines(), rental_location(), return_(), return_location(), search_rec_name(), search_sale_rentals(), set_moves(), set_number(), start_invoice(), store_cache(), taxable_lines(), to_invoice(), transition_pickup(), transition_return_(), transition_start(), try_done(), try_picked_up(), validate_fields(), view_attributes()
Code map
Detected 7 Python files, 26 XML files, and 0 explicit access files. XML connects models to views, menus, actions, and reports; access CSV files establish initial permissions.
__init__.pyaccount.pyaccount.xmldoc/conf.pymessage.xmlparty.pyparty.xmlproduct.pyproduct.xmlsale.pysale.xmlstock.pystock.xmlview/party_form.xmlview/product_category_form.xmlview/product_product_list_sale_rental_line.xmlview/product_rental_price_form.xmlview/product_rental_price_list.xmlview/product_rental_price_list_sequence.xmlview/product_template_form.xmlview/product_template_list.xmlview/sale_configuration_form.xmlview/sale_rental_form.xmlview/sale_rental_line_form.xmlview/sale_rental_line_list.xmlview/sale_rental_line_list_sequence.xmlview/sale_rental_list.xmlview/sale_rental_pickup_show_form.xmlview/sale_rental_pickup_show_line_list.xmlview/sale_rental_return_show_form.xmlview/sale_rental_return_show_line_list.xmlview/stock_location_form.xmlview/stock_move_form.xml
Test plan
- Activation on an empty database and upgrade from the previous revision.
- Create, update, copy, and delete according to state and access rights.
- Every button, transition, and wizard with valid and invalid scenarios.
- Applicable multi-company rules, translations, time zones, and currencies.
- Combined installation with required and optional dependencies.
- Backup and restore of records, attachments, and generated reports.
Compatibility and upgrades
Keep server and modules on series 8.0. Before upgrading, compare tryton.cfg, __register__ migrations, state changes, XML IDs, and permissions. A successful build does not replace a rehearsed migration or functional data reconciliation.
Official documentation evidence
Topics found: Design · Product · Product Category · Rental · Wizards · Pickup · Return · Configuration · Location · Warehouse · Sale Rental Module · Usage · Making products rentable · Creating a rentals order · Changing a rentals order · Making a quotation · Pickup products · Return products · Invoicing a rental
-
- doc/design.rst: The Sale Rental Module introduces and extends the following concepts.
-
- doc/index.rst: The Sale Rental Module manages rental order.
-
- doc/usage/index.rst: Configuration and management tasks relating to rentals can be found under the [
Sales] main menu item.
- doc/usage/index.rst: Configuration and management tasks relating to rentals can be found under the [
-
- doc/usage/presales.inc.rst: Before you can add a
Product <product:concept-product>to aRental <model-sale.rental>it must be marked as rentable. Only the types assets or service can be marked. When you do this you will also be able to set some additional properties such as theRental Unit <product:model-product.uom>and the prices the product is normally rented at. You can also specify if the rental duration is per day or not.
- doc/usage/presales.inc.rst: Before you can add a
-
- doc/usage/process.inc.rst: Creating a new rental order is simply a matter of creating a new
Rental <model-sale.rental>and adding the lines for the rentedProducts <concept-product>. Most of the fields are optional or have sensible default values.
- doc/usage/process.inc.rst: Creating a new rental order is simply a matter of creating a new