Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
18603 Weergaven

@api.one def create_employee(self):

        active_id = self.env.context.get('active_ids', []) or [] record = self.env['op.faculty'].browse(active_id) record.create_employee() if self.user_boolean and not record.user_id:

            user_group = self.env.ref('openeducat_core.group_op_faculty') self.env['res.users'].create_user(record, user_group)

Avatar
Annuleer
Beste antwoord

Dear Arunagiri,

Active ids is simply current record's id. When Form view of record is opened its id will be passed in context as active_ids. 

While Creating new record , in context('active_ids') will contain id of creating record. that means id of nextval(models table).


Thankyou.

Avatar
Annuleer
Beste antwoord

Active id is the id of the active record.Wizard records will not be  saved in our database so we use this active id for saving datas in our wizard. 

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
dec. 24
5951
3
aug. 24
6825
4
jul. 24
41095
5
apr. 23
98766
3
nov. 22
4241