[MIG] stock_usability_akretion to v18
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Copyright 2016-2022 Akretion France
|
||||
# Copyright 2016-2024 Akretion France (https://www.akretion.com/)
|
||||
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
@@ -10,12 +10,9 @@ class ProductTemplate(models.Model):
|
||||
|
||||
tracking = fields.Selection(tracking=True)
|
||||
sale_delay = fields.Float(tracking=True)
|
||||
# the 'stock' module adds 'product' in detailed_type...
|
||||
# but forgets to make it the default
|
||||
detailed_type = fields.Selection(default='product')
|
||||
|
||||
def action_view_stock_move(self):
|
||||
action = self.env["ir.actions.actions"]._for_xml_id("stock.stock_move_action")
|
||||
action = self.env["ir.actions.actions"]._for_xml_id("stock_usability_akretion.stock_move_list_first_action")
|
||||
action['domain'] = [('product_id.product_tmpl_id', 'in', self.ids)]
|
||||
action['context'] = {'search_default_done': True}
|
||||
return action
|
||||
@@ -25,7 +22,7 @@ class ProductProduct(models.Model):
|
||||
_inherit = 'product.product'
|
||||
|
||||
def action_view_stock_move(self):
|
||||
action = self.env["ir.actions.actions"]._for_xml_id("stock.stock_move_action")
|
||||
action = self.env["ir.actions.actions"]._for_xml_id("stock_usability_akretion.stock_move_list_first_action")
|
||||
action['domain'] = [('product_id', 'in', self.ids)]
|
||||
action['context'] = {'search_default_done': True}
|
||||
return action
|
||||
|
||||
Reference in New Issue
Block a user