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).
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
Since https://github.com/odoo/odoo/commit/d1fc62df0b850c56360c1e5391c69eb807d0fe46:
When several ir.actions.todo are created, only the last one is
considered and the first are marked as done. Thus, there are never
multiple "open" todos at the same time (while before this, only the
first todo was done and the other ones were done on subsequent module
installations, which makes no sense).
The new system however broke stuff. Indeed, when installing the
eCommerce, we expect to land on the "Choose a Theme" page (if website
was not already installed). This was not the case anymore, as the
last todo in that installation is "Redirect to /shop". To fix the
problem, the system is changed to not consider the "last todo" but
"the todo with highest priority, or the last one if same priorities".
By making the "Choose a theme" todo high priority, this solves the
problem.
A better system would be to make todos depend on each other... but
that would be a task for master.
Purpose
=======
The attribute name isn't required on the <filter> tag. If not set, it can't be selected with a xpath and it can't be overwritten.
A lot of PR are coming from the community just to add a name on a filter because:
- It can't be selected with a xpath.
- It can't be used with `default_search_foo` on an action context.
Specification
=============
Make the atttribute name required
Following commit 828c7c3da9:
the kanban record animation when a theme is hovered was blurry with
chrome and laggy with firefox (with linux at least). This commit
removes the scale part of the animation which was the cause of this.
- Handle vertical screenshots
- If a theme is installed, show it first, hide buttons and use a
specific design
- If no screenshot has been defined, show the cover (or the icon if no
covers has been defined neither)
- Show theme's name and category
- Allow to filter by category
- Design grouped layout
Use case when it happens:
* Install website module
* Should redirect to theme selection
Current behavior : Nothing happens
This error come from the commit c56b746221
This commit change the default state of ir.actions.server
from 'code' to 'object_write'. That causes the existing ir action servers
that use python code and has not the field state declared to crash.
This commit update the ir.actions.server and set the state to code.
The website_theme_install needs to reference the module category whose
xml_id is base.module_category_theme_hidden. The problem was that it
needs to do this in a context where the category might not exist (as
auto-created only if a module defines its category as "Theme/Hidden").
To solve the problem, the category was explicitly created by the
website_theme_install module to be able to reference it.
Commit 11812b0b9e removed the "base." part
of the xml_id thinking it was a record which had to be created by the
module. This then wrongly showed the Theme/Hidden modules in the list.
Now the solution came from commit https://github.com/odoo/odoo/commit/c6983137#diff-07193f47475ccdd78f39773a368ce05bL386
which now allows to use the second parameter of ref in a domain
context. This allows to tell the system to not raise an exception if
the ref we want to find does not exist.
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.
The website_theme_install module now adds a link in the theme customize
modal to propose to install a theme when none is installed.
Also correct the name of the theme_default customize modal template.
On website/theme installation and other website_* module installation,
an action was triggered to launch tours. These tours are now used only
for tests and should not be used as onboarding anymore.
Note: in master these tours will be removed to use the new test system.
- add or fix decorators on methods
- fix most compute methods (wrong dependencies)
- revert changes in `eval_context` of `ir.actions`
- various code simplifications and improvements
- migrate methods that were not
- ir_qweb: modify `QWebContext` to take an environment instead of `cr`, `uid`, `context`
- ir_qweb: convert `AssetsBundle` to use new API `env`
- ir_ui_view: use decorator `multi` on method `read_combined`
- ir_ui_view: ensure that method `render` is never called with an xml_id
- ir_ui_view: factor out part of the `ormcache` key of method `_read_template`