lxml.html.clean module we are using to sanitize html takes either a
tree/element or string, and return us an element of the same type.
We are passing it an unicode string, and it gives us back an unicode
string and if it is possible convert entities to utf-8.
This lead to an issue in html inline fields containing an ` `
entity, the entity was converted by the sanitizer to its unicode
character (U+00A0).
Then, when the field value is loaded to be displayed, the internal
value contains U+00A0 characters, but when it is inserted in the page
the browser converts them to ` `. Hence in this instance, the
internal value is never equal to the displayed value and a write is
always triggered even without editing.
This commit simple modify the sanitizer so value saved in database
contain ` `.
closes#14569
opw-689274
- adds position before to COP currency in res_currency_data
- adds address_format to Colombia in res_country_data
- CLA signature for kurkop
Closes#10618
When creating a mail.mail without giving a mail_message_id, a new mail.message
is created. It does then through _notify that notifies people of the message
creation. This leads to mail being sent two times, one when sending the
mail.mail, one when sending the notification.
This commits fixes that behavior. When creating directly a mail.mail without
giving a mail.message, call to _notify is bypassed. This way either an email
is created, either a message that has to be notified is created, but not both.
When Odoo sends emails their Message-Ids are either generated by Odoo or
use the original Message-Id in the case of an incoming email going through
the mail gateway.
When the mailgateway handles replies to those emails it checks their
References or In-Reply-To in order to find matching Message-Ids and find
the reply's parent. Currently it is limited to Message-Ids matching the Odoo
pattern. However if an external email began a discussion thread, references
will not hold any odoo-like pattern.
Previously to commit 0028c42136 this was hidden due to a bug when
managing private messages. This code was also managing replies to external
emails due to a probably undesired side effect.
Correct way of checking if an incoming email is a reply to a thread is to
check that References or In-Reply-To Message-Ids match some stored Message-Ids
of mail.message. They don't have to match Odoo patterN
When clicking on button "invoices" in a SO, the invoice linked
was opened without the action in url. So when refreshing the browser,
a supplier invoice was displayed instaed of a customer invoice.
opw:695844
- Create a new assets
- Set a any gross value, any number of depreciation, and any number of
months in period
- Set "Prorata temporis" to True!
- Save, then confirm the asset
- Post at least one of the line by clicking on the red bubble next to it
- Click on "Modify Depreciation" and choose another number of month
- Click on "modify" to confirm the modifications
The depreciation of the latest posted month is duplicated. However, the
first unposted depreciation should be the first period after the last
posted period, as it is the case for non prorata temporis assets.
opw-693081
In the reconciliation widget, create a counterpart line. No domain is
applied on the "Account" field regarding the company, meaning that we
can select an account from any company.
opw-694149
session.context no longer exists, it is session.user_context
Add the missing context in the message_fetch call. The dates in the chatter were
not formatted according the user locale.
The tacked messages in the chatter were parially translated.
e.g. "Lead created"
The call did not gave the user context and the subtype message was not
translated.
Closes#14589
- Create a project which handles Tasks and Issues
- Create an issue
- Book some timesheet on the issue, thanks to the tab "Timesheet"
- Go to the Timesheet application, you'll see that the time booked
appears in the grid
- Change the time spent from the grid view.
The time added is booked on the issue, while the user doesn't expect it.
This is because the modification of a timesheet line copies an existing
line, then change the necessary values (see method `adjust_grid`).
Ideally, we should have a link module between timesheet grid and project
issue. Another solution would be some hack in the `timesheet_grid`
module to prevent `issue_id` to be copied. However, there is little to
no use of copying a timesheet line in general, so the solution chosen
should not affect the existing processes.
opw-697018
Variable `membership_line_ids` was misspelled `membership_lines_ids`
Thus the list of partner returned has extra partners not filtered by search domain
Closes#13768
In chat window, a chatter and discuss, the text zone appear as a pure
text zone but is transformed later on in HTML to add mentions links and
possibly other features.
Thus, when we wrote multiple spaces or a space at the next to html tag,
with how html worked they were collpased into one (or zero).
To keep them, we need to wrap the content with `<pre />` tag or replace
spaces with ` `.
closes#14593
opw-695535
- Create a MO for 500 Units
- Produce 500 Units
- In the "Finished Products" tab, change the produced quantity to 450
At that point, the button "Mark As Done" doesn't appear anymore.
Therefore, we need to change the "Quantity To Produce" to 450 => This
causes a traceback because of a division by zero.
Fixes#14499
opw-695269
For the field "tax_ids", a command must be written in the the returned dictionary.
In this way, the ids of the tax will be set on the account move line.
opw:689806
When clicking on the delivery order linked to the SO with a portal user,
a access right error was raised.
1. Due to this record rule: res_partner: portal/public: read access on my commercial
The portal user cannot read the fields of the partner linked to the warehouse of the picking.
The unreadable fields were in external_layout_footer.
2. The portal user is not allowed to read the field barcode on a product.
opw:693238
Complements rev. 8a7af44a07
The assets cache is only active while not in "xml dev" mode,
so the cache clearing must not be done while this development
mode is active (i.e. with `--dev=xml`)
When using a many2one widget, in the following scenario:
<h2><span t-field="o.partner_id.parent_id.country_id"/></h2>
If 'parent_id' is an empty recordset, the following error will be
raised:
[...]
[read] = record.read([field_name])
ValueError: need more than 0 values to unpack
This is because record.read([field_name]) returns an empty list which
cannot be unpacked.
In version 10 this problem is avoided by using recordset but to keep the diff
minmal in v9, only returns empty string as the line below does
`if not read[field_name]: return ''`
Closes#14489
When a newly-spawned worker detects a stale asset bundle
(due to its empty cache), it regenerates the new bundles,
but has to notify other workers, who would otherwise continue
serving the old list of bundles. This typically leads to
some missing bundles (served as empty files with 404 status),
that could only be cured by restarting the whole server.
Forcing the cache invalidation on the worker that notices
the staleness has no effect (the cache was empty) except
that it causes a cache refresh signal to be broadcast to
all workers.
QWeb's get_template:
* remove the fallback that returned the entire result of IRQweb's
`load` if no match was made between the t-name of the first children
of this result and the template to render
* When get_template receives an etree, directly return it and don't
try to find a matching t-name in it. The loader was not called but
a matching was trying to be made, now that we removed the fallback
a lot of tests that were relying on passing etree didn't work
anymore.
IRQweb's load now return consistently the full result of IrUiView's
`read_templace` when asked to load an id or an xmlid. We make a special
case to patch the result if asked with an id or with a child view so
that the "t-name" of one of the first children of what we return is
always what QWeb is looking for.