porting stock_analysis to 12

This commit is contained in:
eLBati
2020-02-11 11:20:15 +01:00
parent be678b13b9
commit b8da52d565
9 changed files with 15 additions and 69 deletions

View File

@@ -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
<https://github.com/OCA/stock-logistics-reporting/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-reporting/issues/new?body=module:%20
stock_analysis%0Aversion:%20
8.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Credits
=======
Images
------
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
Contributors
------------
* Lorenzo Battistini <lorenzo.battistini@agilebg.com>
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.

View File

@@ -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).

View File

@@ -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,

View File

@@ -0,0 +1 @@
* Lorenzo Battistini (https://takobi.online/)

View File

@@ -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

View File

@@ -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).

View File

@@ -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,

View File

@@ -8,7 +8,7 @@
<pivot string="Stock Analysis" disable_linking="True">
<field name="product_id" type="row"/>
<field name="location_id" type="col"/>
<field name="qty" type="measure"/>
<field name="quantity" type="measure"/>
</pivot>
</field>
</record>

View File

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 71 KiB