this.call('web.Notification', 'notify', params)
Display a notification at the appropriate location, and returns the
reference id to the same widget. Note that this method does not wait
for the appendTo method to complete.
@param {Object} params
@param {string} params.title notification title
@param {string} params.message notification main message
@param {string} params.type 'notification' or 'warning'
@param {boolean} [params.sticky=false] if true, the notification will stay
visible until the user clicks on it.
@param {string} [params.className] className to add on the dom
@param {function} [params.onClose] callback when the user click on the x
or when the notification is auto close (no sticky)
@param {Array<Object>} params.buttons
@param {function} params.buttons[0].click callback on click
@param {Boolean} [params.buttons[0].primary] display the button as primary
@param {string} [params.buttons[0].text] button label
@param {string} [params.buttons[0].icon] font-awsome className or image src
@returns {Number} notification id
this.call('web.Notification', 'close', notificationId)
We now display all the existing currencies (even the unactivated) instead of a link to activate more of them, and upon the save we make sure to activate the selected currency if it's not yet the case. That's better from a point of view since it avoids jumping off of the screen then come back to make this setting
A whole XML file was missing in the initial import which had as effect to still display 'TIN' instead of 'VAT' in the res.company form view even if the module was installed
As we have two parallel tasks changing the rights for the approval of
leaves, we have to make sure that it stays coherent.
Basically by default an hr_holiday manager can approve anything and the
hr_holiday officer can only approve the leaves of his department and
cannot approve his own leaves.
But you can override this behaviour by setting the Validation By to
"Manager" which will force the leave to be approved by an hr_holiday
manager.
The label and the help message for override limit were confusing, it is
now changed for a less confusing label and help message.
Another confusing thing is that when having a leave type able to
override the limit it should not be visible in the allocations hence it
should not be possible to set the visibility option.
When phantomjs crashes, an error is logged only when the crash is a segfault.
From time to time, we see on the runbot some crashes without any
informations. When digging in the log files, it appears that the exit value
of phantomjs is -6 (that could correspond to the SIGABRT signal).
With this commit, the error message will clearly show the return code
and, above all, it will show that the test failed due to a phantomjs
crash.
When calculating the stock_value of a product,
the system will take into account all the locations
that have this company as company. (that way if owner_id
is not set, the company_id on the location is the owner (virtual: not set))
The Qty on Hand field takes into account however
the quantities that are in the warehouses.
This could lead to weird situations where the Quantity On Hand is 0
and so the record is not shown, while the stock value is positive.
(e.g. stock in Transit)
In order to use the same logic for both fields, we pass company_owned=True
in the context.
In the table of the project overview, we want the
milestone Sale Line not to be included in the remaining
computation of the SO (sold - done column), because selling
milestone product may not be expressed in Hours.
This commit excludes those line from the computation, and
aoivd displaying those 2 columns for this kind of table
rows. Also, it adds italic style on milestone lines to
indicate to users that they are not included in remaining
value.
Task #1834454
- Fix an issue where the transaction were always set a 'form_save' thus always creating payment tokens.
- Fix an issue where when the customer paying while not being logged in was crashing.
The issue is due to the fact that we are creating payment transactions linked to no partners, doing so it crashing the code when creating the payment token with no partner set.
The main reason this is done is to prepare the migration to bootstrap 4.
It has other advantages though, like speed to compute the css and more
convenient language features (if/else/maps/...).
Detailed information about this merge can be found in the merge's
sub-commits.
Remove support of:
- Theme Amelia: removed with bootstrap 3.3.0, but released in odoo at
bootstrap version 3.2.0 (should have been removed since Odoo 9.0
(boostrap version 3.3.5))
- Theme Readable: removed with bootstrap 4.0.0 so it is best to remove
it now so as we are gonna migrate to bootstrap 4.0.0.
We may want to add new bootswatch theme with bootstrap 4.0.0 migration.
This commit also adds the missing LICENSE file.
* mail, web, web_editor, website_sale
Tricky difference between LESS and SCSS:
`0 -$var` will be one value in SCSS (the result of 0 - $var) but
two space-separated values in LESS.
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).
During first scss convertion, classes called as mixins were changed to
an @extend instruction which was the best approximation given the fact
there is no equivalent in sass to do that. The problem is that the
instruction is slowing the scss computation a lot and might also break
the style in unexpected ways because of the complex unwanted selectors
the instruction induces.
This commit removes the need of extends. This is done case per case.
Sometimes this involves adding classes in xml, sometimes to change the
style a little, ... The button rendering refactoring which was made
at the start of the LESS to SASS merge was also done in prevision of
this.
After this commit, sass computation is like 5-6 times faster than less
computation while it was like 10 times *slower* before this commit.
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
Reorganize the theme folder to follow standard hierarchy. In particular,
the libs are now placed in a dedicated folder in the /static/lib folder
instead of the /static/src folder.
Summernote is using LESS and no SCSS version exists (at least
officially). As summernote is meant to be replaced in the future and
that the LESS file was already overridden directly by Odoo, this
commit converts the LESS file to CSS once and for all.
Note: the scss version of the lib file was not up to date, I manually
updated it to our current version (very small changes). The lib will
probably have to be changed with bootstrap 4 anyway.
Note 2: the file is left included in the common assets but it would
probably make more sense to put it both in backend and frontend instead.
Adapt the assets bundle computation to work with SASS (scss). LESS is
still supported though the dependencies are not installed automatically
and the LESS variables are not available anymore (obviously).
SASS is computed thanks to the libsass program, wrapped by the
python-libsass package (no need to start a nodejs process anymore).
The Arabic we use on Transifex is "simple" Arabic, not the one from Syria.
The .po files we synchronise are named 'ar.po', not 'ar_SY.po'
Change the iso_code to match the one we actually use.
transifex module relies on the iso_code to make its URL
When working with relational fields, the sorting function would
compare empty recordsets with Strings (the field value),
crashing in the process.
This is essentially an addendum to previous commit
b6c962e62a
which fixed the sorting for non-relational fields.
opw 1831457
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).
* test_main_flows
The style of a primary/link button is given by the
'btn-primary'/'btn-link' class. The old 'oe_highlight'/'oe_link'
class should still be supported in views but not rendered in the DOM.