Skip to Content
Menu
This question has been flagged

I need to add a selection box into purchase order line which allows me to select a department name who is the product items for. I've created a selection custom field called x_dept under purchase order line model and I put selection options in some language that is not an english and I got error "Wrong value for purchase.order.line.x_dept: u'\u0e44\u0e2d\u0e17\u0e35'"

Could someone advise me how to add a selection box which allows me to select a department from hr department. I use odoo v10.


thank you in advance.

Nat

Avatar
Discard

You can get values of hr department, be defining a many2one field. You can give a many2one field with comodel as 'hr.department', Then you will get the values oh he departments,

Author

Thank Niyas. I'll try and see how it works.

Author

Hi Niyas, I am able to add a selection box and get hr department by create a new custom field and make it as many2one and put an object relation as "hr.department". However, when I printed out purchase order qweb report, I got something like "hr.department(24,)" instead of a name of department. What do I need to change, please advise. Thank you

Author

Well, I got it done now. Thank you so much anyway

Related Posts Replies Views Activity
2
May 24
561
0
Dec 24
28
1
Dec 24
40
0
Nov 24
29
1
Nov 24
218