Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
5133 Представления

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
7313
1
авг. 22
4886
3
мар. 21
2127
5
февр. 20
12187
2
февр. 19
2867