-
-
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
7f07f55
commit 025a362
Showing
14 changed files
with
226 additions
and
242 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
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 wagner@elegosoft.com add missing/lost documentation (issue #4516) | ||
- 4509f78a 2022-02-23 20:48:33 +0100 wagner@elegosoft.com (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.