Commit Graph
15 Commits
Author SHA1 Message Date
Yannick Tivisse bae2d9f717 [IMP] crm, product, ...: Clean some common test classes 2019-11-12 11:34:36 +00:00
Andrea Grazioso (agr-odoo) a128fb5b03 [FIX] project: can delete archived project with tasks
Create a Project with tasks, archive it, delete it.

The project is deleted, but this should not happen:
tasks are present, but they are hidden because when the project is
archived all its tasks are archived too (active flag is set to false).
On project unlinking only active tasks are checked, thus allowing the
deletion. Using a context flag to avoid filtering the non active tasks.

opw-2080515

closes odoo/odoo#38320

X-original-commit: 71a79f26e6319c6987397950c7f9df6c61dfb0d9
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-10-10 06:28:20 +00:00
Thibault Delavallée 1b2d58daec [REF] project: tests: make tests independent from mail
Purpose is to be able to move mail tests in a separate module without
breaking other tests. It seems dependency is not real, only some data
to add. It is better to have self contained tests anyway.
2017-11-21 15:00:21 +01:00
Thibault Delavallée 029d1baf35 [REF] mail: remove required alias on users
This commit remove required alias on res.users model. It also removes the
inheritance of mail.alias.mixin. The field alias_id is kept and allow people
to use aliases on users if they want. However there is no default void alias
created for each user anymore.

Default from of mail.message does not use user alias anymore. Indeed this
creates issues with aliases not being correctly configured and can be
confusing compared to private channels. Using user aliases is therefore
now done manually instead of being a default behavior.
2016-09-01 13:19:24 +02:00
Antony Lesuisse ccf606e026 [ADD] website_project: Portal access to Projects
Split project to move portal features to a new module named website_project.

Portal users may now access their projects and tasks throught the
website_portal My account page. The Backend portal menuitem is removed.

Simplify the privacy settings of project, to be visible to portal users the
project must be in 'portal' mode.

Original authors: Vipul Bhatt, Florian Wintjens
2016-07-06 01:17:43 +02:00
Ravi Gohil f077a6c7bd [IMP] project: replaced except_orm by AccessError in tests
Comments were referring to Warning rather than AccessError but:
- Warning is deprecated
- The functions that are tested actually raise AccessError
2016-06-30 14:41:22 +02:00
Yannick Tivisse e87144b255 [IMP] project: improve tests to consider a task created in a project with and without stages 2015-09-03 13:11:19 +02:00
Damien Bouvy 8bd6074f03 [IMP] project,project_issue,project_timesheet,project_issue_sheet: project visibility and access rights modifications
[REM] portal_project: move ALL the things
- move portal access rights from portal_project  and website_project_issue to project and project_issue
- move portal menuitems back to their respective module
- remove public visibility of projects
- adapt demo data to have a 'Demo Portal' project
- add correct access rights for account.analytic.line for portal users
- small view tweak (do not display 'timesheet' tab if one can't see antyhing in it anyway)
2015-08-14 13:19:03 +02:00
Thibault Delavallée d52bf613d6 [CLEAN] mail: tests: reduce a bit the boilerplate of tests to lessen
the testing time.
2015-07-09 11:13:03 +02:00
Christophe Simonis a304194936 [MERGE] forward port of branch saas-6 up to 81b5c60 2015-06-25 00:26:31 +02:00
Xavier Morel 11ba4689b1 [IMP] running speed of some tests & new testcase type
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-23 16:38:14 +02:00
Jignesh Rathod b55969a577 [REF] mail: migrated tests to the new API and refactored them.
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-03-24 10:18:16 +01:00
Thibault Delavallée b35a44f66d [IMP] mail_mail, mail_message: various improvements to try to improve message creation time
Replaced some read by browse
Moved get_reply_to from mail_mail to mail_message
Hint: specifying email_from, reply_to help to enhance computation time

[REF] mail: cleaned some tests, renamed a file, moved mail_group tests into a dedicated file

bzr revid: tde@openerp.com-20130827133058-ko0g0ib0f0jihmdk
2013-08-27 15:30:58 +02:00
Thibault Delavallée 4b0baa3615 [CLEAN] project, project_issue, project_mrp: misc cleaning of code + fixed bug in project_mrp + re-added commentred tests in project_mrp
bzr revid: tde@openerp.com-20130710122526-tf87avul7huqgigg
2013-07-10 14:25:26 +02:00
Thibault Delavallée 9b41f8fadc [TESTS] project: refactored tests. Moved surviving yml tests into unittest; added mailgateway test.
bzr revid: tde@openerp.com-20130710101508-62eh89gzq22qvpq5
2013-07-10 12:15:08 +02:00