diff --git a/sale_exception/README.rst b/sale_exception/README.rst index 3ef4f9f0aa5..055883078dd 100644 --- a/sale_exception/README.rst +++ b/sale_exception/README.rst @@ -17,13 +17,13 @@ Sale Exception :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsale--workflow-lightgray.png?logo=github - :target: https://github.com/OCA/sale-workflow/tree/17.0/sale_exception + :target: https://github.com/OCA/sale-workflow/tree/18.0/sale_exception :alt: OCA/sale-workflow .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/sale-workflow-17-0/sale-workflow-17-0-sale_exception + :target: https://translation.odoo-community.org/projects/sale-workflow-18-0/sale-workflow-18-0-sale_exception :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/sale-workflow&target_branch=17.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/sale-workflow&target_branch=18.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -84,7 +84,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. @@ -127,6 +127,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/sale-workflow `_ project on GitHub. +This module is part of the `OCA/sale-workflow `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/sale_exception/__manifest__.py b/sale_exception/__manifest__.py index da04e0db506..c7e98249a09 100644 --- a/sale_exception/__manifest__.py +++ b/sale_exception/__manifest__.py @@ -5,7 +5,7 @@ { "name": "Sale Exception", "summary": "Custom exceptions on sale order", - "version": "17.0.1.0.0", + "version": "18.0.1.0.0", "category": "Generic Modules/Sale", "author": "Akretion, " "Sodexis, " diff --git a/sale_exception/data/sale_exception_data.xml b/sale_exception/data/sale_exception_data.xml index cc17cd63349..a9997d19713 100644 --- a/sale_exception/data/sale_exception_data.xml +++ b/sale_exception/data/sale_exception_data.xml @@ -7,8 +7,8 @@ 20 minutes - -1 - + + code model.test_all_draft_orders() diff --git a/sale_exception/models/sale_order_line.py b/sale_exception/models/sale_order_line.py index 20dc90ec917..445a40cdc55 100644 --- a/sale_exception/models/sale_order_line.py +++ b/sale_exception/models/sale_order_line.py @@ -37,12 +37,11 @@ def _compute_exceptions_summary(self): rec.exceptions_summary = False def _get_exception_summary(self): - return "
    %s
" % "".join( - [ - f"
  • {html.escape(e.name)}: {html.escape(e.description)}
  • " - for e in self.exception_ids - ] + items = "".join( + f"
  • {html.escape(e.name)}: {html.escape(e.description)}
  • " + for e in self.exception_ids ) + return f"
      {items}
    " def _get_main_records(self): return self.mapped("order_id") diff --git a/sale_exception/static/description/index.html b/sale_exception/static/description/index.html index bf1f879935e..8f0a242a756 100644 --- a/sale_exception/static/description/index.html +++ b/sale_exception/static/description/index.html @@ -8,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -274,7 +275,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -300,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -368,7 +369,7 @@

    Sale Exception

    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:02cf45502a42ed74a7de2eeb75f68950616d8d807656bff404181daeb39b6558 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

    +

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

    This module allows you attach several customizable exceptions to your sale order in a way that you can filter orders by exceptions type and fix them.

    @@ -427,7 +428,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.

    @@ -460,11 +461,13 @@

    Contributors

    Maintainers

    This module is maintained by the OCA.

    -Odoo Community Association + +Odoo Community Association +

    OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

    -

    This module is part of the OCA/sale-workflow project on GitHub.

    +

    This module is part of the OCA/sale-workflow project on GitHub.

    You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

    diff --git a/sale_exception/tests/test_sale_exception.py b/sale_exception/tests/test_sale_exception.py index aeb402bcc70..ccfe1f68762 100644 --- a/sale_exception/tests/test_sale_exception.py +++ b/sale_exception/tests/test_sale_exception.py @@ -133,7 +133,7 @@ def test_sale_order_exception(self): # Simulation the opening of the wizard sale_exception_confirm and # set ignore_exception to True so_except_confirm = self.sale_exception_confirm.with_context( - **{"active_id": so1.id, "active_ids": [so1.id], "active_model": so1._name} + **{"id": so1.id, "ids": [so1.id], "active_model": so1._name} ).create({"ignore": True}) so_except_confirm.action_confirm() self.assertTrue(so1.ignore_exception) @@ -200,8 +200,8 @@ def test_exception_no_free(self): sale_order.action_confirm() so_except_confirm = self.sale_exception_confirm.with_context( **{ - "active_id": sale_order.id, - "active_ids": [sale_order.id], + "id": sale_order.id, + "ids": [sale_order.id], "exception_ids": [exception.id], "active_model": sale_order._name, } diff --git a/sale_exception/views/sale_view.xml b/sale_exception/views/sale_view.xml index aea095d6b1c..7f3f2ada7c7 100644 --- a/sale_exception/views/sale_view.xml +++ b/sale_exception/views/sale_view.xml @@ -4,8 +4,8 @@ Sale Exception Rules exception.rule - tree,form - + list,form + [('model', 'in', ['sale.order', 'sale.order.line'])] @@ -64,10 +64,10 @@ - + - + is_exception_danger diff --git a/sale_exception/wizard/sale_exception_confirm_view.xml b/sale_exception/wizard/sale_exception_confirm_view.xml index cd480c0c491..95ea07b7033 100644 --- a/sale_exception/wizard/sale_exception_confirm_view.xml +++ b/sale_exception/wizard/sale_exception_confirm_view.xml @@ -8,10 +8,10 @@
    - + - +