how to write the python search condition parameters?
I tried .....search ['name', 'ilike', 'biblio'] but this creates an error during execution.
Any direction would be greatly appreciated as I am not a developper! :-(
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
This is an Example:
partner_rec = self.env['res.partner'].search([('name','ilike','biblio')])
Hope it can help you. You can check this documentation to get more explanation: https://www.odoo.com/documentation/12.0/reference/orm.html#common-orm-methods
Hello Michel,
You done well but there a syntax issue
search ['name', 'ilike', 'biblio'] this wrong
search([('name', 'ilike', 'biblio')]) this is right
thks Subbarao. I made the correction.
I still have an issue as the server action with this python code does not delete the partner categories as expected;
Menikmati diskusi? Jangan hanya membaca, ikuti!
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
Search a message
Diselesaikan
|
|
1
Feb 25
|
746 | |
|
0
Sep 23
|
1821 | ||
|
2
Jun 23
|
3554 | ||
|
1
Agu 22
|
12190 | ||
|
7
Okt 20
|
9887 |
the code
Code:
partner_rec = env['res.partner'].search([])
# you can filter the unncessary partners using the condition in search
for partner in partner_rec:
partner.write({'field_name': ''})