[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:
@@ -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):
|
||||
|
||||
@@ -76,6 +76,7 @@
|
||||
<field name="summary"/>
|
||||
<field name="responsible"/>
|
||||
<field name="responsible_id" attrs="{'invisible': [('responsible', '!=', 'other')]}"/>
|
||||
<field name="note"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
|
||||
@@ -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,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user