diff --git a/stock_usability/__manifest__.py b/stock_usability/__manifest__.py index 25e9dc2..f9962aa 100644 --- a/stock_usability/__manifest__.py +++ b/stock_usability/__manifest__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# © 2014-2016 Akretion (http://www.akretion.com) +# Copyright 2014-2019 Akretion (http://www.akretion.com) # @author Alexis de Lattre # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). diff --git a/stock_usability/stock.py b/stock_usability/stock.py index 1a10aef..c8f4146 100644 --- a/stock_usability/stock.py +++ b/stock_usability/stock.py @@ -14,6 +14,25 @@ class StockInventory(models.Model): _order = 'id desc' +class StockInventoryLine(models.Model): + _inherit = 'stock.inventory.line' + + inventory_id = fields.Many2one(states={'done': [('readonly', True)]}) + inventory_date = fields.Datetime( + related='inventory_id.date', readonly=True) + partner_id = fields.Many2one(states={'done': [('readonly', True)]}) + product_id = fields.Many2one(states={'done': [('readonly', True)]}) + product_code = fields.Char(readonly=True) + product_uom_id = fields.Many2one(states={'done': [('readonly', True)]}) + product_qty = fields.Float(states={'done': [('readonly', True)]}) + location_id = fields.Many2one(states={'done': [('readonly', True)]}) + location_name = fields.Char(readonly=True) + package_id = fields.Many2one(states={'done': [('readonly', True)]}) + prod_lot_id = fields.Many2one(states={'done': [('readonly', True)]}) + state = fields.Selection(store=True) + inventory_location_id = fields.Many2one(readonly=True) + + class StockPicking(models.Model): _inherit = 'stock.picking' _order = 'id desc' diff --git a/stock_usability/stock_view.xml b/stock_usability/stock_view.xml index d86d2b8..9105a49 100644 --- a/stock_usability/stock_view.xml +++ b/stock_usability/stock_view.xml @@ -321,6 +321,47 @@ should be able to access it. So I add a menu entry under Inventory Control. --> + + + usability.stock.inventory.line.tree + stock.inventory.line + + + + product_qty > theoretical_qty + product_qty < theoretical_qty + theoretical_qty < 0 + + + + + + + + + + + + + + + + + + + + + + + usability.stock.location.route.search stock.location.route