diff --git a/setup/stock_inventory_include_exhausted/odoo/addons/stock_inventory_include_exhausted b/setup/stock_inventory_include_exhausted/odoo/addons/stock_inventory_include_exhausted deleted file mode 120000 index 59daf9070..000000000 --- a/setup/stock_inventory_include_exhausted/odoo/addons/stock_inventory_include_exhausted +++ /dev/null @@ -1 +0,0 @@ -../../../../stock_inventory_include_exhausted \ No newline at end of file diff --git a/setup/stock_inventory_include_exhausted/setup.py b/setup/stock_inventory_include_exhausted/setup.py deleted file mode 100644 index 28c57bb64..000000000 --- a/setup/stock_inventory_include_exhausted/setup.py +++ /dev/null @@ -1,6 +0,0 @@ -import setuptools - -setuptools.setup( - setup_requires=['setuptools-odoo'], - odoo_addon=True, -) diff --git a/stock_inventory_include_exhausted/README.rst b/stock_inventory_include_exhausted/README.rst deleted file mode 100644 index 49bdf745d..000000000 --- a/stock_inventory_include_exhausted/README.rst +++ /dev/null @@ -1,85 +0,0 @@ -=========================== -Inventory Include Exhausted -=========================== - -.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! This file is generated by oca-gen-addon-readme !! - !! changes will be overwritten. !! - !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - -.. |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_inventory_include_exhausted - :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_inventory_include_exhausted - :alt: Translate me on Weblate -.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/153/14.0 - :alt: Try me on Runbot - -|badge1| |badge2| |badge3| |badge4| |badge5| - -This module lets you include non-stocked products to your inventory. - -**Table of contents** - -.. contents:: - :local: - -Usage -===== - -To use this module, you simply need to: - -#. Create a new inventory adjustment. -#. Select the products that you want to do the inventory. -#. Check the box "Include Exhausted". -#. Press the button Start Inventory - -Bug Tracker -=========== - -Bugs are tracked on `GitHub 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 `_. - -Do not contact contributors directly about support or help with technical issues. - -Credits -======= - -Authors -~~~~~~~ - -* Tecnativa - -Contributors -~~~~~~~~~~~~ - -* `Tecnativa `_: - - * Carlos Roca - -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 `_ project on GitHub. - -You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/stock_inventory_include_exhausted/__init__.py b/stock_inventory_include_exhausted/__init__.py deleted file mode 100644 index 0650744f6..000000000 --- a/stock_inventory_include_exhausted/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from . import models diff --git a/stock_inventory_include_exhausted/__manifest__.py b/stock_inventory_include_exhausted/__manifest__.py deleted file mode 100644 index 1975639b1..000000000 --- a/stock_inventory_include_exhausted/__manifest__.py +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright 2020 Tecnativa - Carlos Roca -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - -{ - "name": "Inventory Include Exhausted", - "summary": "It includes the option for adding products exhausted on the " - "inventories.", - "version": "14.0.1.0.0", - "depends": ["stock"], - "author": "Tecnativa, Odoo Community Association (OCA)", - "website": "https://github.com/OCA/stock-logistics-warehouse", - "category": "Warehouse", - "license": "AGPL-3", - "data": ["views/stock_inventory_view.xml"], - "installable": True, -} diff --git a/stock_inventory_include_exhausted/i18n/es.po b/stock_inventory_include_exhausted/i18n/es.po deleted file mode 100644 index c26c0c4c1..000000000 --- a/stock_inventory_include_exhausted/i18n/es.po +++ /dev/null @@ -1,36 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * stock_inventory_include_exhausted -# -# Translators: -# Carlos Roca , 2020 -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 13.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-02-18 11:00+0000\n" -"PO-Revision-Date: 2020-02-18 11:00+0000\n" -"Last-Translator: Carlos Roca , 2020\n" -"Language-Team: \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" - -#. module: stock_inventory_include_exhausted -#: model:ir.model.fields,help:stock_inventory_include_exhausted.field_stock_inventory__include_exhausted -msgid "" -"If you select this option, you will receive the out of stock inventory " -"products" -msgstr "" - -#. module: stock_inventory_include_exhausted -#: model:ir.model.fields,field_description:stock_inventory_include_exhausted.field_stock_inventory__include_exhausted -msgid "Include Exhausted" -msgstr "Incluir productos sin existencias" - -#. module: stock_inventory_include_exhausted -#: model:ir.model,name:stock_inventory_include_exhausted.model_stock_inventory -msgid "Inventory" -msgstr "Inventario" diff --git a/stock_inventory_include_exhausted/i18n/stock_inventory_include_exhausted.pot b/stock_inventory_include_exhausted/i18n/stock_inventory_include_exhausted.pot deleted file mode 100644 index e0c607ae9..000000000 --- a/stock_inventory_include_exhausted/i18n/stock_inventory_include_exhausted.pot +++ /dev/null @@ -1,46 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * stock_inventory_include_exhausted -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 14.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_inventory_include_exhausted -#: model:ir.model.fields,field_description:stock_inventory_include_exhausted.field_stock_inventory__display_name -msgid "Display Name" -msgstr "" - -#. module: stock_inventory_include_exhausted -#: model:ir.model.fields,field_description:stock_inventory_include_exhausted.field_stock_inventory__id -msgid "ID" -msgstr "" - -#. module: stock_inventory_include_exhausted -#: model:ir.model.fields,help:stock_inventory_include_exhausted.field_stock_inventory__include_exhausted -msgid "" -"If you select this option, you will receive the out of stock inventory " -"products" -msgstr "" - -#. module: stock_inventory_include_exhausted -#: model:ir.model.fields,field_description:stock_inventory_include_exhausted.field_stock_inventory__include_exhausted -msgid "Include Exhausted" -msgstr "" - -#. module: stock_inventory_include_exhausted -#: model:ir.model,name:stock_inventory_include_exhausted.model_stock_inventory -msgid "Inventory" -msgstr "" - -#. module: stock_inventory_include_exhausted -#: model:ir.model.fields,field_description:stock_inventory_include_exhausted.field_stock_inventory____last_update -msgid "Last Modified on" -msgstr "" diff --git a/stock_inventory_include_exhausted/models/__init__.py b/stock_inventory_include_exhausted/models/__init__.py deleted file mode 100644 index 35536816e..000000000 --- a/stock_inventory_include_exhausted/models/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from . import stock_inventory diff --git a/stock_inventory_include_exhausted/models/stock_inventory.py b/stock_inventory_include_exhausted/models/stock_inventory.py deleted file mode 100644 index 3399dbb37..000000000 --- a/stock_inventory_include_exhausted/models/stock_inventory.py +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright 2020 Tecnativa - Carlos Roca -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - -from odoo import fields, models - - -class StockInventory(models.Model): - _inherit = "stock.inventory" - - include_exhausted = fields.Boolean( - string="Include Exhausted", - help="If you select this option, you will receive the " - "out of stock inventory products", - ) - - def _get_inventory_lines_values(self): - vals = super()._get_inventory_lines_values() - - if self.include_exhausted: - domain = [("qty_available", "=", 0), ("type", "=", "product")] - if self.product_ids: - domain.append(("id", "in", self.product_ids.ids)) - exhausted_products = self.env["product.product"].search(domain) - vals_dic = { - "inventory_id": self.id, - "company_id": self.company_id.id, - "product_qty": 0, - "theoretical_qty": 0, - } - vals_dic["location_id"] = ( - self.env["stock.warehouse"] - .search([("company_id", "=", vals_dic["company_id"])], limit=1) - .lot_stock_id.id - ) - for product in exhausted_products: - vals_dic["product_id"] = product.id - vals_dic["product_uom_id"] = product.uom_id.id - - vals.append(vals_dic.copy()) - - return vals diff --git a/stock_inventory_include_exhausted/readme/CONTRIBUTORS.rst b/stock_inventory_include_exhausted/readme/CONTRIBUTORS.rst deleted file mode 100644 index 3b98bebb6..000000000 --- a/stock_inventory_include_exhausted/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1,3 +0,0 @@ -* `Tecnativa `_: - - * Carlos Roca diff --git a/stock_inventory_include_exhausted/readme/DESCRIPTION.rst b/stock_inventory_include_exhausted/readme/DESCRIPTION.rst deleted file mode 100644 index ef42a3240..000000000 --- a/stock_inventory_include_exhausted/readme/DESCRIPTION.rst +++ /dev/null @@ -1 +0,0 @@ -This module lets you include non-stocked products to your inventory. diff --git a/stock_inventory_include_exhausted/readme/USAGE.rst b/stock_inventory_include_exhausted/readme/USAGE.rst deleted file mode 100644 index 0ca1bcec3..000000000 --- a/stock_inventory_include_exhausted/readme/USAGE.rst +++ /dev/null @@ -1,6 +0,0 @@ -To use this module, you simply need to: - -#. Create a new inventory adjustment. -#. Select the products that you want to do the inventory. -#. Check the box "Include Exhausted". -#. Press the button Start Inventory diff --git a/stock_inventory_include_exhausted/static/description/icon.png b/stock_inventory_include_exhausted/static/description/icon.png deleted file mode 100644 index 3a0328b51..000000000 Binary files a/stock_inventory_include_exhausted/static/description/icon.png and /dev/null differ diff --git a/stock_inventory_include_exhausted/static/description/index.html b/stock_inventory_include_exhausted/static/description/index.html deleted file mode 100644 index 29adc8897..000000000 --- a/stock_inventory_include_exhausted/static/description/index.html +++ /dev/null @@ -1,433 +0,0 @@ - - - - - - -Inventory Include Exhausted - - - -
-

Inventory Include Exhausted

- - -

Beta License: AGPL-3 OCA/stock-logistics-warehouse Translate me on Weblate Try me on Runbot

-

This module lets you include non-stocked products to your inventory.

-

Table of contents

- -
-

Usage

-

To use this module, you simply need to:

-
    -
  1. Create a new inventory adjustment.
  2. -
  3. Select the products that you want to do the inventory.
  4. -
  5. Check the box “Include Exhausted”.
  6. -
  7. Press the button Start Inventory
  8. -
-
-
-

Bug Tracker

-

Bugs are tracked on GitHub 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.

-

Do not contact contributors directly about support or help with technical issues.

-
-
-

Credits

-
-

Authors

-
    -
  • Tecnativa
  • -
-
-
-

Contributors

- -
-
-

Maintainers

-

This module is maintained by the OCA.

-Odoo Community Association -

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 project on GitHub.

-

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

-
-
-
- - diff --git a/stock_inventory_include_exhausted/tests/__init__.py b/stock_inventory_include_exhausted/tests/__init__.py deleted file mode 100644 index 8ff9dbc55..000000000 --- a/stock_inventory_include_exhausted/tests/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from . import test_stock_inventory_include_exhausted diff --git a/stock_inventory_include_exhausted/tests/test_stock_inventory_include_exhausted.py b/stock_inventory_include_exhausted/tests/test_stock_inventory_include_exhausted.py deleted file mode 100644 index e8116b05c..000000000 --- a/stock_inventory_include_exhausted/tests/test_stock_inventory_include_exhausted.py +++ /dev/null @@ -1,94 +0,0 @@ -# Copyright 2020 Tecnativa - Carlos Roca -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - -from odoo.tests.common import TransactionCase - - -class StockInventoryIncludeExhaustedTest(TransactionCase): - def setUp(self): - super().setUp() - - self.inventory_model = self.env["stock.inventory"] - self.location_model = self.env["stock.location"] - self.res_users_model = self.env["res.users"] - - self.company = self.env.ref("base.main_company") - self.partner = self.ref("base.res_partner_4") - - # We need this to know how many product with no stock we have on our - # database - self.quantity_out_of_stock = len( - self.env["product.product"].search( - [("qty_available", "=", 0), ("type", "=", "product")] - ) - ) - - self.user = self.res_users_model.create( - { - "name": "Test Account User", - "login": "user_1", - "email": "example@yourcompany.com", - "company_id": self.company.id, - "company_ids": [(4, self.company.id)], - } - ) - - self.product1 = self.env["product.product"].create( - { - "name": "Product for parent location", - "type": "product", - "default_code": "PROD1", - } - ) - self.product2 = self.env["product.product"].create( - { - "name": "Product for child location", - "type": "product", - "default_code": "PROD2", - } - ) - - self.location = self.location_model.create( - {"name": "Inventory tests 1", "usage": "internal"} - ) - - def _create_inventory_all_products(self, name, location, include_exhausted): - inventory = self.inventory_model.create( - { - "name": name, - "location_ids": [(4, location.id)], - "include_exhausted": include_exhausted, - } - ) - return inventory - - def test_not_including_exhausted(self): - """Check if products with no stock are not included into the inventory - if the including exhausted option is disabled.""" - inventory_not_inc = self._create_inventory_all_products( - "not_included", self.location, False - ) - inventory_not_inc.action_start() - inventory_not_inc.action_validate() - lines = inventory_not_inc.line_ids - self.assertEqual(len(lines), 0, "Not all expected products are included") - - def test_including_exhausted(self): - """Check if products with no stock are included into the inventory - if the including exhausted option is enabled.""" - inventory_inc = self._create_inventory_all_products( - # The products with no stock don't have a location, - # that's why search the non-stocked in all locations - "included", - self.location, - True, - ) - - inventory_inc.action_start() - inventory_inc.action_validate() - lines = inventory_inc.line_ids - self.assertEqual( - len(lines), - self.quantity_out_of_stock + 2, - "The products with no stock are not included", - ) diff --git a/stock_inventory_include_exhausted/views/stock_inventory_view.xml b/stock_inventory_include_exhausted/views/stock_inventory_view.xml deleted file mode 100644 index f3624abc2..000000000 --- a/stock_inventory_include_exhausted/views/stock_inventory_view.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - Inventory form view - stock_inventory_include_exhausted extension - stock.inventory - - - - - - - -