From 4749b6f65d32b9c4c71544c2060cf21d3675592b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Mart=C3=ADnez?= Date: Fri, 30 Aug 2024 09:45:20 +0200 Subject: [PATCH] [FIX] account_payment_term_extension: Add cash_rounding parameter to _compute_terms() to prevent error Required since https://github.com/odoo/odoo/commit/c45b5208893c93dc8474873dedff0c068ae83c9b --- account_payment_term_extension/README.rst | 5 +++ .../models/account_payment_term.py | 3 ++ .../readme/ROADMAP.md | 1 + .../static/description/index.html | 40 +++++++++++-------- 4 files changed, 33 insertions(+), 16 deletions(-) create mode 100644 account_payment_term_extension/readme/ROADMAP.md diff --git a/account_payment_term_extension/README.rst b/account_payment_term_extension/README.rst index 4f4578d1749..d3a543356e3 100644 --- a/account_payment_term_extension/README.rst +++ b/account_payment_term_extension/README.rst @@ -84,6 +84,11 @@ Select any payment term and set a date in invoice. You must see the due date based on this payment term. +Known issues / Roadmap +====================== + +This module is not compatible with cash rounding + Bug Tracker =========== diff --git a/account_payment_term_extension/models/account_payment_term.py b/account_payment_term_extension/models/account_payment_term.py index a86663156b4..7b844225a1f 100644 --- a/account_payment_term_extension/models/account_payment_term.py +++ b/account_payment_term_extension/models/account_payment_term.py @@ -84,8 +84,11 @@ def _compute_terms( sign, untaxed_amount, untaxed_amount_currency, + cash_rounding=None, ): """Complete overwrite of compute method for adding extra options.""" + if cash_rounding: + raise UserError(_("This module is not compatible with cash rounding")) # FIXME: Find an inheritable way of doing this self.ensure_one() company_currency = company.currency_id diff --git a/account_payment_term_extension/readme/ROADMAP.md b/account_payment_term_extension/readme/ROADMAP.md new file mode 100644 index 00000000000..2a6b3022498 --- /dev/null +++ b/account_payment_term_extension/readme/ROADMAP.md @@ -0,0 +1 @@ +This module is not compatible with cash rounding diff --git a/account_payment_term_extension/static/description/index.html b/account_payment_term_extension/static/description/index.html index b735ffdf042..8dde273e97a 100644 --- a/account_payment_term_extension/static/description/index.html +++ b/account_payment_term_extension/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 { @@ -393,12 +394,13 @@

Payment Term Extension