For uploaded modules (e.g. saas), uploaded assets are stored in
attachments.
When the asset content is retrieved, static "filesystem" files are
assumed to be UTF8 and properly decoded, but attachment data is not
and is thus interpreted as ASCII further down the line, leading to a
UnicodeDecodeError (and a broken page/template/...) if the asset data
is not actually ASCII (e.g. if it's UTF-8).
Fix by treating attachment assets as UTF8 encoded, same as filesystem
assets.
OPW-752858
It was possible to set a payable account for an expense.
So it raised a UserError when reconciling the lines in
function expense_post_payment because two different accounts
were used as payable account.
A expense account is expected as account for an expense.
opw:752695
When trying to close a POS session (which confirms the bank statements
which reconciles the statement lines) if one of the statement lines
has an amount of 0 no payment object is
created (addons/account/models/account_bank_statement.py:905) and thus
``payment`` remains set to ``False``. In the past this was not an
issue but since b17e4a0f6b at the end of
the method (line addons/account/models/account_bank_statement.py:1003)
we unconditionally write to ``payment`` which blows up when it's
``False`` rather than a recordset.
This can happen if e.g. a POS order is composed only of free
products (don't ask...)
Fix by using an empty recordset instead of a boolean for a
non-payment, making payment.write a no-op.
OPW-752922
On online quotations, a left menu is automatically generated on page
load by searching for the <h1/> and <h2/> elements in the page. This
also considered the empty ones which do not make sense and were
breaking the menu's layout. Ideally, there should not be any empty
title in the page.
opw-752764
In case a default value is set for the field `mass_mailing_name` of the
mail composer, the automatic messages sent via message_post_with_* are
considered as a mass mailing. It may also create an AccessError if the
current user is not a mass mailing user.
In the case of the "assign user" email (for auto-subscribed users), the
url wasn't shorten, which resulted in invalid links (opw-752941) (fixed
by 3228694bdd)
When an employee submits an expense, no mail is sent to the manager.
This should be the case, since it works this way on holidays.
The trick, however, is that the expense is created as submitted, but the
followers are only added afterwards. We need to make sure to add the
followers at creation.
opw-751085
Steps to reproduce:
1.Create pos order with two products.
2.One of the products, must be type="Stockable Product" and quantity=0.
3.Pay order.
4.Check order --> extra info --> picking
Bug:
picking state = Waiting Availability
In 9.0, the picking state is equal to "Done".
Fixes#18089
opw:751565
When unlinking payment terms, the ir.property records linked to
the fields "property_payment_term_id" and "property_supplier_payment_term_id"
were not deleted.
opw:749459
The accounting date is an hidden field, which is by default the invoice
date. However, a user can make it available in the interface, and modify
it.
When the accounting date is different from the invoice date, we must
make sure to make the accounting date prevail when it comes to currency
conversion. Otherwise, the account move created will use a currency
exchange rate which is not in line with its date.
opw-751848
The field `acquirer_reference` is not a mandatory field. If not
retrieved from the provider, it will have a NULL value in the DB, and
therefore will be `False` in Python.
The `capture` and `void` method will crash in this case, because of:
`etree.SubElement(tx, "refTransId").text = transaction_id`
opw-751231
- Set the currency precision to 0.05
- Print any QWeb report displaying amounts, e.g. the GL
The amounts are displayed with 1 digit precision instead of 2.
The formula used to compute the decimal places is actually wrong. The
correct one can be found in method `_decimal_places`. Anyway, we can use
directly the field.
opw-752283
Previously, the calendar view only shown a 1h item whatever the duration of the
maintenance, which was wrong every time the maintenance took more or less than
exactly one hour.
Adding this parameter allows showing a calendar view reflecting the real time
taken by the maintenance operation.
Closes#18072