Commit 4326d864 removes the inverse function of the `date_planned`. This
is necessary to avoid unexpected changes of the scheduled dates.
However, this removes the ability to set the scheduled dates of all
lines at once.
This commit introduces back the functionality thanks to a new button.
This way, the functionality remains without unexpected behavior.
This commit fixes a bug introduced by the forward port 1fca5e01cb.
In saas-11, the commit f970906c9e introduced the 'assets' value
for the debug mode, to active the assets splitting. To do that, the
commit had to stop the conversion to a boolean of the debug value
(initially introduced by commit 522dec2fcd).
The problem is that the forward port mentionned above did not resolve
correctly the conflict for the commit 3455daf948, reintroducing the
boolean conversion.
A misleading behavior occurs with the recomputation of scheduled date.
Here is the use case:
- Create a PO with 2 products
- For the product 1, set the scheduled date to today + 7 days
- For the product 2, set the scheduled date to today + 14 days
When saving, the scheduled date of product 2 is reset to today + 7 days.
This is of course unexpected, but moreover, a different behavior can
happen depending on how the scheduled dates are modified. In the
previous case (both products have now the same scheduled date), one can
observe 2 situations.
Case 1.
For the product 2, set the scheduled date to today + 14 days and save.
In this case, the scheduled date of product 2 is not reset.
Case 2.
- For the product 1, set the scheduled date to today + 8 days
- For the product 2, set the scheduled date to today + 14 days
In this case, the scheduled date of product 2 is reset to today + 8 days
when saving
The reason of a different behavior in the 2 situations is that the
scheduled date of the PO is changed in case 2 and not in case 1. Since
the scheduled date of the PO is changed, it triggers the inverse
function `_inverse_date_planned`.
When saving, it is not possible to know whether the scheduled date of
the PO was changed on purpose by the user or recomputed. There are 2
solutions to get a consistent behavior:
- Force the scheduled date of each line to be the same than the
scheduled date of the PO. However, this makes the scheduled date of
the line useless.
- Do not change the scheduled date of the lines when the schedued date
of the PO is changed. However, this removes the ability to reset
automatically the scheduled date of the all lines at once.
This is the second solution which is chosen with this commit.
opw-682934
opw-684063
Closes#12904
The accounting item generated from a PoS order does not contain the
related taxes. Although the accounting entry is globally correct since
the tax line is created manually, the tax should still be written on the
accounting item for reporting purpose.
Note that this is already the behavior when the accounting entry is
generated directly from an invoice.
Fixes#10855
Similarly to werkzeug.urls.url_fix(), attempt to
correct some leftover special characters that
should have been URL-encoded.
We cannot actually use `werkzeug.urls.url_fix` or
`werkzeug.urls.url_quote`, as they expect more/most
characters to be un-encoded.
We have many existing cases where the redirect URL is
already fully encoded or mostly encoded, and those
functions would cause double-encoding, breaking the
final URL.
Similarly to werkzeug.urls.url_fix(), attempt to
correct some leftover special characters that
should have been URL-encoded.
We cannot actually use `werkzeug.urls.url_fix` or
`werkzeug.urls.url_quote`, as they expect more/most
characters to be un-encoded.
We have many existing cases where the redirect URL is
already fully encoded or mostly encoded, and those
functions would cause double-encoding, breaking the
final URL.
"total_invoiced" must only take customer invoices into account because
when you click on the button "invoiced" in the partner view form
you just see the customer invoices.
Adaptation for 8.0 of 9.0 fix made at 37569695Closes#12044
The pricelist report might show price incorrectly rounded. For example,
a calculated price of 20.625 will be displayed as 20.62 in the report
since `formatLang` does not apply a rounding but simply truncate the
value.
Fixes#12875
Rectify name conflict in tax templates between NZ and AU chart of
accounts. Otherwise, it's impossible to install both charts of accounts
at the same time.
Fixes#12600Closes#12758
The name field is the name of the product.template while the display_name will
contains the variant description and product code to allow to identitfy which
product.product is moved.
Closes#11311
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 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.
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.
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.
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
* 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
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