Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
6939 Weergaven

Hello,

I want to add the existing field "state" to the model "mail.compose.message". I want to do this because in my custom view(based on the mail.compose.message model), I want to send a message and at the same time change the workflow "hr_timesheet_sheet.sheet".

Can someone tell me how I can get this done?

Avatar
Annuleer
Beste antwoord

Inherit the model 'mail.compose.message' and add the field.

Avatar
Annuleer
Auteur

okay, but the model 'hr_timesheet_sheet.sheet' already inherits 'mail.thread'. How can I add the 'mail.compose.message' so it inherits both models?

that is not an issue if you want to add the field just inherit the base model. You can either inherit mail compose or hr_timesheet. but the module you give in depends in descriptor file matters. The fields upto the inherited model will be available to you. Add the field you wish in your new model which is inherited from the base model. and adjust the position of the field in the view in xml file, for that you have to inherit the view also

Gerelateerde posts Antwoorden Weergaven Activiteit
3
sep. 24
46576
2
mrt. 15
6244
1
mrt. 15
4520
2
mrt. 22
2468
0
mrt. 24
3140