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

Portretas
Atmesti

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,

Autorius

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

Autorius

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

Autorius

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

Related Posts Replies Rodiniai Veikla
2
geg. 24
1610
3
rugp. 25
772
1
liep. 25
703
1
liep. 25
1058
1
liep. 25
1453