Skip to Content
Menu
This question has been flagged


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
Discard
Related Posts Replies Views Activity
2
Dec 17
16664
0
Apr 15
3796
1
Mar 15
9350
1
Dec 24
1380
1
Aug 18
7906