Commit Graph
33 Commits
Author SHA1 Message Date
Audric Onockx (auon) e3405031ba [FIX] calendar : Fixed meeting accept page shoxs invalid logo
Reproduce :
- Login to the latest runbot 14.0 (BASE, not the main!) with the admin user
- Install the apps "contacts" and "calendar".
- Go to contacts and create a new contact with an email
- Make a new company "Company B" and make sure that this is set as default company for the administrator user.
- Set two different logo's on these companies so you can differentiate them.
- Create a new meeting invitation and add the contact you created in step 2 to it.
- Use the "Send mail" option on the meeting invite to make sure it gets sent. Then check in mailhog (it only comes in here after executing the queue cron for mails).
- Now copy the link behind the "accept" button and copy it in an incognito.

Result :
  The logo shown on the calendar invitation page is wrong as it uses the company logo from the company with ID 1 (first created company) while your logo in the email is the right one from your default company.

Solution :
  The logo shown on the calendar invitation page is the one from the default company of the organizer if any, otherwise the one from the default company of the creator.

opw-2579398

closes odoo/odoo#77907

X-original-commit: ffcaca15bd166d0dfe883a79e41a474b4a521d5a
Signed-off-by: Arnaud Joset <arj-odoo@users.noreply.github.com>
2021-10-06 12:39:47 +00:00
Jeremy Kersten 478068c829 [IMP] *: always use Odoo Response
This branch adds request.redirect on all requests.
In case of a front end request, we do an url_for to the location.

We removed redirect_with_hash that was only for retro compatibility

local_redirect has been renamed to redirect_query, and param keep_hash has been
removed and moved.

Default code for redirect is 303 now instead of 302.

Now redirect and redirect_query make local redirect by default, you need to
pass local=False to make external redirect.

All werkeug.utils.redirect has been replaced by request.redirect.

Http.redirect now use an http.Response type, and it become easy to add an
override like 'set_cookies' e.g.

Dispatch of a website.page return an http.response too, so we first need to
check if it is a cached version before to check if it is an Odoo Response.

Migrate your code:

http.redirect -> request.redirect(location, code, local)
http.local_redirect -> request.redirect_query(location, query, code, local)
http.redirect_with_hash -> request.redirect

Courtesy of odony for help and review ;)

closes odoo/odoo#72599

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-07-08 07:00:06 +00:00
qmo-odoo bcb3edd35b [FIX] calendar: Invalid leaf in join route
This commit fixes an invalid leaf in join route
Follows up: https://github.com/odoo/odoo/pull/68022

LINKS:

closes odoo/odoo#69242

Taskid: 2499471
Pr: #69103
X-original-commit: 9e4cba257d0d44fa52d6783e67a363e5cf6b7735
Related: odoo/enterprise#17677
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-04-14 10:28:18 +00:00
qmo-odoo c5a6a9661f [IMP] calendar: Add route to join existing calendar.event
Allow users to join an event via a route and an action method.
See enterprise PR for more information on the use cases.

LINKS:
TaskID: #2223519
Community PR: https://github.com/odoo/odoo/pull/68022
Enterprise PR: https://github.com/odoo/enterprise/pull/17141
2021-04-01 16:22:06 +00:00
Nicolas Galler bb9d5667b5 [FIX] calendar: accepting meeting invite from email
Behavior prior to the fix:

When accepting a meeting invite from the invitation email, if not logged
in, an Internal Server Error is received.  Additionally, if already
logged in, an Internal Server Error is also received (albeit for a
different reason)

Behavior after the fix:

Accepting (or declining) the meeting invite works and shows the
accepted/declined meeting.

opw-2366173

closes odoo/odoo#60617

X-original-commit: d44d9e58b2cd5530e15e2a8c5055b18d2d8395e7
Related: odoo/enterprise#14361
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Nicolas Galler <nicocrm@users.noreply.github.com>
2020-10-23 12:28:45 +00:00
Martin Trigaux d9287caf94 [IMP] *: convert to private methods
render, render_template, load, activity_schedule_with_view,
get_website_pages should all be private:
It should not be possible to render an aribtrary template only with
its name or id

Still need to render some qweb views from js so the method
render_template is kept public.
This explains why the website editor still need read access on
ir.ui.view as we want to allow any snippet to be rendered.
2020-05-14 13:59:10 +02:00
Yannick Tivisse 1a9be3a869 [REF] calendar: Lint + Clean code 2020-04-09 10:59:34 +02:00
Lucas Lefèvre 85907951c5 [REF] calendar: Remove useless new env
Why is a new env created ? It's already in the request.

Task 2126717
PR #42031
PR Enterprise odoo/enterprise#8006
2020-04-09 10:56:37 +02:00
Lucas Lefèvre 7159f657a0 [REF] calendar: Refactor calendar attendees management
This commit refactors the event attendees and notifications according
to the recurring event refactoring.

Some (very) basic reminder tests are also added.

Task 2126717
PR #42031
PR Enterprise odoo/enterprise#8006
2020-04-09 10:56:37 +02:00
Swapnesh Shah c44f7a0369 [FIX] calendar: Allow any user to set calendar_last_notif_ack
Fixes https://github.com/odoo/odoo/issues/39358
Before this commit Internal user (With no other Rights) cannot perform any activity on Reminder Popup due to missing rights to set calendar_last_notif_ack field.
With this fix, we are now using sudo to write calendar_last_notif_ack

closes odoo/odoo#40104

X-original-commit: 91560fae56f1cba09141eefa1d0da03f4a7b3f72
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-11-12 10:17:10 +00:00
wan 63de98b9b4 [FIX] *: remove en_US as fallback for lang code
en_US may not be activated as it is possible to create a database in
another language using the database manager.

When trying to install a chart of account, the tax return entry tried
to format a date at the installation of the module, with no lang in
the context. The fallback was made on en_US but an error is raised if
that language is not activated.

As it is a very common scenario to retrieve a language from the
context, add a generic tool method to do it.

Replace and closes odoo/odoo#37629

closes odoo/odoo#37568

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-10-01 10:05:17 +00:00
Jérome Maes 0ed992d559 [FIX] calendar: return a response is better if you want to override the controller 2017-04-28 16:25:33 +02:00
Denis Vermylen 9556d91995 [FIX] calendar: fix various tiny problems
- fix access rights issue when viewing events:
	Previously, with an attendee token, you could have access
	to all events by simply changing the id in the url.
	Now an extra verification is made to check if the attendee is
	related to the event.
- fix small mail template display issue
- raise sequence of "Actions" submenu in the technical settings
  (to allow insertion of submenus between Email and Actions)
2017-04-28 16:25:33 +02:00
Nicolas Martinelli 4f43ec4fcf [FIX] calendar: invitation template lang
- Create a calendar event
- Add invitees

The invitees receive a mail so they can accept/decline. When clicking,
the page is always displayed in the language of the administrator.

Since the `request` object is not directly associated to the attendee,
the template is not rendered in his language. Since (i) the template
should not be rendered lazily (see comment in code) and (ii)
`request.render()` does not allow the rendering in an arbitraty
language, we do a manual call to `render_template`.

opw-694718
2016-12-01 11:52:27 +01:00
Jérome Maes 29796b58dd [IMP] calendar: notification route should be in auth
The 2 calendar notification routes were in auth
`none`. This causes no problem, but since they are
reimplementing the auth user mecanism, it is better
to set them directly in auth `user`. Moreover, they
are only called from webclient, when the user is
logged.

This commit also migrate them to new API (we forgot
them ....)
2016-08-08 15:46:03 +02:00
Jérome Maes 6bc14c9142 [MIG] calendar: migration to new API
Migration of all python code, mostly withtout chagnes. And adapting
xml files to guidelines.

On calendar.py, some changes have been perform to make the migration works :
- `_compute` method has been split into `_compute_dates`, `_compute_attendee` and `_compute_display_time`.
- remove unused method `onchange_partner_ids`, `check_partners_email`
- make `compute_rule_string` use a cache record instead of a value
dict to avoid crashes
- remove `new_invitation_token` method, and make it a default value on attendee creation
- add a default value on `day` field, otherwise the "Please select a
proper day of the month" exception is raised during the onchange
2016-07-14 14:04:33 +02:00
Jérome Maes cfb8e8700a [FIX] calendar: view meeting detail when not logged
Since the new QWeb engine, `groups` directives on template
rendered in a route with auth=none is simply ignored, since
all is done as SUPERUSER_ID, it was impossible to instanciate
the webclient to check if the session is valid and to display
meeting info or redirect to event form view.

It seems that we don't want to fix this because routes auth=none
are rare, and special. So it is not considered as a bug.

The fix for calendar is, however, to do redirection or template
rendering server side.
2016-06-20 16:19:32 +02:00
qsm-odoo bba2e39fb8 [FIX] calendar: redirection after invitation email
When accepting/declining a calendar event invitation received by mail,
we landed on an empty gray webclient. The confirmation page had been
dropped with passage to new JS API / new calendar / new webclient.

Previous mechanism had been reimplemented: custom web client with event
information/confirmation if the user is not connected or redirection to
the event form view if the user is connected.

+ FIX manyattendeetag : the status circle did not turn red when an
user declined the invitation.
2015-11-27 16:20:32 +01:00
Leonardo Rochael Almeida 60af7cac02 [IMP] replace simplejson with stdlib json
The stdlib version of the json library is more recent than the 3.5.3
version we are pinning in `requirements.txt`

There is no reason to use it.

Closes #6940
2015-09-28 10:53:32 +02:00
Olivier Dony e11eddf753 [MERGE] Forward-port of saas-5 up to 20cc18d 2014-08-13 20:46:47 +02:00
Denis Ledoux fe83c11301 [MERGE] forward port of branch saas-4 up to b49755b
The forward port of the fix 3609ba10f2 will be done separately, as the mrp scheduler has been completely refactored from saas-5.

Conflicts:
	addons/l10n_be_coda/wizard/account_coda_import.py
	addons/point_of_sale/static/src/xml/pos.xml
	addons/procurement/schedulers.py
2014-08-13 10:45:36 +02:00
Denis Ledoux 45406809d6 [IMP] calendar: use registry of request in notify controllers 2014-08-12 10:31:09 +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
Fabien Meghazi 8dc5f240a9 [REM] Removed addons.web#html_template usage
bzr revid: fme@openerp.com-20140506163334-x94pz9bau4a0r0lb
2014-05-06 18:33:34 +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
Fabien Meghazi a22d0ce78a [FIX] edi, calendar webclient bootstrap
bzr revid: fme@openerp.com-20140501210507-cbl9no3o92zkdq5h
2014-05-01 23:05:07 +02:00
Kersten Jeremy 8b927d7d1c [FIX] fix bug in send_mail_to_attendee of calendar where we passed browse_list and not dict(ids), typo controller calendarr PEP8
bzr revid: jke@openerp.com-20140225165859-1vyjtirgjmbhoij4
2014-02-25 17:58:59 +01:00
jke-openerp 46b0c7aa00 [REF] Rename model crm.meeting into calendar.event
Remove 2 unsused field from calendar.event model (dir,sequence)

bzr revid: jke@openerp.com-20140115093805-1g1j1oymyxsb6kgh
2014-01-15 10:38:05 +01:00
jke-openerp 53264da08a [REF] Add order fix on calendar list view, flake google_calendar, undelete function get_sequence needed for google synchro
bzr revid: jke@openerp.com-20140114133736-cvvftr4hmaa3w3ad
2014-01-14 14:37:36 +01:00
jke-openerp c5791441c4 [REF] Refactoring according to CHS and AL review
bzr revid: jke@openerp.com-20140113174157-ins4vf57g0p6v82u
2014-01-13 18:41:57 +01:00
jke-openerp 656f8241d5 [REF] Refactoring according to the first review of CHS
bzr revid: jke@openerp.com-20140110170912-im9p7j5wf229k4d6
2014-01-10 18:09:12 +01:00
jke-openerp c274b28f4a [TYPO] cleaning
bzr revid: jke@openerp.com-20131220160818-56skpmvbzub6mn1r
2013-12-20 17:08:18 +01:00
jke-openerp dd285d23af [TYPO] Rename base_calendar into calendar
bzr revid: jke@openerp.com-20131219144739-9ic700ycef8uklbc
2013-12-19 15:47:39 +01:00