[IMP] hr: add note field on hr_plan_activity_type

We would like to have a custom note on plan activities

closes odoo/odoo#36796

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit is contained in:
RomainLibert
2019-09-12 14:31:16 +00:00
parent 9ef2157d17
commit 2b34d22b42
3 changed files with 3 additions and 0 deletions
+1
View File
@@ -22,6 +22,7 @@ class HrPlanActivityType(models.Model):
('employee', 'Employee'),
('other', 'Other')], default='employee', string='Responsible', required=True)
responsible_id = fields.Many2one('res.users', 'Responsible Person', help='Specific responsible of activity if not linked to the employee.')
note = fields.Html('Note')
@api.onchange('activity_type_id')
def _onchange_activity_type_id(self):
+1
View File
@@ -76,6 +76,7 @@
<field name="summary"/>
<field name="responsible"/>
<field name="responsible_id" attrs="{'invisible': [('responsible', '!=', 'other')]}"/>
<field name="note"/>
</group>
</sheet>
</form>
+1
View File
@@ -25,6 +25,7 @@ class HrPlanWizard(models.TransientModel):
'res_id': self.employee_id.id,
'res_model_id': self.env['ir.model']._get('hr.employee').id,
'summary': activity_type.summary,
'note': activity_type.note,
'activity_type_id': activity_type.activity_type_id.id,
'user_id': activity_type.get_responsible_id(self.employee_id).id,
})