Before this commit, when the fiscal year was setting to 29/02.
The function that compute the fiscal year dates gives an error.
This occurs when the date passed as parameter wasn't a leap year.
Now, for the non leap years we use the 28/02.
opw-1917035
closesodoo/odoo#29932
As of saas-11.3 there is a "Attach document" widget that is meant to
more easily add attachment.
But on firefox the click event is coming from the button, where on other
browsers it was possibly from a child element.
So the code expecting the child element did not work on firefox.
opw-1920842
closes#29903
The method `read()` may be very slow when reading relational fields and
computed fields, because the computed fields can be computed on a recordset
that is larger than expected.
The issue occurs on model 'res.partner' when reading fields 'child_ids' and
'purchase_order_count', for instance. Suppose we read those two fields on a
partner with 1000 contacts. First, the one2many field is read from the
database and stored to the cache; the latter adds the value ids to the
prefetching of 'res.partner'. Then, the fields are fetched from the cache.
When 'purchase_order_count' is accessed on the partner, the field is computed
on all its children as well...
closesodoo/odoo#29867
opw-1920590
Before this commit, the function prepare_backend_url forced in the url
the view_type 'form'. This occurs because a misunderstand between the
fields ir.actions.act_window.view_type (That indicate if an hierarchy
in the view list exists, with as possible values : form and tree, which
can be mistaken as views types) and ir.actions.act_window.view_mode
(which is a list of allowed views).
Now, if not ask otherwise, the function give the url of the first
(the default) allowed view; or one of the allowed view if asked for it.
closesodoo/odoo#29882
Most operations on X2Many widget possibly propagates a field context
(name_create, name_search, ...) but the original read or read on an
onchange does not.
With this changeset, the field context is also used in these instances.
The assertions added in the added test failed with:
expected: ["world"], result: [undefined]
expected: ["world","world"], result: [undefined,undefined]
fixes#29203
opw-1914466
closes#29866
- Go to 'Project'
- Group by 'Manager'
- Click on the rating
A traceback occurs.
This is because the grouping field `user_id` does not exist in the
target model.
Fixes#26060
opw-1920979
closesodoo/odoo#29900
Instead of checking the size of text only node, let the xml_translate verify it.
The size verification using etree was introduced at 40efdccc3d but was
probably too simple.
Since 45352512a8, this becomes redundant with the nonspace method which can
be extended.
The re.sub is still relevant as some terms may contain only non-alphanumeric and
use push_translation (e.g. '>=' as a selection or xml terms extracted by babel
in static repository)
closesodoo/odoo#29432
When loading a partner form view, the ORM prefetches the computed fields
purchase_order_count and supplier_invoice_count for all the related
partners as well (parent, children, ..).
Instead of reading the orders and invoices once per partner, we group
them all together.
opw 1919933
closesodoo/odoo#29788
Commit a07a076c45 restricts the prefetching to
`self` when accessing the fields to return. This is too restrictive, as it
cancels prefetching of secondary records in computed fields. In this commit we
limit the scope of the restriction to `self`'s model only; this fixes the
original issue without impacting other models.
closesodoo/odoo#30133
Task #1923443
Purpose
=======
The slides on the website showed the 'download' button regardless of the value of the 'download_security' field.
If the value is 'none', meaning that the slides are never downloadable, the button should be hidden.
closes#29904closesodoo/odoo#30051
Using read_group outside of the loop make the sum computation in
PostgreSQL instead of Python, and avoid the ORM to fetch fields of
records to compute a sum of one field.
closesodoo/odoo#29825
In multicompany,
Have company B with a different currency than company A
With a shared product catalog
Open the inventory valuation report for company B
Before this commit the stock Value is expressed in company A's currency,
even though the value itself is correct
After this commit, the stock value is expressed in the right currency
OPW 1912511
closesodoo/odoo#30242
When displaying a video, with the browser window at a certain size, or
resizing it (or opening developer tools) we could the following error:
"ResizeObserver loop limit exceeded"
This can be reproduced in chromium just with this JS code:
window.onerror = function(e){ console.log(e); };
document.body.innerHTML = '<div><video controls src="v.webm"/>';
The issue only happen if:
- the video server does not support HTTP range requests
- the controls are displayed on the video
- browser size is in problematic size/resized to problematic size
And the error is raised in window.onerror but not displayed in the
developer console.
With this change, we ignore these errors until fixed in chromium.
chromium bug tracker: https://crbug.com/809574
opw-1928512
closes#30239
Task #1910927
Purpose
=======
When confirming a sale order with event tickets, a modal is supposed to be shown to be able to
confirm the event registration.
That modal was not shown anymore.
To solve it, we split the '_action_confirm' to run the actual business of the event_sale module,
which is '_update_registrations', and moved the action returned in the regular 'action_confirm' method.
closesodoo/odoo#29997
- Fix the position of 'Add to menu' toggle button in new page dialog
- Properly align tip icon in the welcome message
task-1895287
closesodoo/odoo#29403
- The method `_get_available_payment_input` that returns the available
payments acquirers and the payments tokens for a specific user never
returns the payments tokens linked to a non s2s payment acquirers.
This is wrong, the payments tokens should always appears no matter
what are the acquirers' payment flow.
The payment flow is used only to specify where the customer should
input his credit cards details, either on Odoo or on the payment
acquirer's website (or popup).
Once a token is created, it is safe to process it since no credits cards
details are stored on the Odoo database.
closesodoo/odoo#30258
Display a BoM.
On BoM lines, there is an attachment feature that creates a mrp.document,
which is basically a container for an attachment.
This commit fixes the view which displayed 'no attachment' when there were some
and vice versa.
It also fixes the computation of the number of attachment: the displayed view is
on mrp.document, but the computation is done on ir.attachment.
As a result if there are other unrelated attachments (such as digital files)
they would be counted but not displayed.
opw 1923441
closesodoo/odoo#30208