summaryrefslogtreecommitdiff
path: root/addons/test_mail/models
AgeCommit message (Collapse)Author
2020-04-22[REF] test_mail: sun is shining, no more umbrellasThibault Delavallée
PURPOSE Have a cleaner test_mail addons SPECIFICATIONS Umbrella -> Container, easier to understand that we target a ticket / project like model using mail.test.ticket and mail.test.container . LINKS Prepares Task ID 2238597 (clean notification models) Prepares Task ID 2083854 (improve mass mailing technical flows) PR #49891
2020-04-22[REF] test_mail: rename test models to ease understandingThibault Delavallée
PURPOSE Have a cleaner test_mail addons SPECIFICATIONS Keep only mail-related tests, move odoobot in test mail full, send "update notification" tests in mail (specific to mail). Merge some test files to lessen number of files, perform light file renaming. Split test mail models file to prepare some cleaning in those models and tests. LINKS Prepares Task ID 2238597 (clean notification models) Prepares Task ID 2083854 (improve mass mailing technical flows) PR #49891
2020-04-22[MOV] (test_)mail(_full): redispatch some tests and split test mail models fileThibault Delavallée
PURPOSE Have a cleaner test_mail addons SPECIFICATIONS Keep only mail-related tests, move odoobot in test mail full, send "update notification" tests in mail (specific to mail). Merge some test files to lessen number of files, perform light file renaming. Split test mail models file to prepare some cleaning in those models and tests. LINKS Prepares Task ID 2238597 (clean notification models) Prepares Task ID 2083854 (improve mass mailing technical flows) PR #49891
2020-04-17[REF] mail, various: clean usage of mail aliasThibault Delavallée
Clean the usage of mail aliases and more specifically its associated mixin `mail.alias.mixin` . Stop using context for model of aliases, and correctly give model_id and parent_model_id to the call chain through a cleaned code easier to override. We also merge methods get_alias_model_name and get_alias_values in single one called before record creation (alias first values) and right after (to have values depending on actual record). LINKS Task ID 1919277 Community PR odoo/odoo#41160 Enterprise PR odoo/enterprise#6983 Upgrade PR odoo/upgrade#872 Co-Authored-By: Rémy Voet <ryv@odoo.com> Co-Authored-By: Thibault Delavallée <tde@odoo.com>
2020-02-05[IMP] mail: add tracking on computed stored fieldsRaphael Collet
Also delay the tracking until pre-commit, so that several updates on a record generate a single tracking message.
2019-11-19[IMP] mail: track fields based on ir_model_fieldsKevin Baptiste
The tracked field is now a relation to the corresponding ir.model.field. This prevents potential privacy issues should the field be deleted or renamed. closes odoo/odoo#39232 Taskid: 2088634 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-24[FIX] *: add missing model descriptionMartin Trigaux
Some models did not specified a _description
2019-05-29[IMP] test_mail: Add multi company test from _redirect_to_recordYannick Tivisse
2019-05-13[REF] mail: make blacklist a mixin built upon mail.thread and add message_bounceThibault Delavallée
* mail.blacklist.mixin now clearly make inheritance on mail.thread. Indeed we consider models using the blacklist mechanism as being used in mailing features, meaning they will anyway inherit form mail.thread. In standard Odoo it is the case for the 3 models using it (Lead/Opportunity, Contact and Mailing Contact); * define message_bounce directly in mail.blacklist.mixin. Bounce counter is indeed linked to the blacklist and mailing mechanism; * rename mail.blacklist.mixin to mail.thread.blacklist to ensure coherency with mail.thread and mail.thread.cc (another mixin build on mailL.thread); Inherit declarations in various addons are updated accordingly. Related to task ID 1911679 Linked to PR #29483
2019-04-26[IMP] test_mail: add tests for mail gateway and perform light cleaningThibault Delavallée
This commit add some tests related to the mail gateway: more bounce management tests and some additional thread formation tests. Some test asserts about bounce / blacklist management are commented as they are not completely working currently. This will be improved in master soon. Some cleaning in also done in all mail gateway tests. Notably some call to tool methods are cleaned / simplified, duplicate tests are removed. Some low-level checks are removed. A new test model is added for mail gateway: mail.test.gateway. It is a chatter model with blacklist enabled on it. It allows to tests the various blacklist-related overrides and features as well as all basic mail gateway features. Sub-part of task 1853147 (pre-cleaning before implementing mail gateway improvements) Linked to PR #32974
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-11[MERGE] forward port branch saas-12.1 up to 93d736e905eChristophe Simonis
2019-02-07[MERGE] forward port branch 12.0 up to a46138cb019Christophe Simonis
2019-02-06[FIX] mail: create partner from template in right companyLucas Perais (lpe)
Before this commit, when creating a partner automatically when creating a message with a template, the company on the partner was wrongly set After this commit, we try to retrieve the company from the model on the template OPW 1934392 closes odoo/odoo#30893
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-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-09-21[IMP]various: 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-08-21[IMP] core, test_mail: improve query count assertionsXavierDo
-remove margin With the spirit of making tests determinists, we can remove margins to have a real test of query count. -mock random on assert query count bus gc is triggered using random. Therefore, when send_many is called, we have 1% chance to have more query. Mocking random.random to 1 will disable gc during query count tests (not during warmup). Could be interresting to put gc collection in a cron latter -add more info on querycount Adding file and line number on query count failure/info will help to update the query counts. -update query count based on enterprise Update all query count with enterprise values (exactly) -normalize query counts with enterprise voip module add a read on activity type (during create) in enterprise, leading to one more query but also more information in cache. Therefore, the next assertion will need one more query to access this data in community. Adding an access to activity type in the first assertion will allow to have the same cache state in community and enterprise. Task: #1878588 PR: #26476
2018-08-01[IMP] test_mail: add an active field on activity test modelThibault Delavallée
It will allow to test behavior of activities with archived records in mind.
2018-07-25[IMP] mail : Add possiblities to sequence tracking fields in the chatterlejeune quentin
Fields in the chatter can be organized with a business logic. Here fields for CRM and Website E-commerce have a tracking sequence. For other fields/module just add "track_sequence=x" on model
2018-03-27[IMP] mail: add tool methods to manage activities directly from the mixinThibault Delavallée
This commit adds tools methods related to activities in the mail.activity mixin. It gives to models inheriting from the activity mixin an easy-to-use API to schedule, unlink or mark activities as done. Purpose of those methods is to avoid having people manually managing activities in the code to hide the technical details of the activities model, notably access rights or activity types. A field is added on activity model to indicate they have been generated automatically. This way when rescheduling or unlinking based on some specific activity types we do not change user-created activities. Those methods include scheduling activities, changing their dates, marking them as done or unlinking them. Future commits will use those methods in various addons to automatically generate activities based on workflow we want to implement. This commit also adds tests for the newly added code. Future commits should probably have a look at activity security and add some tests cases to check it is correctly taken into account. It is considered a bit out of scope for this task. Thanks to @jem-odoo for its in-depth review of this commit. Well thanks for other commits also.
2017-12-12[IMP] test_mail: move some data into demo and update tests accordinglyThibault Delavallée
Creating data directly in tests was done when tests were located in mail module to avoid creating real data or demo. Now that mail tests have their own module we can create demo data and use them in tests. It is simpler to have demo data for things like subtype and email templates to ease understanding and reuse.
2017-11-29[MOV] (test_)mail: move tests into their dedicated moduleThibault Delavallée
Purpose: avoid having useless tables for test models in a production environment.
2017-11-29[SPLIT] test_performance: split between base and mail performance testsThibault Delavallée
Test performance will now hold the base class for performance tests as well as tests related to the ORM, depending only on base. A new module test_mail is introduced at this commit that contains performance tests related to mail module. This commit contains only code move and should not impact anything. Future commits will move mail tests into test_mail so that all mail related tests are located in the same optional module. This allows notably to avoid creating a lot of unnecessary tables when installing mail module on production databases.