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

Update sale_rental.pot #4

Open
wants to merge 46 commits into
base: 12.0-mig_sale_rental
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
d570057
Initial check-in of the rental project.
Jan 28, 2014
53e05b2
We want to have the date_planned of the regular products that are on …
Jan 29, 2014
d05ea63
Restrict to "day" UoM in the constraint. Add list of limitations in t…
Jan 29, 2014
66fa7c3
Add read access on rental to stock user.
Jan 29, 2014
132bfdd
Add POT file Add full FR translation for sale_start_end_dates Add par…
Feb 2, 2014
d2f4945
Add pt_BR translation, contributed by Caio Barros.
Jul 14, 2014
b5f47d5
Missing call to super in _invoice_line_hook This bug was very annoyin…
Oct 15, 2014
0bd49b5
Better default values in the wizard for the creation of rental servic…
Nov 18, 2014
ff19658
Add a note about the fact that you need to have access to the form vi…
Nov 18, 2014
a0c3cfe
FIX my commit revno 9 on the wizard to create the rental service Add …
Nov 26, 2014
b1cc113
Port to v8 and new API with several enhancements
May 25, 2015
378022b
Fix typo
May 25, 2015
d852242
Inherit of product_id_change on product_id field, for better usabilit…
May 31, 2015
361cdc7
Fix flake8 warnings
Jun 2, 2015
173b3ae
Fix spelling mistake notified by @jbeficent
Jun 2, 2015
f906c5e
Update POT file and FR translation
Jun 2, 2015
ba8025e
Take into account the remarks of Jordi Ballester
alexis-via Jun 11, 2015
bea3d87
FIX Tax on sale order lines
alexis-via Jul 19, 2015
9eb108e
FIX the "0" qty by default in sale order lines
alexis-via Jul 31, 2015
2a68bd9
Add missing default oca icons
yvaucher Aug 18, 2015
dd16d5e
Slovene translations added
sysadminmatmoz Aug 20, 2015
f6b161a
OCA Transbot updated translations from Transifex
oca-transbot Sep 13, 2015
6514537
prefix versions with 8.0
sbidoul Oct 9, 2015
ed8b6f1
OCA Transbot updated translations from Transifex
oca-transbot Oct 11, 2015
465b1d3
Make modules uninstallable
pedrobaeza Oct 14, 2015
8e18678
Rename manifest files
pedrobaeza Oct 6, 2016
f5254b3
Port sale_start_end_dates and sale_rental (#353)
Nov 8, 2016
a2a62ad
sale_start_end_dates and sale_rental
dvdhinesh Nov 15, 2016
6454e39
Product qty on rental pickings
alexis-via May 11, 2017
3f4d0eb
OCA Transbot updated translations from Transifex
oca-transbot May 20, 2017
53cd8b4
Auto configure sale_rental module via post_install.py script
alexis-via May 24, 2017
7c37f0a
OCA Transbot updated translations from Transifex
oca-transbot Jun 10, 2017
b2e84a1
sale_rental: fix warning @constrains parameter 'must_have_dates' is n…
alexis-via Apr 4, 2018
5d3323b
remove obsolete .pot files [ci skip]
sbidoul Jun 15, 2018
b036f04
fix invalid pt_BR.po
sbidoul Jun 20, 2018
b05ab31
Update sale_rental.pot
oca-travis Jun 20, 2018
4517fbb
Translated using Weblate (Nederlands (nl_NL))
thomaspot Jun 20, 2018
8034e20
pylint
rousseldenis Sep 4, 2018
a522627
Update sale_rental.pot
oca-travis Sep 5, 2018
fe6339c
Update translation files
oca-transbot Nov 24, 2018
476170b
Translated using Weblate (German)
benbrich Dec 7, 2018
a396356
sale_rental: Migration to 11.0
Mar 29, 2019
a3cb539
[MIG] sale_start_end_dates and sale_rental to v12
alexis-via Jul 14, 2019
aa99400
sale_rental: Improve the code of object sale.rental
alexis-via Jul 16, 2019
c20632e
[IMP] enhancements suggested in code reviews
gurneyalex Oct 15, 2019
ddd6474
Update sale_rental.pot
yweng8111 Oct 31, 2019
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
119 changes: 119 additions & 0 deletions sale_rental/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
===========
Sale Rental
===========

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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/11.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-11-0/sale-workflow-11-0-sale_rental
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/167/11.0
:alt: Try me on Runbot

|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 menu *Sales > Products > Product Variants*, on the form view of a stockable product or consumable, in the *Rental* tab, there is a button *Create Rental Service* which starts a wizard to generate the corresponding rental service.

In the menu *Warehouse > Configuration > 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.

To use the module, you need to have access to the form view of sale order lines. For that, you must add your user to one of these groups:

* Manage Product Packaging
* Properties on lines

Upon module installation, all users are automatically added to the group *Manage Product Packaging*.

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*.

Please refer to this screencast https://www.youtube.com/watch?v=9o0QrGryBn8 to get a demo of the installation, configuration and use of this module (note that this screencast is for Odoo v7).

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/167/11.0

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

This module has the following limitations:

* No support for planning/agenda of the rented products
* The unit of measure of the rental services must be *Day* (the rental per hours / per week / per month is not supported for the moment)
* In case of selling rented product, the incoming shipment should be created manually

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 smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/sale-workflow/issues/new?body=module:%20sale_rental%0Aversion:%2011.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>

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/sale-workflow <https://github.com/OCA/sale-workflow/tree/11.0/sale_rental>`_ project on GitHub.

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

{
'name': 'Sale Rental',
'version': '12.0.1.0.0',
'category': 'Sales',
'license': 'AGPL-3',
'summary': 'Manage Rental of Products',
'author': 'Akretion, Sodexis, Odoo Community Association (OCA)',
'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',
],
'post_init_hook': 'add_to_group_stock_packaging',
'demo': ['demo/rental_demo.xml'],
'installable': True,
}
27 changes: 27 additions & 0 deletions sale_rental/data/rental_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2014-2019 Akretion France (http://www.akretion.com/)
@author Alexis de Lattre <[email protected]>
Copyright 2016-2019 Sodexis
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->

<odoo noupdate="1">

<record id="route_warehouse0_rental" model="stock.location.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.location.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>
70 changes: 70 additions & 0 deletions sale_rental/demo/rental_demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2014-2019 Akretion France (http://www.akretion.com/)
@author Alexis de Lattre <[email protected]>
Copyright 2016-2019 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 -->
<record id="rental_inventory" model="stock.inventory">
<field name="name">Inventory for rented products</field>
<field name="filter">partial</field>
</record>

<function model="stock.inventory" name="create_demo_and_validate">
<function eval="[[('id', '=', ref('rental_inventory'))]]" model="stock.inventory" name="search"/>
</function>

<record id="base.user_demo" model="res.users">
<field name="groups_id" eval="[(4, ref('product.group_product_variant'))]"/>
</record>

</odoo>
13 changes: 13 additions & 0 deletions sale_rental/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2016-2019 Akretion France
# @author: Alexis de Lattre <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import SUPERUSER_ID
from odoo.api import Environment


def add_to_group_stock_packaging(cr, registry):
env = Environment(cr, SUPERUSER_ID, {})
conf_page = env['res.config.settings'].create({})
conf_page.group_stock_packaging = True
conf_page.execute()
Loading