mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[IMP] stock_inventory_chatter: black, isort
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user