Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Available addons
----------------
addon | version | maintainers | summary
--- | --- | --- | ---
[account_operating_unit](account_operating_unit/) | 19.0.1.0.0 | | Introduces Operating Unit (OU) in invoices and Accounting Entries with clearing account
[account_operating_unit](account_operating_unit/) | 19.0.1.0.1 | | Introduces Operating Unit (OU) in invoices and Accounting Entries with clearing account
[analytic_operating_unit](analytic_operating_unit/) | 19.0.1.0.0 | | Analytic Operating Unit
[crm_operating_unit](crm_operating_unit/) | 19.0.1.0.0 | | Operating Unit in CRM
[operating_unit](operating_unit/) | 19.0.1.0.0 | | An operating unit (OU) is an organizational entity part of a company
Expand Down
2 changes: 1 addition & 1 deletion account_operating_unit/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Accounting with Operating Units
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:dc98b2ffc709e9af252a3738e8343719015d978580eb0a3b594ef976c9f3772b
!! source digest: sha256:c0ac83c731919c405df260caa28076036054b6f9145e9819b7700f6038b97fdc
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down
2 changes: 1 addition & 1 deletion account_operating_unit/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "Accounting with Operating Units",
"summary": "Introduces Operating Unit (OU) in invoices and "
"Accounting Entries with clearing account",
"version": "19.0.1.0.0",
"version": "19.0.1.0.1",
"author": "ForgeFlow, "
"Serpent Consulting Services Pvt. Ltd.,"
"WilldooIT Pty Ltd,"
Expand Down
4 changes: 4 additions & 0 deletions account_operating_unit/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ class AccountMove(models.Model):

@api.model
def _default_operating_unit_id(self):
if journal_id := self.env.context.get("default_journal_id"):
journal = self.env["account.journal"].browse(journal_id)
if journal_ou := journal.operating_unit_id:
return journal_ou
if (
default_type := self.env.context.get("default_move_type")
) and default_type != "entry":
Expand Down
2 changes: 1 addition & 1 deletion account_operating_unit/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ <h1>Accounting with Operating Units</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:dc98b2ffc709e9af252a3738e8343719015d978580eb0a3b594ef976c9f3772b
!! source digest: sha256:c0ac83c731919c405df260caa28076036054b6f9145e9819b7700f6038b97fdc
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/license-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/operating-unit/tree/19.0/account_operating_unit"><img alt="OCA/operating-unit" src="https://img.shields.io/badge/github-OCA%2Foperating--unit-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/operating-unit-19-0/operating-unit-19-0-account_operating_unit"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/operating-unit&amp;target_branch=19.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module allows a company to manage the accounting based on Operating
Expand Down