Skip to Content
Menú
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
Descartar

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,

Autor

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

Autor

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

Autor

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

Related Posts Respostes Vistes Activitat
2
de maig 24
1493
3
d’ag. 25
490
1
de jul. 25
360
1
de jul. 25
832
1
de jul. 25
1182