From b9ed5ef357a779f85a14f3eb140707d49da2ffea Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Tue, 28 Jan 2014 19:39:10 +0100 Subject: [PATCH 01/81] Initial check-in of the rental project. --- sale_rental/__init__.py | 24 + sale_rental/__openerp__.py | 60 ++ sale_rental/product_view.xml | 38 ++ sale_rental/rental.py | 543 ++++++++++++++++++ sale_rental/rental_data.xml | 30 + sale_rental/rental_view.xml | 88 +++ sale_rental/sale_view.xml | 38 ++ sale_rental/security/ir.model.access.csv | 3 + sale_rental/stock_view.xml | 27 + sale_rental/wizard/__init__.py | 23 + sale_rental/wizard/create_rental_product.py | 103 ++++ .../wizard/create_rental_product_view.xml | 40 ++ 12 files changed, 1017 insertions(+) create mode 100644 sale_rental/__init__.py create mode 100644 sale_rental/__openerp__.py create mode 100644 sale_rental/product_view.xml create mode 100644 sale_rental/rental.py create mode 100644 sale_rental/rental_data.xml create mode 100644 sale_rental/rental_view.xml create mode 100644 sale_rental/sale_view.xml create mode 100644 sale_rental/security/ir.model.access.csv create mode 100644 sale_rental/stock_view.xml create mode 100644 sale_rental/wizard/__init__.py create mode 100644 sale_rental/wizard/create_rental_product.py create mode 100644 sale_rental/wizard/create_rental_product_view.xml diff --git a/sale_rental/__init__.py b/sale_rental/__init__.py new file mode 100644 index 00000000000..09b1d640f0e --- /dev/null +++ b/sale_rental/__init__.py @@ -0,0 +1,24 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Sale Rental module for OpenERP +# Copyright (C) 2014 Akretion (http://www.akretion.com) +# @author Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +from . import rental +from . import wizard diff --git a/sale_rental/__openerp__.py b/sale_rental/__openerp__.py new file mode 100644 index 00000000000..4af661eeaa1 --- /dev/null +++ b/sale_rental/__openerp__.py @@ -0,0 +1,60 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Rental module for OpenERP +# Copyright (C) 2014 Akretion (http://www.akretion.com) +# @author Alexis de Lattre +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + + +{ + 'name': 'Rental', + 'version': '0.1', + 'category': 'Sales Management', + 'license': 'AGPL-3', + 'summary': 'Manage Rental of Products', + 'description': """ +Rental +====== + +This module will allows you to rent products with OpenERP. On the form view of a stockable product or consumable, there is a wizard to generate the corresponding rental service. On the warehouse, you have two additionnal stock locations: *Rental In* (stock of products to rent) and *Rental Out* (products currently rented). + +In a sale order line, 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 contact Alexis de Lattre from Akretion for any help or question about this module. + """, + 'author': 'Akretion', + 'website': 'http://www.akretion.com', + 'depends': ['sale_start_end_dates', 'stock'], + 'data': [ + 'sale_view.xml', + 'stock_view.xml', + 'rental_view.xml', + 'rental_data.xml', + 'wizard/create_rental_product_view.xml', + 'product_view.xml', + 'security/ir.model.access.csv', + ], + 'installable': True, + 'active': False, +} diff --git a/sale_rental/product_view.xml b/sale_rental/product_view.xml new file mode 100644 index 00000000000..3a4bf03c31f --- /dev/null +++ b/sale_rental/product_view.xml @@ -0,0 +1,38 @@ + + + + + + + + + rental.product.product.form + product.product + + + + + + + + + +