Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3826 Lượt xem

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

Ảnh đại diện
Huỷ bỏ

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,

Tác giả

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

Tác giả

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

Tác giả

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

Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 5 24
1567
3
thg 8 25
728
1
thg 7 25
660
1
thg 7 25
1020
1
thg 7 25
1404