diff --git a/contract_price_revision/README.rst b/contract_price_revision/README.rst index fc60b633f..008a04f7a 100644 --- a/contract_price_revision/README.rst +++ b/contract_price_revision/README.rst @@ -2,10 +2,13 @@ Contract Price Revision ======================= -.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:c8a59ff02fbb6be23950f10dec81d9fac5d8dceb53a5213a9cce91789ca63230 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png :target: https://odoo-community.org/page/development-status @@ -14,16 +17,16 @@ Contract Price Revision :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 - :target: https://github.com/OCA/contract/tree/12.0/contract_price_revision + :target: https://github.com/OCA/contract/tree/13.0/contract_price_revision :alt: OCA/contract .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/contract-12-0/contract-12-0-contract_price_revision + :target: https://translation.odoo-community.org/projects/contract-13-0/contract-13-0-contract_price_revision :alt: Translate me on Weblate -.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/110/12.0 - :alt: Try me on Runbot +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/contract&target_branch=13.0 + :alt: Try me on Runboat -|badge1| |badge2| |badge3| |badge4| |badge5| +|badge1| |badge2| |badge3| |badge4| |badge5| This module allows to create revisions of contract line prices. @@ -50,13 +53,17 @@ To use this module: #. When create invoices related to contracts selected, prices will be update with the prices that are not out of date. +#. When managing contract with recurrence on line level, you maybe want not + to revise price for some lines. + Check 'Never Revise Price' on line level to avoid price revisions. + 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 smashing it by providing a detailed and welcomed -`feedback `_. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -66,6 +73,7 @@ Credits Authors ~~~~~~~ +* ACSONE SA/NV * Tecnativa Contributors @@ -97,6 +105,6 @@ Current `maintainer `__: |maintainer-carlosdauden| -This module is part of the `OCA/contract `_ project on GitHub. +This module is part of the `OCA/contract `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/contract_price_revision/__manifest__.py b/contract_price_revision/__manifest__.py index 749502109..46dbe8da4 100644 --- a/contract_price_revision/__manifest__.py +++ b/contract_price_revision/__manifest__.py @@ -5,7 +5,7 @@ { "name": "Contract Price Revision", "summary": "Easy revision of contract prices", - "version": "13.0.1.0.0", + "version": "13.0.1.0.1", "category": "Contract", "author": "ACSONE SA/NV, Tecnativa, Odoo Community Association (OCA)", "license": "AGPL-3", diff --git a/contract_price_revision/i18n/contract_price_revision.pot b/contract_price_revision/i18n/contract_price_revision.pot index 60a305492..cf3d27abf 100644 --- a/contract_price_revision/i18n/contract_price_revision.pot +++ b/contract_price_revision/i18n/contract_price_revision.pot @@ -1,12 +1,12 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * contract_price_revision +# * contract_price_revision # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" +"Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: <>\n" +"Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -23,6 +23,11 @@ msgstr "" msgid "Cancel" msgstr "" +#. module: contract_price_revision +#: model:ir.model.fields,help:contract_price_revision.field_contract_line__never_revise_price +msgid "Check this if you don't want to allow price revision." +msgstr "" + #. module: contract_price_revision #: model:ir.model,name:contract_price_revision.model_contract_line msgid "Contract Line" @@ -58,6 +63,11 @@ msgstr "" msgid "Display Name" msgstr "" +#. module: contract_price_revision +#: model:ir.model.fields,field_description:contract_price_revision.field_contract_price_revision_wizard__fixed_price +msgid "Fixed Price" +msgstr "" + #. module: contract_price_revision #: model:ir.model.fields,field_description:contract_price_revision.field_contract_price_revision_wizard__id msgid "ID" @@ -78,28 +88,48 @@ msgstr "" msgid "Last Updated on" msgstr "" +#. module: contract_price_revision +#: model:ir.model.fields,field_description:contract_price_revision.field_contract_line__never_revise_price +msgid "Never Revise Price" +msgstr "" + #. module: contract_price_revision #: model:ir.model.fields,field_description:contract_price_revision.field_contract_line__previous_price msgid "Previous price" msgstr "" +#. module: contract_price_revision +#: model:ir.model.fields,field_description:contract_price_revision.field_contract_line__price_can_be_revised +msgid "Price Can Be Revised" +msgstr "" + #. module: contract_price_revision #: model_terms:ir.ui.view,arch_db:contract_price_revision.contract_line_duplicate_wizard_view -msgid "Set new start date and variation percent to duplicate.\n" +msgid "" +"Set new start date and variation percent to duplicate.\n" " This process set start date previous day as end date of\n" " origin record.\n" "
\n" "
" msgstr "" +#. module: contract_price_revision +#: model:ir.model.fields,help:contract_price_revision.field_contract_line__price_can_be_revised +msgid "Technical field in order to know if the line price can be revised." +msgstr "" + #. module: contract_price_revision #: model:ir.model.fields,field_description:contract_price_revision.field_contract_line__variation_percent #: model:ir.model.fields,field_description:contract_price_revision.field_contract_price_revision_wizard__variation_percent msgid "Variation %" msgstr "" +#. module: contract_price_revision +#: model:ir.model.fields,field_description:contract_price_revision.field_contract_price_revision_wizard__variation_type +msgid "Variation Type" +msgstr "" + #. module: contract_price_revision #: model:ir.model,name:contract_price_revision.model_contract_price_revision_wizard msgid "Wizard to update price based on percentage variation" msgstr "" - diff --git a/contract_price_revision/i18n/es.po b/contract_price_revision/i18n/es.po index f86c58f01..deb901a8c 100644 --- a/contract_price_revision/i18n/es.po +++ b/contract_price_revision/i18n/es.po @@ -7,15 +7,15 @@ msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-12-17 12:20+0100\n" -"PO-Revision-Date: 2019-12-17 12:22+0100\n" -"Last-Translator: Carlos Dauden \n" +"PO-Revision-Date: 2023-07-20 09:11+0000\n" +"Last-Translator: Ivorra78 \n" "Language-Team: \n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"Plural-Forms: \n" -"X-Generator: Poedit 1.8.7.1\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" #. module: contract_price_revision #: model_terms:ir.ui.view,arch_db:contract_price_revision.contract_line_duplicate_wizard_view @@ -27,6 +27,11 @@ msgstr "Aplicar" msgid "Cancel" msgstr "Cancelar" +#. module: contract_price_revision +#: model:ir.model.fields,help:contract_price_revision.field_contract_line__never_revise_price +msgid "Check this if you don't want to allow price revision." +msgstr "" + #. module: contract_price_revision #: model:ir.model,name:contract_price_revision.model_contract_line msgid "Contract Line" @@ -62,6 +67,11 @@ msgstr "Fecha inicio" msgid "Display Name" msgstr "Nombre mostrado" +#. module: contract_price_revision +#: model:ir.model.fields,field_description:contract_price_revision.field_contract_price_revision_wizard__fixed_price +msgid "Fixed Price" +msgstr "" + #. module: contract_price_revision #: model:ir.model.fields,field_description:contract_price_revision.field_contract_price_revision_wizard__id msgid "ID" @@ -75,18 +85,28 @@ msgstr "Última modificación en" #. module: contract_price_revision #: model:ir.model.fields,field_description:contract_price_revision.field_contract_price_revision_wizard__write_uid msgid "Last Updated by" -msgstr "Última modificación de" +msgstr "Última actualización por" #. module: contract_price_revision #: model:ir.model.fields,field_description:contract_price_revision.field_contract_price_revision_wizard__write_date msgid "Last Updated on" msgstr "Última actualización en" +#. module: contract_price_revision +#: model:ir.model.fields,field_description:contract_price_revision.field_contract_line__never_revise_price +msgid "Never Revise Price" +msgstr "" + #. module: contract_price_revision #: model:ir.model.fields,field_description:contract_price_revision.field_contract_line__previous_price msgid "Previous price" msgstr "Precio anterior" +#. module: contract_price_revision +#: model:ir.model.fields,field_description:contract_price_revision.field_contract_line__price_can_be_revised +msgid "Price Can Be Revised" +msgstr "" + #. module: contract_price_revision #: model_terms:ir.ui.view,arch_db:contract_price_revision.contract_line_duplicate_wizard_view msgid "" @@ -97,17 +117,29 @@ msgid "" "
" msgstr "" "Establezca nueva fecha y porcentaje de variación para duplicar.\n" -" Este proceso establece la fecha de inicio anterior como fecha de finalización de registro de origen.\n" +" Este proceso establece la fecha de inicio anterior " +"como fecha de finalización de registro de origen.\n" "
\n" "
" +#. module: contract_price_revision +#: model:ir.model.fields,help:contract_price_revision.field_contract_line__price_can_be_revised +msgid "Technical field in order to know if the line price can be revised." +msgstr "" + #. module: contract_price_revision #: model:ir.model.fields,field_description:contract_price_revision.field_contract_line__variation_percent #: model:ir.model.fields,field_description:contract_price_revision.field_contract_price_revision_wizard__variation_percent msgid "Variation %" msgstr "Variación %" +#. module: contract_price_revision +#: model:ir.model.fields,field_description:contract_price_revision.field_contract_price_revision_wizard__variation_type +msgid "Variation Type" +msgstr "" + #. module: contract_price_revision #: model:ir.model,name:contract_price_revision.model_contract_price_revision_wizard msgid "Wizard to update price based on percentage variation" -msgstr "Asistente para actualizar el precio basado en un porcentaje de variación" +msgstr "" +"Asistente para actualizar el precio basado en un porcentaje de variación" diff --git a/contract_price_revision/models/contract_line.py b/contract_price_revision/models/contract_line.py index 2f9a3d791..95e35047d 100644 --- a/contract_price_revision/models/contract_line.py +++ b/contract_price_revision/models/contract_line.py @@ -20,6 +20,9 @@ class ContractLine(models.Model): string="Variation %", ) + never_revise_price = fields.Boolean( + help="Check this if you don't want to allow price revision." + ) price_can_be_revised = fields.Boolean( compute="_compute_price_can_be_revised", help="Technical field in order to know if the line price can be revised.", @@ -29,7 +32,8 @@ class ContractLine(models.Model): def _compute_price_can_be_revised(self): date_start = self.env.context.get("date_start", fields.Datetime.now()) lines_can_be_revised = self.filtered( - lambda line: not line.automatic_price + lambda line: not line.never_revise_price + and not line.automatic_price and not line.successor_contract_line_id and line.recurring_next_date and not line.display_type diff --git a/contract_price_revision/readme/USAGE.rst b/contract_price_revision/readme/USAGE.rst index b256f9a54..544bbeeef 100644 --- a/contract_price_revision/readme/USAGE.rst +++ b/contract_price_revision/readme/USAGE.rst @@ -12,3 +12,7 @@ To use this module: will have as ending date the day before the entered date. #. When create invoices related to contracts selected, prices will be update with the prices that are not out of date. + +#. When managing contract with recurrence on line level, you maybe want not + to revise price for some lines. + Check 'Never Revise Price' on line level to avoid price revisions. diff --git a/contract_price_revision/static/description/index.html b/contract_price_revision/static/description/index.html index c6507a431..9d8efe21e 100644 --- a/contract_price_revision/static/description/index.html +++ b/contract_price_revision/static/description/index.html @@ -1,20 +1,20 @@ - + - + Contract Price Revision