[IMP] pre-commit: first run on whole repo

This commit is contained in:
Kevin Khao
2021-11-26 18:54:38 +03:00
parent a04b8980e1
commit 167aefee13
289 changed files with 6020 additions and 4170 deletions

View File

@@ -6,26 +6,26 @@ from odoo import fields, models
class ProductTemplate(models.Model):
_inherit = 'product.template'
_inherit = "product.template"
tracking = fields.Selection(tracking=True)
sale_delay = fields.Float(tracking=True)
# the 'stock' module adds 'product' in type...
# but forgets to make it the default
type = fields.Selection(default='product')
type = fields.Selection(default="product")
def action_view_stock_move(self):
action = self.env.ref('stock.stock_move_action').sudo().read()[0]
action['domain'] = [('product_id.product_tmpl_id', 'in', self.ids)]
action['context'] = {'search_default_done': True}
action = self.env.ref("stock.stock_move_action").sudo().read()[0]
action["domain"] = [("product_id.product_tmpl_id", "in", self.ids)]
action["context"] = {"search_default_done": True}
return action
class ProductProduct(models.Model):
_inherit = 'product.product'
_inherit = "product.product"
def action_view_stock_move(self):
action = self.env.ref('stock.stock_move_action').sudo().read()[0]
action['domain'] = [('product_id', 'in', self.ids)]
action['context'] = {'search_default_done': True}
action = self.env.ref("stock.stock_move_action").sudo().read()[0]
action["domain"] = [("product_id", "in", self.ids)]
action["context"] = {"search_default_done": True}
return action