Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
5119 มุมมอง

i create new module called employee transfer via inheritance.

i want to make field store  value from  employees master table . 

when i create many2one field i don't want to store the id of the relation , i want to store other column example i want to passport number  .

I try to follow some example to store the passport number i don't understand the concept

department_id = fields.Many2one(related='employee_id.department_id', \
string='Department', type='many2one', relation='hr.department', \
readonly=True, store=True)
อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด
employee_passport_no = fields.Char(related='employee_id.passport_id', \
string='Passport Number', readonly=True, store=True)
อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
3
ก.ย. 22
7312
1
ส.ค. 22
4883
3
มี.ค. 21
2127
5
ก.พ. 20
12185
2
ก.พ. 19
2864