Размер видео: 1280 X 720853 X 480640 X 360
Показать панель управления
Автовоспроизведение
Автоповтор
Hi, I have two questions please:- How can we load the values of other fields (ex. "date") of the main model active record other then the "id" ?- How to save back changes done in wizard fields record into the main model record ?
From the default_get method, we can get main record, by browsing the active_id and then we can access any value from the main model
To save back value to original model, main_rec = self.env['main_model'].browse(active_id)main_rec.field = new_value
@@OdooMates I tried: res[‘field_name’] = self.env.context.get(‘active_id.field_name’) but it return context none.
@@OdooMates U mean I should use the “Browse” method instead of “Get” ?
@@SamirSELLAMI we have to browse the record by getting the active_id from context
Thanks 👍👍👍
Welcome 👍
good video, do you have tutorial regarding passing one2many fields record from models.Model to transientModel?
Can we upload documents to attachments via wizard?
Thanks
Welcome
how to acess many2many field in wizard .it shows not allowed to access error
how to point to specific active_id in active_ids?
active_ids is list, lets say, it is [4,3,2,1]from this list on what basis you need to get a specific one ?
@@OdooMates if you use browse method it would retrieve a list?
Hi, I have two questions please:
- How can we load the values of other fields (ex. "date") of the main model active record other then the "id" ?
- How to save back changes done in wizard fields record into the main model record ?
From the default_get method, we can get main record, by browsing the active_id and then we can access any value from the main model
To save back value to original model,
main_rec = self.env['main_model'].browse(active_id)
main_rec.field = new_value
@@OdooMates I tried:
res[‘field_name’] = self.env.context.get(‘active_id.field_name’) but it return context none.
@@OdooMates U mean I should use the “Browse” method instead of “Get” ?
@@SamirSELLAMI we have to browse the record by getting the active_id from context
Thanks 👍👍👍
Welcome 👍
good video, do you have tutorial regarding passing one2many fields record from models.Model to transientModel?
Can we upload documents to attachments via wizard?
Thanks
Welcome
how to acess many2many field in wizard .it shows not allowed to access error
how to point to specific active_id in active_ids?
active_ids is list, lets say, it is [4,3,2,1]
from this list on what basis you need to get a specific one ?
@@OdooMates if you use browse method it would retrieve a list?