[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:
jem-odoo
2018-05-09 09:11:00 +02:00
parent 5bcede7dea
commit cca15358b6
+1 -1
View File
@@ -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.")