diff --git a/rental_pricelist_interval/README.rst b/rental_pricelist_interval/README.rst new file mode 100644 index 00000000..af720e0b --- /dev/null +++ b/rental_pricelist_interval/README.rst @@ -0,0 +1,58 @@ +Rental Pricelist (Interval) +==================================================== + +*This file has been generated on 2023-02-19-14-21-34. Changes to it will be overwritten.* + +Summary +------- + +Enables the user to define different rental prices time uom (Month, Day and Hour). + +Description +----------- + +This Module implements a new rental service product for interval pricing under consideration +of odoo price lists. This enables to rent out products and charge for day interval ranges. + +These ranges can be configured freely on general and/or product level. In contrast to rentals +on daily, monthly or yearly bases a different price computation is applied in sale order lines. + + +Configuration +------------- + +To configure this module, you need to: + +#. Go to company settings and define the default interval ranges on 'Rental Interval Prices' tab. + These ranges will be applied for computation of price intervals for rental service products when interval pricing is activated + in stockable product. + +#. If desired go to 'RS (Prefix and Suffix)' tab an define how rental interval service product + names and reference numbers are created. + + +Usage +----- + +To use this module, you need to: + +#. Create a new stockable product and define it as rental service or + go to an existing one. + +#. On 'Rental Price' tab check the 'Rented in interval' option. + +#. Set the interval base price and define the max amount of days the product + can be rented out. + +#. Push the 'Reset Interval Prices' button to compute interval ranges and prices. + from base price and interval ranges configured in company settings. + +#. Adapt interval min. quantities or prices for the selected product if desired. + +Changelog +--------- + +- 9089b1d5 2022-04-15 14:16:12 +0200 wagner@elegosoft.com (tag: odoo-fox-v15_v15_int_current_daily, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-26, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-25, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-23, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-22, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-21, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-17, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-16, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-15, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-13, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-12, tag: bp_fox_v15_integration-ceqp-2, tag: bp_fox_v15_integration-cep-27, tag: bp_fox_v15_integration-cep-26, tag: bp_fox_v15_integration-cep-25, tag: bp_fox_v15_integration-cep-23, tag: bp_fox_v15_integration-cep-22, tag: bp_fox_v15_integration-cep-21, tag: bp_fox_v15_integration-cep-17, tag: bp_fox_v15_integration-cep-16, tag: bp_fox_v15_integration-cep-15, tag: bp_fox_v15_integration-cep-13, tag: bp_fox_v15_integration-cep-12, tag: baseline_odoo-fox-v15_v15_fox_v15_daily_build-26, origin/fox_v15_integration-cep-26, origin/fox_v15_integration-cep-25, origin/fox_v15_integration-cep-23, origin/fox_v15_integration-cep-22, origin/fox_v15_integration-cep-21, origin/fox_v15_integration-cep-17, origin/fox_v15_integration-cep-16, origin/fox_v15_integration-cep-15, origin/fox_v15_integration-cep-13, origin/fox_v15_integration-cep-12) update module versions for v15 and remove old migration scripts (issue #4967) +- 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) + diff --git a/rental_pricelist_interval/README/CONFIGURATION.rst b/rental_pricelist_interval/README/CONFIGURATION.rst new file mode 100644 index 00000000..0d373c35 --- /dev/null +++ b/rental_pricelist_interval/README/CONFIGURATION.rst @@ -0,0 +1,12 @@ + +Configuration +------------- + +To configure this module, you need to: + +#. Go to company settings and define the default interval ranges on 'Rental Interval Prices' tab. + These ranges will be applied for computation of price intervals for rental service products when interval pricing is activated + in stockable product. + +#. If desired go to 'RS (Prefix and Suffix)' tab an define how rental interval service product + names and reference numbers are created. diff --git a/rental_pricelist_interval/README/CONTRIBUTORS.rst b/rental_pricelist_interval/README/CONTRIBUTORS.rst new file mode 100644 index 00000000..357fa53c --- /dev/null +++ b/rental_pricelist_interval/README/CONTRIBUTORS.rst @@ -0,0 +1,6 @@ + +Contributors +------------ + +elego Software Solutions GmbH, Odoo Community Association (OCA) +Ben Brich (www.humanilog.org), Yu Weng (www.elegosoft.com) diff --git a/rental_pricelist_interval/README/DESCRIPTION.rst b/rental_pricelist_interval/README/DESCRIPTION.rst new file mode 100644 index 00000000..d3c84874 --- /dev/null +++ b/rental_pricelist_interval/README/DESCRIPTION.rst @@ -0,0 +1,18 @@ +Rental Pricelist (Interval) +==================================================== + +*This file has been generated on 2023-02-19-14-21-34. Changes to it will be overwritten.* + +Summary +------- + +Enables the user to define different rental prices time uom (Month, Day and Hour). + +Description +----------- + +This Module implements a new rental service product for interval pricing under consideration +of odoo price lists. This enables to rent out products and charge for day interval ranges. + +These ranges can be configured freely on general and/or product level. In contrast to rentals +on daily, monthly or yearly bases a different price computation is applied in sale order lines. diff --git a/rental_pricelist_interval/README/HISTORY.rst b/rental_pricelist_interval/README/HISTORY.rst new file mode 100644 index 00000000..bb2a8cb6 --- /dev/null +++ b/rental_pricelist_interval/README/HISTORY.rst @@ -0,0 +1,7 @@ + +Changelog +--------- + +- 9089b1d5 2022-04-15 14:16:12 +0200 wagner@elegosoft.com (tag: odoo-fox-v15_v15_int_current_daily, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-26, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-25, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-23, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-22, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-21, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-17, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-16, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-15, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-13, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-12, tag: bp_fox_v15_integration-ceqp-2, tag: bp_fox_v15_integration-cep-27, tag: bp_fox_v15_integration-cep-26, tag: bp_fox_v15_integration-cep-25, tag: bp_fox_v15_integration-cep-23, tag: bp_fox_v15_integration-cep-22, tag: bp_fox_v15_integration-cep-21, tag: bp_fox_v15_integration-cep-17, tag: bp_fox_v15_integration-cep-16, tag: bp_fox_v15_integration-cep-15, tag: bp_fox_v15_integration-cep-13, tag: bp_fox_v15_integration-cep-12, tag: baseline_odoo-fox-v15_v15_fox_v15_daily_build-26, origin/fox_v15_integration-cep-26, origin/fox_v15_integration-cep-25, origin/fox_v15_integration-cep-23, origin/fox_v15_integration-cep-22, origin/fox_v15_integration-cep-21, origin/fox_v15_integration-cep-17, origin/fox_v15_integration-cep-16, origin/fox_v15_integration-cep-15, origin/fox_v15_integration-cep-13, origin/fox_v15_integration-cep-12) update module versions for v15 and remove old migration scripts (issue #4967) +- 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) diff --git a/rental_pricelist_interval/README/USAGE.rst b/rental_pricelist_interval/README/USAGE.rst new file mode 100644 index 00000000..fde8d3fa --- /dev/null +++ b/rental_pricelist_interval/README/USAGE.rst @@ -0,0 +1,18 @@ + +Usage +----- + +To use this module, you need to: + +#. Create a new stockable product and define it as rental service or + go to an existing one. + +#. On 'Rental Price' tab check the 'Rented in interval' option. + +#. Set the interval base price and define the max amount of days the product + can be rented out. + +#. Push the 'Reset Interval Prices' button to compute interval ranges and prices. + from base price and interval ranges configured in company settings. + +#. Adapt interval min. quantities or prices for the selected product if desired. diff --git a/rental_pricelist_interval/__init__.py b/rental_pricelist_interval/__init__.py new file mode 100644 index 00000000..07975873 --- /dev/null +++ b/rental_pricelist_interval/__init__.py @@ -0,0 +1,4 @@ +# Part of rental-vertical See LICENSE file for full copyright and licensing details. + +from .hooks import set_product_def_interval_pricelist_id +from . import models diff --git a/rental_pricelist_interval/__manifest__.py b/rental_pricelist_interval/__manifest__.py new file mode 100644 index 00000000..8c472d0d --- /dev/null +++ b/rental_pricelist_interval/__manifest__.py @@ -0,0 +1,43 @@ +# Part of rental-vertical See LICENSE file for full copyright and licensing details. + +{ + "name": "Rental Pricelist (Interval)", + "summary": "Enables the user to define different rental prices " + "time uom (Month, Day and Hour).", + "version": "17.0.1.0.0", + "category": "Rental", + "author": "elego Software Solutions GmbH, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/vertical-rental", + "configuration": """ +To configure this module, you need to: + +#. Go to company settings and define the default interval ranges on + 'Rental Interval Prices' tab. These ranges will be applied for + computation of price intervals for rental service products + when interval pricing is activated in stockable product. + +#. If desired go to 'RS (Prefix and Suffix)' tab an define how rental +interval service product names and reference numbers are created. +""", + "contributors": [ + "Ben Brich (www.humanilog.org)", + "Yu Weng (www.elegosoft.com)", + ], + "depends": [ + "rental_pricelist", + ], + "data": [ + "security/ir.model.access.csv", + "data/product_uom_data.xml", + "data/product_pricelist_data.xml", + "views/product_pricelist_view.xml", + "views/product_view.xml", + "views/res_company_view.xml", + ], + "demo": [], + "qweb": [], + "post_init_hook": "set_product_def_interval_pricelist_id", + "application": False, + "installable": True, + "license": "AGPL-3", +} diff --git a/rental_pricelist_interval/data/product_pricelist_data.xml b/rental_pricelist_interval/data/product_pricelist_data.xml new file mode 100644 index 00000000..4615697e --- /dev/null +++ b/rental_pricelist_interval/data/product_pricelist_data.xml @@ -0,0 +1,21 @@ + + + + + + Public Pricelist (Interval) + 10 + + + + + + diff --git a/rental_pricelist_interval/data/product_uom_data.xml b/rental_pricelist_interval/data/product_uom_data.xml new file mode 100644 index 00000000..e6580065 --- /dev/null +++ b/rental_pricelist_interval/data/product_uom_data.xml @@ -0,0 +1,9 @@ + + + + Interval(s) + bigger + + + + diff --git a/rental_pricelist_interval/hooks.py b/rental_pricelist_interval/hooks.py new file mode 100644 index 00000000..14d11161 --- /dev/null +++ b/rental_pricelist_interval/hooks.py @@ -0,0 +1,10 @@ +# Part of rental-vertical See LICENSE file for full copyright and licensing details. + + +def set_product_def_interval_pricelist_id(env): + interval_price_id = env.ref("rental_pricelist_interval.pricelist_interval").id + env["product.product"].search([]).write( + { + "def_interval_pricelist_id": interval_price_id, + } + ) diff --git a/rental_pricelist_interval/i18n/de.po b/rental_pricelist_interval/i18n/de.po new file mode 100644 index 00000000..90b8bef0 --- /dev/null +++ b/rental_pricelist_interval/i18n/de.po @@ -0,0 +1,254 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * rental_pricelist_interval +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-01-04 16:54+0000\n" +"PO-Revision-Date: 2022-01-04 16:54+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: rental_pricelist_interval +#: model_terms:ir.ui.view,arch_db:rental_pricelist_interval.product_normal_form_view +msgid "Bulk Prices" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model,name:rental_pricelist_interval.model_res_company +msgid "Companies" +msgstr "Unternehmen" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_rule__company_id +msgid "Company" +msgstr "Unternehmen" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_item__create_uid +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_rule__create_uid +msgid "Created by" +msgstr "Erstellt von" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_item__create_date +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_rule__create_date +msgid "Created on" +msgstr "Erstellt am" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_product__def_interval_pricelist_id +msgid "Default Interval Pricelist" +msgstr "Standard Intervall Preisliste" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_pricelist__display_name +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_pricelist_item__display_name +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_product__display_name +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_item__display_name +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_rule__display_name +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_res_company__display_name +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_sale_order_line__display_name +msgid "Display Name" +msgstr "Anzeigename" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_rule__factor +msgid "Factor" +msgstr "Faktor" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_pricelist__id +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_pricelist_item__id +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_product__id +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_item__id +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_rule__id +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_res_company__id +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_sale_order_line__id +msgid "ID" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_item__min_quantity +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_rule__min_quantity +msgid "Interval (days)" +msgstr "Intervall (Tage)" + +#. module: rental_pricelist_interval +#: model_terms:ir.ui.view,arch_db:rental_pricelist_interval.product_normal_form_view +msgid "Interval Basis" +msgstr "Intervallbasis" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_product__rental_price_interval +msgid "Interval Price" +msgstr "Intervallpreis" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_pricelist__is_interval_pricelist +msgid "Interval Pricelist" +msgstr "Intervall Preiseliste" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_product__interval_scale_pricelist_item_ids +msgid "Interval Scale Pricelist Items" +msgstr "Staffelpreise" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_product__rental_interval_max +msgid "Interval days (Max)" +msgstr "Intervall Tage (Max)" + +#. module: rental_pricelist_interval +#: model:uom.uom,name:rental_pricelist_interval.product_uom_interval +msgid "Interval(s)" +msgstr "Intervall" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_pricelist____last_update +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_pricelist_item____last_update +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_product____last_update +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_item____last_update +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_rule____last_update +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_res_company____last_update +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_sale_order_line____last_update +msgid "Last Modified on" +msgstr "Zuletzt geändert am" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_item__write_uid +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_rule__write_uid +msgid "Last Updated by" +msgstr "Zuletzt aktualisiert durch" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_item__write_date +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_rule__write_date +msgid "Last Updated on" +msgstr "Zuletzt aktualisiert am" + +#. module: rental_pricelist_interval +#: code:addons/rental_pricelist_interval/models/sale.py:0 +#, python-format +msgid "Max rental interval (%s days) is exceeded." +msgstr "Das Max Intervall (%s Tage) ist überschritten." + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_item__name +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_rule__name +msgid "Name" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_res_company__rental_service_default_code_prefix_interval +msgid "Prefix of Rental Service Internal Reference (Interval)" +msgstr "Präfix für Rental Service Interne Referenz (Intervall)" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_res_company__rental_service_name_prefix_interval +msgid "Prefix of Rental Service Name (Interval)" +msgstr "Präfix für Rental Service Name (Intervall)" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_item__price +#: model_terms:ir.ui.view,arch_db:rental_pricelist_interval.product_normal_form_view +msgid "Price" +msgstr "Preis" + +#. module: rental_pricelist_interval +#: model:ir.model,name:rental_pricelist_interval.model_product_pricelist +msgid "Pricelist" +msgstr "Preisliste" + +#. module: rental_pricelist_interval +#: model_terms:ir.ui.view,arch_db:rental_pricelist_interval.product_normal_form_view +msgid "Pricelist Items" +msgstr "Preislisten-Positionen" + +#. module: rental_pricelist_interval +#: model:ir.model,name:rental_pricelist_interval.model_product_pricelist_item +msgid "Pricelist Rule" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model,name:rental_pricelist_interval.model_product_product +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_item__product_id +msgid "Product" +msgstr "Produkt" + +#. module: rental_pricelist_interval +#: model:product.pricelist,name:rental_pricelist_interval.pricelist_interval +msgid "Public Pricelist (Interval)" +msgstr "Allgemeiner Preisliste (Intervall)" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_sale_order_line__rental_interval_name +msgid "Rental Interval" +msgstr "MietIntervall" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_res_company__rental_price_interval_rule_ids +msgid "Rental Interval Price Rules" +msgstr "MietIntervall Preisregel" + +#. module: rental_pricelist_interval +#: model_terms:ir.ui.view,arch_db:rental_pricelist_interval.view_company_form +msgid "Rental Interval Prices" +msgstr "MietIntervall Preis" + +#. module: rental_pricelist_interval +#: model:ir.model,name:rental_pricelist_interval.model_rental_price_interval_item +msgid "Rental Price Interval Item" +msgstr "MietIntervall Preis Element" + +#. module: rental_pricelist_interval +#: model:ir.model,name:rental_pricelist_interval.model_rental_price_interval_rule +msgid "Rental Price Interval Rule" +msgstr "MietIntervall Preisregel" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_pricelist_item__interval_item_id +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_product__product_rental_interval_id +msgid "Rental Service (Interval)" +msgstr "Mietservice (Intervall)" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_product__rental_of_interval +msgid "Rented in interval" +msgstr "Vermietbar in Intervall" + +#. module: rental_pricelist_interval +#: model_terms:ir.ui.view,arch_db:rental_pricelist_interval.product_normal_form_view +msgid "Reset Interval Prices" +msgstr "Intervallpreis zurücksetzen" + +#. module: rental_pricelist_interval +#: model:ir.model,name:rental_pricelist_interval.model_sale_order_line +msgid "Sales Order Line" +msgstr "Auftragsposition" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_sale_order_line__show_rental_interval_price +msgid "Show Option Interval Price" +msgstr "Option Intervallpreis anzeigen" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_res_company__rental_service_default_code_suffix_interval +msgid "Suffix of Rental Service Internal Reference (Interval)" +msgstr "Suffix für Rental Service Interne Referenz (Intervall)" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_res_company__rental_service_name_suffix_interval +msgid "Suffix of Rental Service Name (Interval)" +msgstr "Suffix für Rental Service Name (Intervall)" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_sale_order_line__rental_interval_price +msgid "Use Interval Price" +msgstr "Intervallpreis verwenden " diff --git a/rental_pricelist_interval/i18n/es.po b/rental_pricelist_interval/i18n/es.po new file mode 100644 index 00000000..10fe1ca9 --- /dev/null +++ b/rental_pricelist_interval/i18n/es.po @@ -0,0 +1,254 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * rental_pricelist_interval +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-01-04 16:54+0000\n" +"PO-Revision-Date: 2022-01-04 16:54+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: rental_pricelist_interval +#: model_terms:ir.ui.view,arch_db:rental_pricelist_interval.product_normal_form_view +msgid "Bulk Prices" +msgstr "Precios a granel" + +#. module: rental_pricelist_interval +#: model:ir.model,name:rental_pricelist_interval.model_res_company +msgid "Companies" +msgstr "Compañias" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_rule__company_id +msgid "Company" +msgstr "Compañía" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_item__create_uid +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_rule__create_uid +msgid "Created by" +msgstr "Creado por" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_item__create_date +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_rule__create_date +msgid "Created on" +msgstr "Creado en" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_product__def_interval_pricelist_id +msgid "Default Interval Pricelist" +msgstr "Lista de precios de intervalo predeterminado" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_pricelist__display_name +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_pricelist_item__display_name +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_product__display_name +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_item__display_name +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_rule__display_name +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_res_company__display_name +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_sale_order_line__display_name +msgid "Display Name" +msgstr "Nombre a mostrar" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_rule__factor +msgid "Factor" +msgstr "Factor" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_pricelist__id +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_pricelist_item__id +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_product__id +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_item__id +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_rule__id +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_res_company__id +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_sale_order_line__id +msgid "ID" +msgstr "ID" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_item__min_quantity +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_rule__min_quantity +msgid "Interval (days)" +msgstr "Intervalo (días)" + +#. module: rental_pricelist_interval +#: model_terms:ir.ui.view,arch_db:rental_pricelist_interval.product_normal_form_view +msgid "Interval Basis" +msgstr "Base de intervalo" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_product__rental_price_interval +msgid "Interval Price" +msgstr "Precio de intervalo" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_pricelist__is_interval_pricelist +msgid "Interval Pricelist" +msgstr "Lista de precios de intervalo" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_product__interval_scale_pricelist_item_ids +msgid "Interval Scale Pricelist Items" +msgstr "Artículos de lista de precios de escala de intervalo" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_product__rental_interval_max +msgid "Interval days (Max)" +msgstr "Días de intervalo (máx.)" + +#. module: rental_pricelist_interval +#: model:uom.uom,name:rental_pricelist_interval.product_uom_interval +msgid "Interval(s)" +msgstr "Intervalo(s)" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_pricelist____last_update +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_pricelist_item____last_update +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_product____last_update +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_item____last_update +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_rule____last_update +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_res_company____last_update +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_sale_order_line____last_update +msgid "Last Modified on" +msgstr "Última modificación en" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_item__write_uid +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_rule__write_uid +msgid "Last Updated by" +msgstr "Última actualización por" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_item__write_date +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_rule__write_date +msgid "Last Updated on" +msgstr "Última actualización en" + +#. module: rental_pricelist_interval +#: code:addons/rental_pricelist_interval/models/sale.py:0 +#, python-format +msgid "Max rental interval (%s days) is exceeded." +msgstr "El intervalo máximo de alquiler (%s días) ha sido excedido." + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_item__name +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_rule__name +msgid "Name" +msgstr "Nombre" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_res_company__rental_service_default_code_prefix_interval +msgid "Prefix of Rental Service Internal Reference (Interval)" +msgstr "Prefijo de Referencia Interna del Servicio de alquiler (Intervalo)" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_res_company__rental_service_name_prefix_interval +msgid "Prefix of Rental Service Name (Interval)" +msgstr "Prefijo del nombre del servicio de alquiler (Intervalo)" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_item__price +#: model_terms:ir.ui.view,arch_db:rental_pricelist_interval.product_normal_form_view +msgid "Price" +msgstr "Precio:" + +#. module: rental_pricelist_interval +#: model:ir.model,name:rental_pricelist_interval.model_product_pricelist +msgid "Pricelist" +msgstr "Lista de precios" + +#. module: rental_pricelist_interval +#: model_terms:ir.ui.view,arch_db:rental_pricelist_interval.product_normal_form_view +msgid "Pricelist Items" +msgstr "Artículos de la lista de precios" + +#. module: rental_pricelist_interval +#: model:ir.model,name:rental_pricelist_interval.model_product_pricelist_item +msgid "Pricelist Rule" +msgstr "Reglas de la lista de precios" + +#. module: rental_pricelist_interval +#: model:ir.model,name:rental_pricelist_interval.model_product_product +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_item__product_id +msgid "Product" +msgstr "Producto" + +#. module: rental_pricelist_interval +#: model:product.pricelist,name:rental_pricelist_interval.pricelist_interval +msgid "Public Pricelist (Interval)" +msgstr "Lista de precios pública (intervalo=" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_sale_order_line__rental_interval_name +msgid "Rental Interval" +msgstr "Intervalo de alquiler" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_res_company__rental_price_interval_rule_ids +msgid "Rental Interval Price Rules" +msgstr "Reglas de precios de intervalo de alquiler" + +#. module: rental_pricelist_interval +#: model_terms:ir.ui.view,arch_db:rental_pricelist_interval.view_company_form +msgid "Rental Interval Prices" +msgstr "Precios de intervalos de alquiler" + +#. module: rental_pricelist_interval +#: model:ir.model,name:rental_pricelist_interval.model_rental_price_interval_item +msgid "Rental Price Interval Item" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model,name:rental_pricelist_interval.model_rental_price_interval_rule +msgid "Rental Price Interval Rule" +msgstr "Regla de intervalo de precio de alquiler" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_pricelist_item__interval_item_id +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_product__product_rental_interval_id +msgid "Rental Service (Interval)" +msgstr "Servicio de alquiler (intervalo)" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_product__rental_of_interval +msgid "Rented in interval" +msgstr "Alquilado por intervalo" + +#. module: rental_pricelist_interval +#: model_terms:ir.ui.view,arch_db:rental_pricelist_interval.product_normal_form_view +msgid "Reset Interval Prices" +msgstr "Reiniciar precios de los intervalos" + +#. module: rental_pricelist_interval +#: model:ir.model,name:rental_pricelist_interval.model_sale_order_line +msgid "Sales Order Line" +msgstr "Línea de pedidos de venta" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_sale_order_line__show_rental_interval_price +msgid "Show Option Interval Price" +msgstr "Mostrar opciones de precios de intevalos" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_res_company__rental_service_default_code_suffix_interval +msgid "Suffix of Rental Service Internal Reference (Interval)" +msgstr "Sufijo de Referencia Interna del Servicio de Alquiler (Intervalo)" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_res_company__rental_service_name_suffix_interval +msgid "Suffix of Rental Service Name (Interval)" +msgstr "Sufijo del Servicio de Alquiler (Intervalo)" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_sale_order_line__rental_interval_price +msgid "Use Interval Price" +msgstr "Usa intervalo de precio" diff --git a/rental_pricelist_interval/i18n/rental_pricelist_interval.pot b/rental_pricelist_interval/i18n/rental_pricelist_interval.pot new file mode 100644 index 00000000..9b33ed7d --- /dev/null +++ b/rental_pricelist_interval/i18n/rental_pricelist_interval.pot @@ -0,0 +1,254 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * rental_pricelist_interval +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-01-04 16:54+0000\n" +"PO-Revision-Date: 2022-01-04 16:54+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: rental_pricelist_interval +#: model_terms:ir.ui.view,arch_db:rental_pricelist_interval.product_normal_form_view +msgid "Bulk Prices" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model,name:rental_pricelist_interval.model_res_company +msgid "Companies" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_rule__company_id +msgid "Company" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_item__create_uid +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_rule__create_uid +msgid "Created by" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_item__create_date +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_rule__create_date +msgid "Created on" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_product__def_interval_pricelist_id +msgid "Default Interval Pricelist" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_pricelist__display_name +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_pricelist_item__display_name +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_product__display_name +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_item__display_name +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_rule__display_name +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_res_company__display_name +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_sale_order_line__display_name +msgid "Display Name" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_rule__factor +msgid "Factor" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_pricelist__id +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_pricelist_item__id +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_product__id +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_item__id +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_rule__id +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_res_company__id +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_sale_order_line__id +msgid "ID" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_item__min_quantity +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_rule__min_quantity +msgid "Interval (days)" +msgstr "" + +#. module: rental_pricelist_interval +#: model_terms:ir.ui.view,arch_db:rental_pricelist_interval.product_normal_form_view +msgid "Interval Basis" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_product__rental_price_interval +msgid "Interval Price" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_pricelist__is_interval_pricelist +msgid "Interval Pricelist" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_product__interval_scale_pricelist_item_ids +msgid "Interval Scale Pricelist Items" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_product__rental_interval_max +msgid "Interval days (Max)" +msgstr "" + +#. module: rental_pricelist_interval +#: model:uom.uom,name:rental_pricelist_interval.product_uom_interval +msgid "Interval(s)" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_pricelist____last_update +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_pricelist_item____last_update +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_product____last_update +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_item____last_update +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_rule____last_update +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_res_company____last_update +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_sale_order_line____last_update +msgid "Last Modified on" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_item__write_uid +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_rule__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_item__write_date +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_rule__write_date +msgid "Last Updated on" +msgstr "" + +#. module: rental_pricelist_interval +#: code:addons/rental_pricelist_interval/models/sale.py:0 +#, python-format +msgid "Max rental interval (%s days) is exceeded." +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_item__name +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_rule__name +msgid "Name" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_res_company__rental_service_default_code_prefix_interval +msgid "Prefix of Rental Service Internal Reference (Interval)" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_res_company__rental_service_name_prefix_interval +msgid "Prefix of Rental Service Name (Interval)" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_item__price +#: model_terms:ir.ui.view,arch_db:rental_pricelist_interval.product_normal_form_view +msgid "Price" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model,name:rental_pricelist_interval.model_product_pricelist +msgid "Pricelist" +msgstr "" + +#. module: rental_pricelist_interval +#: model_terms:ir.ui.view,arch_db:rental_pricelist_interval.product_normal_form_view +msgid "Pricelist Items" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model,name:rental_pricelist_interval.model_product_pricelist_item +msgid "Pricelist Rule" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model,name:rental_pricelist_interval.model_product_product +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_rental_price_interval_item__product_id +msgid "Product" +msgstr "" + +#. module: rental_pricelist_interval +#: model:product.pricelist,name:rental_pricelist_interval.pricelist_interval +msgid "Public Pricelist (Interval)" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_sale_order_line__rental_interval_name +msgid "Rental Interval" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_res_company__rental_price_interval_rule_ids +msgid "Rental Interval Price Rules" +msgstr "" + +#. module: rental_pricelist_interval +#: model_terms:ir.ui.view,arch_db:rental_pricelist_interval.view_company_form +msgid "Rental Interval Prices" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model,name:rental_pricelist_interval.model_rental_price_interval_item +msgid "Rental Price Interval Item" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model,name:rental_pricelist_interval.model_rental_price_interval_rule +msgid "Rental Price Interval Rule" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_pricelist_item__interval_item_id +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_product__product_rental_interval_id +msgid "Rental Service (Interval)" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_product_product__rental_of_interval +msgid "Rented in interval" +msgstr "" + +#. module: rental_pricelist_interval +#: model_terms:ir.ui.view,arch_db:rental_pricelist_interval.product_normal_form_view +msgid "Reset Interval Prices" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model,name:rental_pricelist_interval.model_sale_order_line +msgid "Sales Order Line" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_sale_order_line__show_rental_interval_price +msgid "Show Option Interval Price" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_res_company__rental_service_default_code_suffix_interval +msgid "Suffix of Rental Service Internal Reference (Interval)" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_res_company__rental_service_name_suffix_interval +msgid "Suffix of Rental Service Name (Interval)" +msgstr "" + +#. module: rental_pricelist_interval +#: model:ir.model.fields,field_description:rental_pricelist_interval.field_sale_order_line__rental_interval_price +msgid "Use Interval Price" +msgstr "" diff --git a/rental_pricelist_interval/models/__init__.py b/rental_pricelist_interval/models/__init__.py new file mode 100644 index 00000000..a258704f --- /dev/null +++ b/rental_pricelist_interval/models/__init__.py @@ -0,0 +1,5 @@ +# Part of rental-vertical See LICENSE file for full copyright and licensing details. + +from . import product +from . import sale +from . import res_company diff --git a/rental_pricelist_interval/models/product.py b/rental_pricelist_interval/models/product.py new file mode 100644 index 00000000..ed9571ca --- /dev/null +++ b/rental_pricelist_interval/models/product.py @@ -0,0 +1,142 @@ +# Part of rental-vertical See LICENSE file for full copyright and licensing details. + +from odoo import api, fields, models + + +class ProductPricelistItem(models.Model): + _inherit = "product.pricelist.item" + + interval_item_id = fields.Many2one( + "product.product", + string="Rental Service (Interval)", + ) + + @api.onchange("product_id") + def _onchange_product_id(self): + uom_interval = self.env.ref("rental_pricelist_interval.product_uom_interval") + super()._onchange_product_id() + if self.product_id.rented_product_id: + if self.product_id.uom_id.id == uom_interval.id: + self.interval_item_id = self.product_id.rented_product_id.id + return + + +class ProductPricelist(models.Model): + _inherit = "product.pricelist" + + is_interval_pricelist = fields.Boolean("Interval Pricelist") + + +class ProductProduct(models.Model): + _inherit = "product.product" + + def _default_interval_pricelist(self): + try: + res = self.env.ref("rental_pricelist_interval.pricelist_interval").id + except Exception: + return False + return res + + rental_of_interval = fields.Boolean( + "Rented in interval", + copy=False, + ) + + product_rental_interval_id = fields.Many2one( + "product.product", + "Rental Service (Interval)", + ondelete="set null", + copy=False, + ) + + rental_interval_max = fields.Integer( + "Interval days (Max)", + copy=False, + ) + + rental_price_interval = fields.Float( + string="Interval Price", + ) + + interval_scale_pricelist_item_ids = fields.One2many( + "product.pricelist.item", + "interval_item_id", + string="Interval Scale Pricelist Items", + copy=False, + ) + + def_interval_pricelist_id = fields.Many2one( + "product.pricelist", + "Default Interval Pricelist", + default=lambda self: self._default_interval_pricelist(), + ) + + def _get_rental_service(self, rental_type): + self.ensure_one() + if rental_type == "interval" and self.product_rental_interval_id: + return self.product_rental_interval_id + return super()._get_rental_service(rental_type) + + @api.model + def _get_rental_service_uom(self, rental_type): + if rental_type == "interval": + uom_interval = self.env.ref( + "rental_pricelist_interval.product_uom_interval" + ) + return uom_interval + else: + return super()._get_rental_service_uom(rental_type) + + def write(self, vals): + res = super().write(vals) + for p in self: + # Create service product automatically + if vals.get("rental_of_interval", False): + if not p.product_rental_interval_id: + service_product = self._create_rental_service( + "interval", p, p.rental_price_interval + ) + p.product_rental_interval_id = service_product + # update analytic account for service product + if ( + "income_analytic_account_id" in vals + or "expense_analytic_account_id" in vals + ): + p._update_rental_service_analytic_account(vals) + return res + + @api.model_create_multi + def create(self, vals_list): + ext_vals = {} + for vals in vals_list: + if vals.get("rental_of_interval", False): + ext_vals["rental_of_interval"] = True + ext_vals["rental_price_interval"] = vals.get("rental_price_interval") + del vals["rental_of_interval"] + if "rental_price_interval" in vals: + del vals["rental_price_interval"] + res = super().create(vals_list) + res.write(ext_vals) + return res + + def action_reset_rental_price_interval_items(self): + self.ensure_one() + company = self.company_id or self.env.user.company_id + self.interval_scale_pricelist_item_ids.unlink() + values = [] + for rule in company.rental_price_interval_rule_ids: + values.append( + ( + 0, + 0, + { + "fixed_price": self.rental_price_interval * rule.factor, + "min_quantity": rule.min_quantity, + "compute_price": "fixed", + "applied_on": "0_product_variant", + "product_id": self.product_rental_interval_id.id, + "pricelist_id": self.def_interval_pricelist_id.id, + }, + ) + ) + self.interval_scale_pricelist_item_ids = values diff --git a/rental_pricelist_interval/models/res_company.py b/rental_pricelist_interval/models/res_company.py new file mode 100644 index 00000000..690917d7 --- /dev/null +++ b/rental_pricelist_interval/models/res_company.py @@ -0,0 +1,47 @@ +# Part of rental-vertical See LICENSE file for full copyright and licensing details. +from odoo import fields, models + + +class ResCompany(models.Model): + _inherit = "res.company" + + rental_price_interval_rule_ids = fields.One2many( + "rental.price.interval.rule", + "company_id", + string="Rental Interval Price Rules", + ) + rental_service_name_prefix_interval = fields.Char( + "Prefix of Rental Service Name (Interval)", + default="Rental of", + translate=True, + ) + rental_service_name_suffix_interval = fields.Char( + "Suffix of Rental Service Name (Interval)", + default="(Interval(s))", + translate=True, + ) + rental_service_default_code_prefix_interval = fields.Char( + "Prefix of Rental Service Internal Reference (Interval)", + default="RENT-I", + ) + rental_service_default_code_suffix_interval = fields.Char( + "Suffix of Rental Service Internal Reference (Interval)", + ) + + +class RentalPriceIntervalRule(models.Model): + _name = "rental.price.interval.rule" + _description = "Rental Price Interval Rule" + + name = fields.Char() + + factor = fields.Float() + + min_quantity = fields.Integer( + "Interval (days)", + ) + + company_id = fields.Many2one( + "res.company", + "Company", + ) diff --git a/rental_pricelist_interval/models/sale.py b/rental_pricelist_interval/models/sale.py new file mode 100644 index 00000000..096f2fb2 --- /dev/null +++ b/rental_pricelist_interval/models/sale.py @@ -0,0 +1,161 @@ +# Part of rental-vertical See LICENSE file for full copyright and licensing details. + +from odoo import _, api, fields, models +from odoo.exceptions import UserError + + +class SaleOrderLine(models.Model): + _inherit = "sale.order.line" + + # TODO Delete fields rental_interval_price, + # show_rental_interval_price and rental_interval_name + rental_interval_price = fields.Boolean( + string="Use Interval Price", + ) + show_rental_interval_price = fields.Boolean( + string="Show Option Interval Price", + ) + rental_interval_name = fields.Char( + string="Rental Interval", + ) + + def _get_number_of_time_unit(self): + res = super()._get_number_of_time_unit() + time_uoms = self._get_time_uom() + if self.product_uom.id == time_uoms["interval"].id: + res = (self.end_date - self.start_date).days + 1 + return res + + @api.model + def _get_time_uom(self): + res = super()._get_time_uom() + uom_interval = self.env.ref("rental_pricelist_interval.product_uom_interval") + res["interval"] = uom_interval + return res + + # (override) _set_product_id from module rental_pricelist + def _set_product_id(self): + self.ensure_one() + if self.rental and self.display_product_id: + time_uoms = self._get_time_uom() + if self.order_id.pricelist_id.is_interval_pricelist: + if self.display_product_id.rental_of_interval: + self.product_uom = time_uoms["interval"] + self.product_id = self.display_product_id.product_rental_interval_id + else: + if self.display_product_id.rental_of_day: + self.product_uom = time_uoms["day"] + self.product_id = self.display_product_id.product_rental_day_id + elif self.display_product_id.rental_of_month: + self.product_uom = time_uoms["month"] + self.product_id = self.display_product_id.product_rental_month_id + elif self.display_product_id.rental_of_hour: + self.product_uom = time_uoms["hour"] + self.product_id = self.display_product_id.product_rental_hour_id + else: + self.rental = False + self.product_id = self.display_product_id + # raise exceptions.UserError(_('The product has no related \n + # rental services.')) + elif not self.rental and self.display_product_id: + self.product_id = self.display_product_id + + def _check_interval_price(self): + self.ensure_one() + uom_interval = self.env.ref("rental_pricelist_interval.product_uom_interval") + if self.product_uom.id == uom_interval.id: + product = self.product_id.rented_product_id + if product and product.rental_of_interval: + uom_qty = self.number_of_time_unit + if uom_qty > product.rental_interval_max: + raise UserError( + _("Max rental interval (%s days) is exceeded.") + % product.rental_interval_max + ) + + def _update_interval_price(self): + self.ensure_one() + if self.order_id.pricelist_id and self.order_id.partner_id: + if ( + self.product_id.rented_product_id + and self.order_id.pricelist_id.is_interval_pricelist + ): + self._check_interval_price() + self.product_uom_qty = self.rental_qty + product = self.product_id.with_context( + lang=self.order_id.partner_id.lang, + partner=self.order_id.partner_id, + quantity=self.number_of_time_unit, + date=self.order_id.date_order, + pricelist=self.order_id.pricelist_id.id, + uom=self.product_uom.id, + fiscal_position=self.env.context.get("fiscal_position"), + ) + self.price_unit = self.env[ + "account.tax" + ]._fix_tax_included_price_company( + self._get_display_price(), + product.taxes_id, + self.tax_id, + self.company_id, + ) + + def _get_product_rental_uom_ids(self): + self.ensure_one() + time_uoms = self._get_time_uom() + res = [] + if self.order_id.pricelist_id.is_interval_pricelist: + if self.display_product_id.rental_of_interval: + res = [time_uoms["interval"].id] + else: + res = super()._get_product_rental_uom_ids() + return res + + @api.onchange("product_id") + def _onchange_product_id(self): + uom_interval = self.env.ref("rental_pricelist_interval.product_uom_interval") + res = super()._onchange_product_id() + if ( + self.order_id.pricelist_id.is_interval_pricelist + and self.product_id + and self.product_id.rented_product_id + and self.product_id.rented_product_id.rental_of_interval + ): + if ( + self.rental + and res + and "domain" in res + and "product_uom" in res["domain"] + ): + del res["domain"]["product_uom"] + if self.display_product_id.rental: + uom_ids = [uom_interval.id] + res["domain"]["product_uom"] = [("id", "in", uom_ids)] + if self.product_uom.id not in uom_ids: + self.product_uom = uom_ids[0] + return res + + @api.onchange("product_id", "rental_qty") + def rental_product_id_change(self): + res = super().rental_product_id_change() + self._update_interval_price() + return res + + @api.onchange("rental_qty", "number_of_time_unit", "product_id") + def rental_qty_number_of_days_change(self): + res = super().rental_qty_number_of_days_change() + self._update_interval_price() + return res + + @api.onchange("product_uom", "product_uom_qty") + def _onchange_product_uom(self): + res = super()._onchange_product_uom() + self._update_interval_price() + return res + + @api.onchange("start_date", "end_date", "product_uom") + def _onchange_start_end_date(self): + res = super()._onchange_start_end_date() + if self.start_date and self.end_date: + self._update_interval_price() + return res diff --git a/rental_pricelist_interval/pyproject.toml b/rental_pricelist_interval/pyproject.toml new file mode 100644 index 00000000..4231d0cc --- /dev/null +++ b/rental_pricelist_interval/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/rental_pricelist_interval/security/ir.model.access.csv b/rental_pricelist_interval/security/ir.model.access.csv new file mode 100644 index 00000000..e43ca373 --- /dev/null +++ b/rental_pricelist_interval/security/ir.model.access.csv @@ -0,0 +1,2 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_rental_price_interval_rule,access_rental_price_interval_rule,model_rental_price_interval_rule,base.group_user,1,1,1,1 diff --git a/rental_pricelist_interval/static/description/icon.png b/rental_pricelist_interval/static/description/icon.png new file mode 100644 index 00000000..3a0328b5 Binary files /dev/null and b/rental_pricelist_interval/static/description/icon.png differ diff --git a/rental_pricelist_interval/static/description/index.html b/rental_pricelist_interval/static/description/index.html new file mode 100644 index 00000000..066d9577 --- /dev/null +++ b/rental_pricelist_interval/static/description/index.html @@ -0,0 +1,413 @@ + + + + + + +Rental Pricelist (Interval) + + + +
+

Rental Pricelist (Interval)

+ +

This file has been generated on 2023-02-19-14-21-34. Changes to it will be overwritten.

+
+

Summary

+

Enables the user to define different rental prices time uom (Month, Day and Hour).

+
+
+

Description

+

This Module implements a new rental service product for interval pricing under consideration +of odoo price lists. This enables to rent out products and charge for day interval ranges.

+

These ranges can be configured freely on general and/or product level. In contrast to rentals +on daily, monthly or yearly bases a different price computation is applied in sale order lines.

+
+
+

Configuration

+

To configure this module, you need to:

+
    +
  1. Go to company settings and define the default interval ranges on 'Rental Interval Prices' tab. +These ranges will be applied for computation of price intervals for rental service products when interval pricing is activated +in stockable product.
  2. +
  3. If desired go to 'RS (Prefix and Suffix)' tab an define how rental interval service product +names and reference numbers are created.
  4. +
+
+
+

Usage

+

To use this module, you need to:

+
    +
  1. Create a new stockable product and define it as rental service or +go to an existing one.
  2. +
  3. On 'Rental Price' tab check the 'Rented in interval' option.
  4. +
  5. Set the interval base price and define the max amount of days the product +can be rented out.
  6. +
  7. Push the 'Reset Interval Prices' button to compute interval ranges and prices. +from base price and interval ranges configured in company settings.
  8. +
  9. Adapt interval min. quantities or prices for the selected product if desired.
  10. +
+
+
+

Changelog

+
    +
  • 9089b1d5 2022-04-15 14:16:12 +0200 wagner@elegosoft.com (tag: odoo-fox-v15_v15_int_current_daily, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-26, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-25, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-23, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-22, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-21, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-17, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-16, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-15, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-13, tag: daily_odoo-fox-v15_v15_fox_v15_daily_build-12, tag: bp_fox_v15_integration-ceqp-2, tag: bp_fox_v15_integration-cep-27, tag: bp_fox_v15_integration-cep-26, tag: bp_fox_v15_integration-cep-25, tag: bp_fox_v15_integration-cep-23, tag: bp_fox_v15_integration-cep-22, tag: bp_fox_v15_integration-cep-21, tag: bp_fox_v15_integration-cep-17, tag: bp_fox_v15_integration-cep-16, tag: bp_fox_v15_integration-cep-15, tag: bp_fox_v15_integration-cep-13, tag: bp_fox_v15_integration-cep-12, tag: baseline_odoo-fox-v15_v15_fox_v15_daily_build-26, origin/fox_v15_integration-cep-26, origin/fox_v15_integration-cep-25, origin/fox_v15_integration-cep-23, origin/fox_v15_integration-cep-22, origin/fox_v15_integration-cep-21, origin/fox_v15_integration-cep-17, origin/fox_v15_integration-cep-16, origin/fox_v15_integration-cep-15, origin/fox_v15_integration-cep-13, origin/fox_v15_integration-cep-12) update module versions for v15 and remove old migration scripts (issue #4967)
  • +
  • 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)
  • +
+
+
+ + diff --git a/rental_pricelist_interval/tests/__init__.py b/rental_pricelist_interval/tests/__init__.py new file mode 100644 index 00000000..29bc3cc0 --- /dev/null +++ b/rental_pricelist_interval/tests/__init__.py @@ -0,0 +1,2 @@ +# Part of rental-vertical See LICENSE file for full copyright and licensing details. +from . import test_rental_pricelist diff --git a/rental_pricelist_interval/tests/test_rental_pricelist.py b/rental_pricelist_interval/tests/test_rental_pricelist.py new file mode 100644 index 00000000..058032c0 --- /dev/null +++ b/rental_pricelist_interval/tests/test_rental_pricelist.py @@ -0,0 +1,157 @@ +# Part of rental-vertical See LICENSE file for full copyright and licensing details. + +from dateutil.relativedelta import relativedelta + +from odoo import exceptions, fields + +from odoo.addons.rental_base.tests.stock_common import RentalStockCommon +from odoo.addons.rental_pricelist.tests.test_rental_pricelist import ( + _run_sol_onchange_date, + _run_sol_onchange_display_product_id, +) + + +class TestRentalPricelist(RentalStockCommon): + def setUp(self): + super().setUp() + + self.uom_interval = self.env.ref( + "rental_pricelist_interval.product_uom_interval" + ) + self.pricelist_interval = self.env.ref( + "rental_pricelist_interval.pricelist_interval" + ) + # Product Created A and B + ProductObj = self.env["product.product"] + self.productA = ProductObj.create( + { + "name": "Product A", + "type": "product", + "rental": True, + "rental_of_day": True, + "rental_price_day": 200, + "rental_of_interval": True, + "rental_price_interval": 1000, + "rental_interval_max": 21, + } + ) + self.productB = ProductObj.create( + { + "name": "Product B", + "type": "product", + "rental": True, + "rental_of_day": True, + "rental_price_day": 200, + } + ) + self.today = fields.Date.from_string(fields.Date.today()) + self.date_4_day_later = self.today + relativedelta(days=4) + self.date_12_day_later = self.today + relativedelta(days=12) + self.date_17_day_later = self.today + relativedelta(days=17) + self.date_24_day_later = self.today + relativedelta(days=24) + self.rental_order = ( + self.env["sale.order"] + .with_context( + **{ + "default_type_id": self.rental_sale_type.id, + } + ) + .create( + { + "partner_id": self.partnerA.id, + "pricelist_id": self.pricelist_interval.id, + } + ) + ) + + def test_00_interval_price(self): + """ + Create Interval Prices for productA + Activate interval price in sale order line + Change End Date and rental_qty + Reset field rental_interval_price + """ + self.assertEqual(self.productA.rental_price_interval, 1000) + # Create Interval Prices for productA + self.env.user.company_id.write( + { + "rental_price_interval_rule_ids": [ + (0, 0, {"name": "0-7 interval", "factor": 1, "min_quantity": 0}), + ( + 0, + 0, + {"name": "8-14 interval", "factor": 1.75, "min_quantity": 8}, + ), + ( + 0, + 0, + {"name": "15-21 interval", "factor": 2.25, "min_quantity": 15}, + ), + ] + } + ) + self.productA.action_reset_rental_price_interval_items() + check_p1 = check_p2 = check_p3 = False + for price in self.productA.interval_scale_pricelist_item_ids: + # 0-7 interval + if price.min_quantity == 0: + self.assertEqual(price.fixed_price, 1000) + check_p1 = True + # 8-14 interval + elif price.min_quantity == 8: + self.assertEqual(price.fixed_price, 1750) + check_p2 = True + # 15-21 interval + elif price.min_quantity == 15: + self.assertEqual(price.fixed_price, 2250) + check_p3 = True + self.assertTrue(check_p1) + self.assertTrue(check_p2) + self.assertTrue(check_p3) + # Activate interval price in sale order line + line = ( + self.env["sale.order.line"] + .with_context( + **{ + "type_id": self.rental_sale_type.id, + } + ) + .new( + { + "order_id": self.rental_order.id, + "display_product_id": self.productA.id, + "start_date": self.today, + "end_date": self.date_17_day_later, + } + ) + ) + _run_sol_onchange_display_product_id(line) + _run_sol_onchange_date(line) + self.assertEqual(line.rental, True) + self.assertEqual(line.rental_type, "new_rental") + self.assertEqual(line.can_sell_rental, False) + self.assertEqual(line.product_id, self.productA.product_rental_interval_id) + self.assertEqual(line.display_product_id, self.productA) + self.assertEqual(line.product_uom, self.uom_interval) + self.assertEqual(line.product_uom_qty, 1) + self.assertEqual(line.rental_qty, 1) + self.assertEqual(line.number_of_time_unit, 18) + # Change End Date and rental_qty + line.rental_qty = 2 + _run_sol_onchange_date(line, end_date=self.date_12_day_later) + self.assertEqual(line.rental_qty, 2) + self.assertEqual(line.product_uom_qty, 2) + # Change End Date again + _run_sol_onchange_date(line, end_date=self.date_4_day_later) + self.assertEqual(line.price_unit, 1000) + self.assertEqual(line.price_subtotal, 2000) # 2 * 1000 + # Change Pricelist + self.rental_order.pricelist_id = self.pricelist_interval + _run_sol_onchange_display_product_id(line) + _run_sol_onchange_date(line, end_date=self.date_12_day_later) + self.rental_order.pricelist_id = self.pricelist_interval + _run_sol_onchange_display_product_id(line) + _run_sol_onchange_date(line, end_date=self.date_12_day_later) + with self.assertRaises(exceptions.UserError) as e: + _run_sol_onchange_date(line, end_date=self.date_24_day_later) + self.assertEqual("Max rental interval (21 days) is exceeded.", str(e.exception)) diff --git a/rental_pricelist_interval/views/product_pricelist_view.xml b/rental_pricelist_interval/views/product_pricelist_view.xml new file mode 100644 index 00000000..cae8737c --- /dev/null +++ b/rental_pricelist_interval/views/product_pricelist_view.xml @@ -0,0 +1,15 @@ + + + + + product.pricelist.form + product.pricelist + + + + + + + + + diff --git a/rental_pricelist_interval/views/product_view.xml b/rental_pricelist_interval/views/product_view.xml new file mode 100644 index 00000000..b45a34c8 --- /dev/null +++ b/rental_pricelist_interval/views/product_view.xml @@ -0,0 +1,66 @@ + + + + + view.product.product.form + product.product + + + + + + + + + + + Bulk Prices +