Commit Graph
2793 Commits
Author SHA1 Message Date
Martin Trigaux c59c10f1bc [FIX] *: correct typos and bad English
Courtesy of translators
Reexport .pot of modified modules

closes odoo/odoo#61010

X-original-commit: 62a18bdb372e234107fd2099a2df5f9e3a442c96
Related: odoo/enterprise#14489
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-10-29 19:23:41 +00:00
Thibault Delavallée fa11872330 [FIX] event: split unstored / stored fields computation
Otherwise computing unstored fields forces to compute all other already
stored fields. When being in a high charge context this may have a big
impact on DB use.

Task ID-2351463

closes odoo/odoo#59845

X-original-commit: fbde9dd183472237f12014315f063af736950b6c
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-10-13 11:02:17 +00:00
Martin Trigaux e79531c136 [I18N] *: export 14.0 source terms
Including demo data this time

closes odoo/odoo#58862

X-original-commit: 575abde110acb3d12b25f177a863374becef0894
Related: odoo/enterprise#13705
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-09-29 17:52:02 +00:00
Quentin Mourier f6f619beb7 [IMP] website_event_track: improve track view form
This commit improves the track view form so that speaker picture is above
the speaker biography.

Task ID-2325017
COM PR #57744
ENT PR #13571

closes odoo/odoo#58738

X-original-commit: 9391d16c1ae21cbae07e26e3ace524b0e0bfd0a2
Related: odoo/enterprise#13648
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-09-28 18:17:01 +00:00
qmo-odoo 3fa35f311b [IMP] event: Improve labeling in settings
Purpose is to ease users understanding the purpose and features of sub
modules. In this commit we improve various wording and copy writing of
event_* modules in settings.

Task ID-2325017
COM PR odoo/odoo#57744
ENT PR #13571

X-original-commit: b34d40cfb3f3af9cdd21530791e939120d075ff9
2020-09-28 18:17:00 +00:00
Thibault Delavallée 305009a4d4 [FIX] event_sale: fix registration update from sale order
Since yet another change in view / server synchronization order line was
not correctly propagated to registration editor values. Registrations
were created several times when confirming an order as backend did not
receive order line information.

Task ID-2344167

X-original-commit: 406795fbee7be60c3346fa00a20755bfc1c8eff3
2020-09-28 10:12:23 +00:00
Martin Trigaux 90d85eb9c5 [I18N] export saas-13.5 source terms
Without demo data

closes odoo/odoo#56869

X-original-commit: 33f251b6489455cd7221f2c62dee0400a69784b8
Related: odoo/enterprise#12836
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-09-01 11:18:00 +00:00
Thibault Delavallée 4bbb36bd7f [IMP] (website_)event: ease configuration of Online features
PURPOSE

Clean organization and models linked to Event Online feature introduced in
semi stable saas-13.3 at odoo/odoo@981f95b and odoo/enterprise@1472202

Also clean website event menu not being available in website event but only
in website event track, which implies some extra-code to manage it.

In short: merge website_event_online in website_event, website_event_track
_(online/session) in website_event_track.

RATIONALE

_online modules have been added to extend content of website_event and
website_event_track without having any impact on those module. First step
of cleaning is to move this content directly in base module.

track_session module is mainly a rewrite of track module. Second step of
cleaning is to move its content directly in website_event_track.

SPECIFICATIONS

Allow to configure Menu CTA button on event from event_type, like other
frontend related menus and buttons.

Add settings to ease discovering and installing sub event features like
  * meet;
  * exhibitor;
  * live mode;
  * quizzes;

LINKS

Task ID-2319779
COM odoo/odoo#56067
ENT odoo/enterprise#12520
UPG odoo/upgrade#1654
2020-08-21 17:30:13 +00:00
Thibault Delavallée d697966585 [MOV] (website_)event(_online): move tag color field to event
PURPOSE

Clean organization and models linked to Event Online feature introduced in
semi stable saas-13.3 at odoo/odoo@981f95bbf4 and odoo/enterprise@14722028ae

Also clean website event menu not being available in website event but only
in website event track, which implies some extra-code to manage it.

In short: merge website_event_online in website_event, website_event_track
_(online/session) in website_event_track.

RATIONALE

_online modules have been added to extend content of website_event and
website_event_track without having any impact on those module. First step
of cleaning is to move this content directly in base module.

track_session module is mainly a rewrite of track module. Second step of
cleaning is to move its content directly in website_event_track.

SPECIFICATIONS

Move event.tag color field from website event online to event. This field is
part of standard event models.

LINKS

Task ID-2319779
COM odoo/odoo#56067
ENT odoo/enterprise#12520
UPG odoo/upgrade#1654
2020-08-21 17:30:13 +00:00
Barad Mahendra 30adc183f8 [IMP] *: set sample="1" on reporting view archs
The purpose of this commit is to enable sample data on various graph and
pivot views.

Task ID: 2319606

closes odoo/odoo#55917

Related: odoo/enterprise#12415
Signed-off-by: Mathieu Duckerts-Antoine <Polymorphe57@users.noreply.github.com>
2020-08-18 14:24:10 +00:00
Jérémy Hennecart 452d7427ca [IMP] event: remove confusing event tour "Communications" steps
This commit removes a few tour steps from the event main tour that required the
user to configure a few "Communications" on the event.
As these steps are a bit tricky and are absolutely not required for a first
overview of the capabilities of the app, they were removed to ease onboarding.

task-2313380

closes odoo/odoo#55912

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-08-18 09:10:46 +00:00
std-odoo 3dfb3c1e74 [FIX] website_event(_*): improve user flow and experience from frontend
PURPOSE

Provide some fixes after internal test deployment of event online features.
Notably: user registration flow, various fixes in templates.

Also add some unit tests to avoid regressions while working on event features.

LINKS

Task ID-2169118
odoo/odoo#55967
odoo/enterprise#12438

X-original-commit: e66684b23eebaadc3df7b908427d3d7a83d4f0a0
2020-08-17 16:29:49 +00:00
David Beguin f4e23f78bd [FIX] event: set last tour bullet at bottom position for readability
Task ID-2169118
odoo/odoo#55967
odoo/enterprise#12438

X-original-commit: 15c4acf0511ad9e48666e46a2e8789d4c1090013
2020-08-17 16:29:49 +00:00
Martin Trigaux 6156f98288 [FIX] *: adapt action content retrieval
Use _for_xml_id to replace all the self.env.ref().read()[0]
This has the advantage of having a single point of control and to add
the fields filtering and model verification.

Add sudo for other operations on ir.actions.*
2020-08-17 09:09:02 +00:00
Barad Mahendra 63f239163a [IMP] *: set sample="1" on various graph archs
The purpose of this commit is to enable sample data in various
graph views.

TaskID: 2311486
2020-08-12 09:57:09 +00:00
d5840a9093 [IMP] website_event(_track): improve demo data
RATIONALE

Even will soon gain a major update called Event Online, allowing to better
support full-online events. In order to prepare its merge, preparatory merge
are done to lessen the final diff.

PURPOSE

As new "Online Event" support is about to land, new and improved demo data
is necessary to showcase it. Improve online event demo data: have more tracks,
tags, colors, speakers, partners, descriptions, ... Make it WOW and AMAZING.

Improve demo data, especially track-related demo data: more tracks, better
datetimes, titles, tags, ... in order to have at least one event that looks
like a real event.

LINKS

PR #55260
Task ID-2310491 (Event Online Preparation 5)
Part of Task ID-2252655 (Main Online Event task)
Part of Task ID-2283796 (Event B2Basics / Registration Flow)

Co-Authored-By: Aurélien Warnon <awa@odoo.com>
Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
2020-07-31 18:05:03 +00:00
Thibault Delavallée c2627e1615 [REF] event(_sale): improve backend views to ease daily use of events
RATIONALE

Even will soon gain a major update called Event Online, allowing to better
support full-online events. In order to prepare its merge, preparatory merge
are done to lessen the final diff.

PURPOSE

Prepare Event Online support by providing fixes in registration and event
frontend flows. Also provide a quick back2basic in backend views to prepare
addition of Online sub modules.

SPECIFICATIONS: IMPROVE BACKEND VIEWS

Registrations
  * list view: show by default creation date which is Registration Date;
  * list view: by default show email and phone, still optional;
  * list view: by default, hide partner as other information is present;
  * list view: hide event when being in context of a specific event to lessen
    number of displayed columns;
  * rename Source Sales Order to Sales Order, better for users. Make it
    optional;

Tickets
  * list view: description and start / end sales date are now optional to
    lessen number of columns;
  * list view: rename Reserved to Confirmed to match registration state naming;

Event
  * form view: move organizer, responsible and company information on the right
    with address. That way all address-related information are on the right
    while timing information are on the left;
  * kanban view: display 'confirmed' only if no auto confirm on event.
    Otherwise both numbers are the same;

LINKS

Community PR odoo/odoo#55197
Enterprise PR odoo/enterprise#12113

Task ID-2309702 (Event Preparatory Merge 4)
Prepares Task ID-2252655 (Main Online Event task)
Prepares Task ID-2283796 (Event B2Basics / Registration Flow)
2020-07-31 15:38:48 +00:00
e8dd796b7a [REF] event_*: tweak some views to help sub modules inheritance
RATIONALE

Even will soon gain a major update called Event Online, allowing to better
support full-online events. In order to prepare its merge, preparatory merge
are done to lessen the final diff.

PURPOSE

Prepare Event Online support by providing fixes in registration and event
frontend flows. Also provide a quick back2basic in backend views to prepare
addition of Online sub modules.

SPECIFICATIONS

Extract menus entries in separate menus.xml file to ease understanding.
Minimal move is done to avoid too large diff. Complete guidelines compliance
will be done in master.

Sequence configuration menu entries to ease their ordering. Indeed when having
all event sub-apps installed configuration is messy, with event menus mixed
with track menus, ...

Improve event tag view (remove title, have a simple form view)

Improve event sponsor views (add group-by, improve form view, add no content
helpers). Those will become exhibitors and having usable views is necessary.

Add some anchors in existing views to ease inheritance.

LINKS

Community PR odoo/odoo#55197
Enterprise PR odoo/enterprise#12113

Task ID-2309702 (Event Preparatory Merge 4)
Prepares Task ID-2252655 (Main Online Event task)
Prepares Task ID-2283796 (Event B2Basics / Registration Flow)
Prepares Task ID-2299857 (Event Design Review)

Co-Authored-By: Aurélien Warnon <awa@odoo.com>
Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
2020-07-31 15:35:46 +00:00
Thibault Delavallée 4ac288b944 [REF] event: improve (and fix) default email templates
RATIONALE

Events are sometimes held online, gathering a community. In this merge we
improve Event application to better support full-online events with improved
tracks, wishlists, chat rooms, ...

PURPOSE

Prepare Event Online support by providing fixes in registration and event
frontend flows. Also provide a quick back2basic in backend views to prepare
addition of Online sub modules.

SPECIFICATIONS: CONFIRMATION / REMINDER EMAIL

Reorder a bit content: add links to add to calendar directly in header
text, between confirmation and signature.

Add a section holding a link to PWA in order to showcase it to customers.

Apply fixes :

  * correctly use 50% width only for date / location display when location
    is not set;
  * correctly put jinja tags to make valid html, otherwise edit / save template
    breaks it when browse move jinja tags a bit randomly (e.g. %if between
    tr tag is not valid html and broken by design);
  * correctly compute horizontal separation lines, display them only when there
    is actually some content to separate;
  * correctly support organizer / no organizer, address / no address and
    online / not online in all template;

Notes: this require to re-generate the whole translations templates of both
templates but this seems a required pain. Indeed current template are broken
beyong redemption.

Fixes notably cfca2bb0ff

LINKS

Community PR odoo/odoo#55197
Enterprise PR odoo/enterprise#12113

Task ID-2309702 (Event Preparatory Merge 4)
Prepares Task ID-2252655 (Main Online Event task)
Prepares Task ID-2283796 (Event B2Basics / Registration Flow)
Prepares Task ID-2299857 (Event Design Review)
2020-07-31 15:34:30 +00:00
Xavier Morel 6835aeb0de [REM] core, *: deprecate <act_window> and <report>
Convert deprecated tags through the codebase.
2020-07-28 13:03:13 +00:00
382b8f5e1a [IMP] (website)_event_(track): improve and add demo data
PURPOSE

Prepare Event Online support by providing fixes and preparatory cleaning
commits.

SPECIFICATIONS

As new Online Event feature is about to land new and improved demo data
is necessary to showcase it.

Add a new event for demo data that will be used to showcase the "online"
features to be added soon. Add some interesting demo on it: tags, tracks,
sponsors, ...

LINKS

Task ID 2289148 (Event Bugprovements)
Prepares Task ID 2252655 (master Online Event task)
Prepares Task ID 2283796 (Event B2Basics)
PR #53944

X-original-commit: 553e835eb87a750312bed8e188b3ba82e811f7cc
Co-authored-by: Aurélien Warnon <awa@odoo.com>
Co-authored-by: David Beguin <dbe@odoo.com>
Co-authored-by: Thibault Delavallée <tde@odoo.com>
2020-07-24 06:54:35 +00:00
Thibault Delavallée 785d98bfbe [FIX] event: fix event creation with demo tickets
PURPOSE

Prepare Event Online support by providing fixes and preparatory cleaning
commits.

SPECIFICATION

Currently tickets demo data are not correctly created as they mess up with
automatic ticket computation from event_type configuration.

Solution is to flush event creation. It means tickets default configuration
is computed. Afterwards tickets are created in demo and avoid clashing with
the compute in cache.

LINKS

Task ID 2289148 (Event Bugprovements)
Prepares Task ID 2252655 (master Online Event task)
Prepares Task ID 2283796 (Event B2Basics)
PR #53944

X-original-commit: 6b5ec74b3d9bc008c95a92e7fa954675ae506d1a
2020-07-24 06:54:35 +00:00
Thibault Delavallée 460fd55097 [FIX] event: fix tags not correctly defined in xml
PURPOSE

Prepare Event Online support by providing fixes and preparatory cleaning
commits.

SPECIFICATIONS

Currently no tags are set on demo data due to strange construct of eval
and ref. This commit fixes those strange demo definitions.

LINKS

Task ID 2289148 (Event Bugprovements)
Prepares Task ID 2252655 (master Online Event task)
Prepares Task ID 2283796 (Event B2Basics)
PR #53944

X-original-commit: b2b53a6ca02e3e9f51b665bd24cc1d2fee0dc3b9
2020-07-24 06:54:35 +00:00
Thibault Delavallée 2af57b8bb9 [FIX] event: do not erase existing tags when changing category
PURPOSE

Prepare Event Online support by providing fixes and preparatory cleaning
commits.

SPECIFICATIONS

If an event has tags, changing its category resets them. We consider that
a category should update an event but not force or reset event tags, only
give default values.

LINKS

Task ID 2289148 (Event Bugprovements)
Prepares Task ID 2252655 (master Online Event task)
Prepares Task ID 2283796 (Event B2Basics)
PR #53944

X-original-commit: 408bad96de293dc10a3aa78fcee6159d8012fadc
2020-07-24 06:54:34 +00:00
Victor Feyens e8893f84ab [IMP] *: translations improvements
Avoid concatenation of translated strings & raw values and/or other 
translated values, and use the new _ API (by providing the formatting 
values to ensure the fallback on the english terms in case of wrong 
translation).

By including the expected values inside the string to translate, we 
ensure that the formatted values are included at the right place in the 
resulting translated text.

This also provides more information on the string to translate to 
the translators, s.t. the chosen terms for the translations can be more 
adapted to the translation context.

closes odoo/odoo#54635

Related: odoo/enterprise#11925
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-07-23 12:13:19 +00:00
std-odoo 89a2423c21 [FIX] website_event: fix ACL issue during registration
Bug
===
Register to an event with a public user.
Sometimes an ACL error will be raised.

Technical
=========
Before flushing the environment (after the creation of the event
registration in the endpoint `registration_confirm`), the ORM will
recompute all needed stored fields. As we didn't write on some of them
(`date_closed`, `utm_campaign_id`, `utm_source_id`, `utm_medium_id`)
they are in the list `Environment::all.tocompute`. So, the ORM will recompute
the fields even if the state didn't change (this behavior can be verify
in `BaseModel::recompute`). This is done after the "create" call of the
event registration and so without the SUDO flag.

Task-2299227

closes odoo/odoo#54624

X-original-commit: 38f37cd483b7907b20171e2c44e14e69e3e00596
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-07-17 08:34:12 +00:00
Paul Morelle 2cd9f763a5 [FIX] event: fix invalid domain in view_registration_search
Commit 30af656e1a removed a third operand
in the domain but forgot to remove its operator, making the domain
filtering on the Participant invalid.
This commit fixes it by removing the ~~first~~ second pipe.

closes odoo/odoo#54504

X-original-commit: 44feadabab601b0df34d504b585abb9339a4a478
Signed-off-by: Christophe Simonis <chs@odoo.com>
2020-07-15 12:11:04 +00:00
DramixDwandqsm-odoo 188c338ab2 [IMP] website, *: make editor closer to WYSIWYG
*: event, website_blog, website_event, website_forum, website_sale,
   website_sale_comparison

We're changing most of the "DRAG BUILDING BLOCK HERE" placeholders so
that they only appear on drag. Making the preview as close as possible
to the page once saved. However, we're still keeping them on empty pages
because it make sense there to let know that the area is editable.

Part of https://github.com/odoo/odoo/pull/47933
task-2210733

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-07-15 11:36:56 +00:00
Martin Trigaux 400cc4f14e [FIX] *: correct all or improve code translation lookup
This commit fixes all issues detected by the new pylint
gettext-variable test.
It converts some calls to the new syntax
  _("Foo %s", bar)

to progressively migrate the code to the new syntax.

A few calls were not technically incorrect but still detected by the
linter.

  _("Foo" +
    "Bar")

has been converted to

  _("Foo"
    "Bar")

as it has the same effect and make sure the argument is of type
asteroid.Const instead of BinOp).

closes odoo/odoo#53683

Related: odoo/enterprise#11467
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-06-30 10:19:59 +00:00
Jérémy Hennecart 9389f7ce2e [IMP] *: enable sample data in several views
This commit sets attribute sample="1" in a bunch of list and
kanban views, to enable the new sample data feature when views are
empty.

Task 2232801

X-original-commit: 5471309b35619f307242c2704c7681ba63d2be42
2020-06-22 13:04:02 +00:00
Martin Trigaux ba244cef01 [IMP] *: replace to new _() syntax
Using a few regex like
\((_\(.*%s.*)(\) % )([\w\[\]][\w .\[\]\(\)'"]*)\)
($1, $3))

Old syntax is still compatible but starts the migration to the new
syntax that catches error.
2020-06-18 13:03:34 +02:00
qmo-odoo 546709dab6 [FIX] event: hide lone fa-map-marker icon on kanban view when no location
The purpose of this commit is to hide the icon fa-map-marker in the event
kanban view in case no address_id is set on the event.

Task ID 2184037
PR #53119

closes odoo/odoo#53152

X-original-commit: 7aab71db8588286d6b746f0243fa356d220439d8
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-06-17 11:13:03 +00:00
Thibault Delavallée 3f387d08f7 [FIX] event: avoid removing tickets with registrations
Prevent to unlink tickets when having registrations by adding an ondelete
restrict attribute. Otherwise billing information may be lost.

Task ID 2244487
PR odoo/odoo#52998
FwdPort of odoo/odoo#52923

X-original-commit: 5322d76d378e4bd88a42dc0e4b01bb46c7b3546a
2020-06-16 09:14:32 +00:00
Thibault Delavallée 8385c880d2 [FIX] event: do not set a void timezone from type
Synchronize only timezone value from event type if set. Otherwise keep the
existing one or fallback on user defined one.

Task ID 2244487
PR odoo/odoo#52998
FwdPort of odoo/odoo#52923

X-original-commit: 10094beec786ef0ea6e32e621d4e026fedeba19a
2020-06-16 09:14:31 +00:00
Thibault Delavallée b14b5b91cb [FIX] event: always synchronize tags, seats_max and auto_confirm with category
We consider that changing category should always update value of those fields
to avoid having oddly-configured events. Indeed if you choose a new event
category most of its configuration should be propagated to the event.

Task ID 2244487
PR odoo/odoo#52998
FwdPort of odoo/odoo#52923

X-original-commit: f7e747886caebf37d60037a3e0e760f95bd0fb68
2020-06-16 09:14:31 +00:00
Sébastien Mottet (oms)andThibault Delavallée be11161a42 [FIX] event(_questions): take better care of 2many fields when updating from event type
PURPOSE

Fix various issues spotted in 13.3 when testing event. Notably
computation of 2many fields coming from template.

SPECIFICATIONS

When updating template on an event, one2many fields should be better managed.
Previous heuristic was

  * if event type uses o2m configuration (use_ticket / _schedule / _question)
    and has lines

   * erase existing lines;
   * create new lines based on old one;

This has the drawback of loosing information of what is sent (mail) or
sold (tickets) or answered( questions). Another drawback is that only
types having line are synchronized. This means that if updating several
times the event type you could end up with an XMas configuration with
lines coming from different event types, depending on their o2m configuration.

We choose a better heuristic that should solve this issue

  * every time we change type, independently of its use_* field that is used
    mainly for UX on the type itself:

    * erase existing lines that have not been used yet (no mail sent, no
      ticket linked to registrations, no answer linked to registrations)
    * create new lines based on old one; if type has no lines, event will
      have its old empty line erased as well;

It means that we try to synchronize more the type to the event while keeping
configuration line already used in some registrations.

Also provide some other fixes like deletion restrictions or better domain
for UX purpose. See sub commits for more details.

LINKS

Task ID 2244487
PR odoo/odoo#52998
FwdPort of odoo/odoo#52923

X-original-commit: 645f70cad033083e82a3ef9102c694c331badef9
Co-authored-by: Sebastien Mottet <oms@odoo.com>
Co-authored-by: Thibault Delavallée <tde@odoo.com>
2020-06-16 09:14:31 +00:00
Thibault Delavallée 7c37d457e7 [IMP] event: improve some type -> event configuration tests
Purpose of this commit is to add some tests related to event_type to event
configuration. Indeed changing a type on an event may change its sub models
(mails, tickets, questions). Asserting current behavior is necessary before
tweaking behavior considered as to be improved.

Task ID 2244487
PR odoo/odoo#52998
FwdPort of odoo/odoo#52923

X-original-commit: 6fb42e70164bab05681b11f1e76e320db0266445
2020-06-16 09:14:31 +00:00
3fea5b2136 [REF] mail, *: refactor messaging with OWL
This commit is a significant rewriting of client-side discuss, chatter,
chat window, and messaging menu using OWL. The behavior should be broadly
the same, with some slight functional changes here and there.

From a technical standpoint, the code of messaging is mainly organized in 2
main groups of modules:

- models, which are logical entities that depict the client-side state of
  messaging as a whole.
- components, which are in charge of displaying information from models.

This refactoring also introduces new JS guidelines regarding folder structure
(/static) and naming rules for JS modules.

Community PR: https://github.com/odoo/odoo/pull/39023
Enterprise PR: https://github.com/odoo/enterprise/pull/6249

Task-1914207

This PR is a collaborative work by Alexandre, Julien, Sébastien and Xavier,
with the precious help of Lucas to speed it up towards the end.

closes odoo/odoo#39023

Related: odoo/enterprise#6249
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Co-authored-by: Alexandre Kühn <aku@odoo.com>
Co-authored-by: Julien Giannone <jgi@odoo.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
Co-authored-by: Xavier Dubuc <xdu@odoo.com>
2020-06-15 18:12:21 +00:00
Didier (did) 001e26cd97 [IMP] event : Update tour message, clean onboarding and some views
Change event onboarding rainbow message to something more relevant. Default
message is considered as less user friendly than the new one.

Before this commit the category_id for a tag had no label displayed. We choose
to wrap the category_id field inside a group so that field labels shows up.

In settings, wrap the tag_ids inside a div.o_setting_right_pane so we can have
the left border displayed correctly, like most fields in settings.

Finally remove "Online" template from the event_data since it acts like a
dummy type without pre-defined data.

Task 2257884

closes odoo/odoo#52472

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-06-10 17:21:57 +00:00
Jeremy Hennecart 3f650c0f85 [IMP] event(_sale): slightly improve event views to prepare event_crm inclusion
Prepare event_crm link module addition by cleaning some views. Notably buttons
box has to be added directly in event and not in event_sale anymore. It allows
to add content in it independently from event_sale presence.

LINKS

Task ID 2166679
PR #52334
2020-06-10 16:09:59 +00:00
Nasreddin Boulif 885437ee21 [IMP] event: add payment status in barcode / attendee kanban view
PURPOSE

Introduce a clearer way of handling registrations for multiple events occurring
at the same time and place by

  * improve attendess kanban view;
  * introducing a Registration Desk menu item;

SPECIFICATIONS

Introduce a computed "payment_status" selection field, allowing to display
status of a registration, based on its SO and ``is_paid```field. It is better
fro UX and display. It is not stored as currently stored fields are sufficient
for current requirement.

Add it to the kanban view.

Prepare barcode improvements by improving _get_registration_summary returned
data dict, adding some information to display in event_barcode. Reorganize
registrations actions, and prepare a generic one leading to attendees kanban
view for registration desk.

LINKS

Task ID #2214290
Community PR odoo/odoo#47511
Enterprise PR odoo/enterprise#9190
2020-06-10 14:55:48 +00:00
Nasreddin Boulif d169b5b509 [IMP] event: improve attendees kanban view
PURPOSE

Introduce a clearer way of handling registrations for single / multiple events
occurring at the same time and place by

  * improve attendees kanban view, notably by better supporting mono and multi
    event (hide unnecessary information);
  * introducing a Registration Desk menu item to manage multi-event mode;

SPECIFICATIONS

Improve attendees kanban view, notably due to the following issues

  * event_ticket_id as char field is hard to recognize. Notably with attendees
    with same ticket directly in the kanban view;
  * missing explicit icon/button of the event registration state;

Handle mono-event (coming from an event) / multi-event (global attendees
view) modes.

Replace "event_ticket_id" text by colored badge (random color on each
"event.event_ticket_id.id"). Move this field directly into event as now
tickets are supported in event, not only with event_sale.

Add button or text linked to the registration state.

Kanban card structure is therefore

    -----------------------
    Attendee Name
    Event Name (if in multi mode)
    Booked by partner_id.display_name                      ICON/BUTTON
    Ticket in a tag format
    -----------------------

Buttons and icons, if registrations is

  * canceled (nothing to do in Kanban, open the form view)  => Canceled text
  * unconfirmed and is awaiting confirmation => Attended text
  * confirmed and is awaiting attendance confirmation => Button
  * done, end of the flow => Icon

Mobile specific: put button as big buttons on the right of the card, ensure
all cards are displayed using same height and display correct.

LINKS

Task ID #2214290
PR #47511
2020-06-10 14:55:48 +00:00
Krupal Oza 4c24409f2f [IMP] event: Improve list view and update widget
Purpose of this commit is to update the list views of event according
to the new framework possibilities for better UX/UI.

This commit utilises the latest framework features available from task 2195254
to represent the information in better way and/or adds some useful fields

List of the tree views improved are:
- Event - event.view_event_tree

For detailed specification, you can visit pad of the task.

Task-id: 2250285
2020-05-28 12:05:44 +00:00
c5d3a109f5 [REF] ir.autovacuum: declarative garbage collector registration
The ir.autovacuum model purpose is to run several garbage collecting
operations like removing files from the filestore when no attachment
references them anymore.

The precedent strategy to register new garbage collection tasks was to
override the `power_on` method and to imperatively execute a vacuum
cleaning method on a given model. All calls were executed in a single
SQL transaction without any error handling, meaning a single fail during
any call resulted in a complete failure of the entire vacuum cleaning
chain.

We introduce a new `@autovacuum` api decorator, its purpose it to
register garbage collecting methods that will be safely executed in
their own transaction by the vacuum cleaner. In order to ensure this
new strategy is used, we deprecate `power_on` extensions.

By the way, garbage-collecting methods can be quite heavy and we don't
want users to directly call them. We now ensure they are private.

closes odoo/odoo#47842

Task: 2154079
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
Co-authored-by: Olivier Dony <odo@odoo.com>
2020-05-19 13:38:19 +00:00
Thibault Delavallée 5a5eced13c [FIX] website_event: do not tell yet-to-come events are closed
Currently if an event has tickets, some of them with start date and some of
them without, it is considered has beginning at the minimal start date.
However if a ticket has no start date and is not expired, it means it is
available for sale.

An event start date is therefore the first date of its not expired tickets if
they all have a date, otherwise it is set to False (aka, already started).

We also fix display in main event page: events not yet open are not considered
as Sold out or Closed anymore, just not yet open.

Task ID 2244487
PR #51503

closes odoo/odoo#51523

X-original-commit: 8404a6ff12ee82e9b4ec35660f74dbe0b4a90cb0
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-05-19 10:14:41 +00:00
Sébastien Mottet (oms) 179c5fcaba [FIX] (website_)event: fix 'sold out' display condition on frontend
One condition among other to determine if SOLD OUT should be displayed for a
ticket is start_sale_date < current date. However is start_sale_date is not
set a traceback is raised.

Moreover timezones are not taken into account when comparing dates, which may
create issues.

A tool method 'is_launched' has been added to overcome this problem. It works
like the already existing field 'is_expired'. Its value is computed based on
start_sale_date and event_id.date_tz. This will be changed into a not stored
computed field in master.

Task ID 2244487
PR #51503

X-original-commit: 9f81e126cdb1ce79ef26077a708cad8a7614031f
2020-05-19 10:14:39 +00:00
Thibault Delavallée 83a7fb5f92 [IMP] event_sale: add some tests for registration update
In this commit we add some tests related to sale order / event registrations
synchronization, notably

  * registrations automatically created when _update_registrations of an SO
    line is called, for example at SO confirmation;
  * using the registration editor;

LINKS

Task ID 2258685
Prepare Task ID 2166679 (create leads from registrations)
PR odoo/odoo#51341
2020-05-18 11:58:06 +00:00
Krupal Oza 6d17897dff [IMP] various: Clean the kanban view design
PURPOSE
=========================

The goal of this task is to set up some kind of guidelines to make
kanban views consistent.
It is fine having different kanban views, but if a UI element is shared
among several kanban views, it should behave/look the same so the user
knows what to expect.

Kanban views can be split into two types:
==> 'documents' kanbans, such as res.partner, crm.lead, etc.
    - those records are created/edited often, numerous
    - 'opening' the card means accessing the record
==> 'dashboard' kanbans,such as stock.picking.type,account.journal, etc.
    - those records are not created/edited often, there are much less numerous
    - usually presented as dashboard, where 'opening' the card means
accessing a set of related 'documents' (clicking on a account.journal
to access account.move, or stock.picking.type to access stock.picking)
    - configuration of the 'card record' is done through a dropdown to
access configuration

Here are some guidelines for consistency. Bear in mind that those are
not rules, but guidelines for consistency that we'd like to keep in
mind when designing.

==> 'documents' kanbans
 - the record is accessed through global click
 - the user avatar is at the bottom right
 - the activity widget is at the bottom left (in last position if
there are other elements)

==> 'dashboard' kanbans
 - the record is accessed through a 'Configuration' option in the card dropdown
 - there is no global click, and therefore no focus shadow
 - the dropdown icon (o_kanban_manage_toggle_button) is always visible,
with icon fa-ellipsis-v
 - the listview counterpart should be presented as a dedicated
configuration menu, and shouldn't be in the 'dashboard action'
 - links in the body of the card are structured as follows: link with
<count>+label, then any additional aggregated metrics (not link) to the right
example https://drive.google.com/file/d/1ZP6HDHTtC7cQ6rDWgqLoPs6U8JCeNVkW/view?usp=sharing

==> global guidelines
 - the title font color is #212529, with 500 weight
 - the subtitle font color is #666666, with 400 weight
 - the font size is 1.083rem
 - text overflow is handled through linebreak, not ellipsis
 - numerical values are aligned to the right
 - the kanban state widget is at the bottom right

SPECIFICATION
=================

AS per guidelines Improved follwing kanban/dashbaord view
 - hr_job
 - hr_department
 - hr_work_entry
 - hr_appraisal
 - fleet_vehicle
 - product_template
 - sale_subscription_template
 - crm_team
 - res_partner
 - event
 - stock_picking_type
 - mrp_eco_type
 - maintenance_team
 - quality_alert_team
 - account_journal

Added the department menu on employee with default kanban view
Added sequence in hr_work_entry list view

TaskID: 2206372
Related Enterprise PR: https://github.com/odoo/enterprise/pull/10341
Closes: #50536
2020-05-18 12:11:22 +00:00
Yannick Tivisse 7b714a3bc7 [IMP] various: Update list views with new widgets
Purpose
=======

The following task implemented new widgets/features in the listview for better UI.
https://www.odoo.com/web#id=2195254&action=327&model=project.task&view_type=form&cids=1&menu_id=4720

The goal of the current task is to use those to upgrade our listviews

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

Below are change requests on various listviews.

Remove decoration-bf="message_needaction==True" from every listview in every module.

PRODUCT - stock.view_stock_product_template_tree (product template)

remove all decorations from <tree>
set the following decorations on 'virtual_available' and 'qty_available'
decoration-danger="virtual_available&lt;0"
decoration-warning="virtual_available==0"
also set decoration-bf on 'virtual_available'
apply the same modifications on stock.view_stock_product_tree for product variants

SUBSCRIPTION - sale_subscription.sale_subscription_view_list

remove all decorations from <tree>
'stage_id' field
set <field name="stage_id" widget="badge" decoration-info="stage_category == 'draft'" decoration-success="stage_category == 'progress'"/>
'recurring_next_date' field
set <field name="recurring_next_date" string="Next Invoice" widget="remaining_days" attrs="{'invisible': [('stage_category', '!=', 'progress')]}"/>
set decoration-bf on 'code' and 'recurring_total_incl'
move 'percentage_satisfaction' before 'recurring_total_incl'
set widget="many2one_avatar_user" on 'user_id'
add <field name="activity_ids" widget="list_activity"/> after 'user_id'

ELEARNING - website_slides.slide_channel_view_tree

set widget="many2one_avatar_user" on 'user_id'
'enroll' field
set <field name="enroll" widget="badge" decoration-success="enroll == 'public'" decoration-info="enroll == 'invite'" decoration-warning="enroll == 'payment'"/>

POS - point_of_sale.view_pos_order_tree

remove all decorations from <tree>
'state' field
make visible and move it at the end of the view
set <field name="state" widget="badge" decoration-info="state == 'draft'" decoration-success="state not in ('draft','cancel')"/>
set decoration-bf on 'name'

APPRAISAL - hr_appraisal.view_hr_appraisal_tree

'state' field
set <field name="state" widget="badge" decoration-info="state in ('new','pending')" decoration-success="state == 'done'"/>
'date_close' field
set <field name="date_close" widget="remaining_days" attrs="{'invisible': ['|',('state','=','done'),('state','=','cancel')]}"/>

PAYMENT - account.view_account_payment_tree

remove all decorations from <tree>
'state' field
set <field name="state" widget="badge" decoration-info="state == 'draft'" decoration-success="state == 'posted'"/>
move 'company_id' before 'amount'

CONTRACT - hr_contract.hr_contract_view_tree

remove all decorations from <tree>
'state' field
set <field name="state" widget="badge" decoration-info="state == 'draft'" decoration-warning="state == 'close'" decoration-success="state == 'open'"/>
set widget="many2one_avatar_employee" on 'employee_id'

PAYSLIPS - hr_payroll.view_hr_payslip_tree

remove all decorations from <tree>
'state' field
set <field name="state" widget="badge" decoration-info="state == 'draft'" decoration-warning="state == 'verify'" decoration-success="state in ('done','paid')"/>
set decoration-bf on 'number' and 'net_wage'
move 'company_id' before 'basic_wage'
set widget="many2one_avatar_employee" on 'employee_id'

SURVEY - survey.survey_tree

'state' field
set <field name="state" widget="badge" decoration-info="state == 'draft'" decoration-success="state == 'open'"/>

APPLICATION - hr_recruitment.crm_case_tree_view_job

set widget="date' on 'create_date'
set widget="priority' on 'priority'
set widget="many2one_avatar_user" on 'user_id'

TIME OFF - hr_holidays.hr_leave_view_tree

remove all decorations from <tree>
'state' field
set <field name="state" widget="badge" decoration-info="state == 'draft'" decoration-warning="state in ('confirm','validate1')" decoration-success="state == 'validate'"/>
apply the same changes in hr_holidays.hr_leave_allocation_view_tree

closes odoo/odoo#51305

Taskid: 2256589
Related: odoo/enterprise#10614
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-15 08:24:05 +00:00
Dharmraj Jhala ad6ea605ab [IMP] crm, event, website_crm_partner_assign: remove useless copy attributes
Editable stored fields are copy by default if their base field
allow it (char, integer, ...). Purpose of this commit is to remove
unnecessary copy=True statements added when using stored editable
fields.

PR #49464
Task 2225253

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-05-14 13:14:45 +00:00