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 @@ -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 | <a href='https://github.com/kittiu'><img src='https://github.com/kittiu.png' width='32' height='32' style='border-radius:50%;' alt='kittiu'/></a> | 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 | <a href='https://github.com/kittiu'><img src='https://github.com/kittiu.png' width='32' height='32' style='border-radius:50%;' alt='kittiu'/></a> | Access all OUs' Analytics
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:2462d3b6b8dd98daea9cf64883f0710895043c52d76d9b12f1306e48f85898c1
!! source digest: sha256:75ccaacd75da38a607df85e5c12dd818eac06deb02f26958b13d4331d259d4a3
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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": "17.0.1.2.0",
"version": "17.0.1.2.1",
"author": "ForgeFlow, "
"Serpent Consulting Services Pvt. Ltd.,"
"WilldooIT Pty Ltd,"
Expand Down
9 changes: 6 additions & 3 deletions account_operating_unit/models/account_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

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:2462d3b6b8dd98daea9cf64883f0710895043c52d76d9b12f1306e48f85898c1
!! source digest: sha256:75ccaacd75da38a607df85e5c12dd818eac06deb02f26958b13d4331d259d4a3
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/17.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-17-0/operating-unit-17-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=17.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