Help

欢迎!

该社区面向专业人士和我们产品和服务的爱好者。
分享和讨论最好的内容和新的营销理念,建立您的专业形象,一起成为更好的营销人员。


0

How to Set Custom Default Accounts for New Contacts in Odoo 18?

Avatar
Discard
2 Answers
0
Avatar
odoo
Best Answer

You can achieve this in Odoo 18 by setting up an Automated Action to assign your newly created default accounts when a new contact is created. Follow these steps:

Click Create and set the following parameters:

  • Action Name: Default Accounts on Contacts
  • Model: Contacts (res.partner)
  • Active: ✅ (Check this)
  • Trigger: On Creation
  • Apply On: Match all records
  • Action To Do: Python Code
record['property_account_payable_id'] = env['account.account'].search([('code', '=', '510000')], limit=1).id
record['property_account_receivable_id'] = env['account.account'].search([('code', '=', '420000')], limit=1).id


Avatar
Discard
0
Avatar
odoo
Best Answer

Thank you Abhay I will try this solution.

Avatar
Discard