Commit Graph
6 Commits
Author SHA1 Message Date
Thibault Delavallée cb67c23888 [MOV] mail: reorder controllers and views
As mail grows and will continue to grow, ordering views and having right
files is important to understand module organization and content.

Split main.py controller file into two files, one for mail related controllers
(redirections) and one for discuss.

Rename files according to guidelines for wizards and views.

No functional change comes with this commit. This is only code move.

Task-2631873
PR odoo/odoo#75571
2021-08-25 13:12:11 +00:00
RomainLibert f61687a4cd [IMP] hr_holidays : split hr.holidays into hr.leave and hr.leave.allocation
Purpose
=======

Have a clear distinction between leave and allocation requests instead of
using the same model to mix 2 different concepts.

Splitting the model will allow different business code to be run on each
model as allocations and leaves are not exactly the same thing; this
will add some code but simplify future improvements

Specification
=============

1/ Completely separate the models

Model hr.holidays has been split into leave.request and
leave.allocation.

2/ Make reporting working again by using an SQL view aggregating data
from leaves and allocations

A new report has been added in order to aggregate
datas from both allocations and requests. The views have been modified
accordingly.
2018-01-15 10:38:31 +01:00
Nicolas Martinelli 68391bd5c9 [FIX] hr_holidays: approval link
The approval link received by a manager doesn't take into account the
double approval configuration of the holiday type.

opw-741558
2017-05-30 17:13:18 +02:00
Thibault Delavallée 1e23b1921a [FIX] hr_holidays: fix forward-ported code still using workflows
Commit 0b87f76628 introduced in 9 some new
controllers in hr holidays. They are used to activate some workflow signals
through dedicated controllers.

However hr holidays workflow have been removed meanwhile at commit
6a8e4c6119. This commit fixes the forward-port
by correctling calling methods instead of trigerring workflow signals.
2016-11-23 09:46:10 +01:00
Christophe Simonis 341bea8f88 [MERGE] forward port branch saas-12 up to 43cb4ac 2016-10-10 13:00:05 +02:00
Thibault Delavallée 0b87f76628 [IMP] mail: separate management of mail routes from redirection
Move code related to redirection in its own class method. This way all
controllers perform their own actions and checks before calling the
redirection itself. Moreover it is necessary for some controllers to be
able to call the redirection independently outside of the mail/view
controller scope.

This commit also fixes some links generated for mail notification email
buttons. Assign and (un)follow buttons now effectively use the link helper
when generating the associated URL instead of manually crafting it.

Custom routes for notification buttons used in HR and CRM are added.
Indeed in order to be able to fine-tune the behavior called by those
buttons, using dedicated controllers is simpler than trying to use
a generic one. As there are few custom buttons in notification emails
using dedicated controllers does not lead to a code overhead.
2016-10-03 19:03:50 +02:00