diff --git a/product.py b/product.py index ce64f023ff..f211d8db01 100644 --- a/product.py +++ b/product.py @@ -22,7 +22,6 @@ class ProductCostPrice: class ProductCostHistory(ModelSQL, ModelView): 'History of Product Cost' __name__ = 'product.product.cost_history' - _rec_name = 'date' product = fields.Many2One('product.product', "Product") date = fields.DateTime('Date') cost_price = fields.Numeric('Cost Price') @@ -50,6 +49,9 @@ class ProductCostHistory(ModelSQL, ModelView): Coalesce(history.write_date, history.create_date), history.product, history.cost_price)) + def get_rec_name(self, name): + return str(self.date) + class OpenProductCostHistory(Wizard): 'Open Product Cost History'