Skip to content
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

[15.0] [MIG] rental_pricelist #42

Open
wants to merge 18 commits into
base: 15.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions rental_pricelist/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
Rental Pricelist
====================================================

*This file has been generated on 2023-02-19-14-21-34. Changes to it will be overwritten.*

Summary
-------

Enables the user to define different rental prices with time uom (Month, Day and Hour).

Description
-----------

Rental prices are usually scaled prices based on a time unit, typically day, sometimes months or hour.
This modules integrates the standard Odoo pricelists into rental use cases and allows the user an
easy way to specify the prices in a product tab as well as to use all the enhanced pricelist features.


Usage
-----

Create a rentable product:
* Go to Rentals > Configuration > Settings.
* Please activate the checkbox for using 'Product Variants'.
* Go to Rentals > Products > Products.
* Create a new storable product.
* Active the checkbox 'Can be Rented'.

Configure the naming of rental services:
* Go to Settings > Users & Companies > Companies.
* To to page 'Rental Services'.
* Configure the rental service names by providing a prefix and suffix for the name and default code.

Create the rental services:
* Go to the previously created rentable storable product.
* Go to page 'Rental Price'.
* Activate the boolean fields for hourly, daily or monthly rental as needed.
* Save the product, which creates the related rental services for the given time units.
* Add a usual price for one hour, one day or one month.
* Add bulk prices, e.g. one day costs 300 €, 7 days 290 €, 21 days 250 €, and so on.

Hint: The (bulk) prices are added in the product form view of the storable, rentable product
but are actually used for its related rental services!

Create a rental order:
* Go to Rentals > Customer > Rental Quotations.
* Create a new order and choose the type 'Rental Order'.
* Choose the storable rental product (not the rental service!).
* Choose the rental time unit, which actually loads the correct related rental service.
* Set the quantity to rent out one or several storable rentable products.
* Choose start and end date.
* Confirm the order.
* Check out the two deliveries, one for outgoing and one for incoming delivery.

Please also see the usage section of sale_rental and rental_base module.

Changelog
---------

- 9089b1d5 2022-04-15 14:16:12 +0200 [email protected] (tag: odoo-fox-v15_v15_int_current_daily, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-26, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-25, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-23, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-22, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-21, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-17, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-16, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-15, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-13, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-12, tag: bp_fox_v15_integration-ceqp-2, tag: bp_fox_v15_integration-cep-27, tag: bp_fox_v15_integration-cep-26, tag: bp_fox_v15_integration-cep-25, tag: bp_fox_v15_integration-cep-23, tag: bp_fox_v15_integration-cep-22, tag: bp_fox_v15_integration-cep-21, tag: bp_fox_v15_integration-cep-17, tag: bp_fox_v15_integration-cep-16, tag: bp_fox_v15_integration-cep-15, tag: bp_fox_v15_integration-cep-13, tag: bp_fox_v15_integration-cep-12, tag: baseline_odoo-fox-v15_v15_fox_v15_daily_build-26, origin/fox_v15_integration-cep-26, origin/fox_v15_integration-cep-25, origin/fox_v15_integration-cep-23, origin/fox_v15_integration-cep-22, origin/fox_v15_integration-cep-21, origin/fox_v15_integration-cep-17, origin/fox_v15_integration-cep-16, origin/fox_v15_integration-cep-15, origin/fox_v15_integration-cep-13, origin/fox_v15_integration-cep-12) update module versions for v15 and remove old migration scripts (issue #4967)
- 8d191ff7 2022-04-10 15:41:16 +0200 [email protected] add missing/lost documentation (issue #4516)
- 4509f78a 2022-02-23 20:48:33 +0100 [email protected] (origin/feature_4516_add_files_ported_from_v12_v14, feature_4516_add_files_ported_from_v12_v14) add files ported to v14 by cpatel and khanhbui (issue #4516)

12 changes: 12 additions & 0 deletions rental_pricelist/README/CONFIGURATION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

Configuration
-------------

To configure this module, you need to:

#. Go to company settings and define the default interval ranges on 'Rental Interval Prices' tab.
These ranges will be applied for computation of price intervals for rental service products when interval pricing is activated
in stockable product.

#. If desired go to 'RS (Prefix and Suffix)' tab an define how rental interval service product
names and reference numbers are created.
5 changes: 5 additions & 0 deletions rental_pricelist/README/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

Contributors
------------

elego Software Solutions GmbH, Odoo Community Association (OCA)
16 changes: 16 additions & 0 deletions rental_pricelist/README/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Rental Pricelist
====================================================

*This file has been generated on 2023-02-19-14-21-34. Changes to it will be overwritten.*

Summary
-------

Enables the user to define different rental prices with time uom (Month, Day and Hour).

Description
-----------

Rental prices are usually scaled prices based on a time unit, typically day, sometimes months or hour.
This modules integrates the standard Odoo pricelists into rental use cases and allows the user an
easy way to specify the prices in a product tab as well as to use all the enhanced pricelist features.
7 changes: 7 additions & 0 deletions rental_pricelist/README/HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

Changelog
---------

- 9089b1d5 2022-04-15 14:16:12 +0200 [email protected] (tag: odoo-fox-v15_v15_int_current_daily, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-26, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-25, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-23, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-22, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-21, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-17, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-16, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-15, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-13, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-12, tag: bp_fox_v15_integration-ceqp-2, tag: bp_fox_v15_integration-cep-27, tag: bp_fox_v15_integration-cep-26, tag: bp_fox_v15_integration-cep-25, tag: bp_fox_v15_integration-cep-23, tag: bp_fox_v15_integration-cep-22, tag: bp_fox_v15_integration-cep-21, tag: bp_fox_v15_integration-cep-17, tag: bp_fox_v15_integration-cep-16, tag: bp_fox_v15_integration-cep-15, tag: bp_fox_v15_integration-cep-13, tag: bp_fox_v15_integration-cep-12, tag: baseline_odoo-fox-v15_v15_fox_v15_daily_build-26, origin/fox_v15_integration-cep-26, origin/fox_v15_integration-cep-25, origin/fox_v15_integration-cep-23, origin/fox_v15_integration-cep-22, origin/fox_v15_integration-cep-21, origin/fox_v15_integration-cep-17, origin/fox_v15_integration-cep-16, origin/fox_v15_integration-cep-15, origin/fox_v15_integration-cep-13, origin/fox_v15_integration-cep-12) update module versions for v15 and remove old migration scripts (issue #4967)
- 8d191ff7 2022-04-10 15:41:16 +0200 [email protected] add missing/lost documentation (issue #4516)
- 4509f78a 2022-02-23 20:48:33 +0100 [email protected] (origin/feature_4516_add_files_ported_from_v12_v14, feature_4516_add_files_ported_from_v12_v14) add files ported to v14 by cpatel and khanhbui (issue #4516)
38 changes: 38 additions & 0 deletions rental_pricelist/README/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

Usage
-----

Create a rentable product:
* Go to Rentals > Configuration > Settings.
* Please activate the checkbox for using 'Product Variants'.
* Go to Rentals > Products > Products.
* Create a new storable product.
* Active the checkbox 'Can be Rented'.

Configure the naming of rental services:
* Go to Settings > Users & Companies > Companies.
* To to page 'Rental Services'.
* Configure the rental service names by providing a prefix and suffix for the name and default code.

Create the rental services:
* Go to the previously created rentable storable product.
* Go to page 'Rental Price'.
* Activate the boolean fields for hourly, daily or monthly rental as needed.
* Save the product, which creates the related rental services for the given time units.
* Add a usual price for one hour, one day or one month.
* Add bulk prices, e.g. one day costs 300 €, 7 days 290 €, 21 days 250 €, and so on.

Hint: The (bulk) prices are added in the product form view of the storable, rentable product
but are actually used for its related rental services!

Create a rental order:
* Go to Rentals > Customer > Rental Quotations.
* Create a new order and choose the type 'Rental Order'.
* Choose the storable rental product (not the rental service!).
* Choose the rental time unit, which actually loads the correct related rental service.
* Set the quantity to rent out one or several storable rentable products.
* Choose start and end date.
* Confirm the order.
* Check out the two deliveries, one for outgoing and one for incoming delivery.

Please also see the usage section of sale_rental and rental_base module.
4 changes: 4 additions & 0 deletions rental_pricelist/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Part of rental-vertical See LICENSE file for full copyright and licensing details.

from .hooks import set_multi_sales_price
from . import models
25 changes: 25 additions & 0 deletions rental_pricelist/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Part of rental-vertical See LICENSE file for full copyright and licensing details.

{
"name": "Rental Pricelist",
"summary": "Enables the user to define different rental prices with "
"time uom (Month, Day and Hour).",
"version": "15.0.1.0.0",
"category": "Rental",
"author": "elego Software Solutions GmbH, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/vertical-rental",
"depends": [
"rental_base",
],
"data": [
"views/sale_view.xml",
"views/product_view.xml",
"views/res_company_view.xml",
],
"demo": [],
"qweb": [],
"post_init_hook": "set_multi_sales_price",
"application": False,
"installable": True,
"license": "AGPL-3",
}
13 changes: 13 additions & 0 deletions rental_pricelist/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Part of rental-vertical See LICENSE file for full copyright and licensing details.

from odoo import SUPERUSER_ID
from odoo.api import Environment


def set_multi_sales_price(cr, registry):
env = Environment(cr, SUPERUSER_ID, {})
conf_page = env["res.config.settings"].create({})
conf_page.group_uom = True
conf_page.group_product_pricelist = True
conf_page.product_pricelist_setting = "advanced"
conf_page.execute()
Loading
Loading