Before this commit when we have a synced event with google and then we toggle the all-day field
changes didn't reflect on google side
This happened because google uses two separate fields for start/end.
1. dateTime (used for normal events)
2. date (used for all-day events)
when one of them is set, the other must be null.
Before this commit when we did a patch update, we set only one, but forget about the other which raises an error.
closesodoo/odoo#157664
Task: 3681668
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
The `test_accepting_recurrent_event_*` tests make sure that accepting recurrent events on google side reflect in odoo.
The test was failing because of the following:
when retrieving the invited attendee, the test used `self.assertEqual(event.attendee_ids[1].state, expected_states[i])` assuming that organizer will be at index `0` and invited user at index `1`.
However the list of `event.attendee_ids` is ordered by create_date.
And we create both organizer and attendee with the same command at the same time: `partner_ids=[Command.set([self.organizer_user.partner_id.id, self.attendee_user.partner_id.id])]`
So we might have organizer at index `1` and invited attendee at index `0`. This resulted in the indeterministic behavior of the test.
To fix this issue:
This commit changes how the invited attendee is retrieved, making sure that we always get the right attendee.
fixes runbot-61527
closesodoo/odoo#162279
X-original-commit: 6db2614283abfc035343f021b9cfc52609aa9d44
Signed-off-by: Ahmad Almaghraby (alah) <alah@odoo.com>
Before this commit when accepting a recurrent event from google calendar with option "this event", it didn't reflect on odoo calendar.
This happened due to the write_date check which applies google update only if their write_date is after odoo write_date,
but multiple updates from google might change some events write_date to now, which causes other google updates to get discarded.
This commit aims to fix this issue by keeping the write_date of the affected events before applying any google updates, and considering these dates instead of the live odoo write_date.
closesodoo/odoo#160357
Task: 3731552
X-original-commit: 3bcf6c458a4b483af6467d1c027b60771d1ce08d
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
The `test_calendar_month_view_start_hour_displayed` makes sure that start hour is displayed in calendar month view.
The test was failing before 09:00 AM because after creating the event, it sets the start time to 10:00 without setting the stop time or duration.
So when creating this event before 09:00 with a default duration of 1 hour, the stop time would be before 10:00, and it would raise an error.
This commit aims to fix this issue by adding a step to set the duration of the event, avoiding the potential error.
fixes runbot-59850
closesodoo/odoo#157263
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Before this commit when you create an event from a lead, a button appears to jump back to the lead but while you're creating the record, it already appears but empty.
This commit hides the button in case the res_model_name is null, which happens while we are creating the event and before hitting save.
closesodoo/odoo#154956
Task: 3747059
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
The `test_calendar_month_view_start_hour_displayed` makes sure
that start hour is display in calendar month view.
The test was failing because when clicking on scale selector,
it used '.dropdown-toggle:contains("Week")' however it might
happen that the current scale is not week.
This commit fixes this issue by changing the way we access
the scale selector.
fixes runbot-59023
closesodoo/odoo#156121
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Before this commit: the Outlook button status did not update automatically when we restart the sync.
This commit aims to fix the issue by using state for reactive values that control the button state.
closesodoo/odoo#155174
Task: 3731623
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Before this commit: the Google button status did not update automatically when we restart the sync.
This commit aims to fix the issue by using state for reactive values that control the button state.
Task: 3731623
Part-of: odoo/odoo#155174
When updating contracts, work entries are recomputed automatically for the employee linked to that contract.
However some contracts might not have an employee, which raises an error.
Added a check to recompute work entries only if the contract has an employee.
closesodoo/odoo#151190
Task: 3614495
X-original-commit: 3a4683ae8159bf405513a901b1fd3bba72a05fb7
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>