Skip to content

Commit

Permalink
Merge PR #74 into 15.0
Browse files Browse the repository at this point in the history
Signed-off-by LoisRForgeFlow
  • Loading branch information
OCA-git-bot committed Dec 13, 2024
2 parents 5a872c5 + d161c4c commit faa303b
Show file tree
Hide file tree
Showing 13 changed files with 660 additions and 0 deletions.
92 changes: 92 additions & 0 deletions repair_stock_move_restrict_lot/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
==============================
Repair Stock Move Restrict Lot
==============================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:c94e72916093650c40fe3428b8f443013e3897f3df7b2c59d27bb45283e50fa7
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
:target: https://odoo-community.org/page/development-status
:alt: Alpha
.. |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%2Frepair-lightgray.png?logo=github
:target: https://github.com/OCA/repair/tree/15.0/repair_stock_move_restrict_lot
:alt: OCA/repair
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/repair-15-0/repair-15-0-repair_stock_move_restrict_lot
: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/repair&target_branch=15.0
:alt: Try me on Runboat

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

Glue module between repair_stock_move and stock_restrict_lot.
It assigns the repair lot to the stock moves on creation. Otherwise in the
_action_assign it may reserve the incorrect quant and then and error is raised
when unreserving the quant: https://github.com/odoo/odoo/blob/15.0/addons/stock/models/stock_move_line.py#L388

.. IMPORTANT::
This is an alpha version, the data model and design can change at any time without warning.
Only for development or testing purpose, do not use in production.
`More details on development status <https://odoo-community.org/page/development-status>`_

**Table of contents**

.. contents::
:local:

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

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

* ForgeFlow

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

* Aaron Henriquez <[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-AaronHForgeFlow| image:: https://github.com/AaronHForgeFlow.png?size=40px
:target: https://github.com/AaronHForgeFlow
:alt: AaronHForgeFlow

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

|maintainer-AaronHForgeFlow|

This module is part of the `OCA/repair <https://github.com/OCA/repair/tree/15.0/repair_stock_move_restrict_lot>`_ 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 repair_stock_move_restrict_lot/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
17 changes: 17 additions & 0 deletions repair_stock_move_restrict_lot/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2024 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)

{
"name": "Repair Stock Move Restrict Lot",
"version": "15.0.1.0.0",
"development_status": "Alpha",
"license": "AGPL-3",
"category": "Repair",
"summary": "Glue module to restrict lot in stock moves of repair orders",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/repair",
"depends": ["repair_stock_move", "stock_restrict_lot"],
"installable": True,
"application": False,
"maintainers": ["AaronHForgeFlow"],
}
1 change: 1 addition & 0 deletions repair_stock_move_restrict_lot/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import repair_order
11 changes: 11 additions & 0 deletions repair_stock_move_restrict_lot/models/repair_order.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from odoo import models


class RepairOrder(models.Model):
_inherit = "repair.order"

def _prepare_repair_stock_move(self):
vals = super()._prepare_repair_stock_move()
if self.lot_id:
vals["restrict_lot_id"] = self.lot_id.id
return vals
1 change: 1 addition & 0 deletions repair_stock_move_restrict_lot/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Aaron Henriquez <[email protected]>
4 changes: 4 additions & 0 deletions repair_stock_move_restrict_lot/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Glue module between repair_stock_move and stock_restrict_lot.
It assigns the repair lot to the stock moves on creation. Otherwise in the
_action_assign it may reserve the incorrect quant and then and error is raised
when unreserving the quant: https://github.com/odoo/odoo/blob/15.0/addons/stock/models/stock_move_line.py#L388
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit faa303b

Please sign in to comment.