Commit Graph
93 Commits
Author SHA1 Message Date
Elisabeth Dickinson 80098df3dd [FIX] *: fix ribbons position and size
This commit fixes the ribbons used in `kanban` and `form` views.

The SCSS uses the square root of the parent `div.ribbon` to calculate its
diagonal width and applies that width to the child `span`.

After changing the ribbon's transform-origin, we calculate the ribbon's
position based on CSS variables of the view's top padding,the height of
the ribbon and the shadow's size (to avoid it being cropped by
overflow-hidden).

By changing the values of a few of these variables in the kanban view,
we were able to remove all the specific SCSS related to ribbons in the
modules.

Other changes were applied inside some of the modules to make this
work:

- `event`: padding corrections on the kanban's cards;
- `hr_holidays: replaced `margin:0` in the SCSS with negative margin
utility classes on the element to achieve the same visual result;
- `discuss`: moved the ribbon to the parent element;
- this was also done to `discuss`, `survey` and `helpdesk`;
- `crm_team_view` in `sales_team`: the ribbon's height made it overflow
from the kanban's card. We fixed this by changing the value of one of
the CSS variables in the view's SCSS file;
- the same thing was done in `survey` and `appointment`;
- `website_event_exhibitor` had some SCSS that wasn't being used because
it uses `.o_ribbon` instead of `.ribbon`

task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:21 +02:00
Brieuc-brdandElisabeth Dickinson 21d87a3da5 [REF] *: milk graphical assets
- apps icons
- base: replace demo avatars Mitchell, Marc and Joel
- mail: replace odoobot avatar

Part-of: odoo/odoo#116641
Co-authored-by: Elisabeth Dickinson <edi@odoo.com>
2023-05-12 22:59:14 +02:00
Michael (mcm) ff0d6dd580 [REF] *: replace odoo module by native one
This commit converts almost all odoo module by native module.
The goal is to deprecate odoo.define in favor of native module and then
simplify boot.js by removing the regexp that finds module dependencies.

task id: 3162300

closes odoo/odoo#117305

Related: odoo/enterprise#39118
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-04-03 17:07:24 +02:00
Joseph CaburnayandJulien Mougenot 3a798039d6 [REF] web_tour,*: convert web_tour to owl
* The tours are now run by the `MacroEngine` defined in `macro.js`.
  * This is accomplished by converting (at runtime) the user-defined tours to
    `Macro`s. See `tour_compilers.js` for the step (and tour-to-macro) compilation.
* API is kept the same as much as possible. Basically, declaring tours stayed
  the same with some exceptions:
  * `allowInvisible` can be provided in a step to allow consuming the trigger
    element even if it is invisible.
  * `isCheck` can now be used to replace the no operation `run` that is
    traditionally signals the runner to only perform a check.
  * Before, multiple `run`s can be called simultaneously. Now, each `run` method
    is awaited before proceeding to the next step.
* If the trigger element is `disabled`, the tour runner will *not* proceed on
  calling the `run` method and the runner will stay on current step until the
  trigger element becomes `enabled`.
  * However, the tour runner is okay with `disabled` trigger element if the step
    has `isCheck = true`. As long as the trigger element is found for `isCheck`
    step, the tour runner will happily move to the next step.
* Some tours are adjusted to properly run with this new tour runner.
* When the tour failed:
  * The dom string is not logged anymore.
  * However, a warning message containing the relative location of the step will
    be logged. This is better in helping the author in locating the failed step.

**Some guidelines learned during the development:**

* Each step may trigger a dom mutation. It's a good practice to insert an
  intermediate step that *checks* the existence of an element that result from
  the action of the previous step.
* Refrain from using the `run` method for assertions. `run`, in principle, is
  provided to perform actions that are not offered by the helper. Use the
  `trigger` for assertions.
* During dev, find `SHOW_POINTER_DURATION` and set it to `250`. This will show
  the pointer (pointing to the trigger element) for 250ms when watching the
  tour.

closes odoo/odoo#107618

Task-id: 3082036
Related: odoo/enterprise#37560
Signed-off-by: Géry Debongnie <ged@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
2023-03-15 13:19:45 +01:00
Jorge Pinna Puissant 688986f888 [REF] web, *: simplify concrete fields API - remove value prop
This commit, is part of a series of commits that aim to simplifie the
concrete fields API.

In this commit we will remove value prop from concrete fields. Now each
field will directly use this.props.record.data[this.props.name] to
access their value, As a consequence of this, the name props need to be
mandatory.

task-id 3179751

closes odoo/odoo#113495

Related: odoo/enterprise#37464
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-03-07 09:02:50 +01:00
Bruno BoiandMathieu Duckerts-Antoine d19037e141 [IMP] web,*: better classes handling in view archs
**Before this commit**
- The optional "class" attribute set on the root node of a view arch
  is ignored, except for the kanban view which has a custom
  way of using it.
- The optional "js_class" attribute set on the root node of a view arch
  does not have any impact on the class names passed to its controller.

**After this commit**
The content of the optional attribute "class" set on the root node of an
arch like in

<list class="o_custom_class">
    ...
</list>

as well as an additionnal class derived [1] from the value of the
"js_class" attribute set on the root node of an arch like in

<list js_class="extended_list">
    ...
</list>

will both be found in the prop "className" of any view controller.

[1] a js_class value of "xyz" yields to the class "o_xyz_view"

**Note on this commit**
The kanban view was already appending the root node class attribute
to its renderer element. This is no longer the case and some styling
rules has been adapted.

closes odoo/odoo#113014

Related: odoo/enterprise#37265
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
2023-03-01 17:01:03 +01:00
Aaron Bohy 9374a6f2b7 [REF] *: js fields: extractProps receives fieldInfo
This commit is part of the preliminary work to rewrite the form,
list and kanban model. We want this new Model to only be aware of
field related information it needs (whereas in its current
implementation, the model stores all the information extracted
from the field node in the arch). This would allow to properly
manage multiple occurrences of the same field in views, that is,
each occurrence would be represented by a field component (if
visible of course), and that field component would use the field
information of the arch node it represents. To this end, we want
fields from not using anymore information stored in activeFields
in the record datapoint. Instead, we now call extractProps with
the whole fieldInfo (the information extracted from the arch), s.t.
each field can generate the props it needs from those information
(e.g. sub views for x2manys).

This commit doesn't remove the use of record.activeFields in
concrete fields (this will come later), but reworks the fieldInfo
object generated by parseFieldNode, and provide it to the calls of
extractProps. In fieldInfo, the `options` key is no longer inside
`attrs`, as it is now top-level, alongside several other generic
keys that have been processed (like on_change, modifiers...). For
that reason, a lot of extractProps definitions had to be adapted.

Part of task 3179751

closes odoo/odoo#113092

Related: odoo/enterprise#37266
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-02-24 11:11:32 +01:00
Michael (mcm) 9f4622492c [REF] *: register field descriptors instead of components
Before this commit, the field's description was stored on the
component and this component was then registered.

Now, an object describing the field is used on registration the same way
as it is done for views since https://github.com/odoo/odoo/commit/b828cfc72c587d0b73fcc5459695705640437671.
This split the component's description (props, template, ...) of
the field's description (displayName, supportedTypes, ...) and makes
it clearer.

closes odoo/odoo#112498

Task: 3171520
Related: odoo/enterprise#37105
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-02-16 14:13:32 +01:00
Géry Debongnie b53f78e224 [REF] web_tour,*: use the registry in collecting the tours
This is a step closer to a goal of avoiding dependence on asynchronous
modules. Starting from this commit, new tour definition should be
registered to `registry.category("web_tour.tours")` registry.

So, instead of the following:

```js
import tour from "web_tour.tour";
tour.register(name, options, steps);
```

We now do:

```js
import { registry } from "@web/core/registry";
registry.category("web_tour.tours").add(name, optionsWithSteps);
```

Notice the `options` and `steps` params are merged when registering
the tour definition. It should look something like so:

```js
registry.category("web_tour.tours").add("account_tour", {
  test: true,
  steps: [ ... ],
});
```

And if the `TourManager` instance is needed, one can get it from the
registry like so `registry.get("tourManager")`. Note however that
this instance is only available when the `TourManager` has been
instantiated -- so it's not available at top level of the module.

closes odoo/odoo#111103

Related: odoo/enterprise#36335
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-01-27 23:17:35 +01:00
Andro Gvivradze a6ce0597c8 [FIX] event, website_event: fix event tours
Due to owl conversions the namings of few buttons changed,
thus event_tour and website_event_tour were broken. Commit fixes this issue.
At the same time, test didn't understand the change with datepicker in input
field. Now test moves to next stage whenever the date input field is clicked,
and I added "apply change" step to event_tour to make sure that user saves
their changes.

Task-3060511

closes odoo/odoo#105724

X-original-commit: 10a2cf33c00915a26a473411793e9d20af86a2ac
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-11-15 00:18:02 +01:00
Nicolas Bayet 10af6e83bf [IMP] web_editor,mass_mailing: adapt fields to use owl
- adapt the html field and mass_mailing_widget to be owl components
- adapt the mass mailing view to be an owl view

task-2898432

closes odoo/odoo#94875

Related: odoo/enterprise#30915
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-09-12 11:38:00 +02:00
Michael (mcm) cbc8676dd0 [IMP] event: convert field IconSelector
This commit rewrites IconSelectorField using the new framework.

closes odoo/odoo#96782

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-08-01 18:20:53 +02:00
Romeo Fragomeli 19a0ee516f [REF] event, web: BS5: $emphasized-link-hover-darken-percentage -> $link-shade-percentage
In BS5 `$emphasized-link-hover-darken-percentage` was removed, so we use
the new variable but we restore some BS4 values:

- 15% as in BS4
- remove the underline on links as in BS4

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:17 +02:00
Aaron Bohy e37a663b52 [FIX] web,*: kanban: support t-set defined outside cards
*base, event, hr_holidays

Before this commit, `<t t-set/>` nodes declared outside the main
div of a kanban card where ignored by the kanban compiler. This
commit fixes that issue. To do so, we refactor a bit the way the
compiler and KanbanRecord handle multiple root cards (typically,
several roots with a t-if/t-elif/t-else, s.t. there's a unique
rendered root), by removing the faulty logic from the compiler
that identified card root nodes (and filtered out t-set nodes),
and introducing a div for the KanbanRecord component on which we
can set classNames, attributes and handlers.

The issue could be observed on the Apps kanban view, as it
displayed the "Install" button, whether the app was already
installed or not.

closes odoo/odoo#95211

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-07-05 11:35:16 +02:00
Aaron Bohy 4f984568e1 [REF] *: adapt code to new kanban view
This commit makes various adapations in addons with respect to
the introduction of the owl kanban view. Mainly, some selectors
in scss and in tests needed to be adapted. Moreover, in some tests
that we haven't adapted yet, we must ensure that legacy form and
list views are still used (useLegacyViews).

It also contains some adaptations in kanban templates, e.g. the
replacement of moment by luxon, the removal of underscore...

Part-of: odoo/odoo#92475
2022-06-30 09:29:45 +02:00
stefanorigano (SRI) 87a7449afd [IMP] web, *: odoo-brand color classes
Prior to this commit branded UI components were styled exclusively in
raw SCSS using the '$o-brand-odoo' variable.

This leaded to unnecessary code repetitions since, to achieve the same
visual result, each module defined its own classes.
Visual inconsistencies were frequent too since each module defined its
own variations for interactive states (eg :hover).

This commit injects '$o-brand-odoo' into bootstrap's default
'$theme-color' map, allowing the framework to automatically generate
odoo utility/contextual classes.
These classes can be used to handle text, backgrounds, borders and
buttons wherever needed.

Part of the overall v16 SCSS optimization/restyle, task-2704984.

task-2800721

closes odoo/odoo#87448

Related: odoo/enterprise#25700
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-05-05 14:00:37 +02:00
Fabien Pinckaers 10a5796d4b [IMP] speed up load_menus() by using SVG icons instead of png
Reduces load_menus answer size by 32% (between 20kb and 200kb savings
for the initial loading of the backend, depending on the number of apps
installed). Support for SVG icons in the web client for menus/apps.

Reduced PNG icons for apps list (8 bits PNG instead of 24 as our icons
don't need more colors as they are flat designs)

closes odoo/odoo#84280

Related: odoo/enterprise#24200
Signed-off-by: Fabien Pinckaers <fp@odoo.com>
2022-02-12 08:55:18 +00:00
Florian Charlier 9540dc7772 [IMP] event: Improve logic and appearence of archived registrations
When an attendee's registration was archived, their seat was still
considered taken, which could be problematic such as in cases of
limited seat availability.

Only non-archived registrations are now counted as seats. The same
error as with regular registrations will be raised if there are not
enough seats available to un-archive a registration. These ValidationError
messages now show the name of the fully booked event.

A few python tests are included to verify the impact of (un)archiving on
seats availability for events and for event tickets.

The appearence of archived registrations was also not different in form
and kanban views, which is somewhat confusing and inconsistent with the
aspect of archived records in Odoo. Actions buttons are not available on
archived records.

Filtering in the archived records needed to be simplified from a "Custom
Filter" to a one-click feature, already available for many models.

Task-2646298

closes odoo/odoo#77715

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-12-17 11:04:53 +00:00
ijas ahammed bf0bb8497e [IMP] event,website_event_questions: improve attendees list view
In this commit we have improved the attendees list
view, changes done are listed below,

- We have changed the cancel button
  color to red in attendees list view.

- We have added badge widget for the
  state field in attendees list view, the following
  states uses these colors,

  - draft - blue
  - cancel - grey
  - open - blue
  - done - green

- We have added a `activity_ids` before the field `state`
  field in attendees list view.

- We have added the field `registration_answer_ids` with
  `many2many_tags` and default hide in attendees list view
  just before the status field.

TaskID-2670765

Part-of: odoo/odoo#79166
2021-11-30 12:52:16 +00:00
Aurélien Warnon 44b55dc883 [IMP] [website_]event: add a new full page format badge report
This commit introduces a new badge report displayed on a full A4 page.

This report is meant to be printed for the attendee and contains more
detailed information that the existing "badge report", which is only meant to
be folded and used as a badge.

We use a lot of custom layout and classes to create a "ticket-feeling" to the
report and make it look good visually.

We also introduce a new field that allows easily customizing (outside of
studio) this report by adding "extra instructions" (how to use your ticket /
directions on how to get to the event / ...).

Side note: scss disclaimer

As the reporting engine does not allow complex class/rules building, we had to
implement this nice layout using very well placed background-image and
"pixel perfect" sized elements.

LINKS

ENT PR odoo/enterprise#19349
UPG PR odoo/upgrade#2599
Task-26779
2021-07-30 09:02:53 +00:00
Aurélien Warnon 1b66782dca [REF] event_*: refactor the event foldable registration badge
PURPOSE

The event foldable badge is currently not very user-friendly in terms of usage
and style.
This commit aims to re-work it visually as well as getting rid of multiple
technical flows (unnecessary fields / no studio anchors / ...).

SPECS

Preliminary cleaning : Unify both foldable badge templates into one.

The "event badges" report can be printed from 2 different sources, from the
event.event itself as a preview and from the event.registration as an actual
badge for a specific attendee.

The implementation was done using two different templates, leading to a lot of
duplicated code and potential issues when editing one template that would not
modify the other accordingly.

This commit unifies both templates into one.
When the report is printed from the event as a "preview", we simply check that
the attendee variable is missing and print placeholders instead.

Main changes : Rework the whole foldable badge template

1. Get rid of unnecessary fields

The foldable badge template used several fields on the event.event model itself
that would allow customizing the report per event.
However, there were actually no way for the user to access and edit those
fields, as they are not part of any views.

We therefore removed them (badge_front, badge_back, badge_innerleft,
badge_innerright, event_logo).

And instead offer a single new field (ticket_extra_instructions), available on
the form view of the event, that allows to easily customize the foldable badge
and adding instructions specific to this event (how to come / what to bring /
...).

2. Visual changes

The report was re-worked to make it look a bit more recent, as the previous
look was very basic and was not very attractive.

This was done using a specific scss file that allows defining rules without
bloating the template with long style attributes.

In addition, we added some pictures that help the attendee understanding how to
correctly fold the printed A4 sheet into a badge and slide it into the holder.

All the information that were previously on the report should still be there.

3. Relocate action from website_event to event

As a bonus, we moved the reporting action from website_event to event, in order
to have everything that is related to this foldable badge in the same module.

Side note: scss disclaimer

As the reporting engine does not allow complex class/rules building, we had to
implement this nice layout using very well placed background-image and
"pixel perfect" sized elements.

You will see a lot of hardcoded numbers, mainly on heights, but it can't be
helped.

LINKS

ENT PR odoo/enterprise#19349
UPG PR odoo/upgrade#2599
Task-26779
2021-07-30 09:02:52 +00:00
Xavier Morel 0e552b96da [FIX] *: convert tip contents to t-out
Requires markup every markup-using tip content as Markup. Would be a
nice occasion to migrate everything to a markup-safe markdown I think,
especially if we could migrate the translations so we don't lose them.
2021-07-20 05:40:55 +00:00
Munaf Khan 3d84bb6494 [IMP] {website_}event: improve tour usability
This commit makes few changes in the event tour as
listed below:

 * Remove the step asking user to save the event, as the next step is
   redirecting to the website which already triggers a save
 * Make the tip for website redirection appeaer in edit mode also
 * Fix a typo ("registering" instead of "registrating")
 * Instead of having to go to a specific stage, moving to any stage is
   now enough for going to next step

taskID-2446215

closes odoo/odoo#70682

X-original-commit: 203499216c657631b39b6ddc9560a1daaf20a862
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-05-11 14:05:04 +00:00
Debauche Stéphane 69df7d3d8a [IMP] event: improve event mail state display
Purpose
=======

Show an icon representing the state of the event mail and number of contacted
registrations instead of the simple checkbox "sent".

Specifications
==============

Instead of the checkbox "sent", an event mail can have 3 values

  1. Sent, if all the mails has been sent;
  2. Scheduled, if scheduled but no attendee have been contacted;
  3. Running, if not all attendees have been contacted;

Note that communication targeting "after registration" are always considered
as being "running" as any new registration triggers a new communication.

A new widget is added that displays an icon depending on the state.

A new field holding contact count is added. When scheduler send emails it is
updated to keep a count of sent communications.

LINKS

Task ID-2414658
COM PR odoo/odoo#63093
UPG PR odoo/upgrade#2014
2021-03-24 11:18:42 +00:00
Damien Abeloos 498eb0cfed [IMP] event: improve the event form editor and update the tour
* In the Communication tab, prevent inserting multiple duplicate lines
  upon switching template.
    - Before, when the user was switching between templates, the lines
      introduced with the last template were not removed, and the amount of
      lines only kept increasing.
    - Now, only the lines that are linked to a registration are kept

* In the Tickets tab, prevent inserting multiple duplicate lines upon
  switching template (Ticketing) if there was already tickets linked to a registration.
    - Same problem as in the Communication tab, multiple lines could be introduced.
    - Now, only the lines that are linked to a registration are kept

* Add 2 tests (compute mails and tickets) to ensure those behaviors are properly
  maintained in future updates. As the issue occured only in a non-saved Form when
  switching event_type templates, the tests are a little low level (since we have
  to check the computed results directly in the Form).

* Remove the last 2 steps of the event_tour :
    - They are a bit out of scope and they break the rythm (better to end on a high note)

Task ID : 2410217
PR : https://github.com/odoo/odoo/pull/63370
2021-03-03 12:24:55 +00:00
Mohammed Shekha 706929e118 [FIX] *: update tour sequence
with this commit we are updating sequence of onboarding tours

task-2444153

closes odoo/odoo#65244

X-original-commit: a928beccb09f4db4234356e5e4f7bdf090ecc964
Related: odoo/enterprise#16026
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-01-29 09:03:08 +00:00
std-odoo 29f4bfd188 [FIX] (website_)event: constrain event tour steps to the event module
Bug
===
When we start the Event tour, if we go outside of Event during the tour
we might see the tour bubble in the other application.

It should be visible only in Event.

Task 2381898

closes odoo/odoo#63098

X-original-commit: 3209e775fe89132914cad9bc7ab40fa1a7811229
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-12-09 14:26:22 +00:00
Martin Trigaux e433bc57ff [FIX] *: rephrase, correct typos
Courtesy of Transifex's translators for reporting bad/unclear sentences.

closes odoo/odoo#61804

X-original-commit: f5d0f4a1ebf406583889e9e04912d40c0693343e
Related: odoo/enterprise#14769
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-11-16 16:47:28 +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
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
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
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
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 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
Vishnu Thuletiya 9a830432db [IMP] various: Use the new avatar widget in kanban view
The purpose of task is to update the 'user/employee avatar' to the new
widget in all the kanban view across all modules.
The below new widget are introduced for avatar:
 - many2one_avatar_user (for user_id fields)
 - many2one_avatar_employee (for employee_id fields)
which displays the avatar (i.e. picture) of a user/employee in front
of his name and clicking on the avatar will open a chatbox to message
that specific user/employee.

So in this commit, For each kanban view with a user or employee avatar,
replaced it by the field with the new 'many2one_avatar' widget.

TaskID: 2244928
Related Enterprise PR: https://github.com/odoo/enterprise/pull/10420

closes odoo/odoo#50789

Closes: #50789
Related: odoo/enterprise#10420
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-05-13 12:37:48 +00:00
Patrick Hoste 8509ba7d2a [IMP] (website_)event: add new tour to demonstrate new features
PURPOSE

Create a tour for Events to introduce new users to this freshly
revamped application.

SPECIFICATIONS

In 'website_event' module the tour steps extends the 'event' tour steps

LINKS

Task ID : 2180175
PR : #45612

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-12 12:45:16 +00:00
Thibault DelavalléeandStéphane Debauche 623a226beb [MOV][IMP] event: improve some views and event main menus definitions
PURPOSE

This commit is part of ticket model support directly in event application.

SPECIFICATIONS

In this commit we move menu definitions in their own file. It eases views
split and move, as otherwise there are dependencies between files that are
complicated to solve. Better to have menus defined in a main file, and updating
them at will afterwards.

We also improve menus sequences and groups, as some were missing or badly
defined.

Registration tree view is slightly updated to include phone and mobile numbers
as those are used notably for communication. They are hidden by default
like email.

Finally a small tweak of event kanban view is performed, notably to have
a better display with dependencies installed. We ensure all cards have the
same height.

LINKS

Task ID 2177281
Community PR #43488

Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Co-Authored-By: Stéphane Debauche <std@odoo.com>
2020-01-30 15:18:08 +00:00
Debauche Stéphane 9726e33654 [IMP] event: improve kanban card display of events
Purpose
=======

Improve design of the kanban cards in Events.

Specifications
==============

Have more useful information on the kanban record and removed redundant
information

  * Display the location of the event
  * Remove the duration
  * Date should only be in the green block
  * Use the same links as before

Task 2170831
PR #43173
2020-01-27 11:21:59 +00:00
Debauche Stéphane f59a68983c [IMP] event: improve some view
Kanban view
===========
- add a field ``sales_total_price`` which contains the total sum of all sale order lines (care about the currency)
- this field is used in ``event_sale``
- display the number of expected and confirmed
- when clicking on these buttons, redirect to the tree view with the correct filter
- display this new field in the kanban view
- display the location instead of the country in the kanban view

Form view
=========
Change the order of the buttons in the header of the event form view
Preview Badge > Contact Attendee > Contact Speaker
Add a note field on the model `event.event`

Search
======
Remove the default filter "Upcoming/Running"

Task #2088538
2020-01-08 09:11:50 +00:00
Debauche Stéphane 412ff994f1 [IMP] event: replace state by kanban stage
Purpose
=======
Remove the state on the event and add a stage.
So, we can have more control on the event flow, and we will have less constrains.

Website event
=============
Before
------
People can register for an event if "seats are available" and if the state is "confirmed".

After
-----
People can register for an event if `event_registrations_open` is True,
- Event: seats are available and the event is not finished
- Event sale:  One or more ticket has `sale_available` set to True

Task #2088538
2020-01-08 09:11:50 +00:00
stefanorigano 1d9208c4fa [REF] *: improve app icons, add SVG version
- Uniform colors and design
- Replace duplicated icons (eg. sale / sale_management)
- Improve misleading icons (eg. POS)
- Add icons for new apps

Add SVG versions to lossless future editing and print/marketing use.

task-54681
2018-08-09 15:46:06 +02:00
qsm-odoo d8c217a67d [REF] *: BS4, review color system
Odoo used to declare two main colors: primary and optional (which are
purple and turquoise in enterprise). Those were respectively assigned
to the 'primary' bootstrap variable and the 'btn-primary' bootstrap
variable.

BS4, however, does not allow to have a different primary color for
buttons. Instead, the 'primary' color is used for all 'primary' related
components and utility classes, same as for all other colors. So, if we
want to keep our enterprise buttons green, our 'optional' colors had to
become our 'primary' color. The old odoo primary is then renamed to the
'odoo' color.

The palette of grays is now larger by default and is numbered from 100 to
900 alongside the $black and $white variables. The equivalence for older
variables and the way we used them is:

$gray-darker          ->  gray 900 (unused before)
$gray-dark            ->  gray 900
$gray                 ->  gray 700
$gray-light           ->  gray 600
$gray-lighter-darker  ->  gray 400 (the old variable was created by us)
$gray-lighter-dark    ->  gray 300 (the old variable was created by us)
$gray-lighter         ->  gray 200

Fortunately, the 'lighter' variations we created fit well in the default
BS4 system ! Unfortunately, our $gray-lighter which carried the same
function as $gray-200 (see above) is very close to the new default
$gray-100 and quite distant from the new $gray-200. This will be handled
in the next commit.
2018-07-27 12:36:54 +02:00
qsm-odoo 770aec399c [REF] *: get rid of vendor prefixes
BS4 do not provide vendor prefixes scss mixins anymore as it is meant
to be used with the 'autoprefixer' library. As we only support the last
version of every major browsers in Odoo, we took the decision to not
use the library as it was also complex to integrate in Odoo. We decided
to do the library's work by hand if it ever become necessary.
2018-07-27 12:36:54 +02:00
qsm-odoo 6e4db7d13a [REF] *: review scss variables handling
Unlike LESS, SCSS variables are not lazy loaded. Our system has thus
to be updated. This commit creates new templates which are t-called
in assets bundles (to replace the old less_helpers template):

- web._assets_utils: regroups the mixins and functions which *can*
  (and so should) be available in every asset bundle

- web._assets_primary_variables: regroups the variables (or mixins
  used as variables) which *can* (and so should) be available in
  every asset bundle

- web._assets_secondary_variables: same as above but provides an
  environnement where all the 'primary' ones are accessible. This is
  for example useful to handle the community/enterprise split:

  // Community primary variables
  $o-pink-color: pink; // enterprise color
  $o-brand-primary: blue;

  // Enterprise primary variables
  $o-brand-primary: $o-pink-color;

  // Community secondary variables
  $o-my-darker-primary: darken($o-brand-primary, 5%);

  => If there was only one variable template, enterprise edition would
     have been able to define its primary color at the end but the
     darker primary would not have been updated. Using the "!default"
     system and putting enterprise definition above would not have
     solved the problem as the $o-pink-color would not have been
     accessible.

- web._assets_backend_helpers: regroups the variables, mixins and
  functions which *can* (and so should) be available in the backend
  asset bundle only. This is especially (only?) useful for bootstrap
  variables overriddes.

- web._assets_frontend_helpers: regroups the variables, mixins and
  functions which *can* (and so should) be available in the frontend
  asset bundle only. This is especially (only?) useful for bootstrap
  variables overriddes.

Note: bootstrap variables are not accessible in any of those anymore.
If you have variables that should depend on bootstrap, you have 3
solutions:

- Find another way: your variable is probably useless, use bootstrap
  variables directly or create a variable that will influence the
  value of bootstrap variables. E.g. instead of declaring:
  `$myvar: $bootstrapvar * 3`
  and using $myvar alone, declare:
  `$myvar: 3` and use `$myvar * $bootstrapvar` where needed.

- Declare a copy of the bootstrap variable and use that one. In that
  case, you should also force-set the real bootstrap one to be sure
  they match (this should be done in appropriate templates mentioned
  above). E.g.
  ```
  $o-boostrapvar: 5;
  ...
  $boostrapvar: $o-bootstrapvar;
  ```

- Set your variable to null and set it to your bootstrap expression
  in the file you will need it (where bootstrap variables are accessible)
  without forgetting to add the !default flag to allow overriddes.
  ```
  $myvar: null;
  ...
  $myvar: $bootstrapvar * 5 !default;
  ```

This commit also partly changes the variable names to follow the
convention:
$o-<app_id>-<name> where 'app_id' is the current's app name or a
meaningful unique identifier ("theme" for all themes for example, as
no multiple themes can be installed).
2018-04-18 15:59:19 +02:00
qsm-odoo 97aa0a8dec [REF] *: convert less content to scss content
Convert content so that the assets compile on app installation. The
style is still broken after this as the variables/mixins/... are not
defined in the right order (as it did not matter in LESS but does in
SCSS).

This commit basically changes:
- Variables: @​var_hello -> $var-hello
- Mixins: .mixin_world() {} -> @​mixin mixin-world {}
- Classes used as mixin: .my_class() -> @​extend .my_class
    - Here there were no other solution than to convert the use of
      a mixin call by the use of an extend as a first approximation
- LESS functions -> SCSS functions (e.g. fade -> rgba)
- Move first variable definition before the variable is used
    - Still need to make sure last variable definition is at the
      right place
2018-04-18 15:59:16 +02:00
qsm-odoo b04dec4025 [REF] *: rename all LESS files to SCSS
This is a simple renaming without adaptation.
2018-04-18 15:59:15 +02:00
qsm-odoo 55c6785c93 [FIX] event, hr: fix kanban view
Resolve two "bugs" introduced with new design:
- Events kanban dropdown position
- Employees kanban tags position
2017-08-28 14:42:50 +02:00
Yannick Tivisse a7e57d6d1a [IMP] Appswitcher: Better icons for some modules
For Manufacturing and Repairs, replace the gavel by a wrench. A gavel is a small hammer used by a judge; it is not used in manufacturing. Keep it for when we will have a Law app.

For POS, replace the briefcase by a screen:

For timesheet, replace the calendar by a clock:

For calendar, use the calendar:

For event, use a ticket, it's more generic than a martini glass:
2016-05-25 13:12:53 +02:00
Fabien Pinckaers 4c8e908b49 [IMP] Speed up app switcher loading: 645k --> 137k lossless compression for all icons 2016-02-26 11:39:38 +01:00
qsm-odoo 5960d3cff8 [IMP] *: New icons 2015-08-11 14:31:10 +02:00