i hve one many to one field 'hr.employee', in that i want to list some particular employee data. is this possible in odoo v8?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Akuntansi
- Inventaris
- PoS
- Project
- MRP
Pertanyaan ini telah diberikan tanda
Hi Ramanan,
It is possible in v8. You can use domain attribute in that many2one field, for giving the criteria
For example:
class Session(models.Model):
_name = 'model.name'
employee_id = fields.Many2one('hr.employee', string="Employee", domain=[('field_name','=',value)])
works.
you can use domain for that:
<field name="your_many2one_field" domain="[('employee_id','=',employee_id)/>
thnks it's works.
class Session(models.Model):
_name = 'model.name'
employee_id = fields.Many2one('hr.employee', string="Employee",
domain=[('field_name','=',True)])
Menikmati diskusi? Jangan hanya membaca, ikuti!
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
Daftar| Post Terkait | Replies | Tampilan | Aktivitas | |
|---|---|---|---|---|
|
|
1
Apr 20
|
5823 | ||
|
how to set many2one field and autofill other fields?
Diselesaikan
|
|
2
Nov 18
|
15653 | |
|
|
1
Jun 18
|
4714 | ||
|
|
1
Nov 17
|
8107 | ||
|
|
1
Agu 17
|
4979 |
You mean you want list only employees satisfying a criteria?
yes based on condition i want to list particular employee in many2one field.