Skip to content

Commit

Permalink
[MIG] account_operating_unit: Migration to 18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
HeliconiaSolutions committed Jan 7, 2025
1 parent fa69d68 commit 9445af1
Show file tree
Hide file tree
Showing 10 changed files with 160 additions and 154 deletions.
114 changes: 57 additions & 57 deletions account_operating_unit/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,42 +17,41 @@ Accounting with Operating Units
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Foperating--unit-lightgray.png?logo=github
:target: https://github.com/OCA/operating-unit/tree/17.0/account_operating_unit
:target: https://github.com/OCA/operating-unit/tree/18.0/account_operating_unit
:alt: OCA/operating-unit
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/operating-unit-17-0/operating-unit-17-0-account_operating_unit
:target: https://translation.odoo-community.org/projects/operating-unit-18-0/operating-unit-18-0-account_operating_unit
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/operating-unit&target_branch=17.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/operating-unit&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module allows a company to manage the accounting based on Operating
Units (OU's).

- The financial reports (Trial Balance, P&L, Balance Sheet), allow to
report the balances of one or more OU's.
- If a company wishes to report Balance Sheet and P&L accounts based on
OU's, they should indicate at company level that the OU's are
self-balanced, and the corresponding Inter-Operating Unit clearing
account. The Chart of Accounts will always be balanced, for each
Operating Unit.
- A company considering Operating Unit as applicable to report only
profits and losses will not need to set the OU's as self-balanced.
- The self-balancing of Operating Unit is ensured at the time of
posting a journal entry. In case that the journal involves posting of
items in separate Operating Units, new journal items will be created,
using the Inter-Operating Unit clearing account, to ensure that each
OU is going to be self-balanced for that journal entry.
- Adds the Operating Unit to the invoice. A user can choose what OU to
create the invoice for.
- Adds the Operating Unit to payments and payment methods. The
operating unit of a payment will be that of the payment method
chosen.
- Implements security rules at OU level to invoices, payments and
journal items.
- Adds the Operating Unit to the cash basis journal entries.
- The financial reports (Trial Balance, P&L, Balance Sheet), allow to
report the balances of one or more OU's.
- If a company wishes to report Balance Sheet and P&L accounts based on
OU's, they should indicate at company level that the OU's are
self-balanced, and the corresponding Inter-Operating Unit clearing
account. The Chart of Accounts will always be balanced, for each
Operating Unit.
- A company considering Operating Unit as applicable to report only
profits and losses will not need to set the OU's as self-balanced.
- The self-balancing of Operating Unit is ensured at the time of posting
a journal entry. In case that the journal involves posting of items in
separate Operating Units, new journal items will be created, using the
Inter-Operating Unit clearing account, to ensure that each OU is going
to be self-balanced for that journal entry.
- Adds the Operating Unit to the invoice. A user can choose what OU to
create the invoice for.
- Adds the Operating Unit to payments and payment methods. The operating
unit of a payment will be that of the payment method chosen.
- Implements security rules at OU level to invoices, payments and
journal items.
- Adds the Operating Unit to the cash basis journal entries.

**Table of contents**

Expand All @@ -78,37 +77,37 @@ account.
Usage
=====

- Add the Operating Unit to invoices.
- Report invoices by Operating Unit in *Accounting / Reporting*
*Business Intelligence / Invoices*
- Add the Default Operating Unit to account move. Then all move lines
will by default adopt this Operating Unit.
- Add Operating Units to the move lines. If they differ across lines of
the same move, and the OU's are self-balanced, then additional move
lines will be created so as to make the move self-balanced from OU
perspective.
- In the menu *Accounting / Reporting / PDF Reports*, you can indicate
the Operating Units to report on, for the *Trial Balance*, *Balance
Sheet*, *Profit and Loss*, and *Financial Reports*.
- Add the Operating Unit to invoices.
- Report invoices by Operating Unit in *Accounting / Reporting*
*Business Intelligence / Invoices*
- Add the Default Operating Unit to account move. Then all move lines
will by default adopt this Operating Unit.
- Add Operating Units to the move lines. If they differ across lines of
the same move, and the OU's are self-balanced, then additional move
lines will be created so as to make the move self-balanced from OU
perspective.
- In the menu *Accounting / Reporting / PDF Reports*, you can indicate
the Operating Units to report on, for the *Trial Balance*, *Balance
Sheet*, *Profit and Loss*, and *Financial Reports*.

Known issues / Roadmap
======================

- The *General Ledger*, *Aged Partner Balance* reports do not support
the filter by Operating Unit. Basically due to lack of proper hooks
in the standard methods used by these reports, to introduce the
ability to filter by Operating Unit.
- Trial Balance, P&L and Balance Sheet were removed from Odoo
Community. Once OCA Financial Reports are migrated to 13 we can add
the Operating Unit to those reports.
- The *General Ledger*, *Aged Partner Balance* reports do not support
the filter by Operating Unit. Basically due to lack of proper hooks in
the standard methods used by these reports, to introduce the ability
to filter by Operating Unit.
- Trial Balance, P&L and Balance Sheet were removed from Odoo Community.
Once OCA Financial Reports are migrated to 13 we can add the Operating
Unit to those reports.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/operating-unit/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
`feedback <https://github.com/OCA/operating-unit/issues/new?body=module:%20account_operating_unit%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/operating-unit/issues/new?body=module:%20account_operating_unit%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Expand All @@ -125,17 +124,18 @@ Authors
Contributors
------------

- ForgeFlow <contact@forgeflow.com>
- Jordi Ballester Alomar <jordi.ballester@forgeflow.com>
- Aarón Henríquez <ahenriquez@forgeflow.com>
- Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>
- WilldooIT Pty Ltd <info@willdooit.com>
- Michael Villamar <michael.villamar@willdooit.com>
- Jarsa Sistemas <info@jarsa.com.mx>
- Alan Ramos <alan.ramos@jarsa.com.mx>
- Saran Lim. <saranl@ecosoft.co.th>
- Pimolnat Suntian <pimolnats@ecosoft.co.th>
- Hieu, Vo Minh Bao <hieu.vmb@komit-consulting.com>
- ForgeFlow <contact@forgeflow.com>
- Jordi Ballester Alomar <jordi.ballester@forgeflow.com>
- Aarón Henríquez <ahenriquez@forgeflow.com>
- Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>
- WilldooIT Pty Ltd <info@willdooit.com>
- Michael Villamar <michael.villamar@willdooit.com>
- Jarsa Sistemas <info@jarsa.com.mx>
- Alan Ramos <alan.ramos@jarsa.com.mx>
- Saran Lim. <saranl@ecosoft.co.th>
- Pimolnat Suntian <pimolnats@ecosoft.co.th>
- Hieu, Vo Minh Bao <hieu.vmb@komit-consulting.com>
- ``Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>``\ \_

Maintainers
-----------
Expand All @@ -150,6 +150,6 @@ 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.

This module is part of the `OCA/operating-unit <https://github.com/OCA/operating-unit/tree/17.0/account_operating_unit>`_ project on GitHub.
This module is part of the `OCA/operating-unit <https://github.com/OCA/operating-unit/tree/18.0/account_operating_unit>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
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.0.0",
"version": "18.0.1.0.0",
"author": "ForgeFlow, "
"Serpent Consulting Services Pvt. Ltd.,"
"WilldooIT Pty Ltd,"
Expand Down
1 change: 1 addition & 0 deletions account_operating_unit/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
- Saran Lim. \<<saranl@ecosoft.co.th>\>
- Pimolnat Suntian \<<pimolnats@ecosoft.co.th>\>
- Hieu, Vo Minh Bao \<<hieu.vmb@komit-consulting.com>\>
- `Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>`_
7 changes: 2 additions & 5 deletions account_operating_unit/report/account_invoice_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).

from odoo import fields, models
from odoo.tools import SQL


class AccountInvoiceReport(models.Model):
Expand All @@ -14,8 +15,4 @@ class AccountInvoiceReport(models.Model):
)

def _select(self):
select_str = super()._select()
select_str += """
,line.operating_unit_id
"""
return select_str
return SQL("%s, line.operating_unit_id", super()._select())
34 changes: 17 additions & 17 deletions account_operating_unit/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ <h1 class="title">Accounting with Operating Units</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:5b020f80517fa70ab746f98800e561a235087ec12b512802748fe3d88283d223
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/licence-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><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/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/operating-unit/tree/18.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-18-0/operating-unit-18-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=18.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
Units (OU’s).</p>
<ul class="simple">
Expand All @@ -382,16 +382,15 @@ <h1 class="title">Accounting with Operating Units</h1>
Operating Unit.</li>
<li>A company considering Operating Unit as applicable to report only
profits and losses will not need to set the OU’s as self-balanced.</li>
<li>The self-balancing of Operating Unit is ensured at the time of
posting a journal entry. In case that the journal involves posting of
items in separate Operating Units, new journal items will be created,
using the Inter-Operating Unit clearing account, to ensure that each
OU is going to be self-balanced for that journal entry.</li>
<li>The self-balancing of Operating Unit is ensured at the time of posting
a journal entry. In case that the journal involves posting of items in
separate Operating Units, new journal items will be created, using the
Inter-Operating Unit clearing account, to ensure that each OU is going
to be self-balanced for that journal entry.</li>
<li>Adds the Operating Unit to the invoice. A user can choose what OU to
create the invoice for.</li>
<li>Adds the Operating Unit to payments and payment methods. The
operating unit of a payment will be that of the payment method
chosen.</li>
<li>Adds the Operating Unit to payments and payment methods. The operating
unit of a payment will be that of the payment method chosen.</li>
<li>Implements security rules at OU level to invoices, payments and
journal items.</li>
<li>Adds the Operating Unit to the cash basis journal entries.</li>
Expand Down Expand Up @@ -448,20 +447,20 @@ <h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
<h1><a class="toc-backref" href="#toc-entry-3">Known issues / Roadmap</a></h1>
<ul class="simple">
<li>The <em>General Ledger</em>, <em>Aged Partner Balance</em> reports do not support
the filter by Operating Unit. Basically due to lack of proper hooks
in the standard methods used by these reports, to introduce the
ability to filter by Operating Unit.</li>
<li>Trial Balance, P&amp;L and Balance Sheet were removed from Odoo
Community. Once OCA Financial Reports are migrated to 13 we can add
the Operating Unit to those reports.</li>
the filter by Operating Unit. Basically due to lack of proper hooks in
the standard methods used by these reports, to introduce the ability
to filter by Operating Unit.</li>
<li>Trial Balance, P&amp;L and Balance Sheet were removed from Odoo Community.
Once OCA Financial Reports are migrated to 13 we can add the Operating
Unit to those reports.</li>
</ul>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-4">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/operating-unit/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/operating-unit/issues/new?body=module:%20account_operating_unit%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/operating-unit/issues/new?body=module:%20account_operating_unit%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand All @@ -488,6 +487,7 @@ <h2><a class="toc-backref" href="#toc-entry-7">Contributors</a></h2>
<li>Saran Lim. &lt;<a class="reference external" href="mailto:saranl&#64;ecosoft.co.th">saranl&#64;ecosoft.co.th</a>&gt;</li>
<li>Pimolnat Suntian &lt;<a class="reference external" href="mailto:pimolnats&#64;ecosoft.co.th">pimolnats&#64;ecosoft.co.th</a>&gt;</li>
<li>Hieu, Vo Minh Bao &lt;<a class="reference external" href="mailto:hieu.vmb&#64;komit-consulting.com">hieu.vmb&#64;komit-consulting.com</a>&gt;</li>
<li><tt class="docutils literal">Heliconia Solutions Pvt. Ltd. <span class="pre">&lt;https://www.heliconia.io&gt;</span></tt>_</li>
</ul>
</div>
<div class="section" id="maintainers">
Expand All @@ -499,7 +499,7 @@ <h2><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h2>
<p>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.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/operating-unit/tree/17.0/account_operating_unit">OCA/operating-unit</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/operating-unit/tree/18.0/account_operating_unit">OCA/operating-unit</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
Expand Down
Loading

0 comments on commit 9445af1

Please sign in to comment.