Skip to Content
Menu
This question has been flagged
3 Replies
3630 Views

I have "tech" field name and i want to print "Technology" as a label in browser. so i write below code

tech = fields.Selection(string='Technology',[('php','PHP'),('java','JAVA'),('python','Python')])

but it gives an error like "SyntaxError: non-keyword arg after keyword arg"

if i write below code than it display "tech" as a label but i want to print "Technology".

tech = fields.Selection([('php','PHP'),('java','JAVA'),('python','Python')])

help me out.Thanks in advance


Avatar
Discard
Best Answer

You can give label at View side like
<field name="tech" string="Technology"/>

or


tech = fields.Selection([('php','PHP'),('java','JAVA'),('python','Python')], string='Technology')

Avatar
Discard
Author

Thank you..it works.

Best Answer

You can try it.


'tech': fields.selection([('php','PHP'),('java','JAVA'),('python','Python') ],'Technology'),

Avatar
Discard
Best Answer

You Can write like this


tech = fields.Selection([('php','PHP'),('java','JAVA'),('python','Python')],'Technology')

Avatar
Discard