summaryrefslogtreecommitdiff
path: root/addons/project/tests/test_project_flow.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>
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] rating: introduce the parent mixinjem-odoo
When creating a task, the satisfaction of the project is recomputed even if the task has not rating. This can lead to performance issue: concurrency error in Postgresql can happen if a task is created when somebody else tries to update the project. The satisfaction recomputation will give and concurrency error whereas it will return the same satisfaction percentage, since the task has no rating. The same problem will happens in every modules implementing the rating feature: project, helpdesk and livechat. This problem leads us to create the rating.parent.mixin in order to retrigger the computation only when a new rating appears on the parent object. We also unstore the field to make its computation lazy. Maybe in a near future, this field will be computed in SQL directly. The parent mixin allow us to standardize the behavior to all parent rating models. These optimizations should reduce the number of computation and speed up the task creation. opw-1902502 Task-1903565
2018-03-20[REM] project: remove assigned subtype and keep only classic trackingThibault Delavallée
Since e9734f4975904b6196423b7f5de7dd211809d6f6 assignation is now a notification sent in the inbox or by email to the newly-assigned responsible. It is therefore considered as not necessary to link a subtype to the assignation itself. Indeed having it logged in the discussion history as a classic tracking in addition to the notification is considered as sufficient. In project module the task opened subtype was linked to task creation and task assignation. This subtype is now used only for task creation. It also fixes a strange behavior. Changing assigned user in an ongoing task was trigerring the task opened subtype which was strange. This is not the case anymore. This commit is related to task ID 60790. Closes #23244 .
2018-02-23[IMP] rating: Parent document name updateRomainLibert
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-01-17[IMP] project: drop project substask constraintAkash Bhavsar
This commit improves subtask mecanism, on several points: 1) Drop the project constraint: before this commit, creating subtask in non parent project was not possible. Now you can move subtask to any project. The default project of a subtask is the one from the parent. 2) When setting a parent task, we want to force some field to have the same value as its parent, like `partner_id` or the `sale_line_id`. The idea is here, we work for the same client; a subtask count for the same goal (SO line or customer). Those fields should be readonly on the view. 3) Refactor some methods Task: 38498
2017-08-07[IMP] project: Remove default author when going through the mail gatewayYannick Tivisse
2016-09-02[FIX] adapt logger namesRaphael Collet
2016-06-30[IMP] project: replaced except_orm by AccessError in testsRavi Gohil
Comments were referring to Warning rather than AccessError but: - Warning is deprecated - The functions that are tested actually raise AccessError
2016-06-16[REM] project: remove state field on project.projectAdrien Dieudonne
Also remove unused method _generate_task()
2015-09-03[IMP] project: improve tests to consider a task created in a project with ↵Yannick Tivisse
and without stages
2015-09-02[IMP] project, project_issue: discard project templatesRaphael Collet
2015-08-21[REF] mail: mail_thread: followers updateThibault Delavallée
Followers can now be partners or channels. Partners following a document will receive needaction, as previously. However people can follow documents through channels. Members of a channel are able to listen to a stream of messages using the channel. Those messages do not create needaction messages. It is therefore possible to follow documents without receiving too much notifications. For interesting documents subscribing with its partner will create notification. message_follower_ids fields is udpated. It is now a many2many to mail.followers, not to res.partner anymore. A subscription can be either a partner (partner_id) or a channel (channel_id). Some access rules have been updated accordingly.
2015-07-28[REM] resource, project: removed faces library and its relatedThibault Delavallée
code in resource and project. This library was once used to perfom resource allocation: scheduling tasks and things like that. However this feature cannot be accessed through the interface since a long time. The feature is now removed from the project code. The library has been removed. Some code in resource used only in the project code has also been removed, as well as a test linked to this code.
2015-07-08[IMP] Project : remove task delegationYannick Tivisse
Conflicts: addons/project/wizard/project_task_delegate.py
2015-06-25[MERGE] forward port of branch saas-6 up to 81b5c60Christophe Simonis
2015-06-24[MERGE] forward port of branch 8.0 up to b8bf1e0Christophe Simonis
2015-06-23[IMP] running speed of some tests & new testcase typeXavier Morel
Some tests (e.g. mail) have expensive and significant DB setup for a number of small and cheap tests. Using a TransactionCase, the DB setup far dominates the tests themselves, by up to 10x (mail unit tests take ~130s on my machine, the tests themselves take ~15s). The SavepointCase introduced here is an hybrid of SingleTransactionCase and TransactionCase: it uses a single transaction for all tests in a class, but each test case is isolated by a rollbacked savepoint. This allows a common DB setup (via setUpClass) while keeping independent tests. TransactionCase should remain the primary test case superclass, but SavepointCase can be a fair optimisation when setup costs far dominate.
2015-06-02[LEGAL] Use global LICENSE/COPYRIGHT files, remove boilerplate textOlivier Dony
- Preserved explicit 3rd-party copyright notices - Explicit boilerplate should not be necessary - copyright law applies automatically in all countries thanks to Berne Convention + WTO rules, and a reference to the applicable license is clear enough.
2015-05-12[IMP] project,project_issue,portal_project: code cleaningPariket Trivedi
- remove unnecessary copy() method from project/res_partner.py - remove old methods on project.project - progress is not used anymore on project.project - use clickable statusbar for project states - remove _resolve_project_id_from_context - rename project.category becomes project.tag to be more explicit - remove old methods on tasks - issues: remove option fetchmail_issue
2015-03-24[REF] mail: migrated tests to the new API and refactored them.Jignesh Rathod
Tests have been migrated to the new api to prepare the migration of the mail module itself. Moreover tests have been cleaned: redundant tests and unnecessary tests have been removed. As the base test class in mail is used in other addons, other addons have been updated : - portal - project - portal_project - website_project_issue - sale - purchase Future commits will come with somes fixes for issues detected when cleaning the tests.
2015-02-24[REF] mail: _track update.Thibault Delavallée
_track is now a method that returns the subtype to trigger in a given tracking context. A tracking will now lead to only one subtype being trigerred, instead of having multiple possible subtypes. Now, one tracking leads to one message with one subtype, or without subtype if there is none matching. This simplifies the model for future evolution of chatter and mail. [IMP] project, project_issue: cleaned task and issue subtypes, now having opened for created / assigned.
2014-08-04[IMP] project : mailgateway: add to and cc as followers of the newly created ↵Dikshit Prajapati
task
2014-07-06[MERGE] new v8 api by rcoRaphael Collet
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
2013-12-06[FIX] [TESTS] project, hr_holidays and portal-related modules: fixed tests, ↵Thibault Delavallée
because the raised errors have been updated bzr revid: tde@openerp.com-20131206125751-lx5ki1nz10pdo63r
2013-07-10[IMP] project_issue: added date_last_stage_update in reports; removed ↵Thibault Delavallée
month_last_stgae_update in project_task, only date is sufficient because reports already handle this correctly. Updated coding style of tests. bzr revid: tde@openerp.com-20130710132954-tnr75cf33nti8r1u
2013-07-10[CLEAN] project, project_issue, project_mrp: misc cleaning of code + fixed ↵Thibault Delavallée
bug in project_mrp + re-added commentred tests in project_mrp bzr revid: tde@openerp.com-20130710122526-tf87avul7huqgigg
2013-07-10[TESTS] project: refactored tests. Moved surviving yml tests into unittest; ↵Thibault Delavallée
added mailgateway test. bzr revid: tde@openerp.com-20130710101508-62eh89gzq22qvpq5