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

[MIG] stock_request_direction: Migration to 18.0 #53

Open
wants to merge 25 commits into
base: 18.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f2ee60c
[ADD] stock_request_direction
max3903 Jul 30, 2019
74da018
[FIX] Method Name
osi-scampbell Aug 6, 2019
8fb2355
stock_request_direction 12.0.1.0.1
OCA-git-bot Aug 10, 2019
90fb29a
Added translation using Weblate (Chinese (Simplified))
liweijie0812 Oct 16, 2019
10f2da3
Added translation using Weblate (Spanish)
max3903 Nov 1, 2019
a4b02c5
[IMP] stock_request_direction: black, isort
ps-tubtim Mar 13, 2020
1a491e6
[MIG] stock_request_direction: Migration to 13.0
ps-tubtim Oct 16, 2020
4846ca0
Update translation files
oca-transbot Oct 20, 2020
d6547cf
[IMP] Warehouse On Change
patrickrwilson Mar 23, 2020
48599ad
[IMP] Add warehouse_id to existing onchange.
patrickrwilson Apr 1, 2020
d2e1083
[FIX] Conflict with stock_request onchange method
patrickrwilson Apr 16, 2020
6ea5896
[FIX] stock.request's location_id conflict with stock.request.order's
kittiu Apr 15, 2021
219ddf4
pre-commit fix
kittiu Apr 15, 2021
bb641cf
stock_request_direction 13.0.1.0.1
OCA-git-bot Apr 19, 2021
90e255d
[MIG] stock_request_direction
kittiu Apr 19, 2021
484bb8e
[FIX]stock_request_direction: fixed an error while on click on one2ma…
vimalpatelserpentcs Sep 2, 2021
ffc8ca1
Update translation files
weblate Oct 9, 2023
0250220
Added translation using Weblate (Italian)
mymage Dec 18, 2023
20e2646
[IMP] : pre-commit stuff
peluko00 Apr 11, 2024
986ed65
[MIG] stock_request_direction: Migration to 16.0
peluko00 Apr 11, 2024
8d98a58
Update translation files
weblate Jun 11, 2024
90438d2
[IMP] stock_request_direction: pre-commit auto fixes
peluko00 Jun 11, 2024
cd848c6
[MIG] stock_request_direction: Migration to 17.0
peluko00 Jun 11, 2024
eab5800
Update translation files
weblate Jun 13, 2024
e5b81db
[MIG] stock_request_direction: Migration to 18.0
SMaciasOSI Jan 7, 2025
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
122 changes: 122 additions & 0 deletions stock_request_direction/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
========================
Stock Requests Direction
========================

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

.. |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%2Fstock--logistics--request-lightgray.png?logo=github
:target: https://github.com/OCA/stock-logistics-request/tree/18.0/stock_request_direction
:alt: OCA/stock-logistics-request
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/stock-logistics-request-18-0/stock-logistics-request-18-0-stock_request_direction
: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/stock-logistics-request&target_branch=18.0
:alt: Try me on Runboat

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

This module was written to allow users to request products to be
transferred from or to your warehouses. They can specify the direction
and don't have to bother selecting the inventory location.

**Table of contents**

.. contents::
:local:

Usage
=====

Creation
--------

- Go to Stock Requests > Stock Requests
- Create or select a stock request
- Provide a product, quantity, direction and expected date
- Click Confirm

Upon confirmation, the request will be reviewed by the warehouse team
who can define the appropriate route.

In case that transfers are created, the user will be able to access to
them from the button 'Transfers' available in the Stock Request.

Cancel
------

When the user cancels a Stock Request, the related pending stock moves
will be also cancelled.

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/stock-logistics-request/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/stock-logistics-request/issues/new?body=module:%20stock_request_direction%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.

Credits
=======

Authors
-------

* Open Source Integrators

Contributors
------------

- `Open Source Integrators <https://www.opensourceintegrators.com>`__

- Maxime Chambreuil <[email protected]>
- Steve Campbell <[email protected]>
- Freni Patel <[email protected]>

- `Ecosoft <http://ecosoft.co.th>`__:

- Pimolnat Suntian <[email protected]>
- Kitti U. <[email protected]>

- `APSL-Nagarro <https://apsl.tech>`__:

- Antoni Marroig <[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.

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

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

|maintainer-max3903|

This module is part of the `OCA/stock-logistics-request <https://github.com/OCA/stock-logistics-request/tree/18.0/stock_request_direction>`_ 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 stock_request_direction/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (c) 2019 Open Source Integrators
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).

from . import models
21 changes: 21 additions & 0 deletions stock_request_direction/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright (c) 2019 Open Source Integrators
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).

{
"name": "Stock Requests Direction",
"summary": "From or to your warehouse?",
"version": "18.0.1.0.0",
"license": "LGPL-3",
"website": "https://github.com/OCA/stock-logistics-request",
"author": "Open Source Integrators, Odoo Community Association (OCA)",
"category": "Warehouse Management",
"depends": ["stock_request"],
"data": [
"views/res_config_settings.xml",
"views/stock_request_views.xml",
"views/stock_request_order_views.xml",
],
"application": False,
"development_status": "Beta",
"maintainers": ["max3903"],
}
45 changes: 45 additions & 0 deletions stock_request_direction/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_request_direction
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2020-01-17 05:13+0000\n"
"Last-Translator: Nelson Ramírez Sánchez <[email protected]>\n"
"Language-Team: none\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 3.10\n"

#. module: stock_request_direction
#: model:ir.model.fields,field_description:stock_request_direction.field_stock_request__direction
#: model:ir.model.fields,field_description:stock_request_direction.field_stock_request_order__direction
msgid "Direction"
msgstr "Sentido"

#. module: stock_request_direction
#: model:ir.model.fields.selection,name:stock_request_direction.selection__stock_request__direction__inbound
#: model:ir.model.fields.selection,name:stock_request_direction.selection__stock_request_order__direction__inbound
msgid "Inbound"
msgstr "Entrante"

#. module: stock_request_direction
#: model:ir.model.fields.selection,name:stock_request_direction.selection__stock_request__direction__outbound
#: model:ir.model.fields.selection,name:stock_request_direction.selection__stock_request_order__direction__outbound
msgid "Outbound"
msgstr "Saliente"

#. module: stock_request_direction
#: model:ir.model,name:stock_request_direction.model_stock_request
msgid "Stock Request"
msgstr "Solicitud de Existencias"

#. module: stock_request_direction
#: model:ir.model,name:stock_request_direction.model_stock_request_order
msgid "Stock Request Order"
msgstr "Pedido de Existencia"
54 changes: 54 additions & 0 deletions stock_request_direction/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_request_direction
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-01-15 11:34+0000\n"
"Last-Translator: mymage <[email protected]>\n"
"Language-Team: none\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"
"X-Generator: Weblate 4.17\n"

#. module: stock_request_direction
#: model:ir.model.fields,field_description:stock_request_direction.field_stock_request__direction
#: model:ir.model.fields,field_description:stock_request_direction.field_stock_request_order__direction
msgid "Direction"
msgstr "Direzione"

#. module: stock_request_direction
#: model:ir.model.fields.selection,name:stock_request_direction.selection__stock_request__direction__inbound
#: model:ir.model.fields.selection,name:stock_request_direction.selection__stock_request_order__direction__inbound
msgid "Inbound"
msgstr "In entrata"

#. module: stock_request_direction
#: model:ir.model.fields.selection,name:stock_request_direction.selection__stock_request__direction__outbound
#: model:ir.model.fields.selection,name:stock_request_direction.selection__stock_request_order__direction__outbound
msgid "Outbound"
msgstr "In uscita"

#. module: stock_request_direction
#: model:ir.model,name:stock_request_direction.model_stock_request
msgid "Stock Request"
msgstr "Richiesta di magazzino"

#. module: stock_request_direction
#: model:ir.model,name:stock_request_direction.model_stock_request_order
msgid "Stock Request Order"
msgstr "Ordine richiesta di magazzino"

#~ msgid "Display Name"
#~ msgstr "Nome visualizzato"

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

#~ msgid "Last Modified on"
#~ msgstr "Ultima modifica il"
42 changes: 42 additions & 0 deletions stock_request_direction/i18n/stock_request_direction.pot
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:
# * stock_request_direction
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.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: stock_request_direction
#: model:ir.model.fields,field_description:stock_request_direction.field_stock_request__direction
#: model:ir.model.fields,field_description:stock_request_direction.field_stock_request_order__direction
msgid "Direction"
msgstr ""

#. module: stock_request_direction
#: model:ir.model.fields.selection,name:stock_request_direction.selection__stock_request__direction__inbound
#: model:ir.model.fields.selection,name:stock_request_direction.selection__stock_request_order__direction__inbound
msgid "Inbound"
msgstr ""

#. module: stock_request_direction
#: model:ir.model.fields.selection,name:stock_request_direction.selection__stock_request__direction__outbound
#: model:ir.model.fields.selection,name:stock_request_direction.selection__stock_request_order__direction__outbound
msgid "Outbound"
msgstr ""

#. module: stock_request_direction
#: model:ir.model,name:stock_request_direction.model_stock_request
msgid "Stock Request"
msgstr ""

#. module: stock_request_direction
#: model:ir.model,name:stock_request_direction.model_stock_request_order
msgid "Stock Request Order"
msgstr ""
45 changes: 45 additions & 0 deletions stock_request_direction/i18n/zh_CN.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_request_direction
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2019-10-16 15:58+0000\n"
"Last-Translator: 黎伟杰 <[email protected]>\n"
"Language-Team: none\n"
"Language: zh_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 3.8\n"

#. module: stock_request_direction
#: model:ir.model.fields,field_description:stock_request_direction.field_stock_request__direction
#: model:ir.model.fields,field_description:stock_request_direction.field_stock_request_order__direction
msgid "Direction"
msgstr "方向"

#. module: stock_request_direction
#: model:ir.model.fields.selection,name:stock_request_direction.selection__stock_request__direction__inbound
#: model:ir.model.fields.selection,name:stock_request_direction.selection__stock_request_order__direction__inbound
msgid "Inbound"
msgstr "入库"

#. module: stock_request_direction
#: model:ir.model.fields.selection,name:stock_request_direction.selection__stock_request__direction__outbound
#: model:ir.model.fields.selection,name:stock_request_direction.selection__stock_request_order__direction__outbound
msgid "Outbound"
msgstr "出库"

#. module: stock_request_direction
#: model:ir.model,name:stock_request_direction.model_stock_request
msgid "Stock Request"
msgstr "库存请求"

#. module: stock_request_direction
#: model:ir.model,name:stock_request_direction.model_stock_request_order
msgid "Stock Request Order"
msgstr "库存请求单"
5 changes: 5 additions & 0 deletions stock_request_direction/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2019 Open Source Integrators
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).

from . import stock_request
from . import stock_request_order
22 changes: 22 additions & 0 deletions stock_request_direction/models/stock_request.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright (c) 2019 Open Source Integrators
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).

from odoo import api, fields, models


class StockRequest(models.Model):
_inherit = "stock.request"

direction = fields.Selection(
[("outbound", "Outbound"), ("inbound", "Inbound")],
)

@api.onchange("direction")
def _onchange_location_id(self):
if not self._context.get("default_location_id"):
if self.direction == "outbound":
# Stock Location set to Partner Locations/Customers
self.location_id = self.company_id.partner_id.property_stock_customer.id
else:
# Otherwise the Stock Location of the Warehouse
self.location_id = self.warehouse_id.lot_stock_id.id
Loading
Loading