Ir al contenido
Menú
Se marcó esta pregunta
3523 Vistas


I am using V11 and I would like to read the  value of a selection field from another form, i have used copied field like parent field in child model

The  parent model is "purchase.requisition" , I would like to know the value of the field "type" which is a selection field in the model.

the other model is "purchase.requisition.line", It already contains a field which is defined as follows:


state = fields.Selection([
('new','Buat PPB'),
('department_approval','Menunggu Approval Supervisor'),
('ir_approve','Menunggu Approval Manager'),
('approved','Approved'),
('po_created','Purchase Order Created'),
('received','Received'),
('cancel','Cancel')],string='Stage',default="new")

I extended this model to add a new field which will hold the value of the selection field in product using the incoming code:


state = fields.Selection([
('new','New'),
('department_approval','Waiting Department Approval'),
('ir_approve','Waiting IR Approved'),
('approved','Approved'),
('po_created','Purchase Order Created'),
('received','Received'),
('cancel','Cancel')],string='Stage',default="new",related="requisition_id.state",store=True)


But when I open the form I don't find the selected type value, I just find the selection drop-down menu without selected value but show in pivot menu.
when i change "store" field in child to 'False' that value in child come up. but field state dont show in pivot menu


can help me... i want field state show up in pivot menu and have value




Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
2
dic 17
16402
0
abr 15
3616
1
mar 15
9213
1
dic 24
1223
1
ago 18
7739