diff --git a/stock_inventory_chatter/__manifest__.py b/stock_inventory_chatter/__manifest__.py index c9f08be4e..ce51ae16b 100644 --- a/stock_inventory_chatter/__manifest__.py +++ b/stock_inventory_chatter/__manifest__.py @@ -1,11 +1,10 @@ -# Copyright 2017-19 Eficent Business and IT Consulting Services S.L. -# (http://www.eficent.com) +# Copyright 2017-19 ForgeFlow S.L. (https://www.forgeflow.com) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { "name": "Stock Inventory Chatter", - "version": "12.0.1.0.0", - "author": "Eficent, " "Odoo Community Association (OCA)", + "version": "13.0.1.0.0", + "author": "ForgeFlow," "Odoo Community Association (OCA)", "development_status": "Mature", "website": "https://github.com/OCA/stock-logistics-warehouse", "category": "Warehouse", diff --git a/stock_inventory_chatter/data/stock_data.xml b/stock_inventory_chatter/data/stock_data.xml index 81aecac66..a6e72de6a 100644 --- a/stock_inventory_chatter/data/stock_data.xml +++ b/stock_inventory_chatter/data/stock_data.xml @@ -2,11 +2,6 @@ - - Inventory Canceled - stock.inventory - - Inventory Confirmed stock.inventory diff --git a/stock_inventory_chatter/models/stock.py b/stock_inventory_chatter/models/stock.py index a1c37a66f..fd8ac5817 100644 --- a/stock_inventory_chatter/models/stock.py +++ b/stock_inventory_chatter/models/stock.py @@ -1,26 +1,19 @@ -# Copyright 2017 Eficent Business and IT Consulting Services S.L. -# (http://www.eficent.com) +# Copyright 2019 ForgeFlow S.L. (https://www.forgeflow.com) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). -from odoo import api, fields, models +from odoo import fields, models class StockInventory(models.Model): _name = "stock.inventory" _inherit = ["stock.inventory", "mail.thread"] - partner_id = fields.Many2one(track_visibility="always") - state = fields.Selection(track_visibility="onchange") - location_id = fields.Many2one(track_visibility="always") - filter = fields.Selection(track_visibility="onchange") + state = fields.Selection(tracking=True) - @api.multi def _track_subtype(self, init_values): self.ensure_one() - if "state" in init_values and self.state == "cancel": - return "stock_inventory_chatter.mt_inventory_canceled" - elif "state" in init_values and self.state == "confirm": - return "stock_inventory_chatter.mt_inventory_confirmed" + if "state" in init_values and self.state == "confirm": + return self.env.ref("stock_inventory_chatter.mt_inventory_confirmed") elif "state" in init_values and self.state == "done": - return "stock_inventory_chatter.mt_inventory_done" + return self.env.ref("stock_inventory_chatter.mt_inventory_done") return super(StockInventory, self)._track_subtype(init_values) diff --git a/stock_inventory_chatter/readme/CONTRIBUTORS.rst b/stock_inventory_chatter/readme/CONTRIBUTORS.rst index ec5d52ada..1889b7c26 100644 --- a/stock_inventory_chatter/readme/CONTRIBUTORS.rst +++ b/stock_inventory_chatter/readme/CONTRIBUTORS.rst @@ -1,3 +1,4 @@ -* Miquel Raïch +* Miquel Raïch * Xavier Jimenez -* Lois Rilo +* Lois Rilo +* Joan Sisquella