Commit Graph

90 Commits

Author SHA1 Message Date
Denis Ledoux 4f03a6224d [FIX] calendar: calendar_last_notif_ack is not user self readable.
`calendar_last_notif_ack` is not in the self readable fields list
of `res.users`. See `SELF_READABLE_FIELDS` in res_users.py.

This field must therefore be read as SUPERUSER.

opw-634402
2015-05-12 12:21:56 +02:00
Jeremy Kersten 2e49fc09ff [FIX] calendar: set context if none
Avoid traceback if no context in get_recurrent_date_by_event when code do:
    context.get('xx')
2015-05-11 10:41:02 +02:00
Denis Ledoux d13ca06c8e [FIX] calendar: message_(un)subscribe expects integers
In calendar, using recurrent events leads to the use of
virtual ids, which are strings.
It wasn't possible to change the message subscriptions
for recurring events,
neither for the user himself, neither for the other followers

opw-627895
2015-02-23 14:29:01 +01:00
Denis Ledoux 0200e31f7b [FIX] calendar: context can be frozen in Odoo 8.0 2015-02-20 16:53:02 +01:00
Denis Ledoux 6539104a4f [FIX] calendar: add followers to recurrent events
default_get method of mail.wizard.invite model uses
the key 'default_res_id' to retrieve the res_id of the record
to add the followers.

In the case of recurrent events, virtual ids are used, and
the conversion from virtual ids to real ids is needed.
2015-02-20 16:13:28 +01:00
Richard Mathot af94e5af6b [FIX] calendar: loading problem with some locales
When you try to load calendar_demo.xml, the loading of demo event
`calendar_event_1` fails with fr_BE locale (and probably some others).

This is due to the rendering of the mail template
`calendar_template_meeting_invitation` (which is used when you create
an event).

This template used a method `get_interval()` in calendar.py, which
does not always return Unicode strings. Furthermore, these strings
are dates and should be formatted according to user locale.

PS: Yeah, we love Python2's management of encodings and Unicode...
2015-02-17 14:41:29 +01:00
Jeremy Kersten 8ef8cf7dba [IMP] calendar: use from_string and to_string from new api to convert datetime/string 2015-02-12 11:57:01 +01:00
Jeremy Kersten 064f18e6b6 [FIX] calendar: stop to think that cron will be always on time
Fix error where if no email_from was in openerp.tool.config, notif by mail was not sent
Add optionnal param 'missing' to allow to have missing alarm.

Missing field is the date from the last time that cron had run.
Now we stop to process the next 30 minutes, but we process all alarm since the next cron.
So, an email alarm will be always in delay, but a mail will be sent !

In v8 we use ICP to save the date, but it should be changed in master, maybe we should
save the last execution time in the ir_cron model directly ?
2015-02-12 11:57:01 +01:00
Jeremy Kersten e0c17258bd [FIX] calendar: allow to force the sending of email in function _send_mail_to_attendees (even if email are himself) and use it for reminder. 2015-02-06 14:02:36 +01:00
Denis Ledoux 6c78541978 [FIX] calendar: prevent updating event with a start date greater than the end date
Setting a constraint on an old api style computed field is broken in Odoo 8.0
The constraint is checked with the old value of the computed field, not the new one
So, it was possible to update an event with a start date greater than the stop date
And once done, it was impossible to correct the mistake
2015-01-08 14:19:28 +01:00
Denis Ledoux faf45db0d2 [FIX] calendar: set duration on either stop or start date updated
Not only when both are.
2015-01-08 12:22:13 +01:00
tfossoul f3c4688715 [FIX] Calendar : virtual ID fix. Close #4465 2014-12-31 11:56:28 +01:00
Jeremy Kersten 42fbb5fd71 Revert "[IMP] calendar: Set default value for start* and stop* date/datetime. Else field.function start and stop are not setted by default while they are required."
This reverts commit b1adf3a95e.

Not so simple, 'search' don't find recurrent events with this change
2014-12-14 22:43:29 +01:00
Jeremy Kersten b1adf3a95e [IMP] calendar: Set default value for start* and stop* date/datetime. Else field.function start and stop are not setted by default while they are required. 2014-12-12 17:09:53 +01:00
Jeremy Kersten de641ccbf8 [FIX] calendar: allow to sort in tree view the starting date (start, start_date, start_datetime) (hack for V8) 2014-11-21 14:07:09 +01:00
Olivier Dony cc762004ed [FIX] calendar: support non-ascii chars in date/time format
The calendar module generates string values with
a date/time formatted according to the user
language. Those formats may contain non-ascii
characters and are read as unicode strings,
but fed to str{p,t}time, which only accepts
byte strings (in Python 2).

This would cause an exception when loading calendar
notifications for a user using e.g. Chinese with
some CJK unicode chars in the date/time format.
2014-11-20 18:16:41 +01:00
Christophe Simonis ed925892b9 [MERGE] forward port of branch saas-3 up to 2c1bcfb 2014-10-23 16:52:37 +02:00
Denis Ledoux 2c1bcfb2c9 [FIX] calendar: avoid to pass ids as string to unlink and write methods
opw-616532: if the event is associated somehow to a workflow, an assert is done to check that element of the ids list are (int, long)
2014-10-23 16:40:53 +02:00
Jeremy Kersten 24bec094c2 [IMP] hr_holiday/calendar : allow to pass no_email into context when we create a meeting to avoid to send a mail to attendees. 2014-10-03 20:43:48 +02:00
Christophe Simonis 41afeec7f1 [MERGE] forward port of branch saas-5 up to 9363bc9 2014-09-04 18:03:24 +02:00
Christophe Simonis 9363bc9182 [MERGE] forward port of branch saas-3 up to 3d80dc2 2014-09-04 17:51:42 +02:00
Stéphane Wirtel 1ff7ed2758 [IMP] Optimize the schedulers of the calendar, fetchmail and base_action_rules modules
Disable the the crons when they'd have nothing to do, re-enable them when a
task is (probably) introduced
2014-09-02 18:32:27 +02:00
Raphael Collet 97256fa1fb [IMP] models: move prefetching of records back to method _prefetch_field
The selection of records in cache for prefetching was moved to method
_read_from_database() by xmo at rev 785018cc in order to fix an access right
bug.  But this introduced an issue: to explicitly avoid prefetching, you should
use read() instead of browsing records.  We revert the change by xmo, without
reintroducing the bug (which apparently was fixed by another way).
2014-08-22 14:42:20 +02:00
Denis Ledoux ae65be2b2a [MERGE] forward port of branch saas-5 up to 0739bc4 2014-08-11 15:58:02 +02:00
Denis Ledoux 7c647ec876 [MERGE] forward port of branch saas-4 up to 0a1e4a0 2014-08-08 17:27:29 +02:00
Denis Ledoux 0a1e4a05b2 [MERGE] forward port of branch saas-3 up to 81a902a 2014-08-08 17:06:39 +02:00
Olivier Dony 4b2f2a1561 [IMP] calendar.event: _compute should be done in batch + consistent @multi attributes 2014-08-07 18:03:08 +02:00
Olivier Dony 6445ce7922 [FIX] calendar.read: do not re-compute `display_time` for virtual calendar ID if not requested 2014-08-07 18:03:08 +02:00
Olivier Dony 30ddb67299 [IMP] calendar: simplify/optimize `rrule` computed field
Avoid reading one record at a time, leading to multiple
calls to read() which is special-cased and even slower
than a normal one.
2014-08-07 18:03:08 +02:00
Jeremy Kersten 6655a020c3 [FIX] calendar/crm: Add active_id (if in model partner_id) in defaults values from partner_ids when we creates a new meeting.
Bug was that when you click on meeting button from a res_partner form (Customers in menu), the button overwrites the context to use the active partner as a default in the calendar meeting. By consequence, the context overwritte the default partner who are the creator. Now the context could be removed from action and that is in get_default for partner_ids (from model calendar_event) that we add the creator AND the active_id if from a model res_partner.
2014-08-07 13:02:59 +02:00
Martin Trigaux 29d16f756c [FIX] calendar: avoid double 'Attendees' field in search view
The partner_ids fields represents attendees but it's confusing to have twice the same field in search view (opw 607275)
2014-08-04 17:52:02 +02:00
Thibault Delavallée dec73a43da [FIX] calendar: onchange_dates: protect against void dates (for example when creating a meeting through the form view) 2014-08-01 15:50:34 +02:00
Christophe Simonis 120a2c1ec1 [FIX] {base_action_rule,calendar,hr,mail,project_issue}: decorate the method `message_post` to specify signature 2014-07-28 18:07:17 +02:00
rlu-odoo 8b67a7202d [REF] OpenERP --> Odoo in various UI texts
Rebranding has been done in:
- data/demo files
- html templates
- help notices
- comments
- logger messages
- and other various messages

(Commit taken from odoo-dev:8.0-improve-openerp-odoo-rlu at rev 7deaa08)

Closes #1260
2014-07-18 13:45:41 +02:00
qdp-odoo d35d47165e Merge pull request #1124 from odoo-dev/master-wmsstaging4-jco
fixes related to WMS, product variants and templates... from Josse
2014-07-17 18:18:16 +02:00
Xavier Morel a1de79b875 [FIX] calendar: invalidate cache to avoid (pre)fetching invalid virtual IDs
Because the new API basically browses everything, the virtual IDs used by
calendar.event are added to the cache and prefetching tries to get them from
the database resulting in conversion errors. These ids have to be forcibly
evicted to avoid the error.
2014-07-14 15:41:40 +02:00
Josse Colpaert af0e9b8aa6 [MERGE] Fix copy_data for merge 2014-07-07 14:33:01 +02:00
Raphael Collet cbe2dbb672 [MERGE] new v8 api by rco
A squashed merge is required as the conversion of the apiculture branch from
bzr to git was not correctly done. The git history contains irrelevant blobs
and commits. This branch brings a lot of changes and fixes, too many to list
exhaustively.

- New orm api, objects are now used instead of ids
- Environements to encapsulates cr uid context while maintaining backward compatibility
- Field compute attribute is a new object oriented way to define function fields
- Shared browse record cache
- New onchange protocol
- Optional copy flag on fields
- Documentation update
- Dead code cleanup
- Lots of fixes
2014-07-06 17:05:41 +02:00
Josse Colpaert 8678d3c890 [MERGE] Merge from master routing conflict 2014-06-25 15:10:18 +02:00
Josse Colpaert 12211437f1 [IMP] Corrections in views + calendar fields isinstance + inventory theoretical qty 2014-06-25 15:03:11 +02:00
Josse Colpaert 5ecde0fa26 [IMP] Tristates should be working even if the picking has no name 2014-06-23 15:23:20 +02:00
Denis Ledoux 6ed5b04146 [FIX] calendar: replace end_type = final_date by end_date, the actual right selection 2014-06-02 12:02:11 +02:00
Kersten Jeremy 02be7aa65c [IMP] Improve Calendar synchronization
- Use the new fields from calendar (renamed in 9398.1.7 trunk-cal-v8-jke)
    - Manage some google excpetions about token expiration
    - Manage some google excpetions about token revokation
    - Manage some google excpetions about 410 - Gone from google
    - Detect / Allow user to change the calendar and remove all old reference.
    - Use by default the since_modified for synchronization and not always a full (updatedTime in google)
    - Add some key for ir_parameters : 
             'calendar.week_synchro' : number of week to synchornize when we are in full mode
             'calendar.block_synchro_attendee' : need to synchronize the attendees between google and openerp (creation of partner)
             'calendar.block_since_synchro' : Always use the full synchro. (Can be forced in "one time" removing the last synchro from res_users form)
             'calendar.debug_print' : _logger is more verbose
    - Pep 8
    - Change behaviour of do_request to return a tuple with status raquest and response
    - Add field from token and synchro date in res_users view form
2014-05-14 10:28:10 +02:00
Kersten Jeremy 6d00292064 [REF] Replace temp name by real name
bzr revid: jke@openerp.com-20140505154246-8vahdzf60oiksm62
2014-05-05 17:42:46 +02:00
Kersten Jeremy 4ce7e8c6dd [FIX] Fix access rule for portal. Add timezone in small calendar from email
bzr revid: jke@openerp.com-20140505124657-t6gxusxkkgon06hf
2014-05-05 14:46:57 +02:00
Kersten Jeremy 834e0bb367 [FIX] Calendar - set tz compatible in template mail and view (from email link). now it's possible to choose in template the TZ of the attendee, or the tz from event creator...
bzr revid: jke@openerp.com-20140505104611-6qwpwwslxen0bea5
2014-05-05 12:46:11 +02:00
Kersten Jeremy ed6bc9f198 [MERGE] Merge with trunk
bzr revid: jke@openerp.com-20140502123149-4g7d7xh07i5z9dct
2014-05-02 14:31:49 +02:00
Kersten Jeremy 5d6f8bf45c [FIX] Calendar - Fix unlink which can try to unlink a numeric string without cast it in integer
bzr revid: jke@openerp.com-20140430133623-l6iynwdp0ampy23s
2014-04-30 07:36:23 -06:00
Kersten Jeremy d9c3c175bd [REF] Calendar refactoring - Manage allday in date field and not datetime.
bzr revid: jke@openerp.com-20140430093613-3tdn2tfiwshcahbz
2014-04-30 11:36:13 +02:00
Christophe Simonis 7a7d7febf8 [MERGE] forward port of branch saas-3 up to revid 9429 chs@openerp.com-20140424123538-rxk9got9k2on1ki1
bzr revid: chs@openerp.com-20140424131824-4ksluvhnegp7kplb
bzr revid: chs@openerp.com-20140424134533-lhhcd32n3s0m9cqk
2014-04-24 15:45:33 +02:00