From 979ded1266c2dd019e8d98c7dc576af49e7c7b2b Mon Sep 17 00:00:00 2001 From: Vincent Van Rossem Date: Tue, 13 Jan 2026 15:28:57 +0100 Subject: [PATCH 1/2] [IMP] account_operating_unit: account.move::_default_operating_unit_id `account.move` should default on the journal's operating unit (if set) instead of the user's operating unit --- account_operating_unit/models/account_move.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/account_operating_unit/models/account_move.py b/account_operating_unit/models/account_move.py index 5b358d6385..d9da98da96 100644 --- a/account_operating_unit/models/account_move.py +++ b/account_operating_unit/models/account_move.py @@ -145,10 +145,13 @@ class AccountMove(models.Model): @api.model def _default_operating_unit_id(self): + if journal_id := self._context.get("default_journal_id"): + journal = self.env["account.journal"].browse(journal_id) + if journal_ou := journal.operating_unit_id: + return journal_ou if ( - self._context.get("default_move_type", False) - and self._context.get("default_move_type") != "entry" - ): + move_type := self._context.get("default_move_type") + ) and move_type != "entry": return self.env["res.users"]._get_default_operating_unit() return False From 5d4c8715e1f3412d545f5738cd9fa34d2f4dd7b9 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Wed, 14 Jan 2026 12:05:30 +0000 Subject: [PATCH 2/2] [BOT] post-merge updates --- README.md | 2 +- account_operating_unit/README.rst | 2 +- account_operating_unit/__manifest__.py | 2 +- account_operating_unit/static/description/index.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a074c9523f..361c59c2c0 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Available addons addon | version | maintainers | summary --- | --- | --- | --- [account_financial_report_operating_unit](account_financial_report_operating_unit/) | 17.0.1.0.0 | | Introduces Operating Unit (OU) in financial reports -[account_operating_unit](account_operating_unit/) | 17.0.1.2.0 | | Introduces Operating Unit (OU) in invoices and Accounting Entries with clearing account +[account_operating_unit](account_operating_unit/) | 17.0.1.2.1 | | Introduces Operating Unit (OU) in invoices and Accounting Entries with clearing account [account_operating_unit_access_all](account_operating_unit_access_all/) | 17.0.1.0.0 | kittiu | Access all OUs' Accounting [analytic_operating_unit](analytic_operating_unit/) | 17.0.1.0.0 | | Analytic Operating Unit [analytic_operating_unit_access_all](analytic_operating_unit_access_all/) | 17.0.1.0.0 | kittiu | Access all OUs' Analytics diff --git a/account_operating_unit/README.rst b/account_operating_unit/README.rst index 8e5af26058..a805746843 100644 --- a/account_operating_unit/README.rst +++ b/account_operating_unit/README.rst @@ -11,7 +11,7 @@ Accounting with Operating Units !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:2462d3b6b8dd98daea9cf64883f0710895043c52d76d9b12f1306e48f85898c1 + !! source digest: sha256:75ccaacd75da38a607df85e5c12dd818eac06deb02f26958b13d4331d259d4a3 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png diff --git a/account_operating_unit/__manifest__.py b/account_operating_unit/__manifest__.py index 20b172e1e0..313a7131d0 100644 --- a/account_operating_unit/__manifest__.py +++ b/account_operating_unit/__manifest__.py @@ -5,7 +5,7 @@ "name": "Accounting with Operating Units", "summary": "Introduces Operating Unit (OU) in invoices and " "Accounting Entries with clearing account", - "version": "17.0.1.2.0", + "version": "17.0.1.2.1", "author": "ForgeFlow, " "Serpent Consulting Services Pvt. Ltd.," "WilldooIT Pty Ltd," diff --git a/account_operating_unit/static/description/index.html b/account_operating_unit/static/description/index.html index ec64099bcf..11e54c835b 100644 --- a/account_operating_unit/static/description/index.html +++ b/account_operating_unit/static/description/index.html @@ -372,7 +372,7 @@

Accounting with Operating Units

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:2462d3b6b8dd98daea9cf64883f0710895043c52d76d9b12f1306e48f85898c1 +!! source digest: sha256:75ccaacd75da38a607df85e5c12dd818eac06deb02f26958b13d4331d259d4a3 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: LGPL-3 OCA/operating-unit Translate me on Weblate Try me on Runboat

This module allows a company to manage the accounting based on Operating