diff options
| author | jbm-odoo <jbm@odoo.com> | 2020-08-12 14:03:20 +0000 |
|---|---|---|
| committer | jbm-odoo <jbm@odoo.com> | 2020-08-19 15:52:35 +0000 |
| commit | 49f8ee9e40399af77025717650569e6b1f39a2ae (patch) | |
| tree | a37ab78e22b83205ebd207f6f32fd18103f93218 /addons/sale_project/models | |
| parent | a98f0621169144f53f4ebc9361f3b7c6b60556c8 (diff) | |
[IMP] sale_timesheet: Billable project
Split completely 'non billable' from 'task rate' for more clarity.
Simplify the task form view of non-billable projects.
TaskID 2032048
closes odoo/odoo#55972
Related: odoo/enterprise#12441
Related: odoo/upgrade#1662
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/sale_project/models')
| -rw-r--r-- | addons/sale_project/models/product.py | 4 | ||||
| -rw-r--r-- | addons/sale_project/models/sale_order.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/addons/sale_project/models/product.py b/addons/sale_project/models/product.py index 1b2fc87a7e9..e4f6318684b 100644 --- a/addons/sale_project/models/product.py +++ b/addons/sale_project/models/product.py @@ -20,10 +20,10 @@ class ProductTemplate(models.Model): creating a new project based on the selected template.") project_id = fields.Many2one( 'project.project', 'Project', company_dependent=True, - help='Select a non billable project on which tasks can be created. This setting must be set for each company.') + help='Select a billable project on which tasks can be created. This setting must be set for each company.') project_template_id = fields.Many2one( 'project.project', 'Project Template', company_dependent=True, copy=True, - help='Select a non billable project to be the skeleton of the new created project when selling the current product. Its stages and tasks will be duplicated.') + help='Select a billable project to be the skeleton of the new created project when selling the current product. Its stages and tasks will be duplicated.') @api.constrains('project_id', 'project_template_id') def _check_project_and_template(self): diff --git a/addons/sale_project/models/sale_order.py b/addons/sale_project/models/sale_order.py index b9bb84afa90..ffeeae5ffa4 100644 --- a/addons/sale_project/models/sale_order.py +++ b/addons/sale_project/models/sale_order.py @@ -66,7 +66,7 @@ class SaleOrder(models.Model): if len(task_projects) == 1 and len(self.tasks_ids) > 1: # redirect to task of the project (with kanban stage, ...) action = self.with_context(active_id=task_projects.id).env.ref( 'project.act_project_project_2_project_task_all').read()[0] - action['domain'] = [('project_id', '=', task_projects.id)] + action['domain'] = [('id', 'in', self.tasks_ids.ids)] if action.get('context'): eval_context = self.env['ir.actions.actions']._get_eval_context() eval_context.update({'active_id': task_projects.id}) |
