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 |
| 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 |
| 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/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
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 @@
This module allows a company to manage the accounting based on Operating