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

[16.0][MIG] sale_rental: Migration to 16.0 #3366

Open
wants to merge 77 commits into
base: 16.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
f6d1b32
Initial check-in of the rental project.
Jan 28, 2014
1d246f7
We want to have the date_planned of the regular products that are on …
Jan 29, 2014
87ab55f
Restrict to "day" UoM in the constraint. Add list of limitations in t…
Jan 29, 2014
126a018
Add read access on rental to stock user.
Jan 29, 2014
2c0f661
[Translation]
Feb 2, 2014
35c1970
Missing call to super in _invoice_line_hook This bug was very annoyin…
Oct 15, 2014
916e397
Better default values in the wizard for the creation of rental servic…
Nov 18, 2014
f7aaa98
Add a note about the fact that you need to have access to the form vi…
Nov 18, 2014
ecb0d46
FIX my commit revno 9 on the wizard to create the rental service Add …
Nov 26, 2014
3859475
Port to v8 and new API with several enhancements
May 25, 2015
4c30bb9
Fix typo
May 25, 2015
33d36ef
Inherit of product_id_change on product_id field, for better usabilit…
May 31, 2015
3492636
Fix flake8 warnings
Jun 2, 2015
df2e1f2
Fix spelling mistake notified by @jbeficent
Jun 2, 2015
069faf5
[Translation]
Jun 2, 2015
b317c38
Take into account the remarks of Jordi Ballester
alexis-via Jun 11, 2015
9bc0ae7
FIX Tax on sale order lines
alexis-via Jul 19, 2015
228e5b2
FIX the "0" qty by default in sale order lines
alexis-via Jul 31, 2015
20b99de
Add missing default oca icons
yvaucher Aug 18, 2015
956feb0
prefix versions with 8.0
sbidoul Oct 9, 2015
dd3588e
Make modules uninstallable
pedrobaeza Oct 14, 2015
a1f9499
Rename manifest files
pedrobaeza Oct 6, 2016
94d7fe0
Port sale_start_end_dates and sale_rental (#353)
Nov 8, 2016
b2c68a9
sale_start_end_dates and sale_rental
dvdhinesh Nov 15, 2016
0e926db
Product qty on rental pickings
alexis-via May 11, 2017
225c08c
Auto configure sale_rental module via post_install.py script
alexis-via May 24, 2017
b747b85
sale_rental: fix warning @constrains parameter 'must_have_dates' is n…
alexis-via Apr 4, 2018
f5b19f2
pylint
rousseldenis Sep 4, 2018
edeff1b
sale_rental: Migration to 11.0
Mar 29, 2019
cde0bee
[MIG] sale_start_end_dates and sale_rental to v12
alexis-via Jul 14, 2019
33c6f8b
sale_rental: Improve the code of object sale.rental
alexis-via Jul 16, 2019
9fb4b4d
[IMP] enhancements suggested in code reviews
gurneyalex Oct 15, 2019
480afae
[FIX] Archive rental routes rather than delete
sadamo Oct 15, 2019
907313a
[UPD] Update sale_rental.pot
oca-travis Sep 16, 2020
bab4f8b
[UPD] README.rst
OCA-git-bot Sep 16, 2020
b591217
Added translation using Weblate (Portuguese (Brazil))
marcelsavegnago Oct 1, 2020
6ff81e9
Translated using Weblate (Portuguese (Brazil))
marcelsavegnago Oct 2, 2020
3513650
Update translation files
oca-transbot Oct 9, 2020
2163da0
Update translation files
oca-transbot Nov 22, 2020
408e849
Translated using Weblate (Portuguese)
pedrocs-exo Feb 8, 2021
b250a06
[IMP] sale_rental: extract function _run_rental_procurement
yweng8111 Mar 5, 2021
2ae50cf
[UPD] Update sale_rental.pot
oca-travis Mar 12, 2021
07b8e10
sale_rental 12.0.1.1.0
OCA-git-bot Mar 12, 2021
2466f99
Update translation files
oca-transbot Mar 12, 2021
15328c8
[UPD] Update sale_rental.pot
oca-travis Mar 12, 2021
a8ad346
Update translation files
oca-transbot Mar 12, 2021
3bc1044
[MIG] sale_rental from v12 to v14
alexis-via Jul 31, 2021
a21e537
sale_rental: black, isort, etc.
alexis-via Jul 31, 2021
13b5c84
[UPD] Update sale_rental.pot
oca-travis Dec 7, 2021
a75ec68
[UPD] README.rst
OCA-git-bot Dec 7, 2021
e7018b6
[MIG] sale_rental: Migration to 15.0
kirca Jan 17, 2022
0b019b1
[IMP] : black, isort, prettier, pylint
kirca Jan 17, 2022
025e650
[UPD] Update sale_rental.pot
May 17, 2022
ca3ec45
[UPD] README.rst
OCA-git-bot May 17, 2022
77dabfd
sale_rental 15.0.1.0.1
OCA-git-bot May 17, 2022
96aa45c
[UPD] README.rst
OCA-git-bot Jun 2, 2022
a55a4e0
[UPD] README.rst
OCA-git-bot Jun 2, 2022
3f1face
Translated using Weblate (French (France))
gregory-moka Jun 3, 2022
04619f4
Translated using Weblate (French (France))
gregory-moka Jun 3, 2022
b49d132
Translated using Weblate (French)
gregory-moka Jul 4, 2022
c7397ff
Translated using Weblate (Italian)
mymage Mar 23, 2023
e3f965f
Translated using Weblate (Italian)
mymage Apr 15, 2023
0e7bd3d
Translated using Weblate (Italian)
mymage May 3, 2023
4901ffc
Translated using Weblate (Italian)
mymage May 9, 2023
e8f4de0
Translated using Weblate (Italian)
mymage May 12, 2023
24720e2
Translated using Weblate (Italian)
mymage Jun 20, 2023
b388452
Translated using Weblate (Spanish)
Ivorra78 Jul 24, 2023
9b22eed
[UPD] README.rst
OCA-git-bot Sep 3, 2023
a75ef9a
Update translation files
weblate Oct 10, 2023
a59bbe2
Translated using Weblate (Spanish)
Ivorra78 Oct 10, 2023
51fc1fa
[FIX] sale_rental: Linter fixes
pedrobaeza Oct 28, 2023
a2bd732
[BOT] post-merge updates
OCA-git-bot Oct 28, 2023
cc3ce8a
Update translation files
weblate Oct 28, 2023
440f719
Translated using Weblate (Italian)
mymage Dec 24, 2023
e6fc7cf
Translated using Weblate (Spanish)
May 14, 2024
058fe7e
Translated using Weblate (Spanish)
Jun 12, 2024
999b174
[MIG] sale_rental: Migration to 16.0
IJOL Oct 18, 2024
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
117 changes: 117 additions & 0 deletions sale_rental/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
===========
Sale Rental
===========

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:c754755bc48b0a4404d8f61101edd6ebbaf57c8df20780e4f58aed7d1a2a875c
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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%2Fsale--workflow-lightgray.png?logo=github
:target: https://github.com/OCA/sale-workflow/tree/16.0/sale_rental
:alt: OCA/sale-workflow
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_rental
: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/sale-workflow&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

With this module, you can rent products with Odoo. This module supports:

* regular rentals.
* rental extensions.
* sale of rented products.

**Table of contents**

.. contents::
:local:

Configuration
=============

In the *Products* menu, on the form view of a stockable product or consumable, in the *Sales* tab, there is a button *Create Rental Service* which starts a wizard to generate the corresponding rental service.

In the menu *Inventory > Configuration > Warehouse Management > Warehouses*, on the form view of the warehouse, in the *Technical Information* tab, you will see two additional stock locations: *Rental In* (stock of products to rent) and *Rental Out* (products currently rented). In the *Warehouse Configuration* tab, make sure that the option *Rental Allowed* is checked.

Usage
=====

In a sale order line (form view, not tree view), if you select a rental service, you can:

* create a new rental with a start date and an end date: when the sale order is confirmed, it will generate a delivery order and an incoming shipment.
* extend an existing rental: the incoming shipment will be postponed to the end date of the extension.

In a sale order line, if you select a product that has a corresponding rental service, you can decide to sell the rented product that the customer already has. If the sale order is confirmed, the incoming shipment will be cancelled and a new delivery order will be created with a stock move from *Rental Out* to *Customers*.

Known issues / Roadmap
======================

This module has the following limitations:

* No support for planning/agenda of the rented products (i.e. you can't rely on this module to check your capacity to rent a product for the selected dates when you create a quote)
* The unit of measure of the rental services must be *Day* (the rental per hour / per week / per month is not supported for the moment)

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/sale-workflow/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/sale-workflow/issues/new?body=module:%20sale_rental%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
~~~~~~~

* Akretion
* Sodexis

Contributors
~~~~~~~~~~~~

* Alexis de Lattre <[email protected]>
* Sodexis <[email protected]>
* Danh Vo <https://github.com/danhvophuong>
* Kiril Vangelovski <[email protected]>

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.

.. |maintainer-alexis-via| image:: https://github.com/alexis-via.png?size=40px
:target: https://github.com/alexis-via
:alt: alexis-via

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-alexis-via|

This module is part of the `OCA/sale-workflow <https://github.com/OCA/sale-workflow/tree/16.0/sale_rental>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions sale_rental/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from . import wizard
28 changes: 28 additions & 0 deletions sale_rental/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright 2014-2021 Akretion France (http://www.akretion.com)
# @author Alexis de Lattre <[email protected]>
# Copyright 2016-2021 Sodexis (http://sodexis.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Sale Rental",
"version": "16.0.0.0.0",
"category": "Sales",
"license": "AGPL-3",
"summary": "Manage Rental of Products",
"author": "Akretion, Sodexis, Odoo Community Association (OCA)",
"maintainers": ["alexis-via"],
"website": "https://github.com/OCA/sale-workflow",
"depends": ["sale_start_end_dates", "sale_stock", "sales_team"],
"data": [
"security/ir.model.access.csv",
"security/sale_rental_security.xml",
"data/rental_data.xml",
"views/sale_order.xml",
"views/stock_warehouse.xml",
"views/sale_rental.xml",
"wizard/create_rental_product_view.xml",
"views/product.xml",
],
"demo": ["demo/rental_demo.xml"],
"installable": True,
}
26 changes: 26 additions & 0 deletions sale_rental/data/rental_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2014-2021 Akretion France (http://www.akretion.com/)
@author Alexis de Lattre <[email protected]>
Copyright 2016-2021 Sodexis
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo noupdate="1">

<record id="route_warehouse0_rental" model="stock.route">
<field name="name">Rent</field>
<field name="sequence">100</field>
<field name="warehouse_selectable" eval="True" />
<field name="product_selectable" eval="False" />
</record>

<record id="route_warehouse0_sell_rented_product" model="stock.route">
<field name="name">Sell Rented Product</field>
<field name="sequence">100</field>
</record>

<record id="stock.warehouse0" model="stock.warehouse">
<field name="rental_allowed" eval="True" />
</record>

</odoo>
58 changes: 58 additions & 0 deletions sale_rental/demo/rental_demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright 2014-2021 Akretion France (http://www.akretion.com/)
@author Alexis de Lattre <[email protected]>
Copyright 2016-2021 Sodexis
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
<odoo noupdate="1">

<record id="rent_consu_delivery_01" model="product.product">
<field name="name">Rental of one Three-Seat Sofa</field>
<field name="default_code">RENT-FURN_8999</field>
<field name="categ_id" ref="product.product_category_5" />
<field name="sale_ok" eval="True" />
<field name="purchase_ok" eval="False" />
<field name="list_price">5</field>
<field name="type">service</field>
<field name="uom_id" ref="uom.product_uom_day" />
<field name="uom_po_id" ref="uom.product_uom_day" />
<field name="must_have_dates" eval="True" />
<field name="rented_product_id" ref="product.consu_delivery_01" />
<!-- The 'stock' module sets it as type = 'product'
This XMLID is misleading -->
</record>

<record id="rent_product_product_20" model="product.product">
<field name="name">Rental of one Flipover</field>
<field name="default_code">RENT-FURN_9001</field>
<field name="categ_id" ref="product.product_category_5" />
<field name="sale_ok" eval="True" />
<field name="purchase_ok" eval="False" />
<field name="list_price">4</field>
<field name="type">service</field>
<field name="uom_id" ref="uom.product_uom_day" />
<field name="uom_po_id" ref="uom.product_uom_day" />
<field name="must_have_dates" eval="True" />
<field name="rented_product_id" ref="product.product_product_20" />
</record>

<record id="rent_product_product_25" model="product.product">
<field name="name">Rental of one Acoustic Bloc Screens</field>
<field name="default_code">RENT-FURN_6666</field>
<field name="categ_id" ref="product.product_category_5" />
<field name="sale_ok" eval="True" />
<field name="purchase_ok" eval="False" />
<field name="list_price">6</field>
<field name="type">service</field>
<field name="uom_id" ref="uom.product_uom_day" />
<field name="uom_po_id" ref="uom.product_uom_day" />
<field name="must_have_dates" eval="True" />
<field name="rented_product_id" ref="product.product_product_25" />
</record>

<!-- Create inventory on Rental In for these products -->
<function model="stock.quant" name="create_demo_and_validate" />


</odoo>
Loading
Loading