From b8da52d565cc10c180f6b6306b016cfd64472213 Mon Sep 17 00:00:00 2001 From: eLBati Date: Tue, 11 Feb 2020 11:20:15 +0100 Subject: [PATCH] porting stock_analysis to 12 --- stock_analysis/README.rst | 59 ------------------ stock_analysis/__init__.py | 1 - stock_analysis/__manifest__.py | 10 +-- stock_analysis/readme/CONTRIBUTORS.rst | 1 + stock_analysis/readme/DESCRIPTION.rst | 4 ++ stock_analysis/report/__init__.py | 1 - stock_analysis/report/stock_analysis.py | 6 +- stock_analysis/report/stock_analysis_view.xml | 2 +- .../description}/demo_analysis.png | Bin 9 files changed, 15 insertions(+), 69 deletions(-) delete mode 100644 stock_analysis/README.rst create mode 100644 stock_analysis/readme/CONTRIBUTORS.rst create mode 100644 stock_analysis/readme/DESCRIPTION.rst rename stock_analysis/{images => static/description}/demo_analysis.png (100%) diff --git a/stock_analysis/README.rst b/stock_analysis/README.rst deleted file mode 100644 index 2d1d5a6..0000000 --- a/stock_analysis/README.rst +++ /dev/null @@ -1,59 +0,0 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html - :alt: License: AGPL-3 - -============== -Stock Analysis -============== - -This module extends the stock reporting to allow better stock per location analysis. -By default, it adds a pivot table where lines are products and columns are locations. - -.. image:: /stock_analysis/images/demo_analysis.png - -Usage -===== - -.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas - :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/151/8.0 - -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 -`_. - -Credits -======= - -Images ------- - -* Odoo Community Association: `Icon `_. - -Contributors ------------- - -* Lorenzo Battistini - -Maintainer ----------- - -.. image:: https://odoo-community.org/logo.png - :alt: Odoo Community Association - :target: https://odoo-community.org - -This module is maintained by the OCA. - -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. - -To contribute to this module, please visit https://odoo-community.org. diff --git a/stock_analysis/__init__.py b/stock_analysis/__init__.py index 1738bf2..e60f9e4 100644 --- a/stock_analysis/__init__.py +++ b/stock_analysis/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2016 Lorenzo Battistini - Agile Business Group # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). diff --git a/stock_analysis/__manifest__.py b/stock_analysis/__manifest__.py index a419fce..e7150e0 100644 --- a/stock_analysis/__manifest__.py +++ b/stock_analysis/__manifest__.py @@ -1,13 +1,15 @@ -# -*- coding: utf-8 -*- # © 2016 Lorenzo Battistini - Agile Business Group +# © 2020 Lorenzo Battistini - TAKOBI # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Stock Analysis", "summary": "Analysis view for stock", - "version": "10.0.1.0.0", - "category": "Inventory, Logistic, Storage", - "website": "https://www.agilebg.com", + "version": "12.0.1.0.0", + "development_status": "Beta", + "category": "Warehouse", + "website": "https://github.com/OCA/stock-logistics-reporting", "author": "Agile Business Group, Odoo Community Association (OCA)", + "maintainers": ["eLBati"], "license": "AGPL-3", "application": False, "installable": True, diff --git a/stock_analysis/readme/CONTRIBUTORS.rst b/stock_analysis/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000..c752a54 --- /dev/null +++ b/stock_analysis/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Lorenzo Battistini (https://takobi.online/) diff --git a/stock_analysis/readme/DESCRIPTION.rst b/stock_analysis/readme/DESCRIPTION.rst new file mode 100644 index 0000000..1560beb --- /dev/null +++ b/stock_analysis/readme/DESCRIPTION.rst @@ -0,0 +1,4 @@ +This module extends the stock reporting to allow better stock per location analysis. +By default, it adds a pivot table where lines are products and columns are locations. + +.. figure:: ../static/description/demo_analysis.png diff --git a/stock_analysis/report/__init__.py b/stock_analysis/report/__init__.py index 9431e97..9af24b0 100644 --- a/stock_analysis/report/__init__.py +++ b/stock_analysis/report/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2016 Lorenzo Battistini - Agile Business Group # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). diff --git a/stock_analysis/report/stock_analysis.py b/stock_analysis/report/stock_analysis.py index 1304a18..3290f18 100644 --- a/stock_analysis/report/stock_analysis.py +++ b/stock_analysis/report/stock_analysis.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # © 2016 Lorenzo Battistini - Agile Business Group # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). @@ -10,12 +9,13 @@ class StockAnalysis(models.Model): _name = 'stock.analysis' _auto = False _rec_name = 'product_id' + _description = 'Stock analysis view' product_id = fields.Many2one( 'product.product', string='Product', readonly=True) location_id = fields.Many2one( 'stock.location', string='Location', readonly=True) - qty = fields.Float(string='Quantity', readonly=True) + quantity = fields.Float(string='Quantity', readonly=True) lot_id = fields.Many2one( 'stock.production.lot', string='Lot', readonly=True) package_id = fields.Many2one( @@ -35,7 +35,7 @@ class StockAnalysis(models.Model): quant.id AS id, quant.product_id AS product_id, quant.location_id AS location_id, - quant.qty AS qty, + quant.quantity AS quantity, quant.lot_id AS lot_id, quant.package_id AS package_id, quant.in_date AS in_date, diff --git a/stock_analysis/report/stock_analysis_view.xml b/stock_analysis/report/stock_analysis_view.xml index 09a3482..86a6055 100644 --- a/stock_analysis/report/stock_analysis_view.xml +++ b/stock_analysis/report/stock_analysis_view.xml @@ -8,7 +8,7 @@ - + diff --git a/stock_analysis/images/demo_analysis.png b/stock_analysis/static/description/demo_analysis.png similarity index 100% rename from stock_analysis/images/demo_analysis.png rename to stock_analysis/static/description/demo_analysis.png