I've been stuck for nearly the hole day to find out how to do this, until i found this. Solved in less than 20min, super thumbs up!! Thank you very much!
@@OdooMates Thank you for you're reply but this is not am actually mean it .here is the python code executed on scheduled action, @api.model def _get_open_qty(self): for rec in self: rec.open_qty = rec.qty_available print("hi") the print statement is executed but the for loop is not worked. Hope you help me
Hi, thanks for your time! Nice video. Would be nice to also understand how to create scheduled action to create a new record, state "object_create" instead of "code". Thanks!
Hi odoo mate, I’m currently trying to put acitivity_ids field in a custom Kanban view. I follow the way that CRM does, like: But when the activity overdue, the clock icon doesn’t turn red like the Kanban view in CRM or project module does. Do you know how to do that?
good tutorial as expected .. i have 2 issues : i changed time to run after 2 minutes but method didn't called .. second : i want to make my cron method run for model level to check specific field .. how can i do this ? can i create email from cron python method based on condition ? thanks
Regarding the function not getting executed... Just make sure whether it is or not... Because it has to work... Just add a print statement in the log and see... Whether it get printed or not
To get the users of user group, you can check like this from the python. suppose group id is 10, then browse the record, then by calling .users will return the users in the list.
I've been stuck for nearly the hole day to find out how to do this, until i found this. Solved in less than 20min, super thumbs up!! Thank you very much!
Great to hear!
Thank You so much Odoo Mates. Great explain, finally I got your solution.
Happy to hear it :)
If your schedule didn't run automatically, you should set noupdate="0" instead of noupdate="1", because noupdate="1" is for cron run only once.
thanks for sharing
Hi, Can you help me? How can add the next day with 07:59:59. I can't do it. Tks so much
Set interval as day and modify the time from the ui
Nice Explaination. Good Job !
thanks brother
Does the cron job function supposed to return a boolean? I found "return True" in the odoo's source.
Not mandatory always
@@OdooMates What if we "return False", does it means the job has not been executed correctly? will this be recored somewhere ?
Good job I really like it.
If I hadn't written print ("Abcd", rec).
What would you have written instead?
instead of printing abcd, we can perform some operations as per the need
I runs automatically according to the Odoo Time which can be found in the logs, not according to your pc time.
Server time/browser time
Thank you, this video help me so much
Glad it helped!
ValueError: : "'school.student' object has no attribute 'test_cron_job'" while evaluating
'model.test_cron_job()'
fix please?
ruclips.net/video/AHxIutNAda0/видео.html
Hi, This video is very helpful for me but Why For loop in function not executed on scheduled action triggered?
Glad it helped
ruclips.net/video/Rv44nFVn_5U/видео.html
@@OdooMates Thank you for you're reply but this is not am actually mean it .here is the python code executed on scheduled action,
@api.model
def _get_open_qty(self):
for rec in self:
rec.open_qty = rec.qty_available
print("hi")
the print statement is executed but the for loop is not worked. Hope you help me
@@anuvarghese3672 in your case you can remove the for loop and add your logic
@@OdooMates Thank You so much Odoo Mates.
Hi, thanks for your time! Nice video. Would be nice to also understand how to create scheduled action to create a new record, state "object_create" instead of "code". Thanks!
it shows error 'External ID not found in the system: %s' % xmlid)
Can I see your code
last_week_visit_date
code
model.send_followup_mail()
1
minutes
-1
"External ID not found in the system: ir.actions.server"
bug in my side ,its working now ,i removed the ref
What is the mean of "-1" in numbercall?
why is that "-1" / (minus one)..?
did am I missing something about that in this video?
to set the limit of number of executions, if you set a number it will execute only that much times, -1 will represent no limit
Can we get the module that you explained on(hospital module )?
Yes, search Odoo development tutorial or om_hospital in Odoo apps you can download it for free
apps.odoo.com/apps/modules/12.0/om_hospital/
Thank you
Hi odoo mate, I’m currently trying to put acitivity_ids field in a custom Kanban view.
I follow the way that CRM does, like:
But when the activity overdue, the clock icon doesn’t turn red like the Kanban view in CRM or project module does. Do you know how to do that?
Thanks it's an interesting video
welcome :)
good tutorial as expected ..
i have 2 issues :
i changed time to run after 2 minutes but method didn't called ..
second : i want to make my cron method run for model level to check specific field .. how can i do this ?
can i create email from cron python method based on condition ?
thanks
For this better than scheduled action.. You can go with automated action
Regarding the function not getting executed... Just make sure whether it is or not... Because it has to work... Just add a print statement in the log and see... Whether it get printed or not
@@OdooMates my case : i want to check 'visa expire' field for all employees and if (Today date - Visa Expire
@@omarahmed299 where you able to do that? I am also confused ?
How to send scheduled mails to a specific users in a group
To get the users of user group, you can check like this from the python.
suppose group id is 10, then browse the record, then by calling .users will return the users in the list.
Hi, nice video, could you attatch git repo for us please?
github.com/odoomates/odooapps/tree/16.0/om_hospital
thank you sir.
Most welcome
thinks Mates
welcome