Commit Graph
4946 Commits
Author SHA1 Message Date
XavierDo 2966d4faed [IMP] product: rename product.uom into uom.uom
Also rename product.uom.categ into uom.category to
 give it a decent name.
2018-02-26 14:27:26 +01:00
XavierDo 6a378e3839 [IMP] product: move uom in a new addon
Moves UoM models, test and data to a new addon in
order to be able to use uom without product.
A simple example is be to be able to use UoM for
timesheets.

This commit only move code, and adapt xml ids
without chaging any feature or functionnal
behavior.
Note: 'product' module now depends on new
'uom' module.
2018-02-26 14:27:26 +01:00
Thibault Delavallée 86350c56ff [REF] various: clean override of _notify_get_groups
Overrides of _notify_get_groups are used to add some buttons in notification
emails and control the display of "Access document" button. This commit
cleans some overrides :

 * accounting: portal users that are not the customer have no access to the
   invoice and should not have the access button;
 * project: remove unnecessary override on project model and consider portal
   users have access to the document through customer portal;
 * sale: portal users that are not the customer have no access to the sale
   order and should not have the access button;
 * website_blog: display access button to everyone only if the post is
   published; otherwise keep standard behavior;
 * website_forum: display access button to everyone only if the post
   has not been closed or deactivated; otherwise keep standard behavior;
 * website_slides: display access button to everyone only if the slides
   has been published; otherwise keep standard behavior;
2018-02-26 14:15:12 +01:00
Thibault Delavallée d46e358d3e [REF] mail: rename notification methods related to recipients
This commit renames some internal mail.thread methods linked to the
notification process. This is the next commit of a series aiming at
improving code readability and method finding through prefixes. See
notably cae1c3977f, cdfe479e2e and fc1348dd3d.

This commit does not change any functional feature. It does only
rename notification-related methods, using the _notify prefix to
ensure they are private and to mark they are part of the notification
process.
2018-02-26 14:14:12 +01:00
Christophe Simonis a0d7763e09 [MERGE] forward port branch saas-11.2 up to 932e641be1 2018-02-23 17:20:52 +01:00
RomainLibert 12b580c953 [IMP] rating: Parent document name update
For objects inherting from rating.mixin, when their parent model change
(e.i.: task from a project to another), the "Parent document name" does
not change. The rating is still considered belonging to the old parent
object (rating stat of project is not correct).

Change the rating API. In rating mixin, instead of having 2 methods
returning parent id and parent model (rating_get_parent_id and
rating_get_parent_model_name), we should have one method returning the
'parent relation field' (inevitably m2o field). Then we can deduce its
parent_res_id/parent_res_model, and check this parent field is in values
of write to trigger the recompute of parent_res_name.

Also, add "ondelete=cascade" on parent_res_model_id

Impacted modules: project, rating, helpdesk, livechat
2018-02-23 16:13:03 +01:00
Christophe Simonis 9a84ba5533 [MERGE] forward port branch saas-11.1 up to e750bb6e11 2018-02-22 10:39:15 +01:00
Christophe Simonis ae6a65753e [MERGE] forward port branch 11.0 up to dbb713c2f8 2018-02-21 20:19:26 +01:00
Christophe Simonis dbb713c2f8 [MERGE] forward port branch saas-16 up to 49f8548557 2018-02-21 19:17:01 +01:00
Christophe Simonis 49f8548557 [MERGE] forward port branch saas-15 up to 085ff2f9c4 2018-02-21 18:36:36 +01:00
Christophe Simonis 085ff2f9c4 [MERGE] forward port branch saas-14 up to 8c692aac88 2018-02-21 18:09:17 +01:00
Christophe Simonis 8c692aac88 [MERGE] forward port branch 10.0 up to aad677c338 2018-02-21 17:57:00 +01:00
Christophe Simonis aad677c338 [MERGE] forward port branch 9.0 up to 4432e1d5c3 2018-02-21 17:35:11 +01:00
Christophe Simonis 4432e1d5c3 [FIX] project: do not reset task's partner when changing project if project is not linked to a specific partner 2018-02-21 17:26:16 +01:00
Thibault Delavallée 634a688653 [MOV][IMP] project: improve action to configure activity types and move in its own file
Purpose of this commit is to ease project managers in their daily job
organization by ensuring that newly created activities in project
configuration are by default associated to tasks, and not global.

Activity types actions and views are moved in their own file in order
to match the guidelines.
2018-02-21 16:43:26 +01:00
Olivier Dony af7860c94c [FIX] project: restore portal visibility
Odoo 11 comes with unified features for Project Tasks and Project
Issues. Specifically, issues were retro-fitted into tasks, and saw their
specific features added to the features of tasks.
During this refactoring, the portal controller for issues was superseded
by a unified portal controller for tasks, via
623ea43268

One case was lost in the process: portal visibility of
tasks/issues/things that are individually followed by customers, without
the customer following the project itself.
This is important for `transversal` projects, such as a "Helpdesk"
project common to all customers, where each customer only sees their own
issues.

This commit restores the feature, previously added to issues by
1cc8252a95

Note: this clearly requires a proper regression test, to be added soon.
2018-02-21 14:12:15 +01:00
Thibault Delavallée 8a026e26c6 [IMP] mail: update _notify API
Purpose of this commit is to allow to give additional values when rendering
notification emails and to make some parameters explicit.

This commit updates the _notify API. It allow to propagate a dictionary
containing values given to the rendering of the notification template.
This allow to have more complex templates and/or to control the rendering
depending on some parameters. Indeed currently only some fixed values and
values coming form the message to notify are given to the rendering
context.

First use will be soon when pushing notification emails not necessarily
linked to documents. In this process some values will be given by the caller
and not only by the message context anymore.

This commit also moves some context key used to control the notification
process directly in values given to the _notify method. It allows to make
those parameters explicit and rely less on context.

The _notify method now takes a values dictionary that may contain

 * add_sign: add user signature to notification email, default is True.
   It replaces the ``mail_notify_user_signature`` context key;
 * mail_auto_delete: auto delete send emails, default is True. It
   replaces the ``mail_auto_delete`` context key;
 * other values are given to the context used to render the notification
   template, allowing customization.

It allows to remove some context switch notably in the composer. A values
dictionary is computed and given to message_post and then propagated to
the notification mechanism.
2018-02-20 14:32:09 +01:00
Odoo Translation Bot 54670bb149 [I18N] Update translation terms from Transifex 2018-02-20 09:46:32 +01:00
Odoo Translation Bot d070bdf536 [I18N] Update translation terms from Transifex 2018-02-18 07:06:15 +01:00
Odoo Translation Bot 0be75775de [I18N] Update translation terms from Transifex 2018-02-18 04:28:35 +01:00
Odoo Translation Bot 40aedd74a3 [I18N] Update translation terms from Transifex 2018-02-18 01:04:11 +01:00
Thibault Delavallée 467e490e5d [FIX] project: reorder inherit to be able to pass through portal before mail thread
Purpose is to enable override of mail.thread methods in portal mixin.
An example is the _notification_recipients method defined in mail.thread
and customized in portal.mixin.
2018-02-15 14:50:36 +01:00
Christophe Simonis 806f42b065 [MERGE] forward port branch saas-11.2 up to 8b9e854be4 2018-02-15 13:46:23 +01:00
Christophe Simonis 3b959c313d [MERGE] forward port branch saas-11.1 up to a277b58507 2018-02-15 11:52:10 +01:00
Christophe Simonis a277b58507 [MERGE] forward port branch 11.0 up to 259686ba78 2018-02-15 10:58:08 +01:00
Odoo Translation Bot 3809a8a41c [I18N] Update translation terms from Transifex 2018-02-14 13:43:39 +01:00
Odoo Translation Bot 91f2209216 [I18N] Update translation terms from Transifex 2018-02-14 11:53:12 +01:00
Nicolas Lempereur 268443657e Revert "[FIX] project: follow stage change"
This reverts commit 5fa4f4cc31.

Explanation: https://github.com/odoo/odoo/commit/5fa4f4cc31#commitcomment-27551833
2018-02-14 09:53:46 +01:00
Nicolas Martinelli 5fa4f4cc31 [FIX] project: follow stage change
- Create a project and a task
- Add a channel as follow of the project and task
- Set the channel to follow task stage change only

When changing the stage, the tracking is sometimes received in the
channel, sometimes it is not.

In the case of a stage change, the subtype returned for tracking depends
on the stage sequence. If the sequence is `<= 1`, the subtype for task
creation is returned. Therefore, if the channel is not following task
creation, the tracking message might or might not appear, depending on
the which stage is impacted.

We can remove this specific case, since the creation will be handled
when `user_id` is in the `init_values` or when `mail_create_nolog` is in
the context.

opw-802924
closes #22926
2018-02-13 17:38:25 +01:00
Nicolas Martinelli f19e0f8047 [FIX] project: set as favorite
- Connect as a user with only 'User' rights on projects
- Set a project as favorite (click the star)

The project is not set as favorite.

Since only project managers are allowed to write on projects, the field
`is_favorite` is set as read-only. Therefore, it is filtered out by
`_generateChanges`, and nothing happens.

First step is to set the attribute `force_save` in the view, so the RPC
`write` call is forced. Second step is to compute directly the inverse
thus bypassing access rights.

Co-authored-by: Nicolas Lempereur <nle@odoo.com>
opw-814604
opw-801587
closes #22938
2018-02-13 16:07:21 +01:00
Christophe Simonis adeea2a88d [MERGE] forward port branch saas-11.2 up to 0f02dcb639 2018-02-12 18:34:43 +01:00
Christophe Simonis 0f02dcb639 [MERGE] forward port branch saas-11.1 up to c69d00157e 2018-02-12 18:08:27 +01:00
Aaron Bohy c265e47a63 [FIX] web,*: tests: remove src attr from img nodes
In the tests environmnent, we don't want img and iframe nodes to
perform RPCs when they are inserted into the DOM. For img nodes,
we prefixed the src attribute by '#test: ' as soon as they were
inserted into the DOM. Unfortunately, this didn't work as expected:
an RPC was done to fetch route '/web/tests?' (i.e. the tests page),
because everything after '#' in the url isn't sent to the server.

This rev. completely removes the src attribute of img nodes, and
set a 'data-src' attribute with the original src attribute's value,
so that it can still be checked in the tests.

Tests using this attribute have been adapted accordingly.
2018-02-12 11:13:42 +01:00
Odoo Translation Bot 09923c7bf6 [I18N] Update translation terms from Transifex 2018-02-11 07:05:39 +01:00
Odoo Translation Bot 26468bfaba [I18N] Update translation terms from Transifex 2018-02-11 04:26:28 +01:00
Odoo Translation Bot 0351677a00 [I18N] Update translation terms from Transifex 2018-02-11 00:48:18 +01:00
qdp-odoo 4a3df5256a [FIX] *: fixed decorators on copy() 2018-02-09 10:32:23 +01:00
Kinjal Mehta e25d0b3891 [IMP] project: Remove a shared stage if no linked record inside this project
Purpose
=======

Projects may have share columns. If we want to delete a stage on a project there's several use case

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

Different use cases:
- The stage is shared
	- There's no task in this stage for this project: Remove the stage from this project, don't delete it
	- There's a task in this stage (Active or not): Raise an error from the ondelete restrict
- The stage is not shared
	- There's no task in this stage: Delete the stage (unlink)
        - There's a task in this stage (Active or not): Raise an error from the ondelete restrict
2018-02-06 08:56:54 +01:00
Kinjal Mehta 89c07862d5 [IMP] crm, project,...: Prevent stage deletion when there's a linked record
Purpose
=======

Avoid having people getting some tasks lost in the "undefined" column. Because they won't understand what it means an how they achieve it.

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

Add an "ondelete='restrict'" on the stage field definition.
2018-02-06 08:56:54 +01:00
Christophe Simonis bba0bc6ded [MERGE] forward port branch saas-11.2 up to eefca5d492 2018-02-05 17:21:35 +01:00
Christophe Simonis eefca5d492 [MERGE] forward port branch saas-11.1 up to 73610ff992 2018-02-05 16:20:48 +01:00
jem-odoo b9c8394247 [FIX] project: reset correct tour
Partial revert of 88ff096c96
Please, avoid bring things ...
2018-02-05 14:38:50 +01:00
Fabien Pinckaers 88ff096c96 [IMP] project: when doing a subtask, missing space after colon
[IMP] project: "Task Title">Title (could be named differently)
[FIX] project: don't assign a person on a task during the tour
Someone is already assigned as tasks are created from the kanban,
directly, with a responsible by default.
2018-02-05 10:53:29 +01:00
Fabien Pinckaers e02e7517b3 [FIX] project, mail: improved empty list message 2018-02-04 17:06:52 +01:00
Fabien Pinckaers 31509f1129 [IMP] project: better empty message 2018-02-04 16:37:31 +01:00
Odoo Translation Bot ed1740a6b7 [I18N] Update translation terms from Transifex 2018-02-04 07:05:04 +01:00
Odoo Translation Bot 348ba041d7 [I18N] Update translation terms from Transifex 2018-02-04 04:27:20 +01:00
Odoo Translation Bot df1accbf53 [I18N] Update translation terms from Transifex 2018-02-04 00:48:03 +01:00
Christophe Simonis e00a447e2c [MERGE] forward port branch saas-11.1 up to 7e469eb77a 2018-02-01 18:20:28 +01:00
Géry Debongnie f4ee938328 [IMP] project: take the actual task action instead of a dynamic one
Before this commit, we create a new dynamic action when creating a new
project.  This is a problem for various reasons:

- we did not have the nocontent helper properly set (so, the kanban view
  could not display the help message just after creating a project
- the dynamic action is slightly different from the one you get when you
  click on an existing project (different views, ...)
- the dynamic action is not editable in studio

With this commit, we simply reuse the same action, but with a different
context.  This solves all these issues at once, without duplicating
logic.
2018-02-01 15:48:09 +01:00