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] purchase_request_operating_unit #640

Open
wants to merge 16 commits into
base: 16.0
Choose a base branch
from
Open
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
95 changes: 95 additions & 0 deletions purchase_request_operating_unit/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
===================================
Operating Unit in Purchase Requests
===================================

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

.. |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-LGPL--3-blue.png
: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/16.0/purchase_request_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-16-0/operating-unit-16-0-purchase_request_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/webui/builds.html?repo=OCA/operating-unit&target_branch=16.0
:alt: Try me on Runboat

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

This module introduces the following features:

* Adds the Operating Unit (OU) to the Purchase Request.

* The user’s default Operating Unit (OU) is proposed at the time of creating the Purchase Request.

* Security rules are defined to ensure that users can only see the Purchase Request of that Operating Units in which they are allowed access to.

**Table of contents**

.. contents::
:local:

Usage
=====

Follow these steps:

#. Create or use an existing Operating Unit (OU) in Settings ->
Users & Configuration -> Operating Unit.
#. Change the configuration of the Users. In Application Accesses, put an User
as Request manager and another one as Request User.
#. Create a Purchase Request Order. By default, if there is no Approver, any
Manager with the same OU can accept the PO. If you specify an Approver, he
must be in the same Operating Unit as the Purchase Request.

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 smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/operating-unit/issues/new?body=module:%20purchase_request_operating_unit%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
~~~~~~~

* Eficent
* SerpentCS

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

* Jordi Ballester Alomar <[email protected]>
* Serpent Consulting Services Pvt. Ltd. <[email protected]>
* Saran Lim. <[email protected]>

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/operating-unit <https://github.com/OCA/operating-unit/tree/16.0/purchase_request_operating_unit>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions purchase_request_operating_unit/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).

from . import model
from . import wizard
20 changes: 20 additions & 0 deletions purchase_request_operating_unit/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2016-19 ForgeFlow S.L.
# Copyright 2016-19 Serpent Consulting Services Pvt. Ltd.
# (<http://www.serpentcs.com>)
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).

{
"name": "Operating Unit in Purchase Requests",
"version": "16.0.1.0.0",
"author": "Eficent, SerpentCS, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/operating-unit",
"license": "LGPL-3",
"category": "Purchase Management",
"depends": ["purchase_request", "purchase_operating_unit", "stock_operating_unit"],
"data": [
"security/purchase_security.xml",
"view/purchase_request_view.xml",
"wizard/purchase_request_line_make_purchase_order_view.xml",
],
"installable": True,
}
99 changes: 99 additions & 0 deletions purchase_request_operating_unit/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * purchase_request_operating_unit
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2022-06-28 11:05+0000\n"
"Last-Translator: Khalid Hazam <[email protected]>\n"
"Language-Team: none\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"
"X-Generator: Weblate 4.3.2\n"

#. module: purchase_request_operating_unit
#: code:addons/purchase_request_operating_unit/model/purchase_request.py:0
#, python-format
msgid ""
"Configuration error. The Purchase Request and the Warehouse of picking type "
"must belong to the same Operating Unit."
msgstr ""

#. module: purchase_request_operating_unit
#: code:addons/purchase_request_operating_unit/model/purchase_request.py:0
#, fuzzy, python-format
msgid "Configuration error. The approver has not the indicated Operating Unit"
msgstr ""
"Erreur de configuration. L’approbateur n'a pas l'unité opérationnelle "
"indiquée"

#. module: purchase_request_operating_unit
#: code:addons/purchase_request_operating_unit/wizard/purchase_request_line_make_purchase_order.py:0
#, fuzzy, python-format
msgid ""
"Could not process !You have to select linesfrom the same operating unit."
msgstr ""
"Impossible de traiter ! Vous devez sélectionner les lignes de la même unité "
"opérationnelle."

#. module: purchase_request_operating_unit
#: model:ir.model.fields,field_description:purchase_request_operating_unit.field_purchase_request__operating_unit_id
#: model:ir.model.fields,field_description:purchase_request_operating_unit.field_purchase_request_line__operating_unit_id
#: model:ir.model.fields,field_description:purchase_request_operating_unit.field_purchase_request_line_make_purchase_order__operating_unit_id
#: model_terms:ir.ui.view,arch_db:purchase_request_operating_unit.purchase_request_line_search
#: model_terms:ir.ui.view,arch_db:purchase_request_operating_unit.view_purchase_request_search
msgid "Operating Unit"
msgstr "Unité opérationnelle"

#. module: purchase_request_operating_unit
#: model:ir.model,name:purchase_request_operating_unit.model_purchase_request
msgid "Purchase Request"
msgstr "Demande d'achat"

#. module: purchase_request_operating_unit
#: model:ir.model,name:purchase_request_operating_unit.model_purchase_request_line
msgid "Purchase Request Line"
msgstr "Ligne de la demande d'achat"

#. module: purchase_request_operating_unit
#: model:ir.model,name:purchase_request_operating_unit.model_purchase_request_line_make_purchase_order
#, fuzzy
msgid "Purchase Request Line Make Purchase Order"
msgstr "Ligne de demande d'achat fait Bon de commande"

#. module: purchase_request_operating_unit
#: model:ir.model,name:purchase_request_operating_unit.model_stock_rule
msgid "Stock Rule"
msgstr ""

#. module: purchase_request_operating_unit
#: code:addons/purchase_request_operating_unit/model/purchase_request.py:0
#, python-format
msgid ""
"The Company in the Purchase Request and in the Operating Unit must bethe "
"same."
msgstr ""
"La société sur la demande d'achat et sur l'unité opérationnelle doit être la "
"même."

#, python-format
#~ msgid ""
#~ "Configuration error. The Purchase Request and theWarehouse of picking "
#~ "type must belong to the same Operating Unit."
#~ msgstr ""
#~ "Erreur de configuration. La demande d'achat et l'entrepôt de prélèvement "
#~ "doivent appartenir à la même unité opérationnelle."

#~ msgid "Display Name"
#~ msgstr "Nom affiché"

#~ msgid "ID"
#~ msgstr "ID"

#~ msgid "Last Modified on"
#~ msgstr "Dernière modification le"
75 changes: 75 additions & 0 deletions purchase_request_operating_unit/i18n/pt.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * purchase_request_operating_unit
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2020-02-29 15:13+0000\n"
"Last-Translator: Pedro Castro Silva <[email protected]>\n"
"Language-Team: none\n"
"Language: pt\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 3.10\n"

#. module: purchase_request_operating_unit
#: code:addons/purchase_request_operating_unit/model/purchase_request.py:0
#, python-format
msgid ""
"Configuration error. The Purchase Request and the Warehouse of picking type "
"must belong to the same Operating Unit."
msgstr ""

#. module: purchase_request_operating_unit
#: code:addons/purchase_request_operating_unit/model/purchase_request.py:0
#, python-format
msgid "Configuration error. The approver has not the indicated Operating Unit"
msgstr ""

#. module: purchase_request_operating_unit
#: code:addons/purchase_request_operating_unit/wizard/purchase_request_line_make_purchase_order.py:0
#, python-format
msgid ""
"Could not process !You have to select linesfrom the same operating unit."
msgstr ""

#. module: purchase_request_operating_unit
#: model:ir.model.fields,field_description:purchase_request_operating_unit.field_purchase_request__operating_unit_id
#: model:ir.model.fields,field_description:purchase_request_operating_unit.field_purchase_request_line__operating_unit_id
#: model:ir.model.fields,field_description:purchase_request_operating_unit.field_purchase_request_line_make_purchase_order__operating_unit_id
#: model_terms:ir.ui.view,arch_db:purchase_request_operating_unit.purchase_request_line_search
#: model_terms:ir.ui.view,arch_db:purchase_request_operating_unit.view_purchase_request_search
msgid "Operating Unit"
msgstr "Unidade Operacional"

#. module: purchase_request_operating_unit
#: model:ir.model,name:purchase_request_operating_unit.model_purchase_request
msgid "Purchase Request"
msgstr ""

#. module: purchase_request_operating_unit
#: model:ir.model,name:purchase_request_operating_unit.model_purchase_request_line
msgid "Purchase Request Line"
msgstr ""

#. module: purchase_request_operating_unit
#: model:ir.model,name:purchase_request_operating_unit.model_purchase_request_line_make_purchase_order
msgid "Purchase Request Line Make Purchase Order"
msgstr ""

#. module: purchase_request_operating_unit
#: model:ir.model,name:purchase_request_operating_unit.model_stock_rule
msgid "Stock Rule"
msgstr ""

#. module: purchase_request_operating_unit
#: code:addons/purchase_request_operating_unit/model/purchase_request.py:0
#, python-format
msgid ""
"The Company in the Purchase Request and in the Operating Unit must bethe "
"same."
msgstr ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * purchase_request_operating_unit
#
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: purchase_request_operating_unit
#: code:addons/purchase_request_operating_unit/model/purchase_request.py:0
#, python-format
msgid ""
"Configuration error. The Purchase Request and the Warehouse of picking type "
"must belong to the same Operating Unit."
msgstr ""

#. module: purchase_request_operating_unit
#: code:addons/purchase_request_operating_unit/model/purchase_request.py:0
#, python-format
msgid "Configuration error. The approver has not the indicated Operating Unit"
msgstr ""

#. module: purchase_request_operating_unit
#: code:addons/purchase_request_operating_unit/wizard/purchase_request_line_make_purchase_order.py:0
#, python-format
msgid ""
"Could not process !You have to select linesfrom the same operating unit."
msgstr ""

#. module: purchase_request_operating_unit
#: model:ir.model.fields,field_description:purchase_request_operating_unit.field_purchase_request__operating_unit_id
#: model:ir.model.fields,field_description:purchase_request_operating_unit.field_purchase_request_line__operating_unit_id
#: model:ir.model.fields,field_description:purchase_request_operating_unit.field_purchase_request_line_make_purchase_order__operating_unit_id
#: model_terms:ir.ui.view,arch_db:purchase_request_operating_unit.purchase_request_line_search
#: model_terms:ir.ui.view,arch_db:purchase_request_operating_unit.view_purchase_request_search
msgid "Operating Unit"
msgstr ""

#. module: purchase_request_operating_unit
#: model:ir.model,name:purchase_request_operating_unit.model_purchase_request
msgid "Purchase Request"
msgstr ""

#. module: purchase_request_operating_unit
#: model:ir.model,name:purchase_request_operating_unit.model_purchase_request_line
msgid "Purchase Request Line"
msgstr ""

#. module: purchase_request_operating_unit
#: model:ir.model,name:purchase_request_operating_unit.model_purchase_request_line_make_purchase_order
msgid "Purchase Request Line Make Purchase Order"
msgstr ""

#. module: purchase_request_operating_unit
#: model:ir.model,name:purchase_request_operating_unit.model_stock_rule
msgid "Stock Rule"
msgstr ""

#. module: purchase_request_operating_unit
#: code:addons/purchase_request_operating_unit/model/purchase_request.py:0
#, python-format
msgid ""
"The Company in the Purchase Request and in the Operating Unit must bethe "
"same."
msgstr ""
4 changes: 4 additions & 0 deletions purchase_request_operating_unit/model/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).

from . import purchase_request
from . import stock_rule
Loading
Loading