Fix crash upon click on "Show History" on product form
This commit is contained in:
@@ -4,7 +4,6 @@
|
|||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
|
|
||||||
from odoo import models, fields
|
from odoo import models, fields
|
||||||
from odoo.tools.safe_eval import safe_eval
|
|
||||||
|
|
||||||
|
|
||||||
class ProductProduct(models.Model):
|
class ProductProduct(models.Model):
|
||||||
@@ -43,6 +42,5 @@ class ProductProduct(models.Model):
|
|||||||
self.ensure_one()
|
self.ensure_one()
|
||||||
action = self.env.ref(
|
action = self.env.ref(
|
||||||
'product_usability.product_price_history_action').read()[0]
|
'product_usability.product_price_history_action').read()[0]
|
||||||
action['domain'] = safe_eval(action['domain'])
|
action['domain'] = [('product_id', '=', self.id)]
|
||||||
action['domain'].append(('product_id', '=', self.id))
|
|
||||||
return action
|
return action
|
||||||
|
|||||||
Reference in New Issue
Block a user