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.
The onchange should have the signature with `ids` instead of `id` for a proper
guess.
Without this, the method can not be overriden with an api.multi (the return
result is a list of dictionnary which is not understood by the ORM as a proper
return format).
Fixes#12856
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.
When the webclient calls do_action from the app_switcher, it toggles it when
the returned deferred is resolved.
The logout client action didn't return anything, so when logging out from the
app switcher, the webclient directly toggled the app_switcher and displayed
the last opened action if any, and a gray screen otherwise.
This commit makes the client action return a deferred which is never resolved,
so the app_switcher isn't toggled when logging out.
The code for page creation from menu edition dialog was there but
invisible to the user because of a wrong qweb template inheritance.
Indeed, the edit menu dialog relies on an extension of the link dialog
template. But this one is extended in-place in another location and
that extension is not considered when the second extension is made
because a t-extend always use the base template. The only solution to
achieve the same result is to copy the edit menu dialog qweb extension
in Javascript.
Note: the feature was still available from the link dialog in page
edition though because this was not concerned by the wrong qweb
extension.
However, adding a page by this way would create multiple pages because
one was created each time a page name was entered (and not only on
save !). So typing "test", then changing its mind and typing "hello",
then rechanging to "test", then hitting the save button created the
"test, "test-1", "test-2" and "hello" pages.
This fix takes advantage of an already present parameter which can
determine if a new page should be created or not. However, a code
refactoring should be done in master for these classes.
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 error was only appearing in case 'writeoff_currency' != 'company_currency' which, here was achieved by having a secondary currency on the reconciled account. As the manual reconciliation wizard is doing a two-step reconciliation to make sure to balance all the secondary currencies, we must check the context to detect its special key and avoid giving an amount_currency that would interfer.
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.
Commit c21568e14f deactivated the sanitization of frontend html fields so
that their modification through the editor worked again. However,
this broke the possibility to display their traduction and to modify
them.
The problem is that the translate option of html fields should not
equal "True" but instead be the html_translate function defined in
openerp.tool.translate. The translate=True option is automatically
change in html_translate though but there is a condition: the field
should be sanitized, which is why this broke since the sanitization
is disabled.
This commit sets the translate option of non-sanitized html fields
to html_translate. Maybe we should investigate for this to be automatic
for non-sanitized html fields as well.
Thanks to @rco-odoo.
Currently no access button is displayed if the email is a discussion and has
no contextual actions like creating a new document, or setting the responsible
of the document. However it leads to emails being sent without access button.
This can be extremely frustrating and make the notification email quite
impossible to use efficiently.
With this commit when an user has access to a document the link to the document
is always displayed in the notification email.
get_formview_action and get_formview_id are methods used notably in a
redirection called from a mail controller used in notification emails.
Those methods however are defined as cr, uid, id and are interpreted
as api.one when called by a new-api style method.
With modules being converted into the new API, those methods are called
as api.one and the result is encapsulated into a list.
To avoid having to take the first element of the returned list we decided
to simplify the call chain and migrate the methods as multi methods, using
ids instead of id. Various addons have been updated accordingly. A temporary
support of ids being an int / long has been added to avoid conflict with calls
using id (for example if javascript is not updated).
Since users cannot set it manually to readonly=False in the settings or in the view, thatt's the only way to allow them to import invoices and their corresponding accounting entries.
Since commit 3d48f2a375, each statement line creates a payment entry if it creates a move. So the code to cancel a statement line must be adapted to keep the old behavior: remove the payment if it was created by the statement line processing; keep the payment if it was registered before the statement line.
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.
When website_quote is installed, the Terms and Conditions of the quote
template should replace the Terms and Conditions of the company.
But if T&C of the company is not filled, it will keep the note written.
opw:683543
Backported to 8.0 following report at #12648
[FIX] base: use datetime instead of date
The variable `date` is compared to the field `name` in the selection
query. `name` is filled in with datetime data. In particular, in the
module currency_rate_live, datetime.now() is used in the name. It is
necessary to make an appropriate comparison to make sure we select the
updated rate right away.
Fixes#12648
An yml import is instantiated in old api style, with old api self and
registry. As there are no more api.v7 method in report, rewriting the
yml test in python will make the test valid
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.
* Remove double scrollbar which appeared on chrome
* Remove strange whitespace on top of the preview due to the removal
of the odoo navbar (the code was wrongly adapted)
The fith arguemnt of the search method in count in new API.
Passing all arguments as positional arguments will make the context passed for
the value of the `count` argument.
bbc67ec is a similar fix in 9.0
Closes#12830
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 sale orders, the timesheets stat button should display the number of related timesheets.
0b55f2ee6d changed the computation system to have the number of timesheets
instead of the total time for several reasons, but used a domain which also includes expenses.
This commit changes the domain to make sure that the stat button only displays the number of timesheets,
and that the action leads to a list view of timesheets only.
Since version 6.1 the functions set and get on ir.values are deprecated.
The overwrite of the function get on "ir.values" didn't set the context
at the right argument.
opw:682883
We determine the mime types of the files we server
automatically + manually, and browsers should not
try to second-guess it.
Browser mime-guessing is there for the myriads of
badly configured web servers out there.
Tours can now be launched flawlessly thanks to the run method of the
tour service.
In a tour definition, here what you might have to do to make it
functionnal in auto mode:
* If actions are required between two steps of an onboarding tour:
* If the actions have to wait for elements to appear on the screen,
define new tour steps with no content and add the "auto" key
and set it to "true".
* If the actions concern elements which are already on the screen,
you can use the "run" key in a step to make the tour faster to
execute actions after the step.
The "run" key may take several values:
* A string with the values "click", "text" or "drag_and_drop". By
default, you will not have to specify "click" for normal elements
or "text" for form elements as they are the default values for
those. Note: the "text" value can be followed by the text to enter
(default to "Test") and the "drag_and_drop" value can be followed
by a jQuery selector to specify where to drop the element (default
to the body element).
* A function which takes an "actions" parameter. This allowed to do
anything but here are common uses in the run definition :
* a call to "actions.auto()" will do the default action on the
step element (click on normal element and add text on form
elements).
* a call to "actions.auto(element)" will do the default action on
the given element. Note: this.$anchor is a reference to the
step jQuery element.
* a call to "actions.text([text], [element])" will add the optional
text (default to "Test") to the optional given element (default
to the step element).
* a call to "actions.click([element])" will click on the optional
given element (default to the step element).
* a call to "actions.drag_and_drop([to], [element])" will drag and
drop the optional given element (default to the step element) in
the optional given "to" element (default to the body element).
Note 1: all the "element" parameters can be given as a jQuery selector,
a DOM node or a jQuery element.
Note 2: the run method is designed to do actions on elements which are
already on the screen. If this is not the case for some of them,
consider using an "auto: true" step as explained above.
Note 3: "auto: true" steps can also contain a run definition.
When defining a tour, you can also add predefined steps (auto or not).
These are defined in the object STEPS of the tour service object. These
include opening the "More" menu if any in community before clicking on
an app, opening the appswitcher in enterprise, ...
The full list is accessible in the tour_manager.js file.