Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
3 Replies
3867 Tampilan

When I import many sale orders from an Excel or CSV file, the related sale person (field called 'user_id') is always the user who imported the orders. Normally it should be the user who is related to the concrete customer in partners module. I do not want to import another column with the salespersons because that would be too much work. So is there an action I can schedule or call after import that sets the correct salesperson for each order?

Thanks in advance!

Avatar
Buang
Jawaban Terbai

It's simple to setup an Automated Action to automatically assign the salesperson from the customer record.  

Enable Developer Mode and navigate to Settings / Technical / (Automation) / Automated Actions and add the following


Python code is:

record['user_id'] = record.partner_id.user_id
Note: if you can't find Automated Actions in Developer Mode you may need to install the base_automation module as explained here

Avatar
Buang
Penulis

Thanks for your answer. Unfortunately, I cannot set automated actions because I am not using Odoo Studio. Do you know if there is any possibility to perform this within a scheduled action?

You don't need Odoo Studio to create Automated Actions. They are available in all versions of Odoo, but sometimes you need to install the base_automation module as explained here: https://odootricks.tips/automated-actions/

Penulis

Very nice to know. Now it works. Thank you!

Post Terkait Replies Tampilan Aktivitas
1
Feb 24
2285
1
Apr 17
6903
2
Okt 15
4919
1
Okt 22
3373
2
Feb 21
6825