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

[18.0] [MIG] stock_picking_backorder_strategy: Migration to 18.0 #1844

Open
wants to merge 24 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
24 commits
Select commit Hold shift + click to select a range
647e947
[ADD] add module stock_backorder_strategy
Aug 13, 2015
e5a6cd4
[MIG] Make modules uninstallable
pedrobaeza Oct 14, 2015
86cc646
[MIG] Rename manifest files
pedrobaeza Oct 6, 2016
29c43b0
[10.0][MIG] stock_picking_backorder_strategy
rousseldenis Jun 6, 2018
c419152
[MIG] stock_picking_backorder_strategy: Migration to 11.0
mgosai Dec 6, 2018
184bba2
[FIX] stock_picking_backorder_strategy - Issue #495
max3903 Feb 6, 2019
590090e
[ADD] icon.png
OCA-git-bot Apr 3, 2019
34e640c
[MIG] stock_picking_backorder_strategy: Migration to 12.0
Sep 11, 2019
5c295f9
[MIG] stock_picking_backorder_strategy: Migration to 13.0
sebalix Jan 6, 2021
c0563a0
stock_picking_backorder_strategy 13.0.1.0.1
OCA-git-bot Jan 12, 2021
4615ef9
[IMP] stock-picking-backorder-strategy: black, isort, prettier
sebalix Sep 22, 2021
f223028
[MIG] stock_picking_backorder_strategy: Migration to 14.0
RujiaL May 21, 2021
d5314b9
[IMP] stock_picking_backorder_strategy: black, isort, prettier
ernesto-garcia-tecnativa Feb 15, 2023
47b2f6f
[MIG] stock_picking_backorder_strategy: Migration to 15.0
ernesto-garcia-tecnativa Feb 15, 2023
a553a7f
[UPD] Update stock_picking_backorder_strategy.pot
Feb 17, 2023
5076ce5
[UPD] README.rst
OCA-git-bot Feb 17, 2023
44c0038
Update translation files
weblate Feb 17, 2023
8532e92
[UPD] README.rst
OCA-git-bot Sep 3, 2023
d6f1914
Translated using Weblate (Spanish)
Ivorra78 Oct 22, 2023
f661266
Translated using Weblate (Italian)
mymage Nov 24, 2023
dbdac9f
Translated using Weblate (Italian)
mymage Jan 15, 2024
3594f0e
Translated using Weblate (Italian)
mymage Aug 22, 2024
1392fb6
[IMP] stock_picking_backorder_strategy: pre-commit auto fixes
bizzappdev Jan 18, 2025
ad567ee
[MIG] stock_picking_backorder_strategy: Migration to 18.0 and renamed…
bizzappdev Feb 3, 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
146 changes: 146 additions & 0 deletions stock_picking_backorder_strategy_cancel/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
===============================
Picking backordering strategies
===============================

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

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

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

Added new selection in Create Backorder field at Operation Type level.

- Cancel: backorder is cancelled

**Table of contents**

.. contents::
:local:

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

Your preferred way to install addons will work with Stock Picking
Backorder Strategy.

An easy way to install it with all its dependencies is using pip:

pip install --pre odoo11-addon-stock-picking-backorder-strategy then
restart Odoo, update the addons list in your database, and install the
Stock Picking Backorder Strategy application.

Usage
=====

To configure this module, you need to:

- Define backorder strategy on picking type (Warehouse > Configuration >
Types of Operation)

Changelog
=========

11.0.1.0.0 (2018-12-06)
-----------------------

- [11.0][MIG] stock_picking_backorder_strategy Migration to v11.0 Field
pack_operation_ids removed in v11 Method do_new_transfer changed to
button_validate

10.0.1.0.0 (2018-06-06)
-----------------------

- [10.0][MIG] stock_picking_backorder_strategy Migration to v10.0 Added
a default 'manual' strategy according to changed flow in pickings. Let
the normal process (backorder wizard) occurs

8.0.1.0.0 (2015-08-13)
----------------------

- [ADD] add module stock_backorder_strategy Define on stock_picking_type
how to manage backorder. create: default behavior no_create: no
backorder created cancel: backorder is cancelled

18.0.1.0.0 (2025-02-03)
-----------------------

- [18.0][MIG] The "stock_backorder_strategy" module has been renamed to
"stock_backorder_strategy_cancel" as all original functionalities of
"stock_backorder_strategy" module are now part of Odoo, except for
backorder cancellation, which remains in the module
"stock_backorder_strategy_cancel".

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

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

* ACSONE SA/NV

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

- Laetitia Gangloff <[email protected]>
- Denis Roussel <[email protected]>
- Mayank Gosai <[email protected]>
- Luis Escobar <[email protected]>
- Rujia Liu <[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-rousseldenis| image:: https://github.com/rousseldenis.png?size=40px
:target: https://github.com/rousseldenis
:alt: rousseldenis
.. |maintainer-mgosai| image:: https://github.com/mgosai.png?size=40px
:target: https://github.com/mgosai
:alt: mgosai

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

|maintainer-rousseldenis| |maintainer-mgosai|

This module is part of the `OCA/stock-logistics-workflow <https://github.com/OCA/stock-logistics-workflow/tree/18.0/stock_picking_backorder_strategy_cancel>`_ 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 stock_picking_backorder_strategy_cancel/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from .hooks import pre_init_hook
18 changes: 18 additions & 0 deletions stock_picking_backorder_strategy_cancel/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2018 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Picking backordering strategies",
"version": "18.0.1.0.0",
"development_status": "Production/Stable",
"author": """ACSONE SA/NV,
Odoo Community Association (OCA)""",
"maintainers": ["rousseldenis", "mgosai"],
"category": "Warehouse Management",
"website": "https://github.com/OCA/stock-logistics-workflow",
"depends": ["stock"],
"license": "AGPL-3",
"installable": True,
"application": False,
"pre_init_hook": "pre_init_hook",
}
23 changes: 23 additions & 0 deletions stock_picking_backorder_strategy_cancel/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from odoo.tools.sql import column_exists


def pre_init_hook(env):
if not column_exists(env.cr, "stock_picking_type", "backorder_strategy"):
return

env.cr.execute(

Check warning on line 8 in stock_picking_backorder_strategy_cancel/hooks.py

View check run for this annotation

Codecov / codecov/patch

stock_picking_backorder_strategy_cancel/hooks.py#L8

Added line #L8 was not covered by tests
"""SELECT id FROM stock_picking_type WHERE backorder_strategy = 'cancel'"""
)
result = env.cr.fetchall()

Check warning on line 11 in stock_picking_backorder_strategy_cancel/hooks.py

View check run for this annotation

Codecov / codecov/patch

stock_picking_backorder_strategy_cancel/hooks.py#L11

Added line #L11 was not covered by tests

if not result:
return

Check warning on line 14 in stock_picking_backorder_strategy_cancel/hooks.py

View check run for this annotation

Codecov / codecov/patch

stock_picking_backorder_strategy_cancel/hooks.py#L14

Added line #L14 was not covered by tests

picking_ids = [res[0] for res in result]

Check warning on line 16 in stock_picking_backorder_strategy_cancel/hooks.py

View check run for this annotation

Codecov / codecov/patch

stock_picking_backorder_strategy_cancel/hooks.py#L16

Added line #L16 was not covered by tests

update_query = """

Check warning on line 18 in stock_picking_backorder_strategy_cancel/hooks.py

View check run for this annotation

Codecov / codecov/patch

stock_picking_backorder_strategy_cancel/hooks.py#L18

Added line #L18 was not covered by tests
UPDATE stock_picking_type
SET create_backorder = 'cancel'
WHERE id IN %s
"""
env.cr.execute(update_query, (tuple(picking_ids),))

Check warning on line 23 in stock_picking_backorder_strategy_cancel/hooks.py

View check run for this annotation

Codecov / codecov/patch

stock_picking_backorder_strategy_cancel/hooks.py#L23

Added line #L23 was not covered by tests
64 changes: 64 additions & 0 deletions stock_picking_backorder_strategy_cancel/i18n/am.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_picking_backorder_strategy
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: stock-logistics-workflow (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-09-13 22:02+0000\n"
"PO-Revision-Date: 2015-10-21 16:33+0000\n"
"Last-Translator: <>\n"
"Language-Team: Amharic (http://www.transifex.com/oca/OCA-stock-logistics-"
"workflow-8-0/language/am/)\n"
"Language: am\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: stock_picking_backorder_strategy
#: model:ir.model.fields,field_description:stock_picking_backorder_strategy.field_stock_picking_type__backorder_strategy
msgid "Backorder Strategy"
msgstr ""

#. module: stock_picking_backorder_strategy
#: model:ir.model.fields.selection,name:stock_picking_backorder_strategy.selection__stock_picking_type__backorder_strategy__cancel
msgid "Cancel"
msgstr "Cancelar"

#. module: stock_picking_backorder_strategy
#: model:ir.model.fields.selection,name:stock_picking_backorder_strategy.selection__stock_picking_type__backorder_strategy__create
msgid "Create"
msgstr ""

#. module: stock_picking_backorder_strategy
#: model:ir.model.fields,help:stock_picking_backorder_strategy.field_stock_picking_type__backorder_strategy
msgid "Define what to do with backorder"
msgstr ""

#. module: stock_picking_backorder_strategy
#: model:ir.model.fields.selection,name:stock_picking_backorder_strategy.selection__stock_picking_type__backorder_strategy__manual
msgid "Manual"
msgstr ""

#. module: stock_picking_backorder_strategy
#: model:ir.model.fields.selection,name:stock_picking_backorder_strategy.selection__stock_picking_type__backorder_strategy__no_create
msgid "No create"
msgstr ""

#. module: stock_picking_backorder_strategy
#: model:ir.model,name:stock_picking_backorder_strategy.model_stock_picking_type
msgid "Picking Type"
msgstr ""

#. module: stock_picking_backorder_strategy
#: model:ir.model,name:stock_picking_backorder_strategy.model_stock_move
msgid "Stock Move"
msgstr ""

#. module: stock_picking_backorder_strategy
#: model:ir.model,name:stock_picking_backorder_strategy.model_stock_picking
msgid "Transfer"
msgstr ""
64 changes: 64 additions & 0 deletions stock_picking_backorder_strategy_cancel/i18n/bg.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_picking_backorder_strategy
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: stock-logistics-workflow (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-11-18 01:44+0000\n"
"PO-Revision-Date: 2015-10-21 16:33+0000\n"
"Last-Translator: <>\n"
"Language-Team: Bulgarian (http://www.transifex.com/oca/OCA-stock-logistics-"
"workflow-8-0/language/bg/)\n"
"Language: bg\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: stock_picking_backorder_strategy
#: model:ir.model.fields,field_description:stock_picking_backorder_strategy.field_stock_picking_type__backorder_strategy
msgid "Backorder Strategy"
msgstr ""

#. module: stock_picking_backorder_strategy
#: model:ir.model.fields.selection,name:stock_picking_backorder_strategy.selection__stock_picking_type__backorder_strategy__cancel
msgid "Cancel"
msgstr "Откажи"

#. module: stock_picking_backorder_strategy
#: model:ir.model.fields.selection,name:stock_picking_backorder_strategy.selection__stock_picking_type__backorder_strategy__create
msgid "Create"
msgstr "Създай"

#. module: stock_picking_backorder_strategy
#: model:ir.model.fields,help:stock_picking_backorder_strategy.field_stock_picking_type__backorder_strategy
msgid "Define what to do with backorder"
msgstr ""

#. module: stock_picking_backorder_strategy
#: model:ir.model.fields.selection,name:stock_picking_backorder_strategy.selection__stock_picking_type__backorder_strategy__manual
msgid "Manual"
msgstr ""

#. module: stock_picking_backorder_strategy
#: model:ir.model.fields.selection,name:stock_picking_backorder_strategy.selection__stock_picking_type__backorder_strategy__no_create
msgid "No create"
msgstr ""

#. module: stock_picking_backorder_strategy
#: model:ir.model,name:stock_picking_backorder_strategy.model_stock_picking_type
msgid "Picking Type"
msgstr ""

#. module: stock_picking_backorder_strategy
#: model:ir.model,name:stock_picking_backorder_strategy.model_stock_move
msgid "Stock Move"
msgstr ""

#. module: stock_picking_backorder_strategy
#: model:ir.model,name:stock_picking_backorder_strategy.model_stock_picking
msgid "Transfer"
msgstr ""
65 changes: 65 additions & 0 deletions stock_picking_backorder_strategy_cancel/i18n/bs.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_picking_backorder_strategy
#
# Translators:
msgid ""
msgstr ""
"Project-Id-Version: stock-logistics-workflow (8.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-11-18 01:44+0000\n"
"PO-Revision-Date: 2015-10-21 16:33+0000\n"
"Last-Translator: <>\n"
"Language-Team: Bosnian (http://www.transifex.com/oca/OCA-stock-logistics-"
"workflow-8-0/language/bs/)\n"
"Language: bs\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: stock_picking_backorder_strategy
#: model:ir.model.fields,field_description:stock_picking_backorder_strategy.field_stock_picking_type__backorder_strategy
msgid "Backorder Strategy"
msgstr ""

#. module: stock_picking_backorder_strategy
#: model:ir.model.fields.selection,name:stock_picking_backorder_strategy.selection__stock_picking_type__backorder_strategy__cancel
msgid "Cancel"
msgstr "Otkaži"

#. module: stock_picking_backorder_strategy
#: model:ir.model.fields.selection,name:stock_picking_backorder_strategy.selection__stock_picking_type__backorder_strategy__create
msgid "Create"
msgstr ""

#. module: stock_picking_backorder_strategy
#: model:ir.model.fields,help:stock_picking_backorder_strategy.field_stock_picking_type__backorder_strategy
msgid "Define what to do with backorder"
msgstr ""

#. module: stock_picking_backorder_strategy
#: model:ir.model.fields.selection,name:stock_picking_backorder_strategy.selection__stock_picking_type__backorder_strategy__manual
msgid "Manual"
msgstr ""

#. module: stock_picking_backorder_strategy
#: model:ir.model.fields.selection,name:stock_picking_backorder_strategy.selection__stock_picking_type__backorder_strategy__no_create
msgid "No create"
msgstr ""

#. module: stock_picking_backorder_strategy
#: model:ir.model,name:stock_picking_backorder_strategy.model_stock_picking_type
msgid "Picking Type"
msgstr ""

#. module: stock_picking_backorder_strategy
#: model:ir.model,name:stock_picking_backorder_strategy.model_stock_move
msgid "Stock Move"
msgstr ""

#. module: stock_picking_backorder_strategy
#: model:ir.model,name:stock_picking_backorder_strategy.model_stock_picking
msgid "Transfer"
msgstr ""
Loading
Loading