-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG]rental_pricelist: Migration to 16.0
- Loading branch information
1 parent
ca4cdce
commit e855463
Showing
16 changed files
with
237 additions
and
243 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,48 @@ | ||
================ | ||
Rental Pricelist | ||
==================================================== | ||
================ | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:abb8d54f6920d71a4ca8c6ffe2552ecebbbca7f055e9029cc8ef05bc6d3779db | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png | ||
:target: https://odoo-community.org/page/development-status | ||
:alt: Beta | ||
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fvertical--rental-lightgray.png?logo=github | ||
:target: https://github.com/OCA/vertical-rental/tree/16.0/rental_pricelist | ||
:alt: OCA/vertical-rental | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/vertical-rental-16-0/vertical-rental-16-0-rental_pricelist | ||
:alt: Translate me on Weblate | ||
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png | ||
:target: https://runboat.odoo-community.org/builds?repo=OCA/vertical-rental&target_branch=16.0 | ||
:alt: Try me on Runboat | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
*This file has been generated on 2022-05-04-12-21-41. 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. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Usage | ||
----- | ||
===== | ||
|
||
Create a rentable product: | ||
* Go to Rentals > Configuration > Settings. | ||
|
@@ -55,8 +80,47 @@ Create a rental order: | |
Please also see the usage section of sale_rental and rental_base module. | ||
|
||
Changelog | ||
--------- | ||
========= | ||
|
||
- 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) | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/vertical-rental/issues>`_. | ||
In case of trouble, please check there if your issue has already been reported. | ||
If you spotted it first, help us to smash it by providing a detailed and welcomed | ||
`feedback <https://github.com/OCA/vertical-rental/issues/new?body=module:%20rental_pricelist%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
Credits | ||
======= | ||
|
||
Authors | ||
~~~~~~~ | ||
|
||
* elego Software Solutions GmbH | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
elego Software Solutions GmbH, Odoo Community Association (OCA) | ||
|
||
Maintainers | ||
~~~~~~~~~~~ | ||
|
||
This module is maintained by the OCA. | ||
|
||
.. image:: https://odoo-community.org/logo.png | ||
:alt: Odoo Community Association | ||
:target: https://odoo-community.org | ||
|
||
OCA, or the Odoo Community Association, is a nonprofit organization whose | ||
mission is to support the collaborative development of Odoo features and | ||
promote its widespread use. | ||
|
||
This module is part of the `OCA/vertical-rental <https://github.com/OCA/vertical-rental/tree/16.0/rental_pricelist>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1 @@ | ||
|
||
Contributors | ||
------------ | ||
|
||
elego Software Solutions GmbH, Odoo Community Association (OCA) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,7 @@ | ||
Rental Pricelist | ||
==================================================== | ||
|
||
*This file has been generated on 2022-05-04-12-21-41. 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,2 @@ | ||
|
||
Changelog | ||
--------- | ||
|
||
- 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# Part of rental-vertical See LICENSE file for full copyright and licensing details. | ||
|
||
from . import sale | ||
from . import sale_order_line | ||
from . import sale_order | ||
from . import product | ||
from . import product_pricelist_item | ||
from . import res_company |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from odoo import _, models | ||
from odoo.exceptions import UserError | ||
|
||
|
||
class SaleOrder(models.Model): | ||
_inherit = "sale.order" | ||
|
||
def _check_rental_order_line(self): | ||
for order in self: | ||
for line in order.order_line: | ||
if line.rental and line.product_id: | ||
if line.product_id.type != "service": | ||
raise UserError( | ||
_("The product %(name)s is not correctly configured.") | ||
% {"name": line.product_id.name} | ||
) | ||
|
||
def action_confirm(self): | ||
self._check_rental_order_line() | ||
return super().action_confirm() |
Oops, something went wrong.