From cca15358b655a93205e07ca66025643dd57269ab Mon Sep 17 00:00:00 2001 From: jem-odoo Date: Tue, 8 May 2018 16:04:27 +0200 Subject: [PATCH] [FIX] hr_timesheet: do not copy AA when copying project When duplicating project, its analytic account is copied. This came from the ancient inheritS between the 2 models. This commit prevent copying the AA. However, if 'allow_timesheet' is checked, a new analytic account will be created when duplicating the project. --- addons/hr_timesheet/models/project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_timesheet/models/project.py b/addons/hr_timesheet/models/project.py index 806ba16895d..12f742231f7 100644 --- a/addons/hr_timesheet/models/project.py +++ b/addons/hr_timesheet/models/project.py @@ -9,7 +9,7 @@ class Project(models.Model): _inherit = "project.project" allow_timesheets = fields.Boolean("Allow timesheets", default=True) - analytic_account_id = fields.Many2one('account.analytic.account', string="Analytic Account", ondelete='set null', + analytic_account_id = fields.Many2one('account.analytic.account', string="Analytic Account", copy=False, ondelete='set null', help="Link this project to an analytic account if you need financial management on projects. " "It enables you to connect projects with budgets, planning, cost and revenue analysis, timesheets on projects, etc.")