How to add the same job position in some contacts using server action.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Бухгалтерия
- Склад
- PoS
- Проекты
- MRP
Этот вопрос был отмечен
Hi Jordan,
Find the IDs of contacts for whom you need to change the job position and update the target_partner_ids list.
target_partner_ids = [1869,1870,1871]
partner_ids = env['res.partner'].search([('id', 'in', target_partner_ids)])
for partner in partner_ids :
partner.write({
'function':'Sales'
})
Or
Create a server action, select 'Contacts' as the model, update the Python code, and click on 'Create Contextual Action
Go to Contacts, select the contacts you want to change, click on 'Action,' and select the server action created.

Hope it helps,
Kiran K
Hi,
1. Create a new server action.

2. Select the contacts and click the 'Consultant job position' button

Please refer to this blog :https://www.cybrosys.com/blog/how-to-create-configure-server-actions-in-the-odoo-15
Hope it helps
Не оставайтесь в стороне – присоединяйтесь к обсуждению!
Создайте аккаунт сегодня, чтобы получить доступ к эксклюзивным функциям и стать частью нашего замечательного сообщества!
Регистрация