Commit Graph
33 Commits
Author SHA1 Message Date
Thibault Delavallée 2e2fd3f8a7 [IMP] event: improve test class and data to help reusing them
PURPOSE

Allow the user to schedule SMS communication on events

SPECIFICATIONS

In order to add tests this commit performs a quick cleaning of event common
class to speedup and prepare new tests.

Containing
  * move data creation in class and use savepoint;
  * move registration creation in its own method to allow calling it if
    necessary;
  * clean some unnecessary variables.

LINKS

Task 1922187
Part of PR #34705
2019-07-25 11:45:08 +00:00
Raphael Collet b7fd679a6c [FIX] *: sudo() -> with_user() 2019-07-04 11:32:22 +00:00
Raphael Collet db97bb7f11 [FIX] *: stupid assignments on non-stored fields without inverse
Some tests had to be adapted because they relied on the buggy behavior:
this was particularly the case when they tried to write on readonly
related fields.

closes odoo/odoo#32460

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-04-11 14:55:50 +00:00
Raphael Collet 960360afe4 [REF] *: use native date/datetime for Date/Datetime fields
From this commit onwards, Date fields will return datetime.date objects and Datetime fields will return datetime.datetime objects, this implies a number of things that are clearly explained both in the ORM API for master.

This commit also introduces a number of helper functions for dates and datetimes that are exposed in tools.date_utils and fields.Date[time], explained in the documentation as well.

Task-ID: 47189
2018-08-06 14:37:19 +02:00
Thibault Delavallée 1fbc29a641 [MOV] base: move ir_* models into models/ 2017-11-27 11:15:03 +01:00
Richard Mathot 95d03559a2 [FIX][P3] *: mock is now a part of unittest 2017-10-03 10:32:01 +02:00
Deep Patel 898224f110 [IMP] web,account,...: Regroup settings, add a nav and search bar
Purpose
=======

Settings are often way too long and hard to scan and sometimes you don't know where to find the settings you're looking for.
By adding a left navigation, you can already have an overview of the settings, and switch easily between them.

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

- Add a search bar on all the apps that have settings which can search results from all the installed apps.
  (If i'm on sales settings,and I search anything then it shows results from sales settings and also shows
  all the other matching results from all the other apps such as, Inventory...etc) with app name.
- Able to activate feature from the current page results (no matter if the searched result is from another apps).
- Highlight searched word in results
- Delete the sheet, have a full white background
- Add left navigation bar on setting
- Left navigation bar fixed
- List displayed based on installed apps
- On right panel, by default display current app setting and change accordingly
- [Mobile] Left navigation bar displayed on top
- Add Breadcrumb on top of the page: have the name "Settings" + Save / discard CTA + Search
- Add General Settings on the nav bar
- remove "save this page..." notif in all settings
- Delete all recommanded apps section + all checkbox that install app should disappear:
	payroll: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrSkMzWVpuZ0ZoaFE/view?usp=drivesdk
	Events: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrYXlHMHd2NTM2blE/view?usp=drivesdk
	Manufacturing: Delete Repair - Quality Control - Maintenance - Product Lifecycle Management [LAP][ok]
	Timesheets: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrdFg5XzNydkd2TlU/view?usp=drivesdk
	project: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrraWo3NE04TktwcTQ/view?usp=drivesdk
	inventory: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrQkRaVUR5ekFQYTQ/view?usp=drivesdk
	recruitment: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrbDdqLWQweF80UkE/view?usp=drivesdk
	purchase: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrRlAyUDBnb0trQWs/view?usp=drivesdk
	email marketing: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrOUZONjhvX2k3Y2s/view?usp=drivesdk
	expenses: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrrR0JpN1ZpQmtxU3M/view?usp=drivesdk
	attendances: https://drive.google.com/a/odoo.com/file/d/0B1uIL9E_zXrralpjZ1VJclNpMWs/view?usp=drivesdk
- About duplicate settings:
	Docsaway: Delete from Sales + delete Default Print Provider
	Attributs & Variants: Delete from Purchases - Manufacturing
	Multi-currencies: delete from Sales
	Unit Of Measures: Delete from Purchase & Expenses
- Add a scroll bar on the left bar when there's too many apps
- Keep the navbar visible even when you search
- Move General Settings to the bottom of the list
- Update on Settings:
    - Accounting:
        - rename automatic rates
        - Anglo Saxon Account: Should be in technical feature
        - Place Accounting Reports section before Taxes section
    - CRM:
        - Phone Validation: Enforce international format becomes
        - Local Numbers: (2 radio buttons proposals) Add international prefix / No prefix
    - Fleet: typo " ... a new car if ..." + text is too long <br>
    - project: fix tooltip for colab pads
2017-09-01 13:02:54 +02:00
Thibault Delavallée 91617bfc78 [IMP] event: ease event configuration and management through categories
This commit improve event.type (Event Categories) model and views in order
to ease event configuration through more detailed categories. The purpose
is to be able to define categories holding default data for website,
tickets, attendee mailing, ... Choosing a category on a new event takes
those default values to help users creating finely-tuned events.

Main configuration on event.type is

 * auto confirmation, replacing the old system-wide auto confirmation
   parameter
 * seats limitation
 * location: online events, timezone
 * communication: reply-to email address, twitter hashtag, automated
   mailing of attendees
 * ticketing
 * website parameters: display on website, display tracks, allow track
   proposal
 * question to attendees
2017-03-03 13:09:53 +01:00
Thibault Delavallée 18ce1c9215 [FIX] event: propagate use of correct default_auto_confirmation key
Fix a14bdbd4be made event correctly use
default_auto_confirmation key. However since commit bf82638bb0
tests were also not correctly using the ir values key.

This commit should fix all use of that key. Maybe.
2017-02-10 13:15:54 +01:00
Kishan Gajjar bf82638bb0 [IMP] event: Improve the settings form view 2017-01-12 13:13:27 +01:00
Fabien Pinckaers 4b877547ef [FIX] event: tests on mails, registration has some title 2016-12-06 12:36:33 +01:00
Fabien Pinckaers 2696f70f58 [FIX] evnet: test scenario, scheduled emails 2016-12-06 11:46:31 +01:00
Fabien Pinckaers 5482c163ef [FIX] event: fixing automated tests 2016-12-06 10:56:43 +01:00
Fabien Pinckaers b048d1154f [FIX] event: test scenario, removing this month, which can be too vague for a short term date 2016-12-06 08:53:31 +01:00
Fabien Pinckaers f8c6c76044 [FIX] event: emails: no map if no location (webinar)
[FIX] event: emails: format of date: 31 Janvier instead of '20160131T1010110'
[IMP] event: better emails (button to zoom to event, cleaner text, show
      organizer phone and email)
2016-12-05 22:37:07 +01:00
Raphael Collet 0783318f97 [FIX] adapt logger names 2016-09-02 17:28:13 +02: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
Jeremy Kersten 5c0de8f00a [FIX] event: fix get_range_str and add tests
Fix format_tz call
Fix week and month computation
Add test wich tests change month and year !
2016-08-31 13:23:14 +02:00
Jigar Patel 9f7d7c6809 [IMP] event: improve emails sent by event
* improve layout of confirmation and reminder emails
 * add default mails configuration on events: 2 reminders are added
   J-2 and J_15
2016-08-18 15:12:08 +02:00
Thibault Delavallée 6b87c731fb [FIX] event: fix access right issues
* Limitate rights of event user to reading an event

Event user should not be able to create events. Its rights should be limited
to reading events, creating and updating registrations. Only event managers
are allowed to create and modify events.

* Sudo access on ir.values in event config settings

Configuring events imply modifying auto confirmation parameter which is stored
into an ir.values. As this model is limited to values with user_id = uid we
have to sudo the access here as it is not a user-defined value.

* Add some tests for the various fixed issues
2016-08-18 15:09:40 +02:00
Thibault Delavallée c8a313d51e [IMP] various: use odoo for imports instead of openerp and update class names 2016-08-10 15:48:07 +02:00
dut-odoo c83702a36a [IMP] event: change term 'Subscription' to 'Registration'
Changed term 'subscription' to 'registration' in event, event_sale,
website_event, website_event_sale modules
2016-05-13 11:28:28 +02:00
Jigar Patel 159f6c9e1f [IMP] event: The timezone of the event should be required field because if the user does not set timezone then in website_event(frontend) for event's timezone is not intuitive 2016-03-07 09:20:34 +01:00
Paramjit Singh Sahota 8ada8b8276 [IMP] event, event_sale, website_event_track: usability improvements
Among others small improvements :

 - [event] remove automatic logging of new registrations on event; for big events
 it produces only noise
 - [event_sale] fix product creation from event management; better display of
 address and date of the event
 - [website_event_track] add a cancel state on the track model. The stat button
 on the event shows only not-canceled state. Also added some tips.
2015-08-11 16:11:19 +02:00
Olivier Dony 3c8c1a96a2 [FIX] event: only auto-trigger after_sub mails during registration + fix tests
Previously, all existing event.mail schedulers were
auto-triggered at each registration, which could
make the behavior unpredictable/surprising,
including during the tests. Only trigger `after-sub`
event.mail schedulers, as only those are related
to a new registration.
Tests fixed to take into account this new behavior.
2015-05-28 23:38:58 +02:00
Jeremy Kersten b220f68b4f [FIX] website_event_sale, event: fix registration to event
First bug, was that the /registration/confirm had never attendee.
Because partner_ids was initialized with set() and so partner_ids &= set(xxx)
will be always empty.
Now the user have confirmation on screen that the registration is done...

Another bug/usuability problem was that when user register to a webinar
less than 1 hours before the event, if scheduler was not run menwhile,
the user has the link after that the webinar was starded...
Now, we force the mail to be send asap, and launch the scheduler at
each confirmation... Anyway, the list of email registration to send should be
never big, because every registration will launch the scheduler.

Test updated since the mail are sent direcly, it's normal to have 0 mail.
2015-05-13 17:43:09 +02:00
Mahendra Barad d9fa702d5e [IMP] event and event_* modules: onboarding improvements
event:
- added tip
- default subscription/reminder/thanks templates for registrations are now using
the reply_to defined on the event
- fixed check of available seats: use seats_availability field, unlimited events
should never trigger the constraint
- added a sequence on scheduled emails on events
- config: wording improvements
- various improvements in event, registration, event_mail and event_report views

event_sale:
- removed override of seats_max: should not depend on available seats in
tickets. Indeed you may have less available places than the sum of seats for
each ticket type, for example if you have 0-10 VIP and 0-20 Standard tickets
for a 20-seats event.
- removed a duplicated view override
- added a seats_availability field on tickets, same meaning as on event.
- improved event form view: registration tab is now replaced by the tickets tab
when tickets are used

website_event:
- better management of sold-out event in the front-end, when doing registrations

website_event_sale:
- removed register link on the event kanban view. There is no need to to from
the back-end to the front-end from the kanban view. The published button on the
event form view already allows to go to the front-end view on the event
- better management of sold-out event in the front-end, when doing registrations
- fixed a template that was in customize and should not

website_event_track:
- wording improvements
- small improvements in the front-end of tracks
2015-01-29 17:39:41 +01:00
Christophe Simonis 902be20de0 [FIX] *: remove deprecated checks attribute of tests modules 2015-01-19 17:17:26 +01:00
Goffin Simon 0fd773a486 [IMP] Cleanup and refactoring of exception handling
Unify and refactor exception handling in framework and addons.

The generic `except_osv` is now deprecated, and replaced by more specialized exception subtypes:
 - `UserError` (renamed from Warning, as it conflicts with the built-in `Warning`) raised when a non-technical error occurs during a business operation. It could be a missing information in the data provided by the user, or a misconfiguration.
 - `AccessError`: raised when any operation is denied because the user conducting it does not have the required access rights.
 - `AccessDenied`: raised when an operation that requires authenticated access is attempted via an unauthenticated request.
 - `MissingError`: raised when an operation is attempted on a record that does not exist.
 - `ValidationError`: raised when an operation violates a SQL or Python constraint.
 - All other exceptions are internal errors due to a system problem or bug, and raised untouched to the client-side, which should display a traceback.

All exceptions take a single message argument.

The `test_exceptions` module has been updated to showcase both new and old (deprecated) exceptions.

A great many old `except_osv` had a useless title with "Error!" or "Warning", those have been removed, as this is handled by the client-side widget that displays the messages.

This commit introduces a more consistent policy for logging errors and warnings:
 - All messages that do not require administrator attention should be logged at INFO level or lower. This includes all errors that are notified to the user in a friendly manner, even for access right problems or validation errors during business operations.
 - All messages that indicate a likely misconfiguration or malicious use by the users should be logged at WARNING level, as they typically require administrator attention.
 - All other unhandled internal errors cannot typically be handled by the user and should be logged at ERROR or higher level, as they require immediate administrator attention.
2015-01-16 17:15:18 +01:00
Mahendrasinh Barad e2e38076aa [IMP] website_event_sale: validation of seats availability in cart.
Attendees are created and deleted on changing the quantity from the cart.

Added sale_order_id and sale_order_line_id fields on registrations, allowing
to find the order and the order line that created the registration without
to rely on origin and ticket.

Also fixed check_auto_confirmation, now in multi mode to avoid issues due to
the specific behavior of api.one.
2014-12-24 14:23:21 +01:00
Mahendra barad ad48bf6d7d [IMP] [ADD] event: mail schedulign system.
This commit adds a way to configure scheduled emails on events. It replaces
existing automatic emails at confirmation and subscription. It proposes to
configure some schedulers, based on subscription or event, using a template
and a configurable timedelta.

A cron is added that regularly checks for event mailing schedulers to execute
and launch them. The granularity of send emails is therefore limited to the
granularity of the cron, aka 1 hour.

[TEST] Added tests for this feature.

Also cleaned a bit event, country_id is now a pure related instead
of a computed field trying to be a related. Also removed default templates
on event category. Configuration in the event itself should be easy
enough for most use cases.
2014-10-17 16:48:29 +02:00
Paramjit Singh Sahota ca862e7b85 [IMP] event: Split Ticket: registration are now for one attendee only.
Registration are now for one attendee only. When buying several seats for an event
you have now one registration for each attendee.

event: nb_register field is removed; as well as unnecessary user_id and it subscribe /
unsubscribe behavior. Also slighly cleaned some views.
event_sale: do not auto confirm registrations linked to a draft sale order. Note: strange
origin is a char field, not a sale_order_id. Added a small wizard to edit attendees
data when confirming a sale order containing event related lines.
website_event: when buying free tickets, ask for attendee details. Added template,
controllers to handle that behavior.
website_event_sale: when buying tickets, ask for attendee details. Events ecommerce
should be better integrated with online events, using inheritance to add details
instead of being very different.
2014-10-09 10:09:06 +02:00
cod-odoo 16b560c441 [IMP][TEST] event: auto confirmation option, allowing to
automatically confirm events. In a simple flow it is usefull to automatically
confirm event and registrations.

[TEST] event: moved draft2done test into a unittest, easier to finely tune
in order to test the auto confirm option. Moreover this gives a basis to
further add python tests in the module. Hooray.
2014-10-02 11:44:07 +02:00