I have been using the Timesheets module in odoo 10. For the Working Time it takes from monday to friday. But I want to add one saturday for every month. That is, each month should calculate 1st saturday along with the other working days. How can I achieve this without using the code?
You can define working hours from Employee's Contracts Form. In it, there is one field which is Working Schedule and set Working hours from there.
Hope it will helps you.
Thanks,
Related
Part of my program requires checking the day of the week that a file was created. I have an input attribute which gives the date of creation in US form (month/day/year). However I do not have the day of the week.
As per the sadism of the legal department I am also restricted to only the time modules within python's standard library so unfortunately the obvious solution of PYTZ is not an option.
My current approach is to use the date to reference the Gregorian calendar. On the assumption that a the same date is always the same day i.e. 1st September 2022 is a Thursday everywhere in the world. However, I have not been able to validate this assumption.
If you know if this assumption is correct/incorrect and/or know of somewhere I can find out I would be very grateful.
Thanks.
our ERP (JTL) allows us to create workflows using dotliquid.
For our production we need a workflow that adds a fix amount of working days to the creation date of an order. However it may not add Saturday and Sundays.
Is it possible to filter the days added so we don't have to manually convert working days to days?
{{ CREATIONDATE | AddDays:X | Datum:'yyyy-MM-dd'}}
I have a single job with two schedule ID’s. One runs the job the last day of the month and the other schid runs the last Sunday of the month. The problem I’m trying to correct arises when the last day of the month falls on a Sunday which causes a conflict between the two schedules.
My first thought was to split the two schids into two separate job names, while making one job a requirement for the other so they can’t run at the same time. The problem is this scenario would only apply on the rare days they both run and on all other days the requirement wouldn’t be met.
I’m not extremely familiar with ca7 so thought I’d look for some input. Can a schid be created with a conditional statement?
I think two schids will be needed. The options assume a calendar that specifies all days as processing days.
Option 1
Schid=1 schedules the job on the last Sunday of the month UNLESS that Sunday falls on the last day of the month.
Schid=2 schedules the job on the last day of the month.
ID=001 ROLL=N INDEX=+000
SCAL= DOTM=2000 LEADTM=0010 STARTM=1950
MONTHLY DAY=SUN WEEK=-00 MONTH=ALL
MONTHLY NRDAY=-00 MONTH=ALL
ID=002 ROLL=N INDEX=+000
SCAL= DOTM=2000 LEADTM=0010 STARTM=1950
MONTHLY RDAY=-00 MONTH=ALL
Option 2
Schid=1 runs the last day of the month unless that day falls on a Sunday.
Schid=2 runs on the last Sunday of the month.
ID=001 ROLL=D INDEX=+000
SCAL= DOTM=1300 LEADTM=0030 STARTM=1230
MONTHLY NDAY=SUN WEEK=-00 MONTH=ALL
MONTHLY RDAY=-00 MONTH=ALL
ID=002 ROLL=D INDEX=+000
SCAL= DOTM=1300 LEADTM=0030 STARTM=1230
MONTHLY DAY=SUN WEEK=-00 MONTH=ALL
Another approach is to define a separate calendar with precisely the days I want the job to run so the schedule definition is pretty simple.
I am trying to find the same day of week from last month if today's date is Wednesday Oct 2nd 2019. I need to retrieve Wednesday Sept 4th 2019.
I am using Carbon and have tried subDays(30) and subMonth(1) but that obviously doesn't return the same week day.
SalesLogs::loadByDate(Carbon::now()->subMonth(1));
This code works as expected, however I am unable to work out how to make it find the same day of the week based on the prior month.
It's not super clear what you are trying to do, but I will take a shot at it. What about if you subtract a month, and then go to the next matching weekday?
$weekday = now()->dayOfWeek;
SalesLogs::loadByDate(now()->subMonth(1)->next($weekday));
Note: you can take advantage of Laravel's handy now() helper function, which is equal to Carbon::now(), but saves you from having to import Carbon.
Does that get you what you need?
I'm try to set Recurrence Appointment in my caldender for 5th working day on every month.
I can see that i can set the 1st, 2nd, 3rd, 4th and the last day of every month but i cant see option to set for 5th day.
Does anyone know how I can do this?
Under 'Recurrence Pattern', select 'Monthly' and put put:
Day [5] of every [1] month(s)
in the bit on the right
-- edit --
Right, looks like this may be of use: http://www.websetters.co.uk/WSAddIns/WSRAII/index.htm
Outlook can't handle that natively as far as I know.
You could do some date crunching in Excel and import them though