Skip to Content
Menu
This question has been flagged
1 Reply
6111 Views

Can you please tell me how i can show Selection field in any detail/tree page.

i mean i want to put selection field in stock_pack_operation or sale_order_line as user remarks/reason it's  not in text field but it's fix remarks so i want to show in selection field user only select remarks/reason reason not self define remarks/reason


note = fields.Selection([    ('fake order', 'Fake Order'), ('missing mobile number', 'Missing Mobile Number')], 'Remarks',    help="Please Enter Your Remarks about Return Product")


<field name="note" placeholder="Add Remarks/Notes" />
Avatar
Discard
Best Answer

Hi,

There is nothing complex in it, i f you want to add a selection field in a tree view, let it be the sale order line.  If it is sale order line you can check the field Invoice status  field in the sale order line which is invisible, it is a selection field.

Just go to the code and see how it is done,

python:

invoice_status = fields.Selection([    ('upselling', 'Upselling Opportunity'),    ('invoiced', 'Fully Invoiced'), 
('to invoice', 'To Invoice'), ('no', 'Nothing to Invoice') ],
    string='Invoice Status', compute='_compute_invoice_status', store=True,
         readonly=True, default='no')

XML,

<field name="invoice_status" invisible="1"/>

Thanks

Avatar
Discard
Author

Thanks for answer...

Related Posts Replies Views Activity
0
Nov 24
8
0
Nov 24
142
2
Aug 24
936
2
Aug 24
478
1
Nov 23
866