Commit Graph
1083 Commits
Author SHA1 Message Date
Odoo Translation Bot 6bb4b305f0 [I18N] Update translation terms from Transifex 2018-10-03 14:27:50 +02:00
Christophe Simonis 199eb8dde3 [MERGE] forward port branch saas-15 up to d23601cc67
closes odoo/odoo#27156
2018-09-21 13:09:12 +00:00
Christophe Simonis d23601cc67 [MERGE] forward port branch saas-14 up to a119373b5b 2018-09-21 14:18:48 +02:00
Christophe Simonis a119373b5b [MERGE] forward port branch 10.0 up to cda1bec3e0 2018-09-21 10:42:19 +02:00
Martin Trigaux 6dec0bc308 [FIX] calendar: compare display_name for empty recordset
When sorting by a many2many fields (e.g. partner_ids) with one of the record
having an empty value on the sorted field, the comparison method used to compare
and empty record (e.g. res.partner()) and a name_get result (e.g. "Agrolait").

This is because the sort_field was initialized with the result of self[field]
but never assigned a new value below.

Fallback on an empty string when no record is found

Fixes #26908
2018-09-18 10:51:10 +02:00
Odoo Translation Bot 2bf3c29b0c [I18N] Update translation terms from Transifex 2018-09-16 04:10:49 +02:00
Odoo Translation Bot 548f8dba82 [I18N] Update translation terms from Transifex 2018-09-16 00:29:05 +02:00
Christophe Simonis 48aac01c13 [MERGE] forward port branch saas-14 up to 55ab1ac691 2018-09-11 18:54:08 +02:00
Christophe Simonis 55ab1ac691 [MERGE] forward port branch 10.0 up to cd66b0984e 2018-09-11 17:44:14 +02:00
Nicolas Lempereur dc9b3df431 [FIX] calendar: keep recurring after edited one
Since 76b7242 if we have a recurring event with 3 occurences:

 [4th 4:00-4th 5:00] [14th 4:00-14th 5:00] [24th 4:00-24th 4:00]

And we detach the first one to modify it, then when getting the
info of reccurring events not detached the system get:

- starts: [14th 4:00] [24th 4:00]
- stops: [4th 5:00] [14th 5:00] [24th 5:00]

And wrongly apply the current filtering over:

 [14th 4:00-4th 5:00] [24th 4:00-14th 5:00]

So the issue hides recurrences of event wrongly if:

- they have not been detached
- they don't have a duration of 0
- one or several previous events have been detached
- the stop date of the nth previous event occurrence (nth equaling
  number of detached previous events) is not in the current filtering.

With this change, the stops are also filtered based on start of
occurrence + duration.

Without the change, the added test fails with:

 False != '155-20120301120100' : Last event should be found searching it by date range

note: for 10.0 up to not including 11.0 which is solved with #26901

opw-1866151
closes #26887
2018-09-11 16:29:05 +02:00
Nicolas Lempereur 3d09560ffc [FIX] calendar: keep recurring after edited one
Since 76b7242 if we have a recurring event with 3 occurences:

 [4th 4:00-4th 5:00] [14th 4:00-14th 5:00] [24th 4:00-24th 4:00]

And we detach the first one to modify it, then when getting the
info of reccurring events not detached the system get:

- starts: [14th 4:00] [24th 4:00]
- stops: [4th 5:00] [14th 5:00] [24th 5:00]

And wrongly apply the current filtering over:

 [14th 4:00-4th 5:00] [24th 4:00-14th 5:00]

So the issue hides recurrences of event wrongly if:

- they have not been detached
- they don't have a duration of 0
- one or several previous events have been detached
- the stop date of the nth previous event occurrence (nth equaling
  number of detached previous events) is not in the current filtering.

With this change, the stops are also filtered based on start of
occurrence + duration.

Without the change, the added test fails with:

 False != '27-20120301120100' : Last event should be found searching it by date range

note: 11.0 version of 10.0 #26887

opw-1866151
closes #26901
2018-09-11 16:27:58 +02:00
Odoo Translation Bot 01d853e295 [I18N] Update translation terms from Transifex 2018-09-09 04:11:03 +02:00
Odoo Translation Bot 988cadaf5d [I18N] Update translation terms from Transifex 2018-09-09 00:29:00 +02:00
Odoo Translation Bot d40145a42e [I18N] Update translation terms from Transifex 2018-09-02 04:09:57 +02:00
Odoo Translation Bot 8846a0c21b [I18N] Update translation terms from Transifex 2018-09-02 00:29:56 +02:00
Nicolas Martinelli 93a586be7c [FIX] calendar: recurring events
Do not parse the rule with `rrulestr`, because converting back to string
will change the original rule.
2018-08-30 09:04:23 +02:00
Odoo Translation Bot 42e41b191c [I18N] Update translation terms from Transifex 2018-08-26 00:27:45 +02:00
Christophe Simonis fbfb91799e [MERGE] forward port branch saas-15 up to 9cf0dbe226 2018-08-21 16:00:40 +02:00
Christophe Simonis e80f853ab3 [MERGE] forward port branch saas-14 up to aafa6e38c4 2018-08-21 12:06:23 +02:00
Christophe Simonis aafa6e38c4 [MERGE] forward port branch 10.0 up to 342d037373 2018-08-21 11:33:53 +02:00
Nicolas Martinelli b4cbf0bb61 [FIX] calendar: date start
When creating and editing a new calendar.event record from the calendar
view, the start_datetime field does not prefill from the day that was
selected on the calendar.

Introduced in e08f999468

opw-1875276
2018-08-17 13:38:32 +02:00
Odoo Translation Bot 75630e3d69 [I18N] Update translation terms from Transifex 2018-08-12 04:15:33 +02:00
Christophe Simonis c22e479246 [MERGE] forward port branch saas-14 up to 5d8076c842 2018-07-10 12:22:55 +02:00
Christophe Simonis 5d8076c842 [MERGE] forward port branch 10.0 up to 5e682451cb 2018-07-10 11:30:59 +02:00
RomainLibert e08f999468 [FIX] calendar: add onchange on start_date and stop_date
When creating an event using the list view, no value is set in the
fields start and stop.

If selecting all day, we could only change the value of start_date and
stop_date which does not change the value in start or stop.

This makes it impossible to create an event from the list view.

This problem is not present in the calendar view since this view sets a
value in start and stop, and the start and stop are recomputed via the
inverse fields.

Closes #25680
2018-07-10 11:14:16 +02:00
Odoo Translation Bot cebab1eb7e [I18N] Update translation terms from Transifex 2018-07-01 00:24:24 +02:00
Odoo Translation Bot 268357bf15 [I18N] Update translation terms from Transifex 2018-06-24 00:25:09 +02:00
Christophe Simonis 152d42041e [MERGE] forward port branch saas-14 up to e4663523b9 2018-06-20 18:48:06 +02:00
Christophe Simonis e4663523b9 [MERGE] forward port branch 10.0 up to 081259ef25 2018-06-20 17:44:58 +02:00
len-odoo dfc37d3407 [FIX] calendar: do not write end time before start time of an event
The end time of a calendar event is constrained to never be before the start
of te event.
However when updating events, one path would first update the start of the event
before updating the end of the event.
So in case where (s_1, e_1) is updated by (s_2, e_2),
with respectively s_i < e_i,
if s2 > e1 then the update would violate the constraint and thus crash
the calendar update.

opw 1854394
2018-06-19 14:12:35 +02:00
Nicolas Martinelli b37416376b [FIX] google_calendar: rrule crash
Consider the following:
``` python
from datetime import datetime
from dateutil import rrule
import pytz

dt = pytz.UTC.localize(datetime(2016, 9, 2, 15, 42, 43, 205))
rset = rrule.rrulestr('FREQ=WEEKLY;INTERVAL=2;BYDAY=SU,FR,SA', dtstart=dt, forceset=True, tzinfos={})
test = [d for d in rset]
```

This will generate the following error:
```
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/dateutil/rrule.py", line 1164, in _iter
    advance_iterator(ritem)
  File "/usr/lib/python2.7/dist-packages/dateutil/rrule.py", line 1091, in __next__
    self.dt = advance_iterator(self.gen)
  File "/usr/lib/python2.7/dist-packages/dateutil/rrule.py", line 649, in _iter
    date = datetime.date.fromordinal(ii.yearordinal+i)
ValueError: year is out of range
```

If such an event is received from Google Calendar, the synchronization
crashes. To avoid this, we enforce a `COUNT` condition if the latter or
`UNTIL` is not explicitly specified. This gives:
``` python
rset = rrule.rrulestr('FREQ=WEEKLY;INTERVAL=2;BYDAY=SU,FR,SA;COUNT=100', dtstart=dt, forceset=True, tzinfos={})
```

Note that this was supposed to be fixed in
https://github.com/odoo/odoo/blob/9dcc32c3041e7ad3549a09c5ed68ee3ef22c7a26/addons/calendar/models/calendar.py#L1287
However, this was working with the old API. The new API and its computed
fields does something different:

1. create the calendar event with the provided `rrule`
2. trigger the inverse method `_inverse_rrule` => `count=100` is added
   to the computed parameters
3. however, doing so won't recompute `rrule` for obvious reasons (it was
   the initial value provided, so we don't recompute it)
4. the crash is met in `_get_recurrent_date_by_event` when using
   `self.rrule`

The fundamental issue is that `_inverse_rrule` is not strictly the
inverse of `_compute_rrule`.

Fixes #25189
opw-1861658
2018-08-07 09:02:44 +02:00
Lucas Perais (lpe) efa7f87cc8 [FIX] calendar: event from activity strip text from html
From a SO (for example), create an activity with type meeting
Create the calendar event

Access it as a guest with the route with the token

Before this commit, there was an error 500 because the description
of the event actually contained "\n" and was not parseable

After this commit, we strip the string at event creation, and no error occur

OPW 1867283
closes #25795
2018-08-06 09:31:06 +02:00
Martin Trigaux a425695e92 [I18N] remove es_AR translations
Courtesy of Juan José Scarafía, ADHOC
The quality of the Spanish (Argentina) translations is very poor.
Remove them all and will start from scratch, translating only when needed.
2018-07-24 10:45:46 +02:00
Odoo Translation Bot e6b570c898 [I18N] Update translation terms from Transifex 2018-07-22 04:09:21 +02:00
Christophe Simonis e354142ce7 [MERGE] forward port branch saas-15 up to c22e479246 2018-07-10 13:21:06 +02:00
Odoo Translation Bot d6a71fae93 [I18N] Update translation terms from Transifex 2018-07-08 04:09:36 +02:00
Odoo Translation Bot 5316406ad7 [I18N] Update translation terms from Transifex 2018-07-01 04:09:17 +02:00
Christophe Simonis c5ed372970 [MERGE] forward port branch saas-15 up to 152d42041e 2018-06-21 10:57:42 +02:00
Denis Ledoux e75c0bd2b9 [FIX] calendar: ensure the recurring dates is inside the limit defined
by datetime

The library `datetime` defines a MINYEAR and MAXYEAR limit.
If you try to play with dates outside of these years limits,
it crashes.

In the case of the opw, the date within its timezone was
within the limit (year 9999), but in the UTC timezone
it was no longer the case (year 10000).

Actually the condition should use `<=` instead of strict `<`,
and check the year *in utc*
is not outside the limit, but as soon as you try
to compute the date within UTC, datetime crashes :).

However we can assume nobody will need a event in the year 9999
any time soon, or by that time if Odoo still exists,
we should have refactored this module about 3333 times and somebody
would probably have removed this limitation by oversight anyway.

opw-1850024
2018-06-20 12:32:29 +02:00
Odoo Translation Bot 2b7c525982 [I18N] Update translation terms from Transifex 2018-08-05 00:28:35 +02:00
Odoo Translation Bot e1703cb95a [I18N] Update translation terms from Transifex 2018-07-29 00:26:54 +02:00
Odoo Translation Bot 402aac89a7 [I18N] Update translation terms from Transifex 2018-07-22 00:27:21 +02:00
Odoo Translation Bot 94e49c251a [I18N] Update translation terms from Transifex 2018-06-17 04:40:39 +02:00
Odoo Translation Bot 74c567329a [I18N] Update translation terms from Transifex 2018-06-17 00:26:55 +02:00
Odoo Translation Bot 3adeb46cdd [I18N] Update translation terms from Transifex 2018-06-10 04:40:02 +02:00
Martin Trigaux e7aff3775f [FIX] calendar: shows the event failing
When importing many events (e.g. google synchronisation), it is not clear which
one is failing

opw-1855471
2018-06-06 10:21:23 +02:00
Odoo Translation Bot 395459d077 [I18N] Update translation terms from Transifex 2018-06-03 04:41:19 +02:00
Odoo Translation Bot d88dd23ae2 [I18N] Update translation terms from Transifex 2018-06-03 00:27:35 +02:00
Odoo Translation Bot ca653c8c44 [I18N] Update translation terms from Transifex 2018-05-29 14:14:28 +02:00
Odoo Translation Bot a89e46fdc0 [I18N] Update translation terms from Transifex 2018-05-27 04:10:26 +02:00