one2many field name: survey_request_ids
model of one2many field : hr_evaluation.evaluation
Field name of 'Interviewer' inside one2many : user_id
model of 'Interviewer' inside one2many : hr.evaluation.interview
I want to create a new field 'Interviewer' below 'Appraisal Deadline' which will have values from the below field 'Interviewer' which is in a one2many.
I tried like these,from openerp import models,fields,api class hr_evaluation_interview(models.Model): _inherit = 'hr.evaluation.interview' @api.onchange('user_id') def _onchange_user_id(self): rec = self.env['hr_evaluation.evaluation'].search([('id','=', self.evaluation_id.id)]) rec.update({ 'interviewer_ids': [(4,self.user_id.id)] }) class hr_evaluation_inherit(models.Model): _inherit = 'hr_evaluation.evaluation' _columns = { 'interviewer_ids': fields.many2many('res.users', string='Interviewer',readonly=True) }
form view image link..,
https://i.stack.imgur.com/2MOPY.png
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Księgowość
- Zapasy
- PoS
- Project
- MRP
To pytanie dostało ostrzeżenie
4121
Widoki
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj sięPowiązane posty | Odpowiedzi | Widoki | Czynność | |
---|---|---|---|---|
|
2
lis 18
|
3956 | ||
|
0
lut 19
|
5685 | ||
|
0
maj 15
|
5909 | ||
|
1
kwi 15
|
3991 | ||
|
1
lip 19
|
3197 |