From f14bdd579594545f2f516c43fd84a27118751811 Mon Sep 17 00:00:00 2001 From: Joan Sisquella Date: Tue, 7 Jan 2020 09:39:47 +0100 Subject: [PATCH] [IMP] stock_inventory_chatter: black, isort --- stock_inventory_chatter/__manifest__.py | 26 +++++++++++-------------- stock_inventory_chatter/models/stock.py | 24 +++++++++++------------ 2 files changed, 23 insertions(+), 27 deletions(-) diff --git a/stock_inventory_chatter/__manifest__.py b/stock_inventory_chatter/__manifest__.py index dc436affa..c9f08be4e 100644 --- a/stock_inventory_chatter/__manifest__.py +++ b/stock_inventory_chatter/__manifest__.py @@ -3,20 +3,16 @@ # 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)", - 'development_status': 'Mature', + "name": "Stock Inventory Chatter", + "version": "12.0.1.0.0", + "author": "Eficent, " "Odoo Community Association (OCA)", + "development_status": "Mature", "website": "https://github.com/OCA/stock-logistics-warehouse", - 'category': 'Warehouse', - 'summary': "Log changes being done in Inventory Adjustments", - 'depends': ['stock'], - "data": [ - 'data/stock_data.xml', - 'views/stock_inventory_view.xml', - ], - 'license': 'AGPL-3', - 'installable': True, - 'application': False, + "category": "Warehouse", + "summary": "Log changes being done in Inventory Adjustments", + "depends": ["stock"], + "data": ["data/stock_data.xml", "views/stock_inventory_view.xml"], + "license": "AGPL-3", + "installable": True, + "application": False, } diff --git a/stock_inventory_chatter/models/stock.py b/stock_inventory_chatter/models/stock.py index f797eeef5..a1c37a66f 100644 --- a/stock_inventory_chatter/models/stock.py +++ b/stock_inventory_chatter/models/stock.py @@ -6,21 +6,21 @@ from odoo import api, fields, models class StockInventory(models.Model): - _name = 'stock.inventory' - _inherit = ['stock.inventory', 'mail.thread'] + _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') + 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") @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' - elif 'state' in init_values and self.state == 'done': - return 'stock_inventory_chatter.mt_inventory_done' + 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" + elif "state" in init_values and self.state == "done": + return "stock_inventory_chatter.mt_inventory_done" return super(StockInventory, self)._track_subtype(init_values)