Commit Graph
35 Commits
Author SHA1 Message Date
Thibault Delavallée ff32384b8f [REF] resource: correctly take into account timezones and clean code
Currently timezones were not or incorrectly taken into account in resource
computation. Indeed complexity comes from attendances being expressed in
naive timezones valid for all users, whereas dates and leaves are computed
into UTC. Computation should always be done in user timezone so that there
are no overlapping days and all time intervals are correctly computed.

A new timezone field is added on leaves to know in which timezone they
were originally encoded. Indeed putting them in naive user timezone
require its original timezone, not the current user timezone, as those
can be different.

This commit also contains code cleaning in resource to be a bit more
pythonic, simplify method parameters and offer a more simple api to
other modules.

Eventually code field is removed on resource as it is not really necessary
for resources. It is explicitly added on workcenter model who use it.
2017-02-27 14:04:48 +01:00
Thibault Delavallée be01aaa99f [REF] resource: remove deprecated compatibility and rename methods
Old methods are still present since a long time and are deprecated since
saas-3. This compatibility layer adds unnecessary complexity to the module
API. Those methods should now be removed. Some renaming is also performed
to ease resource api understanding, notably to better differentiate
internal methods from other methods.

All addons are updated accordingly.
2017-02-27 14:04:48 +01:00
Thibault Delavallée 06f36ddbe9 [REF] resource: remove pseudo-default working hours computation
Companies now always have a default calendar configured. All methods in
resource module should therefore be able to use a real resource.calendar.
This commit removes the computation based on a pseudo 8-17 calendar
given as weird method parameters.

Project is updated in order to use the company calendar by default.
2017-02-27 14:04:48 +01:00
Thibault Delavallée 58a4bfd973 [IMP] mail: update message_new to return the newly created record not just its id 2017-02-27 10:00:46 +01:00
dut-odoo 3345256579 [IMP] project: Improve the settings form view 2017-01-10 15:49:38 +01:00
qdp-odoo 4f29b77e3d [MERGE] foward port of 10.0 up to revision 84a650e33a 2016-12-30 17:21:25 +01:00
Ravi Gadhia 9988c4a984 [IMP] project, project_issue: add support of activities
project.task and project.issue models now support activities. Filters have been
added to ease their management.
2016-12-21 11:00:17 +01:00
Haresh Shyara bc3d55550c [IMP] project, project_issue: tasks and issue stat button on partner view
- Use read_group to compute task_count of res.partner
for performance sake
- When creating a task/issue from partner form view,
the default partner will be the current one (event if
the use case is rare)
- Only display button when count is greater than 0
- Also avoid default 'My Tasks' filter when coming from
partner form view
2016-12-06 15:39:06 +01:00
Jérome Maes 13f84b9aca [REM] *: remove ir.needaction mixin
ir.needaction_mixin is not used anymore by the webclient.
From 9.0, the concept has changed: this feature is now
available in mail module, with the mail.thread mixin,
and message_neeadction field.

Remove all code handeling needaction bullet and
counter on ir.ui.menu, knowing that since 9.0
webclient does not display the counter anymore.

This code was, thus, useless and some RPC calls
were done for nothing, and adapt accounting
reconcialiation widget.
2016-12-05 11:30:03 +01:00
Thibault Delavallée fa404dba81 [IMP] project_issue: do not copu kanban state when duplicating an issue 2016-11-09 10:40:36 +01:00
Thibault Delavallée 038c177f3f [IMP] project, project_issue: set default kanban values as color instead of labels
Kanban state values are different from their visual display. When searching
on kanban state it is not easy to understand the link between the label
and the color. We now set the label as the color to ease matching and
searching. However in kanban view labels can be defined on the stage
itself. This way searching is done on the color while working with
tasks and issues in kanban is done using business meaning defined on
the stage.
2016-11-09 10:40:36 +01:00
Thibault Delavallée df01742fc0 [REF] mail, note, project, project_issue: remove 'new' button in notification emails
As this button leads to a void form view without context it is not
really usefull. As creating new records is achieved using aliases
there is no real need for a New Task/Issue/Note button.

mail/new controller is kept for compatibility but should be removed
before v11.
2016-11-04 10:50:29 +01:00
Christophe Simonis a7ba6cde9c [MERGE] forward port branch saas-12 up to 7134aff 2016-09-28 16:28:31 +02:00
Denis Vermylen (dve) 88e379cd27 [FIX] project_issue: correct onchange_project_id (2)
amend to d78256e76c

We wish to keep the email address if no partner is assigned.
2016-09-28 10:44:34 +02:00
Denis Vermylen (dve) d78256e76c [FIX] project_issue: correct _onchange_project_id
the onchange changed the partners of the ticket when the ticket changed project
to the project's partner, but if the ticket already has a partner it shouldn't
change.
2016-09-27 17:28:40 +02:00
Thibault Delavallée 458aaca328 [IMP] mail: reimplement grouping of notification recipients
There is now a single method easier to inherit to add specific behavior
for the display of access button as well as actions buttons. All addons
using this mechanism are updated accordingly.
2016-09-23 10:01:41 +02:00
Thibault Delavallée d49ede9ac4 [FIX] project_issue: fix migration issue leading to crash in duplicate 2016-09-22 13:47:18 +02:00
Raphael Collet fa082019a0 [IMP] models: change API of _group_by_full
The dictionary `_group_by_full` is replaced by a field parameter `group_expand`
that is assigned to the method name.  The API of the method has been simplified
as well:

    @api.multi
    def _read_group_stage_ids(self, domain, read_group_order=None, access_rights_uid=None):
        # the stages are given by self.ids (wrong model);
        # read_group_order is the order given to read_group() on self;
        # return stages.name_get(), {stage.id: stage.fold)

    _group_by_full = {'stage_id': _read_group_stage_ids}

is now written:

    stage_id = fields.Many2one(..., group_expand='_read_group_stage_ids')

    @api.model
    def _read_group_stage_ids(self, stages, domain, order):
        # stages is a recordset;
        # order is the order to use on stages' model;
        # return a recordset which is a superset of stages
2016-09-16 17:35:24 +02:00
Christophe Simonis f4fc3985b6 [MERGE] forward port branch saas-12 up to 10cde43 2016-09-16 11:03:50 +02:00
Christophe Simonis d614356965 [FIX] project_issue: correct issue count on partners
Also adapt default search to have the same domain
2016-09-14 16:53:03 +02:00
Thibault Delavallée 0194365e0c [IMP] project_issue: slightly improve issue reporting
* Number of emails should not take into account internal notifications
 * Remove Channel and Tasks from issue report as those are not really
   used anymore
 * Remove New filter as it can be done through stage filtering instead
   of using a not obvious heuristic based on stage sequence
2016-09-05 12:18:42 +02:00
Christophe Simonis 1a77d9d02a [MERGE] forward port branch saas-12 up to 476cb5a0 2016-09-03 23:57:57 +02:00
Christophe Simonis 55d2e4b7cf [MERGE] forward port branch saas-11 up to bde7f88 2016-09-02 17:23:34 +02:00
Christophe Simonis 8a4635a4e2 [FIX] project{,_issue}: mark related fields as readonly 2016-09-02 13:58:27 +02:00
Yannick Tivisse b1680bc319 [FIX] project,issue: Correct management of Notifications to portal users
[FIX] website_project: override get_access_action to redirect to my/tasks,projects

[FIX] project_issue: Don't send notif template to portal customers if no website

[FIX] website_project: Portal users can receive notif template
2016-08-30 10:18:53 +02:00
Raphael Collet bf668b64c1 [IMP] all: clean usage of safe_eval
Specifically: do not import `safe_eval` as `eval`, keep it explicit instead.
2016-08-11 15:36:56 +02:00
Thibault Delavallée c8a313d51e [IMP] various: use odoo for imports instead of openerp and update class names 2016-08-10 15:48:07 +02:00
Yannick Tivisse 6372080621 [FIX] project_issue: new api call to 'get_working_hours' 2016-07-13 12:53:34 +02:00
Antony Lesuisse 30bc0ee076 [IMP] website_project_issue: Portal access to Issues
Move portal features (mainly ir.rule) from project_issue to
website_project_issue.

Remove backend menu item, issues should be accessed from the website_portal My
account page, the backend portal menuitem is removed.

Add the dependency on website_portal to display the issue count on projects.

Original authors: Vipul Bhatt, Florian Wintjens
2016-07-06 01:17:43 +02:00
jat-odoo 0b1a27a3c7 [REF,IMP] project,project_issue,rating: Handle ratings more efficiently
Purpose:

For our internal project management, we would like to track the customer
satisfaction on the open projects. We send them an email every one or 2
weeks allowing them to give a feedback by clicking on one of 3
smileys: Happy, Average, Angry. They can also put a additional explanation.

We already have something similar which is working on livechat with a
unusable reporting, and on issues but unusable. Our project are managed by tasks.

Specification:
- On the project : Selection fields : (Periodical Rating or Rating on Stage)
  + Fields to choose the period if periodical
- On the stage : email_template_id field.
- IF :
---> Periodical : Send an email to all the customers for the tasks on this stage periodically
---> On Stage : Send an email to the customer's tasks when the task reaches the stage
- That way, it's impossible to send a satisfaction request both periodically and sequentially.
  FP request
- Who is the customer : The customer on the task OR the customer on the related sales order
  OR the customer on the projet OR nobody
- The last feedback is displayed on the task kanban card (Thumb up, down, or neutral)
- On the project kanban card, the customer satisfaction is displayed. This is the simple
  mean of all the previous ratings.
2016-07-01 14:05:03 +02:00
David Monjoie ccfea6b2f6 [REM] project_issue: removed dead on_change_template override
This function was removed in 9.0 at 1dbccc8215.
2016-06-30 14:41:25 +02:00
vbh-odoo e70605f2d1 [MIG] project_issue: migration to new api 2016-06-30 14:41:24 +02:00
vbh-odoo 3eb717baec [MOV] project_issue: split project_issue.py and project_issue_view files 2016-06-30 14:41:24 +02:00
vbh-odoo 0239d9d4da [MOV] project_issue: re-organized file structure 2016-06-30 14:41:23 +02:00
Thibault Delavallée 0cf2ceca90 [IMP] project, issue: template on stages
Added a mail_template_field on project stage model (project.task.type). This
fields is used to automatically send an email when a task or issue comes in
this stage.

Recruitment code has been updated to use the mixin method.
2016-02-01 12:15:56 +01:00