[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.
This commit is contained in:
@@ -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.")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user