Commit Graph
264 Commits
Author SHA1 Message Date
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
Valentin Löfberg 8e567f819d [IMP] project: Place every links on relative position on kanbans cards
Purpose
========

The links on the project kanban cards are not always at the same place : https://drive.google.com/file/d/1aONUYkZerqqD7fSVmgozRScgLKR-QHtA/view

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

I get rid of the flex element to allow the placing of links using width
attribute. Create the .o_project_timesheet_box class to assure that the
timesheet/overview link is always placed in the middle.
I also deleted the needaction_count button to avoid breaking the display.

Task: 1817850
2018-04-06 10:49:31 +02:00
Christophe Simonis b51f2d38c2 [MERGE] forward port branch saas-11.2 up to 500e3f4970 2018-03-21 11:04:48 +01:00
Jigar PatelandAaron Bohy 89050f61b7 [IMP] web_settings_dashboard,*: improve UX
*crm,project: css selector adapted in tours

This rev. improves the UX of the 'Invite users' and 'Pending
invitations' part of the Settings dashboard.

Task 32804
Closes #19531

Co-authored-by: Aaron Bohy <aab@odoo.com>
2018-03-15 08:32:43 +01:00
fgi-odoo 93062742ab [FIX] project: correct spelling mistake in tour
Closes #23598
2018-03-12 15:46:33 +01:00
Christophe Simonis 0f57bdba72 [MERGE] forward port branch saas-11.2 up to 42659dc70c 2018-03-09 16:25:58 +01:00
Christophe Simonis 36945a5853 [MERGE] forward port branch 11.0 up to c2e878e34c 2018-03-01 19:43:25 +01:00
Nicolas Lempereur 8438470c3a [FIX] project: kanban needaction link well shown
When something like this is in a html content:

```
  <a href="hello">
    <div>
      <b>this</b>
      <a href="world">!</a>
    </div>
  </a>
```

browsers may correct it to:

```
  <a href="hello">  </a>
    <div>
      <a href="hello">
        <b>this</b>
      </a>
      <a href="world">!</a>
    </div>
  </a>
```

which breaks our CSS.

This change transforms the inner tag in a button tag.

opw-1817668
closes #23373
2018-02-28 15:36:18 +01:00
Aaron Bohy c265e47a63 [FIX] web,*: tests: remove src attr from img nodes
In the tests environmnent, we don't want img and iframe nodes to
perform RPCs when they are inserted into the DOM. For img nodes,
we prefixed the src attribute by '#test: ' as soon as they were
inserted into the DOM. Unfortunately, this didn't work as expected:
an RPC was done to fetch route '/web/tests?' (i.e. the tests page),
because everything after '#' in the url isn't sent to the server.

This rev. completely removes the src attribute of img nodes, and
set a 'data-src' attribute with the original src attribute's value,
so that it can still be checked in the tests.

Tests using this attribute have been adapted accordingly.
2018-02-12 11:13:42 +01:00
jem-odoo b9c8394247 [FIX] project: reset correct tour
Partial revert of 88ff096c96
Please, avoid bring things ...
2018-02-05 14:38:50 +01:00
Fabien Pinckaers 88ff096c96 [IMP] project: when doing a subtask, missing space after colon
[IMP] project: "Task Title">Title (could be named differently)
[FIX] project: don't assign a person on a task during the tour
Someone is already assigned as tasks are created from the kanban,
directly, with a responsible by default.
2018-02-05 10:53:29 +01:00
Aaron Bohy fbb6942326 [FIX] project: adapt tour to flow changes
The ColumnQuickCreate widget is now automatically open when
entering a grouped Kanban view with no column. Moreover, the DOM
of the quick create has changed. The tour had to be adapted
accordingly.
2018-01-26 19:26:03 +01:00
Parth Patel b96a4f6296 [IMP] web,project: Kanban onboarding
The goal of this rev. is to improve the user onboarding on the
Project app: when the user creates a new project, he is now guided
to properly configure the stages of its project.

To do so, we added a new mechanism in the Kanban view, allowing to
define examples of processes that can be used in the corresponding
view.

The style of the ColumnQuickCreate widget has also been changed.

Part of task #38740
2018-01-26 19:26:03 +01:00
Alexandre Kühn a87d761fdb [IMP] core: menu tip ux/ui improvement
We would like to make the "no item found" screens more appealing.

Before this commit, it shows a small help tip in the top-left
corner of the screen, just below the "Create" button.

With this commit, these help tips have been replaced by onboarding
screens, which consist of a picture and some text below, both of which
are horizontally centered.

The texts have been slightly changed, so that they are shorter and clearer.

Considered modules:

(A)
    account,
    account_asset,
    account_budget,
    account_test,
    account_voucher,
    analytic
(B)
    barcodes,
    base,
    base_automation,
    board
(C)
    calendar,
    contacts,
    crm
(D)
    delivery
(E)
    event
(F)
    fleet
(G)
    gamification,
    google_drive
(H)
    hr,
    hr_attendance,
    hr_contract,
    hr_expense,
    hr_gamification,
    hr_holidays,
    hr_payroll,
    hr_recruitment,
    hr_timesheet
(I)
    im_livechat
(L)
    l10n_fr_sale_closing,
    link_tracker,
    lunch
(M)
    mail,
    maintenance,
    mass_mailing,
    membership,
    mrp
(N)
    note
(P)
    payment,
    point_of_sale,
    post_mercury,
    pos_restaurant,
    product,
    project,
    purchase,
    purchase_requisition
(R)
    rating,
    repair,
    resource
(S)
    sale,
    sale_timesheet,
    sales_team,
    stock,
    stock_account,
    stock_landed_costs,
    stock_picking_batch,
    survey
(U)
    utm
(W)
    web,
    website,
    website_blog,
    website_customer,
    website_event_track,
    website_forum,
    website_quote,
    website_sale,
    website_sale_digital,
    website_slides
2018-01-18 21:43:29 +01:00
Jérome Maes d7d30f69d7 [REM] website_rating_project: move feature in project
Displaying the rating of project is moved directly
in project module, since it does not depends on website.
User may want to display rating of its support project
even without website.
2017-12-12 14:06:29 +01:00
Sagar Ahirrao c140387f06 [IMP] project: Update tour 2017-12-01 15:00:25 +01:00
Alexandre Kühn 21c4480821 [REF] *: renaming AppSwitcher to HomeMenu
Summary:
   AppSwitcher      => HomeMenu
   AppSwitcherMenu  => HomeStudioMenu

Details:
   application_switcher => home_menu
   application-switcher => home-menu
   AppSwitcher          => HomeMenu
   appswitcher          => home_menu
   AppSwitcherMenu      => HomeStudioMenu
   appswitcher_menu     => home_studio_menu
   app_switcher         => home_menu
   app-switcher         => home-menu
   app_switcher_menu    => home_studio_menu
2017-11-17 16:37:26 +01:00
Yannick Tivisse 7ed9a7fabe [REM] web_planner: Remove the module
Purpose
=======

User tests have been made by the Product Owners team. It showed that the planners are not used by new users on Odoo due to several reasons (They are too static, too heavy to use,...)

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

Remove the module and its different applications. The onboarding on the business flow will be improvement in the weeks to come.
2017-10-26 16:14:21 +02:00
Vandan Shah 77f30a2619 [IMP] project: Improve the cover image mechanism
Purpose
=======

If there is no picture attached to a task, the user doesn't understand how to add a cover image.

Sepecification
==============

- "Select" button to select image => Display only if we have images

- "Remove Cover Image" => Display only if image already set

- "Upload and Set" =>  Always visible , highlight button if no images. Image uploaded via dailog box should automatically set on task kanban and add to the "Attachments" in task.
2017-10-19 11:26:34 +02:00
Jérome Maes 063987c989 [IMP] project,hr_timesheet,project_issue: clickable zone of project kanban box
When clicking on kanban box, the first action is trigger; the user
have to click on the label of the box to see the 'timesheet' (for
instance), otherwise he will see the tasks.

Since HTML5 supports `div`, `table`, ... being wrapped by `a` tag,
we can use it to make the entire kanban box clickable. (See
https://www.w3.org/TR/html5/text-level-semantics.html#the-a-element)
2017-09-13 08:41:31 +02:00
Kirti Choudhary 36a2bfb9cf [IMP] *: add and improve kanban views for mobile
This commit improves readability in kanban views.
The default view in mobile is kanban and many of them
needed to be improved.

task-33438
closes 17853
2017-09-05 13:21:58 +02:00
stefanorigano 7452139552 [REF] project: change dashboard links' color 2017-08-30 16:55:10 +02:00
qsm-odoo fdb38afacf [REF] *: adapt LESS changes and remove dead code
* project, sales_team, web
2017-08-28 12:53:17 +02:00
stefanorigano 3ee2ab71ec [REF] project: set new project dashboard layout and design 2017-08-28 12:53:17 +02:00
stefanorigano e710a858b6 [REF] project: set new kanban layout for project kanban
New kanban design is basically new LESS to override the old one. In the
next version, we will work on a better and uniform layout (which will
allow better LESS). Here, we already set a better layout for project,
as an example.
2017-08-28 12:53:17 +02:00
Jigar Patel 2adc9d5032 [IMP] account: Add a new boolean_favorite widget
Purpose
=======

Projects and soon sales teams have a manual "favorite" button that calls a toggle_favorite method
It should actually be a widget on a boolean field

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

Develop a favorite widget for kanban view that allows to toggle a boolean field
Probably update boolean field to allow inverse method on it

Functionally nothing changed.
2017-08-09 15:11:53 +02:00
qsm-odoo 5f1ef0910b [IMP] web, *: lazy load dialog xml template
* web_editor, web_planner, website

The 'Dialog' class is used in both backend and frontend. Also, lots of
actions can be done without the use of any modal. It thus makes sense
to lazy load its related xml only when a first modal is opened.

This change also allows to get rid of the "base_common.xml" file as the
dialog template is the only remaining one in there and, in the future
website update, it will allow to not load any static XML file on website
page loadings.
2017-07-24 14:28:35 +02:00
Harshad Modi 922a04dbd2 [FIX] project: fix traceback while setting cover image
from project task kanban view (PR #17165)
2017-06-07 10:15:04 +02:00
qsm-odoo 250e716c3a [REF] web, *: restore views design
Since the new views merge, a lot of design elements were broken. This
was particularly impacting the fields in the editable list view; indeed
the editable list view is not using an inline form view anymore so the
fields in the list were not properly styled as the LESS was still
defined assuming the form view environment (for example the invalid
fields were red for o2m fields in form view but not in editable list
view even though they got the right CSS class).

This commit refactor the LESS following these rules:
- No more division of non-layout and layout rules. Dividing LESS rules
  in x_layout.less and x.less was a mistake. Many rules can be
  considered to be layout and not layout at the same time, developers
  always have to switch from one file part to the other, many CSS
  selectors (and rules!) are duplicated for nothing, ...
- Field style is extracted from x_view.less and put in the new
  fields.less file. As before, the fields_extra.less will contain the
  rules specific to community so that the enterprise repo can override
  those by replacing the whole file.
- Many classes have been renamed so that o_form_x_y becomes o_x_y as
  many classes can now be applied outside of form view. These classes
  should not be used in templates anyway.

The commit also changes the DOM of fields so that it is more minimalist
(no useless parent div, etc).

Input elements are not automatically styled anymore, they have to get
the o_input class explicitely. This allows to fix lots of small style
bugs of previous versions (required monetary field had not the proper
style, readonly m2m tags appeared as editable, ...). This also improves
the LESS code.

The editable list view should also completely stop flickering on chrome
and firefox.

The commit also removes the orange outline on list view dirty cells.

The commit also removes deprecated static xml, LESS and other code.

Notice there are still styles to restore/fix and LESS to improve.
2017-05-04 12:07:30 +02:00
Géry Debongnie 2106e3dd2e [REF] web, *: simplify our RPC system (in JS)
The RPC system was not completely satisfactory, we decided to prepare
the future and do it properly.  This commit introduces the new rpc
system, which replace the previous new one.  We now simply have a
method, this._rpc, which takes a dictionary of parameters.  The idea is
that depending on the parameters, it is able to add correct default
value when necessary.

For situations where we don't have the this._rpc method, we can use the
rpc.query method, which takes the same arguments, but directly calls
ajax.rpc instead of triggering up some events.
2017-04-11 19:44:38 +02:00
Aaron Bohy fc08507fdb [REF] web,*: convert Kanban widgets to new style
The remaining widgets were KanbanRecord and the two quick create
widgets. Now, all kanban files have been converted and refactored.
2017-04-11 19:44:38 +02:00
Géry Debongnie 86a87aa8b0 [REF] *: use _rpc method for all rpcs
The _rpc method is now the preferred method to do a rpc, so we need to
update all calls.
2017-04-11 19:44:38 +02:00
Géry Debongnie e574027056 [REF] web,*: remove 'web.model' and 'web.dataModel
Use this.rpc instead of Model object, with web.ajax if necessary.

nb: EventDispatcherMixin include now the custom_events managment instead
of widget
2017-04-11 19:44:38 +02:00
qsm-odoo b34279c89a [IMP] web, *: let kanban column and record know about modelName
* hr_attendance, hr_gamification, hr_recruitment, mass_mailing,
  project, sales_team

Before this commit, the kanban column did not know about the model
name which make customization impossible without a getParent. Kanban
records were supposed to know about this thanks to the options
parameter but this was broken. Now the model name is automatically
initialized from the given state.

Adapt all extensions which relied on this.
2017-04-11 19:44:38 +02:00
Géry Debongnie 905e01921f [REF] web, *: redesign all JS views
This commit introduce a full redesign of all JS views.  We started
basically from scratch.  The goal was to unify all the various views
under a common framework, to make them testable, to make then usable in
different conditions (in studio, or in the frontend), and to make our
lives easier.

Some important points are:
- we introduced new coding guidelines (camelCase, 80 chars width, ...)
- we have a brand new testing framework (still QUnit based)
- kanban view moved to the web addon
- calendar view (formerly web_calender) moved to web as well
- the tree view was removed
- all new code should be documented

We hope that this code is the start of a new era for the Odoo web
client, we want to have a high quality codebase, well documented, well
tested, well designed.

Work done by the framework team: mostly aab, ged, chm, dmo, qsm
2017-04-11 19:44:38 +02:00
Jigar Patel 91b07d5092 [IMP] web_kanban,*: Change the More Call To Action by a 3dots icon to improve readability 2017-03-16 11:40:30 +01:00
Christophe Simonis 2d26229052 [MERGE] forward port branch 10.0 up to ea675d8 2016-11-18 18:29:23 +01:00
Christophe Simonis f05e8655ee [FIX] project: correct tour (bis)
Automatic tour should not open the kanban record directly in edit mode.
This "edit" link wasn't working and has been fixed by 2e0a300016.
2016-11-17 19:27:28 +01:00
Christophe Simonis 639421e8a5 [MERGE] forward port branch 10.0 up to fb77309 2016-11-17 18:13:45 +01:00
Christophe Simonis fb773091d8 [FIX] project: Correct tour
Remove useless step as we are already in edit mode after clicking on
edit action link
2016-11-17 17:50:06 +01:00
qsm-odoo 669336baa9 [REF] web_planner, *: refactor planner code
* Share code between website and backend
* Do not do a [100ms - 500ms] RPC on each app change in the backend
but do it only if the planner is asked to be opened
* Use the Dialog class so that the planner is not broken
* Simplify/optimize code, use standard conventions, lint files, ...
2016-11-15 13:08:59 +01:00
Géry Debongnie 78d9f612fd [FIX] project: increase clickable zone in dashboard
In the kanban project dashboard, the records are displayed with a column
of small 'boxes' on the right.  Those boxes seems clickable and lead to
other actions, such as issues, forecast, timesheet, ...  However, the
actual clickable zone is the tag 'a' inside those boxes.  This leads to
confused users (myself included).

With this commit, the size of the link is increased to the full width of
the box. This is not the perfect fix, since the height is not
necessarily exactly the same as the surrounding box, but it is
significantly easier to click on it in some cases.
2016-11-04 11:45:43 +01:00
qsm-odoo fb363b572b [FIX] *: adapt odoo interface violet
Change color #a24689 to #875A7B

Commit https://github.com/odoo/enterprise/commit/8ac1c19fac7615fecd51e670f798d13158a4e53c
changed the odoo interface violet by changing the main LESS variable
but forgot there was many direct occurences in XML/HTML/... (for
example for the mobile browser color).

Even if it's community the odoo interface violet is used at many places
(module description, XML demo data, ...).
2016-10-05 10:29:00 +02:00
Thibault Delavallée d4ee7971e2 [IMP] project: improve user tour
* Correct some language
 * Add extra steps to redirect to the implementation planner after having
  finished the tour
2016-09-29 14:25:50 +02:00
Martin Trigaux 11812b0b9e [FIX] all: remove external ids fakely from base
Several modules defines records with the external ID `base.foo_bar` while it is
created inside this module (typically menus and groups).
While there is no technical reasons to do so but this may introduce issues:

- these records will not be deleted during uninstall
- if a language is loaded before the installation of the module, it won't be
  translated

The uninstallation will only remove the records with an external id linked to
this module (these would only be removed when removing base).

Installing a language before the module will drop the translations not linked
to an existing external id (as it can not be resolved).

This commit correct all the external ids tagged as from base or other incorrect
modules.
2016-09-02 16:14:26 +02:00
Yannick Tivisse ed0c151222 [IMP] project: Display the favorite icon front of the project card 2016-09-02 08:46:33 +02:00
Christophe Matthieu 5c2274e169 [IMP] crm, project: do not assume number of records in column during tour 2016-08-26 09:30:38 +02:00
Nicolas Lempereur ae34fd50c8 Revert "[IMP] project: tour mini improvement"
This reverts commit 45a13cac80.

The commit failed the tour test since there is invisible
".o_kanban_ghost" cards after the last. Since the created new
project is already sorted in the right location, we don't know
if it will be the first or the last.

But if it is the first, we know we will see the help tip.
2016-08-12 08:38:45 +02:00