-
-
Notifications
You must be signed in to change notification settings - Fork 766
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #598 from Eficent/11.0-mig-purchase_request_depart…
…ment [11.0] [MIG] purchase_request_department
- Loading branch information
Showing
27 changed files
with
1,156 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
server-tools | ||
product-attribute | ||
server-ux | ||
hr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
=========================== | ||
Purchase Request Department | ||
=========================== | ||
|
||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! 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%2Fpurchase--workflow-lightgray.png?logo=github | ||
:target: https://github.com/OCA/purchase-workflow/tree/11.0/purchase_request_department | ||
:alt: OCA/purchase-workflow | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/purchase-workflow-11-0/purchase-workflow-11-0-purchase_request_department | ||
:alt: Translate me on Weblate | ||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png | ||
:target: https://runbot.odoo-community.org/runbot/142/11.0 | ||
:alt: Try me on Runbot | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This module adds the user department in a new field in the purchase request | ||
form and allows to group by department on the tree view. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Usage | ||
===== | ||
|
||
When editing the 'purchase request' form and choosing the 'requested_by' field | ||
the requester's department will be automatically set. | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/purchase-workflow/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/purchase-workflow/issues/new?body=module:%20purchase_request_department%0Aversion:%2011.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 | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* Gisela Mora Comas <gisela.mora@eficent.com> | ||
* Héctor Villarreal <hector.villarreal@eficent.com> | ||
|
||
Other credits | ||
~~~~~~~~~~~~~ | ||
|
||
The development of this module has been financially supported by: | ||
|
||
.. image:: https://upload.wikimedia.org/wikipedia/en/3/3b/Aleph_Objects_Logo.png | ||
:alt: Aleph Objects, Inc | ||
:target: https://www.alephobjects.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/purchase-workflow <https://github.com/OCA/purchase-workflow/tree/11.0/purchase_request_department>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from . import models | ||
from .hooks import post_init_hook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Copyright 2017 Eficent Business and IT Consulting Services S.L. | ||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0). | ||
|
||
{ | ||
"name": "Purchase Request Department", | ||
"author": "Eficent, " | ||
"Odoo Community Association (OCA)", | ||
"version": "11.0.1.0.0", | ||
"website": "https://github.com/OCA/purchase-workflow", | ||
"category": "Purchase Management", | ||
"post_init_hook": "post_init_hook", | ||
"depends": [ | ||
"hr", | ||
"purchase_request" | ||
], | ||
"data": [ | ||
"views/purchase_request_department_view.xml" | ||
], | ||
"license": 'LGPL-3', | ||
"installable": True | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Copyright 2017 Eficent Business and IT Consulting Services S.L. | ||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0). | ||
from odoo import api, SUPERUSER_ID | ||
import logging | ||
|
||
_logger = logging.getLogger(__name__) | ||
|
||
|
||
def post_init_hook(cr, registry): | ||
"""Loaded after installing the module.""" | ||
with api.Environment.manage(): | ||
env = api.Environment(cr, SUPERUSER_ID, {}) | ||
purchase_requests = env['purchase.request'].search([]) | ||
_logger.info( | ||
"Adding the department to %d purchase requests", | ||
len(purchase_requests)) | ||
for purchase_request in purchase_requests: | ||
purchase_request.onchange_requested_by() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * purchase_request_department | ||
# | ||
# Translators: | ||
# OCA Transbot <transbot@odoo-community.org>, 2017 | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 9.0c\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2017-04-29 01:00+0000\n" | ||
"PO-Revision-Date: 2017-04-29 01:00+0000\n" | ||
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n" | ||
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" | ||
"Language: de\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: purchase_request_department | ||
#: model:ir.model.fields,field_description:purchase_request_department.field_purchase_request_department_id | ||
#: model:ir.model.fields,field_description:purchase_request_department.field_purchase_request_line_department_id | ||
#: model:ir.ui.view,arch_db:purchase_request_department.purchase_request_line_search | ||
#: model:ir.ui.view,arch_db:purchase_request_department.view_purchase_request_search | ||
msgid "Department" | ||
msgstr "Abteilung" | ||
|
||
#. module: purchase_request_department | ||
#: model:ir.model,name:purchase_request_department.model_purchase_request | ||
msgid "Purchase Request" | ||
msgstr "" | ||
|
||
#. module: purchase_request_department | ||
#: model:ir.model,name:purchase_request_department.model_purchase_request_line | ||
msgid "Purchase Request Line" | ||
msgstr "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * purchase_request_department | ||
# | ||
# Translators: | ||
# OCA Transbot <transbot@odoo-community.org>, 2017 | ||
# Pedro M. Baeza <pedro.baeza@gmail.com>, 2017 | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 9.0c\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2017-04-29 01:00+0000\n" | ||
"PO-Revision-Date: 2017-04-29 01:00+0000\n" | ||
"Last-Translator: Pedro M. Baeza <pedro.baeza@gmail.com>, 2017\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" | ||
|
||
#. module: purchase_request_department | ||
#: model:ir.model.fields,field_description:purchase_request_department.field_purchase_request_department_id | ||
#: model:ir.model.fields,field_description:purchase_request_department.field_purchase_request_line_department_id | ||
#: model:ir.ui.view,arch_db:purchase_request_department.purchase_request_line_search | ||
#: model:ir.ui.view,arch_db:purchase_request_department.view_purchase_request_search | ||
msgid "Department" | ||
msgstr "Departamento" | ||
|
||
#. module: purchase_request_department | ||
#: model:ir.model,name:purchase_request_department.model_purchase_request | ||
msgid "Purchase Request" | ||
msgstr "Petición de compra" | ||
|
||
#. module: purchase_request_department | ||
#: model:ir.model,name:purchase_request_department.model_purchase_request_line | ||
msgid "Purchase Request Line" | ||
msgstr "Línea de petición de compra" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * purchase_request_department | ||
# | ||
# Translators: | ||
# OCA Transbot <transbot@odoo-community.org>, 2017 | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 9.0c\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2017-04-29 01:00+0000\n" | ||
"PO-Revision-Date: 2017-04-29 01:00+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: purchase_request_department | ||
#: model:ir.model.fields,field_description:purchase_request_department.field_purchase_request_department_id | ||
#: model:ir.model.fields,field_description:purchase_request_department.field_purchase_request_line_department_id | ||
#: model:ir.ui.view,arch_db:purchase_request_department.purchase_request_line_search | ||
#: model:ir.ui.view,arch_db:purchase_request_department.view_purchase_request_search | ||
msgid "Department" | ||
msgstr "Département" | ||
|
||
#. module: purchase_request_department | ||
#: model:ir.model,name:purchase_request_department.model_purchase_request | ||
msgid "Purchase Request" | ||
msgstr "Demande d'achat" | ||
|
||
#. module: purchase_request_department | ||
#: model:ir.model,name:purchase_request_department.model_purchase_request_line | ||
msgid "Purchase Request Line" | ||
msgstr "Ligne de demande d'achat" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * purchase_request_department | ||
# | ||
# Translators: | ||
# OCA Transbot <transbot@odoo-community.org>, 2017 | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 9.0c\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2017-04-29 01:00+0000\n" | ||
"PO-Revision-Date: 2017-04-29 01:00+0000\n" | ||
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\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: purchase_request_department | ||
#: model:ir.model.fields,field_description:purchase_request_department.field_purchase_request_department_id | ||
#: model:ir.model.fields,field_description:purchase_request_department.field_purchase_request_line_department_id | ||
#: model:ir.ui.view,arch_db:purchase_request_department.purchase_request_line_search | ||
#: model:ir.ui.view,arch_db:purchase_request_department.view_purchase_request_search | ||
msgid "Department" | ||
msgstr "Odjel" | ||
|
||
#. module: purchase_request_department | ||
#: model:ir.model,name:purchase_request_department.model_purchase_request | ||
msgid "Purchase Request" | ||
msgstr "" | ||
|
||
#. module: purchase_request_department | ||
#: model:ir.model,name:purchase_request_department.model_purchase_request_line | ||
msgid "Purchase Request Line" | ||
msgstr "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * purchase_request_department | ||
# | ||
# Translators: | ||
# Paolo Valier <paolo.valier@hotmail.it>, 2017 | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 9.0c\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2017-04-29 01:00+0000\n" | ||
"PO-Revision-Date: 2017-04-29 01:00+0000\n" | ||
"Last-Translator: Paolo Valier <paolo.valier@hotmail.it>, 2017\n" | ||
"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n" | ||
"Language: it\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: purchase_request_department | ||
#: model:ir.model.fields,field_description:purchase_request_department.field_purchase_request_department_id | ||
#: model:ir.model.fields,field_description:purchase_request_department.field_purchase_request_line_department_id | ||
#: model:ir.ui.view,arch_db:purchase_request_department.purchase_request_line_search | ||
#: model:ir.ui.view,arch_db:purchase_request_department.view_purchase_request_search | ||
msgid "Department" | ||
msgstr "Dipartimento" | ||
|
||
#. module: purchase_request_department | ||
#: model:ir.model,name:purchase_request_department.model_purchase_request | ||
msgid "Purchase Request" | ||
msgstr "" | ||
|
||
#. module: purchase_request_department | ||
#: model:ir.model,name:purchase_request_department.model_purchase_request_line | ||
msgid "Purchase Request Line" | ||
msgstr "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * purchase_request_department | ||
# | ||
# Translators: | ||
# OCA Transbot <transbot@odoo-community.org>, 2017 | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 9.0c\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2017-04-29 01:00+0000\n" | ||
"PO-Revision-Date: 2017-04-29 01:00+0000\n" | ||
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n" | ||
"Language-Team: Norwegian Bokmål (https://www.transifex.com/oca/teams/23907/" | ||
"nb/)\n" | ||
"Language: nb\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: purchase_request_department | ||
#: model:ir.model.fields,field_description:purchase_request_department.field_purchase_request_department_id | ||
#: model:ir.model.fields,field_description:purchase_request_department.field_purchase_request_line_department_id | ||
#: model:ir.ui.view,arch_db:purchase_request_department.purchase_request_line_search | ||
#: model:ir.ui.view,arch_db:purchase_request_department.view_purchase_request_search | ||
msgid "Department" | ||
msgstr "Avdeling" | ||
|
||
#. module: purchase_request_department | ||
#: model:ir.model,name:purchase_request_department.model_purchase_request | ||
msgid "Purchase Request" | ||
msgstr "" | ||
|
||
#. module: purchase_request_department | ||
#: model:ir.model,name:purchase_request_department.model_purchase_request_line | ||
msgid "Purchase Request Line" | ||
msgstr "" |
Oops, something went wrong.