Commit Graph
4390 Commits
Author SHA1 Message Date
Romain Derie b65cb86697 [IMP] website: remove page creation in menu manager + menu container
This commit:
1. removed the possibility to create page from the menu manager.
   The usability of this feature wasn't great since create menu as a new page
   would redirect to that newly created page without saving the menu manager
   state.
   Plus, there is already the 'NEW' button on the navbar to create a new page,
   the menu manager should, as its name hint, only manage menus.
2. Handle a new case (officially at least) of menu: menu container.
   Those menu are simply menus with '#' as URL. It will be usefull to create a
   menu as a dropdown list container.
   Note: We should take care of a menu's URL being updated to '#' to avoid the
         menu's page URL to be also edited to '#'.

opw-1825883 & opw-1824263
2018-05-09 15:38:58 +02:00
Yannick Tivisse 99f497b390 [IMP] *: Define groups on res.users models
The reified view on the res users will be dropped in the following commit.

The previous commit adds support to define each group as a computed field on the res users.

This commit defines:
- A boolean field for each 'isolated' res.group, i.e. a group in the hidden category.
- A selection field for each 'Application' res.group, i.e. a group in a application category.

Example:
- The group to manage pricelist in sales becomes a boolean field
- The groups project user/manager become a selection field
2018-04-26 15:13:38 +02:00
Christophe Simonis b192431aee [MERGE] forward port branch saas-11.3 up to ec5e27bb7c 2018-04-24 17:42:41 +02:00
Géry Debongnie b519858a30 [FIX] *: use _t instead of _ in js translatable strings 2018-04-19 17:17:54 +02:00
Christophe Simonis e82030433d [MERGE] forward port branch saas-11.2 up to 7084a5190c 2018-04-19 16:33:40 +02:00
Christophe Simonis 7084a5190c [MERGE] forward port branch 11.0 up to 841f3914cc 2018-04-19 15:04:26 +02:00
asa-odoo 1d1fd8219c [FIX] website: fix design of mobile preview close icon
The broken design prevented to click on the close button.

task-1817880
2018-04-19 13:00:21 +02:00
qsm-odoo e5b268827f [REF] web, web_editor, website: convert LESS editor to SCSS editor 2018-04-18 15:59:25 +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 1a007c1a96 [REF] *: stop mentioning "LESS" where this is not required
* web, web_editor, website, im_livechat
2018-04-18 15:59:07 +02:00
qsm-odoo a75e3980ce [IMP] website: define default template for scss files creation 2018-04-18 15:59:04 +02:00
qsm-odoo 549f60b3c2 [REF] *: <a/> elements do not need the oe_link class
The 'oe_link' class is not linked to any style. The class is
automatically converted to 'btn-link' for <button/> elements but this
will not be done on <a/> elements as they are (nearly) unprocessed
node during views rendering.

Also there is minor difference between a '.btn-link' element and a
<a/> element anyway (and maybe there should not be at all).
2018-04-18 14:47:42 +02:00
Christophe Simonis 0cd2cff259 [MERGE] forward port branch saas-11.3 up to fdef30fc29 2018-04-17 16:24:27 +02:00
Christophe Simonis 74033eb007 [MERGE] forward port branch saas-11.2 up to 90f8f17fb4 2018-04-16 19:50:50 +02:00
Christophe Simonis 5f2d080cf8 [MERGE] forward port branch 11.0 up to ad825b673b 2018-04-16 18:34:56 +02:00
Odoo Translation Bot 4bc2581521 [I18N] Update translation terms from Transifex 2018-04-15 04:12:33 +02:00
dbh e6e42a1a8c [IMP] website: add new snippet option to control # of cols
Note: original work of @dbh-odoo was to have + and - buttons on the
editor overlay but specs changed to use a standard dropdown (the work
of @dbh-odoo was thus adapted for this).

See task-46094
Closes https://github.com/odoo/odoo/pull/22197
2018-04-12 16:55:36 +02:00
Martin Trigaux 8b8815f44c [FIX] http_routing: translate without website
web (tagged with `openerp-web`) translations are loaded in the backend, in
`odoo.addons.web.controllers.main.WebClient.translation(mods=None, lang=None)`
method (through `/web/webclient/translations` controller).

In website, the controller `/website/translations` is called used, fetching
the translations from modules with the (fragile) clause `name ilike 'website'`

This commit fixes two bugs:

1. Install `website_sale`, activate discussion on products
  -> the chatter is not translated as the portal translations not loaded in the
     `/website/translations` controller

2. Install `helpdesk` but not `website`, go to portal view of a ticket
   -> the heldesk chatter is not translated as the `/website/translations`
      controller is not called (only provided by the website module)

This patch implements a modular approach to translate the web resources of the
right modules only.

The controller /website/translation is moved to http_routing and each module
override the new _get_translation_frontend_modules_domain method to adds its
translatable module

Closes #23618
Fixes #23610
2018-04-11 16:55:14 +02:00
Odoo Translation Bot d9f7490f55 [I18N] Update translation terms from Transifex 2018-04-08 04:13:24 +02:00
Christophe Simonis 860dfb5586 [MERGE] forward port branch 11.0 up to d277adf4d5 2018-04-06 15:36:10 +02:00
Christophe Simonis a2165a04c3 [FIX] website: less specific xpath pattern
Allow more liberty in layout modifications
2018-04-04 11:37:26 +02:00
Dharmraj JhalaandJérémy Kersten 3d6f9b5e0b [IMP] website, website_sale: improve magnify feature
Move zoom next the original picture
Disable it if same img and max size with ratio < 1.5
Allow to enable zoom automatically
...

Task-33499

Co-authored-by: Jérémy Kersten <jke@odoo.com>
2018-04-03 16:25:18 +02:00
Odoo Translation Bot d636c6c95c [I18N] Update translation terms from Transifex 2018-04-01 04:15:11 +02:00
Romain Derie 5c2b42bbf7 [FIX] website: remove ribbon on unpublished pages (new specs)
This commit reverts part of f5912cb since the spec changed afterwards.

Unpublished page will have a red toggle, which even if it is small should be
enough to draw user attention, and not a ribbon anymore.

Task-44005
2018-03-29 13:08:57 +02:00
Jeremy Kersten b747c3010a [FIX] website: website.redirect keep params during redirect
Before this commit if /foo redirect to /bar?a=1

/foo?debug=1 was redirectd to /bar?a=1

After this commit,

/foo?debug=1 is redirected to /bar?a=1&debug=1
2018-03-28 17:59:31 +02:00
Jeremy Kersten 888e2c3d37 [FIX] website: fix controller / to avoid loop
Don't redirect to '' to avoid infinite redirect loop.
2018-03-28 17:59:19 +02:00
Christophe Simonis 3a537c789a [MERGE] forward port branch saas-11.2 up to 55a14f9ce8 2018-03-27 19:41:30 +02:00
Christophe Simonis 87a0f4dc4c [MERGE] forward port branch 11.0 up to b33d5af4a7 2018-03-27 18:22:18 +02:00
Nicolas Lempereur bae7e32e4b [FIX] website: see versionning changes
Website Versioning module (website_version) is applied when displaying
views by interfering when doing the "render the view of this `key`" and
showing the view with the same `key` but of the currently displayed
version.

The website.page model when directly rendering a page would directly
specify its `id`, thus website version was bypassed and just the master
page was displayed.

With this commit website.page has a "get_view_identifier" that can be
overrided in website_version and has the same previous behavior
otherwise.

This changeset also solves a conflict (`website().get_current_website`
also modify `request.context`) when modifying the context which also
disabled versions.

opw-1824957
closes #23847
2018-03-26 10:53:23 +02:00
Odoo Translation Bot 14e69ca5f1 [I18N] Update translation terms from Transifex 2018-03-25 04:15:17 +02:00
Christophe Simonis 845f4ef7d3 [MERGE] forward port branch saas-11.2 up to 8a7b845353 2018-03-23 10:31:00 +01:00
Christophe Simonis cdbee48888 [MERGE] forward port branch 11.0 up to 39d9c362c5 2018-03-22 20:05:14 +01:00
Romain Derie f5912cbcb3 [IMP] website: make it more noticeable when a page is unpublished
Before this commit, 2 usability issues were reported:
1. Some people would get stuck with unpublished content without even knowing it
   since they would not understand the page is unpublished.
2. People would have a hard time finding the publish button (small toggle on
   the navbar).

Now:
1. We now display a red ribbon on the top right corner specifying the page is
   unpublished. Hopefully it can't be missed.
2. This publish button will be more visible for unpublished content since it
   will be red (danger) color. Hopefully people will notice it at first look.
   Note: It is implemented in a generic way so any 'o_switch' can be turned
   into this version by simply adding the 'o_switch_danger' class to it.

task-44005
Closes #23282
2018-03-22 16:32:51 +01:00
Martin Trigaux 7d86bdca21 [I18N] *: export source terms of saas-11.2 2018-03-22 15:19:07 +01:00
Christophe Simonis 76027a6e12 [MERGE] forward port branch saas-11.2 up to 6773bdbe32 2018-03-21 19:42:34 +01:00
Christophe Simonis 6773bdbe32 [MERGE] forward port branch 11.0 up to e8f630e44d 2018-03-21 19:36:58 +01:00
Christophe Simonis e8f630e44d [MERGE] forward port branch saas-15 up to 7a45296cf1 2018-03-21 18:20:22 +01:00
Christophe Simonis 7a45296cf1 [MERGE] forward port branch saas-14 up to 78dced6bc2 2018-03-21 16:49:15 +01:00
Christophe Simonis 78dced6bc2 [MERGE] forward port branch 10.0 up to c2b3ad1899 2018-03-21 15:55:26 +01:00
Christophe Simonis 0cefaad370 [MERGE] forward port branch 9.0 up to 2c5fe07fc7 2018-03-21 11:35:58 +01:00
Christophe Simonis b51f2d38c2 [MERGE] forward port branch saas-11.2 up to 500e3f4970 2018-03-21 11:04:48 +01:00
Thibault Delavallée 42a4b54881 [IMP] ir_ui_view: allow to use a minimal evaluation context when rendering QWeb
Currently some base context used for evaluation is computed when rendering
QWeb templates. Evaluation context is build in base and improved notably
in website module.

This commit adds an option to skip this context build and have a minimal
evaluation context based on given values. Purpose is to avoid having to
search and browse unnecessary content when evaluating some custom templates.
When we know precisely what we need when rendering a template there is no
need to add unnecessary items in the evaluation context.

This commit is related to task ID 1817951. Closes #23291 .
2018-03-20 13:25:06 +01:00
Christophe Simonis e0345a4a3f [MERGE] forward port branch 11.0 up to 2835d29979 2018-03-20 11:45:11 +01:00
Christophe Simonis 4715d7e35a [MERGE] forward port branch saas-15 up to 0d55241185 2018-03-19 19:29:58 +01:00
Christophe Simonis 0d55241185 [MERGE] forward port branch saas-14 up to 82effcca83 2018-03-19 18:26:25 +01:00
Christophe Simonis 82effcca83 [MERGE] forward port branch 10.0 up to caf6b4a7c7 2018-03-19 18:25:41 +01:00
Odoo Translation Bot b25250f56e [I18N] Update translation terms from Transifex 2018-03-18 04:13:29 +01:00
Odoo Translation Bot 4fd4816d49 [I18N] Update translation terms from Transifex 2018-03-18 00:26:00 +01:00