跳至內容
選單
此問題已被標幟
3813 瀏覽次數

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

頭像
捨棄

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,

作者

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

作者

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

作者

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

相關帖文 回覆 瀏覽次數 活動
2
5月 24
1548
3
8月 25
719
1
7月 25
616
1
7月 25
1007
1
7月 25
1361