From a765b3e643f4ad98f319b983dda313e0ebdf931f Mon Sep 17 00:00:00 2001 From: Yannick Tivisse Date: Tue, 23 Aug 2016 10:23:03 +0200 Subject: [PATCH] [REM] product: Remove product_manager field The product_manager field is existing since v6.0 and never displayed in any views. It is used in sale_timesheet module. A task created from a procurement_order (if it is a service and we track the service) is assigned to the product manager. It doesn't make a lot of sense as the value should be set directly in the database. We will remove the field and assign the current user to the task instead, which is the common behavior in Odoo. --- addons/product/models/product_template.py | 1 - addons/sale_timesheet/models/procurement.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/product/models/product_template.py b/addons/product/models/product_template.py index 860fa0e90e5..8f75f8d01a7 100644 --- a/addons/product/models/product_template.py +++ b/addons/product/models/product_template.py @@ -27,7 +27,6 @@ class ProductTemplate(models.Model): name = fields.Char('Name', index=True, required=True, translate=True) sequence = fields.Integer('Sequence', default=1, help='Gives the sequence order when displaying a product list') - product_manager = fields.Many2one('res.users', 'Product Manager') description = fields.Text( 'Description', translate=True, help="A precise description of the Product, used only for internal information purposes.") diff --git a/addons/sale_timesheet/models/procurement.py b/addons/sale_timesheet/models/procurement.py index b8d34d70fd1..60d3a3a9600 100644 --- a/addons/sale_timesheet/models/procurement.py +++ b/addons/sale_timesheet/models/procurement.py @@ -61,7 +61,7 @@ class ProcurementOrder(models.Model): 'planned_hours': planned_hours, 'remaining_hours': planned_hours, 'partner_id': self.sale_line_id.order_id.partner_id.id or self.partner_dest_id.id, - 'user_id': self.product_id.product_manager.id, + 'user_id': self.env.uid, 'procurement_id': self.id, 'description': self.name + '\n', 'project_id': project.id,