diff --git a/contract_price_revision/README.rst b/contract_price_revision/README.rst index 008a04f7a8b..d79af9cf8a8 100644 --- a/contract_price_revision/README.rst +++ b/contract_price_revision/README.rst @@ -7,7 +7,7 @@ Contract Price Revision !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:c8a59ff02fbb6be23950f10dec81d9fac5d8dceb53a5213a9cce91789ca63230 + !! source digest: sha256:de222a92e86474bc20e85dbdae73adfb5e21bd3f96b065006dcb12b04f58b2ff !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png @@ -17,13 +17,13 @@ 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/13.0/contract_price_revision + :target: https://github.com/OCA/contract/tree/15.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-13-0/contract-13-0-contract_price_revision + :target: https://translation.odoo-community.org/projects/contract-15-0/contract-15-0-contract_price_revision :alt: Translate me on Weblate .. |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 + :target: https://runboat.odoo-community.org/builds?repo=OCA/contract&target_branch=15.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -63,7 +63,7 @@ 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 -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -83,6 +83,7 @@ Contributors * Vicent Cubells * Carlos Dauden + * Carolina Fernandez Maintainers ~~~~~~~~~~~ @@ -105,6 +106,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 46dbe8da409..85e3ce33e91 100644 --- a/contract_price_revision/__manifest__.py +++ b/contract_price_revision/__manifest__.py @@ -1,17 +1,22 @@ # Copyright 2019 Tecnativa - Vicent Cubells # Copyright 2019 Tecnativa - Carlos Dauden +# Copyright 2023 Tecnativa - Carolina Fernandez # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "Contract Price Revision", "summary": "Easy revision of contract prices", - "version": "13.0.1.0.1", + "version": "15.0.1.0.0", "category": "Contract", "author": "ACSONE SA/NV, Tecnativa, Odoo Community Association (OCA)", "license": "AGPL-3", "website": "https://github.com/OCA/contract", "depends": ["contract"], - "data": ["views/contract_line.xml", "wizards/contract_price_revision_views.xml"], + "data": [ + "security/ir.model.access.csv", + "views/contract_line.xml", + "wizards/contract_price_revision_views.xml", + ], "installable": True, "development_status": "Production/Stable", "maintainers": ["carlosdauden"], diff --git a/contract_price_revision/i18n/contract_price_revision.pot b/contract_price_revision/i18n/contract_price_revision.pot index cf3d27abf86..442ca67e255 100644 --- a/contract_price_revision/i18n/contract_price_revision.pot +++ b/contract_price_revision/i18n/contract_price_revision.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 13.0\n" +"Project-Id-Version: Odoo Server 15.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" diff --git a/contract_price_revision/models/contract_line.py b/contract_price_revision/models/contract_line.py index 7d33cf3ac5c..54d566c583d 100644 --- a/contract_price_revision/models/contract_line.py +++ b/contract_price_revision/models/contract_line.py @@ -30,7 +30,7 @@ class ContractLine(models.Model): @api.depends_context("date_start") def _compute_price_can_be_revised(self): - date_start = self.env.context.get("date_start", fields.Datetime.now()) + date_start = self.env.context.get("date_start", fields.Date.today()) lines_can_be_revised = self.filtered( lambda line: not line.never_revise_price and not line.automatic_price diff --git a/contract_price_revision/readme/CONTRIBUTORS.rst b/contract_price_revision/readme/CONTRIBUTORS.rst index 1441c994696..8308dec890c 100644 --- a/contract_price_revision/readme/CONTRIBUTORS.rst +++ b/contract_price_revision/readme/CONTRIBUTORS.rst @@ -2,3 +2,4 @@ * Vicent Cubells * Carlos Dauden + * Carolina Fernandez diff --git a/contract_price_revision/security/ir.model.access.csv b/contract_price_revision/security/ir.model.access.csv new file mode 100644 index 00000000000..db56498c5f1 --- /dev/null +++ b/contract_price_revision/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_contract_price_revision_wizard_account_invoice,access_contract_price_revision_wizard_account_invoice,model_contract_price_revision_wizard,account.group_account_invoice,1,1,1,1 +access_contract_price_revision_wizard_account_manager,access_contract_price_revision_wizard_account_manager,model_contract_price_revision_wizard,account.group_account_manager,1,1,1,1 diff --git a/contract_price_revision/static/description/index.html b/contract_price_revision/static/description/index.html index 9d8efe21e4b..e84c03f29bc 100644 --- a/contract_price_revision/static/description/index.html +++ b/contract_price_revision/static/description/index.html @@ -367,9 +367,9 @@

Contract Price Revision

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:c8a59ff02fbb6be23950f10dec81d9fac5d8dceb53a5213a9cce91789ca63230 +!! source digest: sha256:de222a92e86474bc20e85dbdae73adfb5e21bd3f96b065006dcb12b04f58b2ff !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

+

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

This module allows to create revisions of contract line prices.

Table of contents

@@ -410,7 +410,7 @@

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

+feedback.

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

@@ -428,6 +428,7 @@

Contributors

  • Tecnativa:
    • Vicent Cubells
    • Carlos Dauden
    • +
    • Carolina Fernandez
  • @@ -441,7 +442,7 @@

    Maintainers

    promote its widespread use.

    Current 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/tests/test_contract_price_revision.py b/contract_price_revision/tests/test_contract_price_revision.py index a5081e7271b..fb4104fdba2 100644 --- a/contract_price_revision/tests/test_contract_price_revision.py +++ b/contract_price_revision/tests/test_contract_price_revision.py @@ -1,6 +1,7 @@ # Copyright 2019 Tecnativa - Vicent Cubells # Copyright 2019 Tecnativa - Carlos Dauden # Copyright 2020 ACSONE SA/NV +# Copyright 2023 Tecnativa - Carolina Fernandez # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo.addons.contract.tests.test_contract import TestContractBase @@ -20,7 +21,7 @@ def _create_wizard(self, v_type="percentage", value=0.0): ) def execute_wizard(self): - self.wizard.with_context({"active_ids": [self.contract.id]}).action_apply() + self.wizard.with_context(active_ids=self.contract.id).action_apply() def test_contract_price_revision_wizard(self): # This is for checking if this line is not versioned diff --git a/contract_price_revision/wizards/contract_price_revision.py b/contract_price_revision/wizards/contract_price_revision.py index 824b9624f39..62d5d5290d3 100644 --- a/contract_price_revision/wizards/contract_price_revision.py +++ b/contract_price_revision/wizards/contract_price_revision.py @@ -69,8 +69,8 @@ def action_apply(self): line.stop(date_end) new_line = line.copy(self._get_new_line_value(line)) line.update({"successor_contract_line_id": new_line.id}) - action = self.env["ir.actions.act_window"].for_xml_id( - "contract", "action_customer_contract" + action = self.env["ir.actions.act_window"]._for_xml_id( + "contract.action_customer_contract" ) action["domain"] = [("id", "in", active_ids)] return action