Skip to content

Commit

Permalink
Merge PR #2008 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by jbaudoux
  • Loading branch information
OCA-git-bot committed Oct 7, 2024
2 parents 93c5fe2 + 7d13570 commit 3979cb6
Show file tree
Hide file tree
Showing 10 changed files with 538 additions and 0 deletions.
6 changes: 6 additions & 0 deletions setup/stock_available_stock_mts_mto_rule/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
78 changes: 78 additions & 0 deletions stock_available_stock_mts_mto_rule/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
=================================
Stock Avaiable Stock Mts Mto Rule
=================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:f364aff8e84c7d8390b0aae2ac0abaf2e21ce75a114e77785d76fc246aa03310
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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%2Fstock--logistics--warehouse-lightgray.png?logo=github
:target: https://github.com/OCA/stock-logistics-warehouse/tree/14.0/stock_available_stock_mts_mto_rule
:alt: OCA/stock-logistics-warehouse
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/stock-logistics-warehouse-14-0/stock-logistics-warehouse-14-0-stock_available_stock_mts_mto_rule
: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-warehouse&target_branch=14.0
:alt: Try me on Runboat

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

This is a glue module between `stock_mts_mto_rule` and `stock_avaiable`.
It will use the `immediately_usable_qty` field to compute the split for the
mts mto rule, instead of the `virtual_available` value.

**Table of contents**

.. contents::
:local:

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

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

* Camptocamp

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

* Thierry Ducrest <[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/stock-logistics-warehouse <https://github.com/OCA/stock-logistics-warehouse/tree/14.0/stock_available_stock_mts_mto_rule>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions stock_available_stock_mts_mto_rule/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
12 changes: 12 additions & 0 deletions stock_available_stock_mts_mto_rule/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright 2024 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Stock Avaiable Stock Mts Mto Rule",
"version": "14.0.1.0.0",
"depends": ["stock_available", "stock_mts_mto_rule"],
"website": "https://github.com/OCA/stock-logistics-warehouse",
"author": "Camptocamp,Odoo Community Association (OCA)",
"license": "AGPL-3",
"category": "Hidden",
"installable": True,
}
1 change: 1 addition & 0 deletions stock_available_stock_mts_mto_rule/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import stock_rule
12 changes: 12 additions & 0 deletions stock_available_stock_mts_mto_rule/models/stock_rule.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright 2024 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from odoo import api, models


class StockRule(models.Model):
_inherit = "stock.rule"

@api.model
def _get_available_quantity_mts_mto_rule(self, product):
return product.immediately_usable_qty
1 change: 1 addition & 0 deletions stock_available_stock_mts_mto_rule/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Thierry Ducrest <[email protected]>
3 changes: 3 additions & 0 deletions stock_available_stock_mts_mto_rule/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This is a glue module between `stock_mts_mto_rule` and `stock_avaiable`.
It will use the `immediately_usable_qty` field to compute the split for the
mts mto rule, instead of the `virtual_available` value.
Loading

0 comments on commit 3979cb6

Please sign in to comment.