diff --git a/INSTALL b/INSTALL index 8e164db359..339aba2018 100644 --- a/INSTALL +++ b/INSTALL @@ -4,7 +4,7 @@ Installing trytond_product_cost_history Prerequisites ------------- - * Python 2.4 or later (http://www.python.org/) + * Python 2.5 or later (http://www.python.org/) * trytond (http://www.tryton.org/) * trytond_product (http://www.tryton.org/) diff --git a/product.py b/product.py index 358ea6109b..994b3dbc4c 100644 --- a/product.py +++ b/product.py @@ -52,21 +52,20 @@ class OpenProductCostHistory(Wizard): }, } - def _open(self, cursor, user, data, context=None): + def _open(self, data): model_data_obj = self.pool.get('ir.model.data') act_window_obj = self.pool.get('ir.action.act_window') product_obj = self.pool.get('product.product') - act_window_id = model_data_obj.get_id(cursor, user, - 'product_cost_history', 'act_product_cost_history_form', - context=context) - res = act_window_obj.read(cursor, user, act_window_id, context=context) + act_window_id = model_data_obj.get_id('product_cost_history', + 'act_product_cost_history_form') + res = act_window_obj.read(act_window_id) if not data['id'] or data['id'] < 0: res['pyson_domain'] = PYSONEncoder().encode([ ('template', '=', False), ]) else: - product = product_obj.browse(cursor, user, data['id'], context=context) + product = product_obj.browse(data['id']) res['pyson_domain'] = PYSONEncoder().encode([ ('template', '=', product.template.id), ])