Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

staging #23

Merged
merged 9 commits into from
Aug 30, 2024
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
10 changes: 5 additions & 5 deletions bankayma_account/i18n/he_IL.po
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ msgstr ". עבור"
#. module: bankayma_account
#: model_terms:ir.ui.view,arch_db:bankayma_account.qweb_template_account_move_paid
msgid ". from"
msgstr ". מ"
msgstr "מ"

#. module: bankayma_account
#: model:account.tax,name:bankayma_account.tax_social_security_76ex
Expand Down Expand Up @@ -2052,7 +2052,7 @@ msgstr "[בנקיימא] תשלום מעוכב עד להשלמת מסמכים ע
#: code:addons/bankayma_account/models/account_move.py:0
#, python-format
msgid "[BanKayma] %(company)s you've been paid! 🤑 (Ref %(ref)s)"
msgstr "[בנקיימא] %(company)s שילמנו לך! 🤑 (Ref %(ref)s)"
msgstr "[בנקיימא] %(company)s - שילמנו לך! 🤑 (Ref %(ref)s)"

#. module: bankayma_account
#. odoo-python
Expand Down Expand Up @@ -2101,7 +2101,7 @@ msgstr "חשבון"
#. module: bankayma_account
#: model_terms:ir.ui.view,arch_db:bankayma_account.qweb_template_account_move_rejected
msgid "is on hold after checking 1000 system:"
msgstr "- הבקשה מעוכבת עד לעדכון פרטים או מסמכים."
msgstr "- הבקשה מעוכבת עד לעדכון פרטים או מסמכים -"

#. module: bankayma_account
#: model_terms:ir.ui.view,arch_db:bankayma_account.qweb_template_account_move_draft
Expand All @@ -2124,12 +2124,12 @@ msgstr "או"
#. module: bankayma_account
#: model_terms:ir.ui.view,arch_db:bankayma_account.qweb_template_account_move_paid
msgid "to"
msgstr "ל"
msgstr ":)"

#. module: bankayma_account
#: model_terms:ir.ui.view,arch_db:bankayma_account.qweb_template_account_move_rejected
msgid "until up to date documents"
msgstr ""
msgstr "-"

#. module: bankayma_account
#: model_terms:ir.ui.view,arch_db:bankayma_account.qweb_template_account_move_draft
Expand Down
4 changes: 3 additions & 1 deletion bankayma_account/migrations/16.0.1.0.10/post-migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ def migrate(env, version=None):
"template_account_move_new_from_portal",
"template_account_move_tier_rejected",
):
env.ref("bankayma_account.%s" % xmlid).unlink()
record = env.ref("bankayma_account.%s" % xmlid, False)
if record:
record.unlink()
99 changes: 99 additions & 0 deletions company_cascade_category/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
===================
Cascading companies
===================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
:target: https://odoo-community.org/page/development-status
:alt: Alpha
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmulti--company-lightgray.png?logo=github
:target: https://github.com/OCA/multi-company/tree/16.0/company_cascade
:alt: OCA/multi-company
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/multi-company-16-0/multi-company-16-0-company_cascade
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/webui/builds.html?repo=OCA/multi-company&target_branch=16.0
:alt: Try me on Runboat

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

This module maintains relations between company specific records (think accounts, journals) of parent and child companies, enabling users to configure things in the parent company and then copy (=cascade) this configuration to child companies.

Originally conceived for financial hosting, this mechanism is useful for any setting where Odoo is used to manage multiple organizations that have a very similar financial configuration, but organizational units are a bad fit because the companies are different (legal) entities, or just need more independence from the parent company than OUs provide.

.. IMPORTANT::
This is an alpha version, the data model and design can change at any time without warning.
Only for development or testing purpose, do not use in production.
`More details on development status <https://odoo-community.org/page/development-status>`_

**Table of contents**

.. contents::
:local:

Usage
=====

To use this module, you need to:

#. Go to an account/journal/etc in your parent company
#. Click Actions/Cascade to child companies
#. If not existing yet, an equivalent record will be created in the child company
#. If an equivalent record exists already, it will be overwritten with the parent company's values

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/multi-company/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/multi-company/issues/new?body=module:%20company_cascade%0Aversion:%2016.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.

Credits
=======

Authors
~~~~~~~

* Hunki Enterprises BV
* Moshchot Coop

Contributors
~~~~~~~~~~~~

* Holger Brunn <[email protected]> (https://hunki-enterprises.com)

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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.

.. |maintainer-hbrunn| image:: https://github.com/hbrunn.png?size=40px
:target: https://github.com/hbrunn
:alt: hbrunn

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-hbrunn|

This module is part of the `OCA/multi-company <https://github.com/OCA/multi-company/tree/16.0/company_cascade>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions company_cascade_category/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from . import wizards
21 changes: 21 additions & 0 deletions company_cascade_category/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2023 Hunki Enterprises BV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl-3.0)

{
"name": "Cascading companies (company category support)",
"summary": "Sync configuration from parent companies to children",
"version": "16.0.1.0.0",
"development_status": "Alpha",
"category": "Technical",
"website": "https://github.com/moshchot/BANKayma",
"author": "Hunki Enterprises BV, Odoo Community Association (OCA), Moshchot Coop",
"maintainers": ["hbrunn"],
"license": "AGPL-3",
"application": False,
"installable": True,
"preloadable": True,
"depends": ["company_cascade", "res_company_category"],
"data": [
"wizards/company_cascade_wizard.xml",
],
}
43 changes: 43 additions & 0 deletions company_cascade_category/i18n/he_IL.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * company_cascade
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-07-12 09:38+0000\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: he_IL\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: company_cascade_category
#: model:ir.model,name:company_cascade_category.model_company_cascade_wizard
msgid "Cascade records to child companies"
msgstr ""

#. module: company_cascade_category
#: model:ir.model,name:company_cascade_category.model_company_cascade_mixin
msgid "Cascade values to child companies"
msgstr ""

#. module: company_cascade_category
#: model:ir.model.fields,field_description:company_cascade_category.field_company_cascade_wizard__category_ids
msgid "Categories"
msgstr ""

#. module: company_cascade_category
#: model_terms:ir.ui.view,arch_db:company_cascade_category.view_company_cascade_wizard_form
msgid "Select company categories to cascade to"
msgstr ""

#. module: company_cascade_category
#: model_terms:ir.ui.view,arch_db:company_cascade_category.view_company_cascade_wizard_form
msgid ""
"You very probably should choose a category to restrict the\n"
" cascading."
msgstr ""
1 change: 1 addition & 0 deletions company_cascade_category/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import company_cascade_mixin
44 changes: 44 additions & 0 deletions company_cascade_category/models/company_cascade_mixin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Copyright 2024 Hunki Enterprises BV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).


from odoo import models


class CompanyCascadeMixin(models.AbstractModel):
_inherit = "company.cascade.mixin"

def _company_cascade_get_categories(self):
return self.env.context.get("company_cascade_catgory_categories") or self.env[
"res.company.category"
].search([])

def _company_cascade_get_companies(self):
categories = self._company_cascade_get_categories()
return (
super()
._company_cascade_get_companies()
.filtered(lambda x: not x.category_id or x.category_id in categories)
)

def _company_cascade_get_children(self):
categories = self._company_cascade_get_categories()
return (
super()
._company_cascade_get_children()
.filtered(
lambda x: not x.company_id.category_id
or x.company_id.category_id in categories
)
)

def _company_cascade_get_all(self, company=None):
categories = self._company_cascade_get_categories()
return (
super()
._company_cascade_get_all(company=company)
.filtered(
lambda x: not x.company_id.category_id
or x.company_id.category_id in categories
)
)
1 change: 1 addition & 0 deletions company_cascade_category/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Holger Brunn <[email protected]> (https://hunki-enterprises.com)
3 changes: 3 additions & 0 deletions company_cascade_category/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This module maintains relations between company specific records (think accounts, journals) of parent and child companies, enabling users to configure things in the parent company and then copy (=cascade) this configuration to child companies.

Originally conceived for financial hosting, this mechanism is useful for any setting where Odoo is used to manage multiple organizations that have a very similar financial configuration, but organizational units are a bad fit because the companies are different (legal) entities, or just need more independence from the parent company than OUs provide.
7 changes: 7 additions & 0 deletions company_cascade_category/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
To use this module, you need to:

#. Go to an account/journal/etc in your parent company
#. Click Actions/Cascade to child companies
#. Select the company categories to cascade to
#. If not existing yet, an equivalent record will be created in the child company
#. If an equivalent record exists already, it will be overwritten with the parent company's values
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading