-
-
Notifications
You must be signed in to change notification settings - Fork 714
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
636 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 |
---|---|---|
@@ -0,0 +1,79 @@ | ||
============================ | ||
Stock Location Limit Product | ||
============================ | ||
|
||
.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |badge1| 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 | ||
.. |badge2| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--warehouse-lightgray.png?logo=github | ||
:target: https://github.com/OCA/stock-logistics-warehouse/tree/12.0/stock_location_limit_product | ||
:alt: OCA/stock-logistics-warehouse | ||
.. |badge3| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png | ||
:target: https://runbot.odoo-community.org/runbot/153/12.0 | ||
:alt: Try me on Runbot | ||
|
||
|badge1| |badge2| |badge3| | ||
|
||
This module allows you to define a limit by product quantity on a stock location. This limit can later be used to track the capacity available of the location. | ||
|
||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Configuration | ||
============= | ||
|
||
In Inventory Settings, Go to | ||
Inventory > Configuration > Warehouse Management > Locations | ||
Select or create a location | ||
Enter the limits by selecting a product and entering the quantity | ||
|
||
|
||
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 smashing it by providing a detailed and welcomed | ||
`feedback <https://github.com/OCA/stock-logistics-warehouse/issues/new?body=module:%20stock_location_limit_product%0Aversion:%2012.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 | ||
* Odoo Community Association (OCA) | ||
|
||
Contributors | ||
~~~~~~~~~~~~ | ||
|
||
* Maxime Chambreuil <mchambreuil@opensourceintegrators.com> | ||
* Nikita Vaghela <nikita.vaghela.serpentcs@gmail.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/stock-logistics-warehouse <https://github.com/OCA/stock-logistics-warehouse/tree/12.0/stock_location_limit_product>`_ 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,5 @@ | ||
# Copyright (C) 2019 Open Source Integrators | ||
# Copyright (C) 2019 Serpent Consulting Services Pvt. Ltd. | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) | ||
|
||
from . import models |
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,23 @@ | ||
# Copyright (C) 2019 Open Source Integrators | ||
# Copyright (C) 2019 Serpent Consulting Services Pvt. Ltd. | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) | ||
|
||
{ | ||
'name': 'Stock Location Limit Product', | ||
'version': '12.0.1.0.0', | ||
'license': 'AGPL-3', | ||
'author': 'Open Source Integrators, Odoo Community Association (OCA),', | ||
'website': "https://github.com/OCA/stock-logistics-warehouse", | ||
'summary': """Add a limit by product quantity on a stock location. | ||
This limit can later be used to track the capacity | ||
available of the location.""", | ||
'category': 'Warehouse', | ||
'depends': [ | ||
'stock', | ||
], | ||
'data': [ | ||
'security/ir.model.access.csv', | ||
'views/stock_location_view.xml', | ||
], | ||
'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,6 @@ | ||
# Copyright (C) 2019 Open Source Integrators | ||
# Copyright (C) 2019 Serpent Consulting Services Pvt. Ltd. | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) | ||
|
||
from . import stock_location_limit | ||
from . import stock_location |
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,13 @@ | ||
# Copyright (C) 2019 Open Source Integrators | ||
# Copyright (C) 2019 Serpent Consulting Services Pvt. Ltd. | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class StockLocation(models.Model): | ||
_inherit = "stock.location" | ||
|
||
limit_ids = fields.One2many('stock.location.limit', | ||
'location_id', | ||
'Limits') |
31 changes: 31 additions & 0 deletions
31
stock_location_limit_product/models/stock_location_limit.py
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,31 @@ | ||
# Copyright (C) 2019 Open Source Integrators | ||
# Copyright (C) 2019 Serpent Consulting Services Pvt. Ltd. | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class StockLocationLimit(models.Model): | ||
_name = 'stock.location.limit' | ||
_description = 'Stock Location Limit Product' | ||
_rec_name = 'product_id' | ||
|
||
_sql_constraints = [ | ||
('product_uniq', 'unique(product_id,location_id)', | ||
'Product and Location must be unique!'), | ||
] | ||
|
||
product_id = fields.Many2one( | ||
'product.product', | ||
string='Product', | ||
) | ||
qty = fields.Float('Maximum Quantity') | ||
uom_id = fields.Many2one( | ||
'uom.uom', | ||
related='product_id.uom_id', | ||
string='UoM', | ||
) | ||
location_id = fields.Many2one( | ||
'stock.location', | ||
string='Location', | ||
) |
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,3 @@ | ||
Go to Inventory > Configuration > Warehouse Management > Locations | ||
Select or create a location | ||
Enter the limits by selecting a product and entering the quantity |
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,7 @@ | ||
* Open Source Integrators <https://www.@opensourceintegrators.com> | ||
|
||
* Maxime Chambreuil <mchambreuil@opensourceintegrators.com> | ||
|
||
* Serpent Consulting Services Pvt. Ltd. <https://www.serpentcs.com> | ||
|
||
* Nikita Vaghela <nikita.vaghela.serpentcs@gmail.com> |
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,3 @@ | ||
This module allows you to define a limit by product quantity | ||
on a stock location.This limit can later be used to track | ||
the capacity available of the location. |
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 @@ | ||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink | ||
access_stock_location_limit,access_stock_location_limit_user,model_stock_location_limit,base.group_user,1,1,1,0 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.