From 9c11913aee69370a63c1223b601bc3bc250c2efa Mon Sep 17 00:00:00 2001 From: twalter-c2c Date: Wed, 17 Sep 2025 17:22:07 +0200 Subject: [PATCH 1/2] [FIX] onchange_helper: avoid permissions issue --- onchange_helper/models/base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/onchange_helper/models/base.py b/onchange_helper/models/base.py index f856d9d1189..c4fb6579e0a 100644 --- a/onchange_helper/models/base.py +++ b/onchange_helper/models/base.py @@ -42,7 +42,8 @@ def play_onchanges(self, values, onchange_fields): self.ensure_one() record_values = self._convert_to_write( { - field_name: self[field_name] + # use sudo to avoid access right issue + field_name: self.sudo()[field_name] for field_name, field in self._fields.items() } ) From 13db85ac0ec86c91c575e2fc421a4437e4bfb806 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Fri, 30 Jan 2026 15:14:31 +0000 Subject: [PATCH 2/2] [BOT] post-merge updates --- README.md | 2 +- onchange_helper/README.rst | 30 ++++++++------ onchange_helper/__manifest__.py | 2 +- onchange_helper/static/description/index.html | 41 +++++++++++-------- 4 files changed, 44 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 27fced4e853..b314aa14f14 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ addon | version | maintainers | summary [module_analysis](module_analysis/) | 17.0.1.0.3 | legalsylvain | Add analysis tools regarding installed modules to know which installed modules comes from Odoo Core, OCA, or are custom modules [module_auto_update](module_auto_update/) | 17.0.1.0.0 | | Automatically update Odoo modules [module_change_auto_install](module_change_auto_install/) | 17.0.1.0.2 | legalsylvain | Customize auto installables modules by configuration -[onchange_helper](onchange_helper/) | 17.0.1.0.1 | | Technical module that ease execution of onchange in Python code +[onchange_helper](onchange_helper/) | 17.0.1.0.2 | | Technical module that ease execution of onchange in Python code [rpc_helper](rpc_helper/) | 17.0.1.0.0 | simahawk | Helpers for disabling RPC calls [scheduler_error_mailer](scheduler_error_mailer/) | 17.0.1.0.0 | | Scheduler Error Mailer [sentry](sentry/) | 17.0.1.0.0 | barsi naglis versada moylop260 fernandahf | Report Odoo errors to Sentry diff --git a/onchange_helper/README.rst b/onchange_helper/README.rst index 68667be2d20..5d049496bfd 100644 --- a/onchange_helper/README.rst +++ b/onchange_helper/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 + =============== Onchange Helper =============== @@ -7,13 +11,13 @@ Onchange Helper !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:f99de3ee6c925e95e76870bbc84e80cfeb2842ff3e1e71af1f2bd17deeb935b6 + !! source digest: sha256:3f1d2a44a1028ca746dbc630084f378850109bbe22e61558b1c10f50b55dbe8f !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |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%2Fserver--tools-lightgray.png?logo=github @@ -41,8 +45,8 @@ Usage To use this module, you need to: -- depend on this module -- call yourmodel.play_onchanges(values, ['field']) +- depend on this module +- call yourmodel.play_onchanges(values, ['field']) Example if you want to create a sale order and you want to get the values relative to partner_id field (as if you fill the field from UI) @@ -85,10 +89,10 @@ command when values are assigned to the record by the onchange Notes: -- Order in onchange_fields is very important as onchanges methods will - be played in that order. -- If you use memory object in vals, be award that onchange method in - base model call self.invalidate_cache() that reset it. +- Order in onchange_fields is very important as onchanges methods will + be played in that order. +- If you use memory object in vals, be award that onchange method in + base model call self.invalidate_cache() that reset it. Known issues / Roadmap ====================== @@ -120,11 +124,11 @@ Authors Contributors ------------ -- Guewen Baconnier -- Florian da Costa -- Andrea Stirpe -- Souheil Bejaoui -- Kevin Khao +- Guewen Baconnier +- Florian da Costa +- Andrea Stirpe +- Souheil Bejaoui +- Kevin Khao Maintainers ----------- diff --git a/onchange_helper/__manifest__.py b/onchange_helper/__manifest__.py index 4f5a63d5ea1..a58da57ea54 100644 --- a/onchange_helper/__manifest__.py +++ b/onchange_helper/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Onchange Helper", - "version": "17.0.1.0.1", + "version": "17.0.1.0.2", "summary": "Technical module that ease execution" " of onchange in Python code", "author": "Akretion,Camptocamp,Odoo Community Association (OCA)", "website": "https://github.com/OCA/server-tools", diff --git a/onchange_helper/static/description/index.html b/onchange_helper/static/description/index.html index de5e35abeff..161f3cd1643 100644 --- a/onchange_helper/static/description/index.html +++ b/onchange_helper/static/description/index.html @@ -3,15 +3,16 @@ -Onchange Helper +README.rst -
-

Onchange Helper

+
+ + +Odoo Community Association + +
+

Onchange Helper

-

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

+

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

This is a technical module. Its goal is to ease the play of onchange method directly called from Python code.

Table of contents

@@ -386,7 +392,7 @@

Onchange Helper

-

Usage

+

Usage

To use this module, you need to:

  • depend on this module
  • @@ -433,14 +439,14 @@

    Usage

-

Known issues / Roadmap

+

Known issues / Roadmap

Note that onchanges tend to disappear due to the introduction of ‘computed stored readonly False fields’ in most cases. When migrating, it is best to prefer changing it to that way instead of using this module.

-

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 @@ -448,16 +454,16 @@

Bug Tracker

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

-

Credits

+

Credits

-

Authors

+

Authors

  • Akretion
  • Camptocamp
-

Contributors

+

Contributors

-

Maintainers

+

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.

@@ -478,5 +486,6 @@

Maintainers

+