diff --git a/cor_custom/models/analytic.py b/cor_custom/models/analytic.py index 106263f..c20d34d 100755 --- a/cor_custom/models/analytic.py +++ b/cor_custom/models/analytic.py @@ -14,6 +14,15 @@ import dateutil.parser class AccountAnalyticLine(models.Model): _inherit = 'account.analytic.line' + @api.depends('project_id', 'employee_id') + def name_get(self): + res = [] + for record in self: + if record.project_id.name: + name = record.project_id.name + '/' + record.name + res.append((record.id, name)) + return res + def _domain_project_id(self): domain = [('allow_timesheets', '=', True),('is_sub_project', '=', False)] if not self.user_has_groups('hr_timesheet.group_timesheet_manager'):