summaryrefslogtreecommitdiff
path: root/addons/project/models/project.py
AgeCommit message (Collapse)Author
2019-03-29[IMP] mail, *: don't track fields at createXavierDo
*: project, crm, maintenance, helpdesk, It is useless to track fields during create since they have no initial value and future tracking message will show changes on tracked field. We can log a default creation message instead (as it is now if there is no mail_create_nolog context key) This change will implies - less queries when creating record - cleaner creation messages - less occurence of mail_create_nolog ctx key Removing tracking at create could break the creation subtypes mechanism (example: following task creation subtype on project) Instead of using _track_subtype to give a subtype at create, a new _creation_subtype method can be override. If a creation subtype is set on a specific modlel, creation messages will be create by message_post instead of _message_log. We also need to adapt the message_track_post_template in order to keep this feature whithout tracking. Task: #1916916 closes odoo/odoo#31945 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-03-28[IMP] mail, test_mail, *: add new email.cc.mixin on main modelsXavierDo
*: crm, project, maintenance, hr_recruitment When a record is created from an email, cc can be lost. This commit proposes a new mixin to keep cc on the record and allows to create partner for each of them when sending a message from the chatter. The mixin is added on the mail recors that can be created from mail.alias: document helpdesk.ticket mrp.eco quality.alert hr.applicant crm.lead project.task mail.channel maintenance.equipment Task: 1925001
2019-02-22[MERGE] forward port branch saas-12.1 up to 0f4abc5c228Christophe Simonis
2019-02-21[MERGE] forward port branch 12.0 up to 84143a34b31Christophe Simonis
2019-02-15[FIX] project: subtask of duplicate project are linked to originalJulien (juc) Castiaux
When duplicating a project, every task linked to the project is duplicated too but the link between sub-tasks and their parent task is not updated thus they are left linked to the task of the original project. opw-1937371 closes odoo/odoo#31154
2019-02-15[REM] project, hr_timesheet: remove date_startGeoffroy Larue
Remove date_start in project.task model, because it is not useful. Now using date_assign instead for reporting. Add two ids in settings views to refer from enterprise modules. closes odoo/odoo#31101
2019-02-12[FIX] project: default context keyNicolas Martinelli
- Activate Sub-tasks in projects - Create a sub-task An `AccessError` is raised in `check_access_rule` of `mail.message`. The context is 'polluted' with a `default_parent_id` key, which is not necessary anymore at this point. opw-1924899 closes odoo/odoo#31022
2018-12-10[FIX] project, rating: project percentage satisfaction compute performanceDenis Ledoux
This is basically a backport of revision 47479401cb3f685788d76abe01d3d2bc21ff11e3 to gain the performance on the project percentage satisaction computation but without introducing the new parent mixin, which would not be a stable change. closes odoo/odoo#29354
2018-12-04[REF] rating,*: make some methods privatejem-odoo
Impacted modules: im_livechat, project and rating This commit restricts the access to some method of the rating API. Indeed, some of them are internal business and should not be called from anywhere to avoid breaking the rating flow. This commit also rename some method to fit guidelines. This should not bring any functionnal changes. Task-1903565
2018-12-04[IMP] project: make project use rating parent mixinjem-odoo
No functionnal changes are done in this commit. Everything stays the same, but use the parent mixin mecanism. Task-1903565
2018-12-04[IMP] project: remove useless field percentage_satisfaction_projectjem-odoo
Since project only handle task (project.issue has been merged into tasks), the global satisfaction field is not required anymore, as it is the same as task satisfaction percentage. Task-1903565
2019-01-16[IMP] project: better labelsjem-odoo
The privacy field labels are not clear for users: they bring confusion and hesitation. Replacing them tries to solve this problem. Tasl-1893021
2019-01-04[REF] various: update tracking parametersThibault Delavallée
Purpose is to clean the use of tracking parameters on fields. Parameters are merged and is now tracking=<int> or tracking=True. This commit is linked to task ID 1903814 and PR #28430.
2018-12-31[FIX] project: outdated messageNicolas Martinelli
Issues has been removed some time ago. opw-1920007 closes odoo/odoo#29837
2018-10-18[IMP] mail: Return a browse record in _track_subtype instead of xmlidTWA
Purpose ======= It's possible to gain some requests with returning a browse record instead of an xmlid. It's also cleaner.
2018-10-10[IMP] project, hr_timesheet, sale_timeshee: improve tooltips of projectPrakash Prajapati
Purpose: improve understanding of project model as well as their daily use. This is done by improving tooltips of some fields according to business logic. This commit is related to task ID 1885507 and closes PR #27019.
2018-10-01[MERGE] forward port branch saas-11.4 up to 57e387b6452Christophe Simonis
2018-10-01[MERGE] forward port branch saas-11.3 up to e980af9df00Christophe Simonis
2018-09-26[MERGE] forward port branch 11.0 up to fd122aec521Christophe Simonis
2018-09-24[FIX] project: default value should be translatableMartin Trigaux
2018-09-24[I18N] project: make label_tasks translatableMartin Trigaux
2018-09-24[FIX] project: copy projectNicolas Martinelli
- Create a project - Create some tasks with followers - Create an outgoing mail server with active = False - Copy that project When copied, the project tries to send emails to followers using the inactive mail server. This leads to a traceback. The addition of the context key dates back to 2009 with 853789d0aaea956. The purpose was to copy all tasks, including the archived ones. We keep this behavior, but without propagating the `active_test` during the copy of the tasks. opw-1887354 closes odoo/odoo#27192
2018-09-21[IMP]project_*: Improvement in model descriptionNimesh Jethva
Purpose of this commit is to give description more "business oriented" because those descriptions appears in Odoo Studio which is supposed to be used by end users, not only by developers. Related Task ID : 37311
2018-09-18[MERGE] forward port branch saas-11.4 up to a1b384d66beChristophe Simonis
2018-09-17[MERGE] forward port branch saas-11.3 up to 2de573440ebChristophe Simonis
2018-09-17[MERGE] forward port branch 11.0 up to f2b8caff07bChristophe Simonis
2018-09-14[MERGE] forward port branch saas-11.4 up to 6c103589c15Christophe Simonis
2018-09-14[MERGE] forward port branch saas-11.3 up to ea0b3d600d3Christophe Simonis
2018-09-14[FIX] product: do not translate at code importMartin Trigaux
Defined as this, the label of the selection field were translated during code import, when building the python model, not when a user access the field values as it should (and is already the case thanks to the ORM). Trying to translate a string when no user-context is available is not only useless but may cause bug on services with multiple databases (e.g. a SaaS). In a multi-worker environment, when the code is imported, the _ method will use multiple scenarios to detect the language and get a cursor. As we have no available cursor in the frame (method _get_cr from GettextAlias), the fallback is made on the cursor of the request. In a multi-worker environment, this could be a cursor linked to a database in another language than English. In such scenario, the selections would be translated in the language of the other database instead of displaying it in English opw-1881956
2018-09-14[FIX] project: remove group_by from the contextlen-odoo
The group_by was passed from context from the action spawning a new view. This meant that it could give a group_by a field that was not defined on the destination view, causing a js traceback. opw 1884035
2018-09-13[FIX] sale_timesheet: duplicate project remove tasks SOLjem-odoo
When duplicating a task, we want the copy to have the same sale order line then the original. However, we duplicating a project, the tasks are copied too. But, in that case, we don't want them to be linked to any sale line, as the copy project will not be. This commit fixes that use case, and provides a test. Task #1883640
2018-09-11[FIX] models: make log_access fields readonly, and remove useless definitionsRaphael Collet
2018-09-07[MERGE] forward port branch saas-11.4 up to d78f23df848Christophe Simonis
2018-09-07[MERGE] forward port branch saas-11.3 up to 4850fb08385Christophe Simonis
2018-09-06[FIX] project: allow portal customers to post on task chatterToufik Benjaa
2018-09-05[MERGE] forward port branch 11.0 up to 213759b03e5Christophe Simonis
2018-08-30[FIX] project: iterate on a single taskMoises Lopez
Do not retrieve the attachment of all records Performance impromevement when iterating on a large number of records From #26446
2018-08-22[FIX] project: correct syntaxChristophe Simonis
Oversight of previous forward-port
2018-08-22[MERGE] forward port branch saas-11.4 up to ef6b574eda3Christophe Simonis
2018-08-21[MERGE] forward port branch saas-11.3 up to 6cc7d3f9451Christophe Simonis
2018-08-21[FIX] mail & project: Display access button on mail notificationsToufik Benjaa
This commit fixes two issues: - If a partner has multiple users and if any of these users is a share user, then the access button on mail notifications is not displayed. - If a project.task is either assigned or has its stage folded the access button may not be displayed for certain users. The users affected by this bug are the one who have their user's partner is linked to multiple users with at least one flagged as a share user.
2018-08-13[FIX] project,sale_timesheet: default partner on billed taskjem-odoo
2018-08-13[MOV] project,hr_timesheet: move project_time_mode_id fieldjem-odoo
'project_time_mode_id' is the field used to determined the UoM to use when logging timesheets. It is not used in project alone, but in timesheet. Moving it make sense, and does not cause any problems. For now, no UI allow the end user to change it: it is set with the Hours UoM (hardcoded). This is a technical move to prepare the feature that will allow people timesheeting in Days or Hours. Task #39079
2018-08-07[REF] mail: propagate recipient data through notification processThibault Delavallée
Purpose of this commit is to avoid browsing and prefetching data about recipients when notifying a message to partners and channels. Mail message _notify computes all necessary data in a single query. This commit allow to re-use this data by propagating it through the call chain. Addons inheriting from classification methods used when sending notification emails are updated accordingly to the API and data update. This commit is linked to task ID 47934 and PR #24033. No functional change should occur with this commit.
2018-08-03[IMP] Portal - Share link : Easily share the url of a documentMitali Patel
Purpose ======= - Quickly share the url to someone else (a client, a colleague,...) - Ensure that the recipient can access at least the portal view of the shared record. - Typically used when a client cannot retrieve the mail to access his order. The share link can be used in this case. Specifications ============== For any object inheriting form portal.mixin: - Add a button SHARE (not visible in edit mode) - When clicking on this button, a popup opens with : - A warning message for tasks and projects only (see below) - the link (like in gmail) that can be copied - Recipients - mail composer (with preselected template) ==> see below - button [Send Link] [Copy Link] Discard - After sharing document, put internal note like "Document shared to xyz,...." with template message - Anyone with the link, even anonymous user (not logged in) can have access to the document with the access token provided in the url. Impacted models: - account.invoice (Community) - project.project (Community) - project.task (Community) - purchase.order (Community) - sale.order (Community) - helpdesk.ticket (Enterprise) Warning messages and access rules: Allowed : - SO canceled or draft will be accessible with the link with access_token - If the customer account is B2B (signup not enabled), the recipient will anyway see the document as the user specifically wants the recipient to see the document. Restrictions : - For Project and Task, if the privacy is not public, then, there is a contradiction between the access_token mechanism and the privacy of the document. - A warning message will be displayed in the share wizard to inform the user if the document cannot be visible by the recipients and to ask him to set the privacy to 'Visible by following customer'. The send button will, in that case, be hidden. - To avoid to block the share for a new project, default privacy value is now set to 'Visible by followong customer' Technical implementation ======================== - Move the access_token mechanism (field + methods + mail controller) to the portal.mixin to be able to use it in a generic way for each object inheriting the portal.mixin - Generalise a part of the _*model*_get_page_view_values method into a single one in portal - Generalize the _*model*_check_access into the portal controller of the portal module - Remove the init_column + default value for the access_token > old records have an access_token, > new one won't but it will be generated on demand via the get_access_token Done for performance reasons - Add share button into action menu separately. + kanban view context menu (except for task and project where button not in action menu but 'simple' button for task and project because other modules already provide action to send documents by email, which is not the case for project and task.) - Add a sign_token used to authentify the recipient in the portal view chatter, if any. The message will be posted as if the user was logged in. - Set the _get_share_url as private for security reason - Add a redirect parameter to _get_share_url to get If false : The direct portal view url If True : The redirect url (mail/view/?) - Cleaning up unnecessary code - Bug fix : - Before, if user was not logged and record had partner_id, if partner id was null, post message was done as admin. Now, the post message is done as public user. - If the user had an uid but had no access_token, he could be able to gain the access token of the record. check_access_rights was missing in the get_access_action. Task ID : 30985 Closes #25629
2018-07-11[FIX]: mail: storing add_sign on mail messageXavierDo
Only the add_sign from notif_values is usefull for a resend. We can consider that a mail on resend can be delete in every case, and we can find the model_description from model since a resend can only be performed on message linked to a model. The other notif_values are now parameter in order to ease the understanding of what can transit through this flow. Task: #1860054 PR: #25622
2018-06-28[MERGE] forward port branch saas-11.3 up to 3cdcbce93cbChristophe Simonis
2018-06-27[MERGE] forward port branch saas-11.2 up to 12ddec3a767Christophe Simonis
2018-06-27[MERGE] forward port branch 11.0 up to 152519cd658Christophe Simonis
2018-06-25[FIX] project: default on email as suggested recipientNicolas Lempereur
With 82ca3d3f in 11.0 it was possible to have an email address on a task, without specifying a partner. Because of a small issue, this address was not suggested as a possible recipients like it was in a project.issue object. opw-1858170 closes #25427