When a modal is open, we only activate tips that are inside the modal.
The former solution didn't work when the tip's selector contains ','
(often used when the selector is different in community and enterprise,
e.g. selectors for apps), because the modal restriction was only
applied on the first part of the selector.
Changes the api of the consume method on the web_tour.tour model so that it
now takes in argument an array of tour names instead of a single tour name.
This is done in order to enable the tour service only for the
superuser. Commit 6ef1644a7b changed the meaning of `is_admin`
to achieve this but broke the fact that some features of the debug
manager are available to admin and not only to the superuser. Anyway
a `is_admin` key should mean that the user is in the admin group.
We could have checked client side that the uid is equal to 1 but
adding a `is_superuser` key is more elegant and easier to grep.
Also fix the only occurence of a uid check in the weblcient.
This reverts commit 6ef1644a7b.
The tour mechanism displays a tour if the `session.is_admin` key
is set to True. For this key to bet set to True, you need to be
in the system group.
Default options adds the system group to any created user, however as
there aren't any ir.model.access rule defined on the `web_tour.tour`
model, when you try to login as this created user, you get a traceback.
As the only way to reach a `web_tour.tour` record is to have the
superuser_id, update the `is_admin` condition accordingly.
The tip does not have to wait for this extra_trigger to show up.
Also, waiting for it seems to induce some bugs on chrome under
certain screen sizes, so best to avoid them.
Alse reduce the size of this tip as it is too big for small screen
sizes.
Force tooltip content font style (size, family, line-height, weight)
so that it does not depend on where the tooltip is in the DOM.
This fixes a problem where the style changed when opening/closing the
tooltip. Indeed, the content dimensions, computed in javascript when
the tooltip is closed were wrong because of the style and the opening
/ closing rely on these values.
Tour blog ended with forcing the user to click on a fake element. So
the end of tour blog and banner had to be changed.
Also, the tour step could appear in edit mode which is not what we
wanted.
A tour step mentionned the "features" block and selected the nth
snippet. The problem is that the nth snippet is not the features
block for every theme.
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.
This is a temporary workaround, which probably deserves
further thinking by @ged-odo, as the root cause
stems from commit 96bf5b2656
The problem is that the list view looked for composite group_by
keys such as "create_date:month" within `fields_get`, which
only contains true fields.
When there is no `color` field on the model
e.g. On invoice line taxes
The color class to apply on the badge was set to
`o_tag_color_undefined`
which doesn't exist. It must be set
from `o_tag_color_0` to `o_tag_color_10`
in order have a color.
Because of this, the taxes in the invoices lines
were not visible, because they were written in white
on a white background.
This has been broken by the below revision:
fe66472e2c
removing the or statement (`||`) to set a default
color for models not having a `color` field.
We choose to set `10` as default value, so the color
remains the same compared to the previous release
(light grey). However, if the new behavior chosen
by the usability is to have these in black, it should then
be changed to `0` again.
This filter must be added in the regular searchview,
and not have his own search view.
Without this:
- view_sales_order_filter_ecommerce is a not search view
for the sale orders, having the same priority than the regular one,
and therefore this view can be loaded by default for other menus
(In this case, this was for the menu Website Admin > Orders).
e.g. Clicking on the `Sales` stat button on a contact no longer
filtered the orders of this contact, but displayed all the orders,
because it was this view which was loaded instead of the regular one.
- In Website Admin > Orders, it was simply not possible to type a string
and search for it in the search bar.
A string attribute value can be translated,
and therefore the inherit broken if the term is indeed
translated.
This was the case for this term "Tracked link" in the Dutch
language, the "Tracked link" term of the inherited view has
been translated, and the inherit was therefore broken as
it couldn't find the given node in the base view due to the
fact this term was translated.
opw-683128
When the schema of a view change (e.g. drop of column), the "CREATE OR REPLACE"
will not be enough and dropping the view is required.
Fixes#12754Closes#12756
When making an advance payment in percent, the function onchange_advance_payment_method
set the Down Payment Product to False. Then each time an advanced payment in percent
was made, a new down payment product was created and set in sale.config.setting in the field
deposit_product_id_setting.
Now the function onchange_advance_payment_method let the Down Payment Product
even if the payment method is in percent.
opw:683167
During module update, we should only consider views of already
loaded modules. This filter is done by searching on xmlids of views.
We should also search for explicit view ids (current module is not yet
marked as loaded)
However, by doing this `OR` condition, the generated query is not
optimal and forbid postgresql to use the composite index
`ir_model_data_model_res_id_index` on `ir_model_data` table.
This is a performance issue for databases with a lot of ir_model_data rows.
Use 2 quicker search() to avoid this problem.
This only affect the module update. Normal view loading is unchanged.
Odoo S.A. invoices only 'non-share' (internal) users; the default
filter on the user list view does the same thing. It makes little
sense for the user counter to count all share users.
Now that the debug URL parameter can be equal to "assets", the session
debug variable has to be updated to not only be true or false. Now, its
value is false if the debug parameter is not specified in the url and
a the URL parameter string value otherwise (or 1 if the value is an
empty string).
Also modify all redirection which kept the debug mode to also keep
=assets. Use the $.param.querystring function.
* switch application flag between `hr_timesheet_sheet` and `hr_timesheet`
* renamed `hr_timesheet` application name from "time tracking" to "timesheets"
* move the icon from `hr_timesheet_sheet` to `hr_timesheet`
* removed unused icon from `hr_timesheet`
* renamed `hr_timesheet_sheet` application name from "timesheets" to "timesheets / attendances"
Return key events don't get redispatched and even if they did, it
wouldn't work because 'fake' keypress events don't trigger native HTML
event handlers.
This should be safe because Return cannot start a valid barcode.
We hide the quants_grp if the stock.move is in the draft state. In this
case normally the value of the string_availability_info will be empty
anyway, because the _get_string_qty_information function skips moves in
the draft state.
This is especially useful on small displays, because on there the string
attribute of the field won't be shown, so you just end up with a
Reserved heading with nothing underneath it.
If two addons path have a common part in the folder name (e.g. `/home/alice/dev`
and `/home/alice/devodoo`), the `get_module_from_path` method may match the
wrong folder.
A file `/home/alice/devodoo/bob/models.py` would wrongly match `/home/alice/dev`
path (due to the lack of separator) and the returned module would be `odoo`
(`"odoo/bob/models.py".split('/')[0]`).
In such scenario, the translations of files (code, static folder, report) would
not be included in the exported translation file.
Force the module path to ends with a folder separator to avoid wrong matching.
Closes#12757
When launching a server with two similar addons path, e.g.:
- /home/alice/dev
- /home/alice/devodoo
launching the server in dev mode may crash due to the poor matching using
`path.startswith(...)` method which may make `/home/alice/devodoo/bob/main.xml`
match in addons folder `/home/alice/dev` and with a non-exitant local path
`odoo/bob/main.xml`.
Instead of relying on the name, use the `os.path.commonprefix()` method to match
on real paths and avoid partial matching.
commonprefix will only work if the folder name ends with the appropriate
separator (which is not guarantee for a user provided addons-path) so force a
trailing `/` using os.path.join(..., '')`.
Closes#12359
Before this rev., the debug manager's state was only updated when pushing a new
action but not when coming back to a previous action using the breadcrumbs.
So when the latter case happened, the debug manager was desynchronized with the
action manager and it allowed to edit an action that wasn't the current action.