diff --git a/README.md b/README.md index eff2d933f5..50b0fa4f64 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ addon | version | maintainers | summary [contract_update_last_date_invoiced](contract_update_last_date_invoiced/) | 17.0.1.0.0 | rafaelbn edlopen | This module allows to update the last date invoiced if invoices are deleted. [contract_variable_qty_timesheet](contract_variable_qty_timesheet/) | 17.0.1.0.0 | carlosdauden pedrobaeza danypr92 | Add formula to invoice [contract_variable_quantity](contract_variable_quantity/) | 17.0.1.0.2 | | Variable quantity in contract recurrent invoicing -[product_contract](product_contract/) | 17.0.2.2.0 | sbejaoui CarlosRoca13 | Recurring - Product Contract +[product_contract](product_contract/) | 17.0.2.3.0 | sbejaoui CarlosRoca13 | Recurring - Product Contract [subscription_oca](subscription_oca/) | 17.0.1.0.0 | | Generate recurring invoices. [//]: # (end addons) diff --git a/product_contract/README.rst b/product_contract/README.rst index 502544362d..3ec5c2ce44 100644 --- a/product_contract/README.rst +++ b/product_contract/README.rst @@ -1,3 +1,7 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + ============================ Recurring - Product Contract ============================ @@ -7,13 +11,13 @@ Recurring - Product Contract !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:f21c22f311f9d65254d52e4fa6b382d794d072d0c4cc8b4207a5a3fa5d130433 + !! source digest: sha256:b57ee9a8f9ae2ddcae1c175bb22afa9a5a57d710f185ab3b589113d543ae924f !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |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 +.. |badge2| image:: https://img.shields.io/badge/license-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%2Fcontract-lightgray.png?logo=github diff --git a/product_contract/__manifest__.py b/product_contract/__manifest__.py index bf2adb94d2..8b1bc54d3f 100644 --- a/product_contract/__manifest__.py +++ b/product_contract/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Recurring - Product Contract", - "version": "17.0.2.2.0", + "version": "17.0.2.3.0", "category": "Contract Management", "license": "AGPL-3", "author": "LasLabs, " "ACSONE SA/NV, " "Odoo Community Association (OCA)", diff --git a/product_contract/i18n/ca.po b/product_contract/i18n/ca.po index 4927916507..ae2cae7674 100644 --- a/product_contract/i18n/ca.po +++ b/product_contract/i18n/ca.po @@ -65,6 +65,12 @@ msgstr "" msgid "Automatically Create Contracts At Sale Order Confirmation" msgstr "" +#. module: product_contract +#: model:ir.model.fields,field_description:product_contract.field_product_contract_configurator__avoid_create_contract +#: model:ir.model.fields,field_description:product_contract.field_sale_order_line__avoid_create_contract +msgid "Avoid Create Contract" +msgstr "" + #. module: product_contract #: model_terms:ir.ui.view,arch_db:product_contract.product_contract_configurator_form msgid "Cancel" @@ -93,7 +99,6 @@ msgstr "" #. module: product_contract #. odoo-javascript #: code:addons/product_contract/static/src/xml/sale_product_field.xml:0 -#: code:addons/product_contract/static/src/xml/sale_product_field.xml:0 #, python-format msgid "Configure contract" msgstr "" @@ -566,20 +571,33 @@ msgid "" "This field allows to define how the start date of the contract will\n" " be calculated:\n" "\n" -" - Manual: The start date will be selected by the user, by default will be the\n" +" - Manual: The start date will be selected by the user, by default " +"will be the\n" " date of sale confirmation.\n" -" - Start of current period: The start date will be the first day of the actual\n" -" period selected on 'Invoicing Every' field. Example: If we are on 2024/08/27\n" -" and the period selected is 'Year(s)' the start date will be 2024/01/01.\n" -" - End of current period: The start date will be the last day of the actual\n" -" period selected on 'Invoicing Every' field. Example: If we are on 2024/08/27\n" -" and the period selected is 'Year(s)' the start date will be 2024/12/31.\n" -" - Start of next period: The start date will be the first day of the next\n" -" period selected on 'Invoicing Every' field. Example: If we are on 2024/08/27\n" -" and the period selected is 'Year(s)' the start date will be 2025/01/01.\n" -" - End of next period: The start date will be the last day of the actual\n" -" period selected on 'Invoicing Every' field. Example: If we are on 2024/08/27\n" -" and the period selected is 'Year(s)' the start date will be 2025/12/31.\n" +" - Start of current period: The start date will be the first day of " +"the actual\n" +" period selected on 'Invoicing Every' field. Example: If we are on " +"2024/08/27\n" +" and the period selected is 'Year(s)' the start date will be " +"2024/01/01.\n" +" - End of current period: The start date will be the last day of the " +"actual\n" +" period selected on 'Invoicing Every' field. Example: If we are on " +"2024/08/27\n" +" and the period selected is 'Year(s)' the start date will be " +"2024/12/31.\n" +" - Start of next period: The start date will be the first day of the " +"next\n" +" period selected on 'Invoicing Every' field. Example: If we are on " +"2024/08/27\n" +" and the period selected is 'Year(s)' the start date will be " +"2025/01/01.\n" +" - End of next period: The start date will be the last day of the " +"actual\n" +" period selected on 'Invoicing Every' field. Example: If we are on " +"2024/08/27\n" +" and the period selected is 'Year(s)' the start date will be " +"2025/12/31.\n" " " msgstr "" diff --git a/product_contract/i18n/ca_ES.po b/product_contract/i18n/ca_ES.po index 45e63e2598..ea9e23d0d7 100644 --- a/product_contract/i18n/ca_ES.po +++ b/product_contract/i18n/ca_ES.po @@ -65,6 +65,12 @@ msgstr "" msgid "Automatically Create Contracts At Sale Order Confirmation" msgstr "" +#. module: product_contract +#: model:ir.model.fields,field_description:product_contract.field_product_contract_configurator__avoid_create_contract +#: model:ir.model.fields,field_description:product_contract.field_sale_order_line__avoid_create_contract +msgid "Avoid Create Contract" +msgstr "" + #. module: product_contract #: model_terms:ir.ui.view,arch_db:product_contract.product_contract_configurator_form msgid "Cancel" @@ -93,7 +99,6 @@ msgstr "" #. module: product_contract #. odoo-javascript #: code:addons/product_contract/static/src/xml/sale_product_field.xml:0 -#: code:addons/product_contract/static/src/xml/sale_product_field.xml:0 #, python-format msgid "Configure contract" msgstr "" @@ -566,20 +571,33 @@ msgid "" "This field allows to define how the start date of the contract will\n" " be calculated:\n" "\n" -" - Manual: The start date will be selected by the user, by default will be the\n" +" - Manual: The start date will be selected by the user, by default " +"will be the\n" " date of sale confirmation.\n" -" - Start of current period: The start date will be the first day of the actual\n" -" period selected on 'Invoicing Every' field. Example: If we are on 2024/08/27\n" -" and the period selected is 'Year(s)' the start date will be 2024/01/01.\n" -" - End of current period: The start date will be the last day of the actual\n" -" period selected on 'Invoicing Every' field. Example: If we are on 2024/08/27\n" -" and the period selected is 'Year(s)' the start date will be 2024/12/31.\n" -" - Start of next period: The start date will be the first day of the next\n" -" period selected on 'Invoicing Every' field. Example: If we are on 2024/08/27\n" -" and the period selected is 'Year(s)' the start date will be 2025/01/01.\n" -" - End of next period: The start date will be the last day of the actual\n" -" period selected on 'Invoicing Every' field. Example: If we are on 2024/08/27\n" -" and the period selected is 'Year(s)' the start date will be 2025/12/31.\n" +" - Start of current period: The start date will be the first day of " +"the actual\n" +" period selected on 'Invoicing Every' field. Example: If we are on " +"2024/08/27\n" +" and the period selected is 'Year(s)' the start date will be " +"2024/01/01.\n" +" - End of current period: The start date will be the last day of the " +"actual\n" +" period selected on 'Invoicing Every' field. Example: If we are on " +"2024/08/27\n" +" and the period selected is 'Year(s)' the start date will be " +"2024/12/31.\n" +" - Start of next period: The start date will be the first day of the " +"next\n" +" period selected on 'Invoicing Every' field. Example: If we are on " +"2024/08/27\n" +" and the period selected is 'Year(s)' the start date will be " +"2025/01/01.\n" +" - End of next period: The start date will be the last day of the " +"actual\n" +" period selected on 'Invoicing Every' field. Example: If we are on " +"2024/08/27\n" +" and the period selected is 'Year(s)' the start date will be " +"2025/12/31.\n" " " msgstr "" diff --git a/product_contract/i18n/de.po b/product_contract/i18n/de.po index 2a7510e191..3c9a05297e 100644 --- a/product_contract/i18n/de.po +++ b/product_contract/i18n/de.po @@ -70,6 +70,12 @@ msgstr "Auto-Erneuern" msgid "Automatically Create Contracts At Sale Order Confirmation" msgstr "Erstelle automatisch Verträge bei Verkaufsauftragbestätigung" +#. module: product_contract +#: model:ir.model.fields,field_description:product_contract.field_product_contract_configurator__avoid_create_contract +#: model:ir.model.fields,field_description:product_contract.field_sale_order_line__avoid_create_contract +msgid "Avoid Create Contract" +msgstr "" + #. module: product_contract #: model_terms:ir.ui.view,arch_db:product_contract.product_contract_configurator_form msgid "Cancel" diff --git a/product_contract/i18n/es.po b/product_contract/i18n/es.po index 501ee9ac92..9070106ea8 100644 --- a/product_contract/i18n/es.po +++ b/product_contract/i18n/es.po @@ -9,8 +9,8 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-01-24 14:18+0000\n" -"PO-Revision-Date: 2025-01-24 15:19+0100\n" +"POT-Creation-Date: 2026-01-19 16:41+0000\n" +"PO-Revision-Date: 2026-01-19 17:45+0100\n" "Last-Translator: Pedro M. Baeza \n" "Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" "Language: es\n" @@ -18,7 +18,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Poedit 3.0.1\n" +"X-Generator: Poedit 3.4.2\n" #. module: product_contract #. odoo-python @@ -71,6 +71,12 @@ msgstr "Auto-renovación" msgid "Automatically Create Contracts At Sale Order Confirmation" msgstr "Crear Contratos Automáticamente en la Confirmación del Pedido de Venta" +#. module: product_contract +#: model:ir.model.fields,field_description:product_contract.field_product_contract_configurator__avoid_create_contract +#: model:ir.model.fields,field_description:product_contract.field_sale_order_line__avoid_create_contract +msgid "Avoid Create Contract" +msgstr "Evitar crear contrato" + #. module: product_contract #: model_terms:ir.ui.view,arch_db:product_contract.product_contract_configurator_form msgid "Cancel" @@ -101,7 +107,7 @@ msgstr "Configurar un contrato" #: code:addons/product_contract/static/src/xml/sale_product_field.xml:0 #, python-format msgid "Configure contract" -msgstr "" +msgstr "Configurar contrato" #. module: product_contract #: model:ir.model,name:product_contract.model_contract_contract @@ -153,7 +159,7 @@ msgstr "El producto del contrato debe ser del tipo de servicio" #. module: product_contract #: model_terms:ir.ui.view,arch_db:product_contract.product_contract_configurator_form msgid "Contract renew" -msgstr "" +msgstr "Renovación de contrato" #. module: product_contract #: model_terms:ir.ui.view,arch_db:product_contract.view_order_form @@ -268,7 +274,7 @@ msgstr "Cuarto mes" #. module: product_contract #: model:ir.model.fields,field_description:product_contract.field_product_contract_configurator__id msgid "ID" -msgstr "" +msgstr "ID" #. module: product_contract #: model:ir.model.fields,field_description:product_contract.field_product_contract_configurator__recurring_interval @@ -284,7 +290,7 @@ msgstr "Factura Cada" #: model:ir.model.fields,help:product_contract.field_product_contract_configurator__recurring_interval #: model:ir.model.fields,help:product_contract.field_sale_order_line__recurring_interval msgid "Invoice every (Days/Week/Month/Year)" -msgstr "" +msgstr "Facturar cada (días/semana/mes/año)" #. module: product_contract #: model:ir.model.fields,field_description:product_contract.field_product_contract_configurator__recurring_invoicing_type @@ -400,12 +406,12 @@ msgstr "Producto" #. module: product_contract #: model:ir.model,name:product_contract.model_product_contract_configurator msgid "Product Contract Configurator Wizard" -msgstr "" +msgstr "Asistente de configuración del producto contrato" #. module: product_contract #: model:ir.model.fields,field_description:product_contract.field_sale_order_line__product_contract_description msgid "Product Contract Description" -msgstr "" +msgstr "Descripción del producto contrato" #. module: product_contract #: model:ir.model.fields,field_description:product_contract.field_product_contract_configurator__product_uom_qty @@ -467,7 +473,7 @@ msgstr "La orden de venta y el contrato deben estar vinculados al mismo socio" #. module: product_contract #: model:ir.model,name:product_contract.model_sale_order msgid "Sales Order" -msgstr "" +msgstr "Orden de venta" #. module: product_contract #: model:ir.model,name:product_contract.model_sale_order_line diff --git a/product_contract/i18n/fi.po b/product_contract/i18n/fi.po index ef3bb1a81e..bf11163241 100644 --- a/product_contract/i18n/fi.po +++ b/product_contract/i18n/fi.po @@ -69,6 +69,12 @@ msgstr "" msgid "Automatically Create Contracts At Sale Order Confirmation" msgstr "" +#. module: product_contract +#: model:ir.model.fields,field_description:product_contract.field_product_contract_configurator__avoid_create_contract +#: model:ir.model.fields,field_description:product_contract.field_sale_order_line__avoid_create_contract +msgid "Avoid Create Contract" +msgstr "" + #. module: product_contract #: model_terms:ir.ui.view,arch_db:product_contract.product_contract_configurator_form msgid "Cancel" diff --git a/product_contract/i18n/fr.po b/product_contract/i18n/fr.po index 421c85e427..917eb02554 100644 --- a/product_contract/i18n/fr.po +++ b/product_contract/i18n/fr.po @@ -72,6 +72,12 @@ msgstr "Renouvellement automatique" msgid "Automatically Create Contracts At Sale Order Confirmation" msgstr "Créer automatiquement les contrats à la confirmation de commande" +#. module: product_contract +#: model:ir.model.fields,field_description:product_contract.field_product_contract_configurator__avoid_create_contract +#: model:ir.model.fields,field_description:product_contract.field_sale_order_line__avoid_create_contract +msgid "Avoid Create Contract" +msgstr "" + #. module: product_contract #: model_terms:ir.ui.view,arch_db:product_contract.product_contract_configurator_form msgid "Cancel" diff --git a/product_contract/i18n/hi_IN.po b/product_contract/i18n/hi_IN.po index cd1020b326..b7f2e5b6d0 100644 --- a/product_contract/i18n/hi_IN.po +++ b/product_contract/i18n/hi_IN.po @@ -70,6 +70,12 @@ msgstr "" msgid "Automatically Create Contracts At Sale Order Confirmation" msgstr "" +#. module: product_contract +#: model:ir.model.fields,field_description:product_contract.field_product_contract_configurator__avoid_create_contract +#: model:ir.model.fields,field_description:product_contract.field_sale_order_line__avoid_create_contract +msgid "Avoid Create Contract" +msgstr "" + #. module: product_contract #: model_terms:ir.ui.view,arch_db:product_contract.product_contract_configurator_form msgid "Cancel" diff --git a/product_contract/i18n/hr.po b/product_contract/i18n/hr.po index 0bfc9d3ecb..faf42ebbd8 100644 --- a/product_contract/i18n/hr.po +++ b/product_contract/i18n/hr.po @@ -71,6 +71,12 @@ msgstr "Automatski obnovi" msgid "Automatically Create Contracts At Sale Order Confirmation" msgstr "Automatski kreiraj ugovore pri potvrdi ponude" +#. module: product_contract +#: model:ir.model.fields,field_description:product_contract.field_product_contract_configurator__avoid_create_contract +#: model:ir.model.fields,field_description:product_contract.field_sale_order_line__avoid_create_contract +msgid "Avoid Create Contract" +msgstr "" + #. module: product_contract #: model_terms:ir.ui.view,arch_db:product_contract.product_contract_configurator_form msgid "Cancel" diff --git a/product_contract/i18n/hr_HR.po b/product_contract/i18n/hr_HR.po index 7d928f93af..e13ac2bed4 100644 --- a/product_contract/i18n/hr_HR.po +++ b/product_contract/i18n/hr_HR.po @@ -72,6 +72,12 @@ msgstr "" msgid "Automatically Create Contracts At Sale Order Confirmation" msgstr "" +#. module: product_contract +#: model:ir.model.fields,field_description:product_contract.field_product_contract_configurator__avoid_create_contract +#: model:ir.model.fields,field_description:product_contract.field_sale_order_line__avoid_create_contract +msgid "Avoid Create Contract" +msgstr "" + #. module: product_contract #: model_terms:ir.ui.view,arch_db:product_contract.product_contract_configurator_form msgid "Cancel" diff --git a/product_contract/i18n/it.po b/product_contract/i18n/it.po index ba73e30e0c..52f7e46527 100644 --- a/product_contract/i18n/it.po +++ b/product_contract/i18n/it.po @@ -70,6 +70,12 @@ msgstr "Rinnovo automatico" msgid "Automatically Create Contracts At Sale Order Confirmation" msgstr "Crea automaticamente contratti alla conferma dell'ordine di vendita" +#. module: product_contract +#: model:ir.model.fields,field_description:product_contract.field_product_contract_configurator__avoid_create_contract +#: model:ir.model.fields,field_description:product_contract.field_sale_order_line__avoid_create_contract +msgid "Avoid Create Contract" +msgstr "" + #. module: product_contract #: model_terms:ir.ui.view,arch_db:product_contract.product_contract_configurator_form msgid "Cancel" diff --git a/product_contract/i18n/nl.po b/product_contract/i18n/nl.po index 05752d2506..4b592f1bf0 100644 --- a/product_contract/i18n/nl.po +++ b/product_contract/i18n/nl.po @@ -70,6 +70,12 @@ msgstr "" msgid "Automatically Create Contracts At Sale Order Confirmation" msgstr "" +#. module: product_contract +#: model:ir.model.fields,field_description:product_contract.field_product_contract_configurator__avoid_create_contract +#: model:ir.model.fields,field_description:product_contract.field_sale_order_line__avoid_create_contract +msgid "Avoid Create Contract" +msgstr "" + #. module: product_contract #: model_terms:ir.ui.view,arch_db:product_contract.product_contract_configurator_form msgid "Cancel" diff --git a/product_contract/i18n/nl_NL.po b/product_contract/i18n/nl_NL.po index c40d074d71..a3ececc101 100644 --- a/product_contract/i18n/nl_NL.po +++ b/product_contract/i18n/nl_NL.po @@ -11,8 +11,8 @@ msgstr "" "POT-Creation-Date: 2017-06-09 01:10+0000\n" "PO-Revision-Date: 2017-06-09 01:10+0000\n" "Last-Translator: Peter Hageman , 2017\n" -"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/" -"teams/23907/nl_NL/)\n" +"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/teams/" +"23907/nl_NL/)\n" "Language: nl_NL\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -70,6 +70,12 @@ msgstr "" msgid "Automatically Create Contracts At Sale Order Confirmation" msgstr "" +#. module: product_contract +#: model:ir.model.fields,field_description:product_contract.field_product_contract_configurator__avoid_create_contract +#: model:ir.model.fields,field_description:product_contract.field_sale_order_line__avoid_create_contract +msgid "Avoid Create Contract" +msgstr "" + #. module: product_contract #: model_terms:ir.ui.view,arch_db:product_contract.product_contract_configurator_form msgid "Cancel" diff --git a/product_contract/i18n/product_contract.pot b/product_contract/i18n/product_contract.pot index 86d09e1b60..04f3a1e258 100644 --- a/product_contract/i18n/product_contract.pot +++ b/product_contract/i18n/product_contract.pot @@ -64,6 +64,12 @@ msgstr "" msgid "Automatically Create Contracts At Sale Order Confirmation" msgstr "" +#. module: product_contract +#: model:ir.model.fields,field_description:product_contract.field_product_contract_configurator__avoid_create_contract +#: model:ir.model.fields,field_description:product_contract.field_sale_order_line__avoid_create_contract +msgid "Avoid Create Contract" +msgstr "" + #. module: product_contract #: model_terms:ir.ui.view,arch_db:product_contract.product_contract_configurator_form msgid "Cancel" diff --git a/product_contract/i18n/pt.po b/product_contract/i18n/pt.po index 82d7691122..fcdab2a1c7 100644 --- a/product_contract/i18n/pt.po +++ b/product_contract/i18n/pt.po @@ -70,6 +70,12 @@ msgstr "Auto Renovação" msgid "Automatically Create Contracts At Sale Order Confirmation" msgstr "Criar Contratos Automaticamente na Confirmação da Encomenda de Venda" +#. module: product_contract +#: model:ir.model.fields,field_description:product_contract.field_product_contract_configurator__avoid_create_contract +#: model:ir.model.fields,field_description:product_contract.field_sale_order_line__avoid_create_contract +msgid "Avoid Create Contract" +msgstr "" + #. module: product_contract #: model_terms:ir.ui.view,arch_db:product_contract.product_contract_configurator_form msgid "Cancel" diff --git a/product_contract/i18n/pt_BR.po b/product_contract/i18n/pt_BR.po index ac90a4eb40..2141c15674 100644 --- a/product_contract/i18n/pt_BR.po +++ b/product_contract/i18n/pt_BR.po @@ -12,8 +12,8 @@ msgstr "" "POT-Creation-Date: 2017-06-13 02:40+0000\n" "PO-Revision-Date: 2020-08-10 16:59+0000\n" "Last-Translator: Fernando Colus \n" -"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/" -"teams/23907/pt_BR/)\n" +"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/" +"23907/pt_BR/)\n" "Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -72,6 +72,12 @@ msgstr "Renovação Automática" msgid "Automatically Create Contracts At Sale Order Confirmation" msgstr "Criar Contratos Automaticamente Na Confirmação da Ordem de Venda" +#. module: product_contract +#: model:ir.model.fields,field_description:product_contract.field_product_contract_configurator__avoid_create_contract +#: model:ir.model.fields,field_description:product_contract.field_sale_order_line__avoid_create_contract +msgid "Avoid Create Contract" +msgstr "" + #. module: product_contract #: model_terms:ir.ui.view,arch_db:product_contract.product_contract_configurator_form msgid "Cancel" diff --git a/product_contract/i18n/ru.po b/product_contract/i18n/ru.po index 030da186e6..597e07fe4c 100644 --- a/product_contract/i18n/ru.po +++ b/product_contract/i18n/ru.po @@ -71,6 +71,12 @@ msgstr "" msgid "Automatically Create Contracts At Sale Order Confirmation" msgstr "" +#. module: product_contract +#: model:ir.model.fields,field_description:product_contract.field_product_contract_configurator__avoid_create_contract +#: model:ir.model.fields,field_description:product_contract.field_sale_order_line__avoid_create_contract +msgid "Avoid Create Contract" +msgstr "" + #. module: product_contract #: model_terms:ir.ui.view,arch_db:product_contract.product_contract_configurator_form msgid "Cancel" diff --git a/product_contract/i18n/tr.po b/product_contract/i18n/tr.po index 8421a4bcef..e3348b324f 100644 --- a/product_contract/i18n/tr.po +++ b/product_contract/i18n/tr.po @@ -70,6 +70,12 @@ msgstr "Otomatik Yenile" msgid "Automatically Create Contracts At Sale Order Confirmation" msgstr "Satış Siparişi Onayında Sözleşmeleri Otomatik Olarak Oluştur" +#. module: product_contract +#: model:ir.model.fields,field_description:product_contract.field_product_contract_configurator__avoid_create_contract +#: model:ir.model.fields,field_description:product_contract.field_sale_order_line__avoid_create_contract +msgid "Avoid Create Contract" +msgstr "" + #. module: product_contract #: model_terms:ir.ui.view,arch_db:product_contract.product_contract_configurator_form msgid "Cancel" diff --git a/product_contract/i18n/tr_TR.po b/product_contract/i18n/tr_TR.po index 6b6e77a6a2..15f86dda87 100644 --- a/product_contract/i18n/tr_TR.po +++ b/product_contract/i18n/tr_TR.po @@ -70,6 +70,12 @@ msgstr "" msgid "Automatically Create Contracts At Sale Order Confirmation" msgstr "" +#. module: product_contract +#: model:ir.model.fields,field_description:product_contract.field_product_contract_configurator__avoid_create_contract +#: model:ir.model.fields,field_description:product_contract.field_sale_order_line__avoid_create_contract +msgid "Avoid Create Contract" +msgstr "" + #. module: product_contract #: model_terms:ir.ui.view,arch_db:product_contract.product_contract_configurator_form msgid "Cancel" diff --git a/product_contract/models/sale_order.py b/product_contract/models/sale_order.py index d9d32ec20f..c04860b7e7 100644 --- a/product_contract/models/sale_order.py +++ b/product_contract/models/sale_order.py @@ -44,7 +44,11 @@ def _compute_need_contract_creation(self): @api.depends("order_line") def _compute_is_contract(self): - self.is_contract = any(self.order_line.mapped("is_contract")) + self.is_contract = any( + self.order_line.filtered(lambda ol: not ol.avoid_create_contract).mapped( + "is_contract" + ) + ) def _prepare_contract_value(self, contract_template): self.ensure_one() @@ -69,12 +73,15 @@ def action_create_contract(self): lines_without_contract = self.env["sale.order.line"].browse() for rec in self.filtered("is_contract"): line_to_create_contract = rec.order_line.filtered( - lambda r: not r.contract_id and r.product_id.is_contract + lambda r: not r.contract_id + and r.product_id.is_contract + and not r.avoid_create_contract ) line_to_create_contract._set_contract_line_start_date() line_to_update_contract = rec.order_line.filtered( lambda r: r.contract_id and r.product_id.is_contract + and not r.avoid_create_contract and r not in r.contract_id.contract_line_ids.mapped("sale_order_line_id") ) diff --git a/product_contract/models/sale_order_line.py b/product_contract/models/sale_order_line.py index 8d3f53aa7b..d7d7e09a81 100644 --- a/product_contract/models/sale_order_line.py +++ b/product_contract/models/sale_order_line.py @@ -86,6 +86,7 @@ class SaleOrderLine(models.Model): product_contract_description = fields.Text( compute="_compute_product_contract_description" ) + avoid_create_contract = fields.Boolean() @api.constrains("contract_id") def _check_contact_is_not_terminated(self): @@ -227,6 +228,8 @@ def create_contract_line(self, contract): contract_line = self.env["contract.line"] predecessor_contract_line = False for rec in self: + if rec.avoid_create_contract: + continue if rec.contract_line_id: # If the upsell/downsell line start at the same date or before # the contract line to replace supposed to start, we cancel diff --git a/product_contract/static/description/index.html b/product_contract/static/description/index.html index 25317fdfcf..e581a978f2 100644 --- a/product_contract/static/description/index.html +++ b/product_contract/static/description/index.html @@ -3,7 +3,7 @@ -Recurring - Product Contract +README.rst -
-

Recurring - Product Contract

+
+ + +Odoo Community Association + +
+

Recurring - Product Contract

-

Beta License: AGPL-3 OCA/contract Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/contract Translate me on Weblate Try me on Runboat

This module adds support for products to be linked to contract templates.

A contract is created on sale.order confirmation for each different @@ -391,7 +396,7 @@

Recurring - Product Contract

-

Usage

+

Usage

To use this module, you need to:

  1. Go to Sales -> Products and select or create a product.
  2. @@ -401,7 +406,7 @@

    Usage

-

Known issues / Roadmap

+

Known issues / Roadmap

  • There’s no support right now for computing the start date for the following recurrent types: daily, weekly and monthlylastday.
  • @@ -412,7 +417,7 @@

    Known issues / Roadmap

-

Bug Tracker

+

Bug Tracker

Bugs are tracked on GitHub 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 @@ -420,16 +425,16 @@

Bug Tracker

Do not contact contributors directly about support or help with technical issues.

-

Credits

+

Credits

-

Authors

+

Authors

  • LasLabs
  • ACSONE SA/NV
-

Contributors

+

Contributors

-

Maintainers

+

Maintainers

This module is maintained by the OCA.

Odoo Community Association @@ -459,5 +464,6 @@

Maintainers

+
diff --git a/product_contract/static/src/js/contract_configurator_controller.esm.js b/product_contract/static/src/js/contract_configurator_controller.esm.js index 3be3a58a50..6b83f38941 100644 --- a/product_contract/static/src/js/contract_configurator_controller.esm.js +++ b/product_contract/static/src/js/contract_configurator_controller.esm.js @@ -22,6 +22,7 @@ export class ProductContractConfiguratorController extends formView.Controller { auto_renew_interval, auto_renew_rule_type, recurring_interval, + avoid_create_contract, } = record.data; return this.action.doAction({ type: "ir.actions.act_window_close", @@ -36,6 +37,7 @@ export class ProductContractConfiguratorController extends formView.Controller { auto_renew_interval, auto_renew_rule_type, recurring_interval, + avoid_create_contract, }, }, }); diff --git a/product_contract/static/src/js/sale_product_field.esm.js b/product_contract/static/src/js/sale_product_field.esm.js index 74c80232e1..40172b759a 100644 --- a/product_contract/static/src/js/sale_product_field.esm.js +++ b/product_contract/static/src/js/sale_product_field.esm.js @@ -64,6 +64,7 @@ patch(SaleOrderLineProductField.prototype, { default_is_auto_renew: this.props.record.data.is_auto_renew, default_auto_renew_interval: this.props.record.data.auto_renew_interval, default_auto_renew_rule_type: this.props.record.data.auto_renew_rule_type, + default_avoid_create_contract: this.props.record.data.avoid_create_contract, }; }, @@ -78,6 +79,7 @@ patch(SaleOrderLineProductField.prototype, { is_auto_renew: this.props.record.data.is_auto_renew, auto_renew_interval: this.props.record.data.auto_renew_interval, auto_renew_rule_type: this.props.record.data.auto_renew_rule_type, + avoid_create_contract: this.props.record.data.avoid_create_contract, }; }, diff --git a/product_contract/tests/test_sale_order.py b/product_contract/tests/test_sale_order.py index ef76990372..6f266b2a6b 100644 --- a/product_contract/tests/test_sale_order.py +++ b/product_contract/tests/test_sale_order.py @@ -122,6 +122,15 @@ def test_action_confirm(self): self.assertEqual(contract_line.date_end, Date.to_date("2018-12-31")) self.assertEqual(contract_line.recurring_next_date, Date.to_date("2018-01-31")) + def test_action_confirm_avoiding_create_contract(self): + """It shouldn't create a contract for lines marked as avoid_create_contract""" + self.order_line1.is_auto_renew = True + self.order_line1.avoid_create_contract = True + self.sale.action_confirm() + contracts = self.sale.order_line.mapped("contract_id") + self.assertEqual(len(contracts), 1) + self.assertFalse(self.order_line1.contract_id) + def test_change_sale_company(self): self.assertTrue(self.sale.company_id) other_company = self.env["res.company"].create( diff --git a/product_contract/views/sale_order.xml b/product_contract/views/sale_order.xml index 4abf7ca252..2f670ebe13 100644 --- a/product_contract/views/sale_order.xml +++ b/product_contract/views/sale_order.xml @@ -166,6 +166,7 @@ optional="hide" readonly="product_uom_readonly" /> + diff --git a/product_contract/wizards/product_contract_configurator.py b/product_contract/wizards/product_contract_configurator.py index ac13112b4b..861459cb11 100644 --- a/product_contract/wizards/product_contract_configurator.py +++ b/product_contract/wizards/product_contract_configurator.py @@ -67,6 +67,7 @@ class ProductContractConfigurator(models.TransientModel): contract_start_date_method = fields.Selection( related="product_id.contract_start_date_method" ) + avoid_create_contract = fields.Boolean() @api.depends("product_id", "company_id") def _compute_contract_template_id(self): diff --git a/product_contract/wizards/product_contract_configurator_views.xml b/product_contract/wizards/product_contract_configurator_views.xml index e87418bce3..0556e7fea5 100644 --- a/product_contract/wizards/product_contract_configurator_views.xml +++ b/product_contract/wizards/product_contract_configurator_views.xml @@ -66,6 +66,7 @@ +