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

[16.0][MIG] product_multi_company #459

Closed
wants to merge 38 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
8bb010f
product_multi_company
pedrobaeza Nov 28, 2015
55836a9
product_multi_company: Migration to 9.0
pedrobaeza Dec 6, 2016
74f6f43
OCA Transbot updated translations from Transifex
oca-transbot Dec 10, 2016
7fac7f5
[MIG] product_multi_company: Upgrade to v10
lasley Dec 26, 2016
50a9c74
OCA Transbot updated translations from Transifex
oca-transbot Jun 17, 2017
c8956d6
[MIG] *_multi_company: OpenUpgrade migration scripts
pedrobaeza Dec 15, 2017
7a3c40a
OCA Transbot updated translations from Transifex
oca-transbot Dec 30, 2017
fb23ce9
[MIG] product_multi_company: Migration to 11.0
cubells Nov 16, 2018
b3f92e0
[UPD] Update product_multi_company.pot
oca-travis Jan 17, 2019
c1f729c
[MIG] product_multi_company: Remove migration scripts
pedrobaeza Jan 18, 2019
c0d73b6
Migrate product_multi_company to version 12
florian-dacosta May 4, 2019
0c03d88
Fix product_multi_company description
florian-dacosta Jan 20, 2020
00e8b00
[UPD] Update product_multi_company.pot
oca-travis Mar 9, 2020
d4a042c
[UPD] README.rst
OCA-git-bot Mar 9, 2020
30d1897
Update translation files
oca-transbot Mar 9, 2020
fb0bcdc
Update translation files
oca-transbot Mar 17, 2020
b7604ab
[IMP] product_multi_company: black, isort, prettier
JoanSForgeFlow Mar 30, 2020
db6281a
[MIG] product_multi_company: Migration to 13.0
JoanSForgeFlow Mar 30, 2020
bac1c28
[MIG]product_multi_company: Migration to 13.0 (continue)
AaronHForgeFlow Jun 23, 2020
c135a46
[UPD] Update product_multi_company.pot
oca-travis Jul 8, 2020
bd861e7
[UPD] README.rst
OCA-git-bot Jul 8, 2020
144a8d0
Update translation files
oca-transbot Jul 20, 2020
6fb76ed
[FIX] product_multi_company: integrate tests with product_variant_con…
Jan 12, 2021
f35582e
product_multi_company 13.0.1.0.1
OCA-git-bot Jan 12, 2021
e643c29
Translated using Weblate (Spanish)
anasuarez1 Mar 9, 2021
8fc4b2c
[IMP] product_multi_company: black, isort, prettier
rousseldenis Mar 9, 2021
f4b043d
[14.0][MIG] product_multi_company
rousseldenis Mar 9, 2021
cc0e31b
[14.0][IMP] product_multi_company: Add tests common class
rousseldenis Jun 23, 2021
4efe124
[14.0][IMP] product_multi_company: Create products not shared in corr…
rousseldenis Jun 23, 2021
c328ba9
[14.0][FIX] product_multi_company: Add no_company_ids field
rousseldenis Jul 6, 2021
4801fee
[14.0][FIX] product_multi_company: Remove migration script
rousseldenis Jul 6, 2021
e2e9a25
[40.0][IMP] product_multi_company: Add methods helpers for tests
rousseldenis Jul 7, 2021
8266140
[MIG] product_multi_company: Migration to 15.0
JasminSForgeFlow Feb 21, 2022
4ad205e
[UPD] Update product_multi_company.pot
Apr 26, 2022
9bf5d2f
[UPD] README.rst
OCA-git-bot Apr 26, 2022
f4388f1
[UPD] README.rst
OCA-git-bot Sep 3, 2023
55ebf5b
[MIG] product_multi_company: black, isort, prettier
prabakaran04 Sep 26, 2023
5bde459
[MIG] product_multi_company: Migration to 16.0
prabakaran04 Sep 26, 2023
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
101 changes: 101 additions & 0 deletions product_multi_company/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
=====================
Product multi-company
=====================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:e9d144abde4c3a6c4fce9d56ba304ce6ed90d13981880fb7e3854c53d793f169
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |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/product_multi_company
: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-product_multi_company
: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/multi-company&target_branch=16.0
:alt: Try me on Runboat

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

This modules allows to select in which of the companies you want to use each of the product templates.

**Table of contents**

.. contents::
:local:

Installation
============

This module uses the post and uninstall hooks for updating default product
template security rule. This only means that updating the module will not
restore the security rule this module changes. Only a complete removal and
reinstallation will serve.

Usage
=====

On the product form view, go to the "Information" tab, and put the companies
in which you want to use that product. If none is selected, the product will
be visible in all of them. The default value is the current one.

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 to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/multi-company/issues/new?body=module:%20product_multi_company%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
~~~~~~~

* Tecnativa

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

* Pedro M. Baeza <pedro.baeza@tecnativa.com>
* Dave Lasley <dave@laslabs.com>
* `Tecnativa <https://www.tecnativa.com>`_:

* Vicent Cubells <vicent.cubells@tecnativa.com>
* Denis Roussel <denis.roussel@acsone.eu>

* `Sodexis <https://sodexis.com>`_:

* Prabakaran <prabakaran@sodexis.com>
* Karthik <karthik@sodexis.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.

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

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions product_multi_company/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import models
from .hooks import post_init_hook
from .hooks import uninstall_hook
16 changes: 16 additions & 0 deletions product_multi_company/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2015-2016 Pedro M. Baeza <pedro.baeza@tecnativa.com>
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

{
"name": "Product multi-company",
"summary": "Select individually the product template visibility on each " "company",
"author": "Tecnativa," "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/multi-company",
"category": "Product Management",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"depends": ["base_multi_company", "product", "stock"],
"data": ["views/product_template_view.xml"],
"post_init_hook": "post_init_hook",
"uninstall_hook": "uninstall_hook",
}
34 changes: 34 additions & 0 deletions product_multi_company/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright 2015-2016 Pedro M. Baeza <pedro.baeza@tecnativa.com>
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html

import logging

from odoo import SUPERUSER_ID, api

_logger = logging.getLogger(__name__)

try:
from odoo.addons.base_multi_company import hooks
except ImportError:
_logger.info("Cannot find `base_multi_company` module in addons path.")

Check warning on line 13 in product_multi_company/hooks.py

View check run for this annotation

Codecov / codecov/patch

product_multi_company/hooks.py#L12-L13

Added lines #L12 - L13 were not covered by tests


def post_init_hook(cr, registry):
env = api.Environment(cr, SUPERUSER_ID, {})
# Change access rule
rule = env.ref("product.product_comp_rule")
rule.write(
{
"domain_force": (
"['|', ('company_ids', 'in', company_ids),"
"('company_ids', '=', False)]"
),
}
)


def uninstall_hook(cr, registry):
hooks.uninstall_hook(
cr,
"product.product_comp_rule",
)
43 changes: 43 additions & 0 deletions product_multi_company/i18n/es.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:
# * product_multi_company
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-15 16:43+0000\n"
"PO-Revision-Date: 2021-03-09 10:45+0000\n"
"Last-Translator: Ana Suárez <ana.suarez@qubiq.es>\n"
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.3.2\n"

#. module: product_multi_company
#: model:ir.model,name:product_multi_company.model_product_category
msgid "Product Category"
msgstr "Categoría de producto"

#. module: product_multi_company
#: model:ir.model,name:product_multi_company.model_product_template
msgid "Product Template (Multi-Company)"
msgstr "Plantilla de producto (multi-compañía)"

#. module: product_multi_company
#: model:ir.model.fields,field_description:product_multi_company.field_product_category__route_ids
msgid "Routes"
msgstr "Rutas"

#. module: product_multi_company
#: model:ir.model.fields,field_description:product_multi_company.field_product_category__total_route_ids
msgid "Total routes"
msgstr "Total de rutas"

#~ msgid "Companies"
#~ msgstr "Compañías"
42 changes: 42 additions & 0 deletions product_multi_company/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_multi_company
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-15 16:43+0000\n"
"PO-Revision-Date: 2017-06-15 16:43+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"

#. module: product_multi_company
#: model:ir.model,name:product_multi_company.model_product_category
msgid "Product Category"
msgstr ""

#. module: product_multi_company
#: model:ir.model,name:product_multi_company.model_product_template
msgid "Product Template (Multi-Company)"
msgstr ""

#. module: product_multi_company
#: model:ir.model.fields,field_description:product_multi_company.field_product_category__route_ids
msgid "Routes"
msgstr ""

#. module: product_multi_company
#: model:ir.model.fields,field_description:product_multi_company.field_product_category__total_route_ids
msgid "Total routes"
msgstr ""

#~ msgid "Companies"
#~ msgstr "Sociétés"
43 changes: 43 additions & 0 deletions product_multi_company/i18n/hr.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:
# * product_multi_company
#
# Translators:
# Bole <bole@dajmi5.com>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-01-27 07:37+0000\n"
"PO-Revision-Date: 2018-01-27 07:37+0000\n"
"Last-Translator: Bole <bole@dajmi5.com>, 2018\n"
"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n"
"Language: hr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"

#. module: product_multi_company
#: model:ir.model,name:product_multi_company.model_product_category
msgid "Product Category"
msgstr ""

#. module: product_multi_company
#: model:ir.model,name:product_multi_company.model_product_template
msgid "Product Template (Multi-Company)"
msgstr "Predložak proizvoda ( više tvrtki)"

#. module: product_multi_company
#: model:ir.model.fields,field_description:product_multi_company.field_product_category__route_ids
msgid "Routes"
msgstr ""

#. module: product_multi_company
#: model:ir.model.fields,field_description:product_multi_company.field_product_category__total_route_ids
msgid "Total routes"
msgstr ""

#~ msgid "Companies"
#~ msgstr "Tvrtke"
43 changes: 43 additions & 0 deletions product_multi_company/i18n/nl_NL.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:
# * product_multi_company
#
# Translators:
# Peter Hageman <hageman.p@gmail.com>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-15 16:43+0000\n"
"PO-Revision-Date: 2017-06-15 16:43+0000\n"
"Last-Translator: Peter Hageman <hageman.p@gmail.com>, 2017\n"
"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/"
"teams/23907/nl_NL/)\n"
"Language: nl_NL\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: product_multi_company
#: model:ir.model,name:product_multi_company.model_product_category
msgid "Product Category"
msgstr ""

#. module: product_multi_company
#: model:ir.model,name:product_multi_company.model_product_template
msgid "Product Template (Multi-Company)"
msgstr "Productsjabloon (Meerdere Bedrijven)"

#. module: product_multi_company
#: model:ir.model.fields,field_description:product_multi_company.field_product_category__route_ids
msgid "Routes"
msgstr ""

#. module: product_multi_company
#: model:ir.model.fields,field_description:product_multi_company.field_product_category__total_route_ids
msgid "Total routes"
msgstr ""

#~ msgid "Companies"
#~ msgstr "Bedrijven"
49 changes: 49 additions & 0 deletions product_multi_company/i18n/product_multi_company.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * product_multi_company
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: product_multi_company
#: model:ir.model.fields,field_description:product_multi_company.field_product_template__company_ids
msgid "Companies"
msgstr ""

#. module: product_multi_company
#: model:ir.model.fields,field_description:product_multi_company.field_product_template__company_id
msgid "Company"
msgstr ""

#. module: product_multi_company
#: model:ir.model.fields,field_description:product_multi_company.field_product_template__no_company_ids
msgid "No Companies"
msgstr ""

#. module: product_multi_company
#: model:ir.model,name:product_multi_company.model_product_category
msgid "Product Category"
msgstr ""

#. module: product_multi_company
#: model:ir.model,name:product_multi_company.model_product_template
msgid "Product Template (Multi-Company)"
msgstr ""

#. module: product_multi_company
#: model:ir.model.fields,field_description:product_multi_company.field_product_category__route_ids
msgid "Routes"
msgstr ""

#. module: product_multi_company
#: model:ir.model.fields,field_description:product_multi_company.field_product_category__total_route_ids
msgid "Total routes"
msgstr ""
Loading
Loading