Before this commit, something strange could happen after reloading a
settings form view: all 'sections' were displayed. The issue was caused
by the fact that the state of the view was read from the arch of the
form view at render time. Also, as a form of optimization (I suppose), the
settings did not call the initModules method twice, when it rerenders.
This is unfortunate, because the very same method is actually
responsible for removing unused sections.
This fix is the safe fix, but definitely not the perfect fix (this would
involve a larger change, something like reading the state from the arch once in
the view (factory), then only rendering what is necessary).
In the discuss composer on google chrome, when when the smileys have
more width than available, they stayed on one line and would increase
page size (adding an horizontal scrollbar).
This happened really easily in saas-11.3 because we have more smileys,
but still happened in 11.0 depending on the screen size.
opw-1861191
closes#25507
Co-authored-by: qsm-odoo <qsm@odoo.com>
When computing a salary sheet, a maximum recursion error could happen if there
is a cycle in the rules or in the categories.
Add constrains for salary rules and categories.
Closes#25405
Application of a fix more specific to the problem of the contact widget
which can not serialize the dictionary because it contains the values of
the context of which browse record. (because contact try to
json.dumps options for multi-edition feature in web_editor)
opw-1859848
https://github.com/odoo/odoo/commit/ab85e9594651fd33ffd2747f4d3c5b360e7c7922
Steps to reproduce the bug:
- Create a product P with routes MTO and BUY
- Set a vendor V on this product
- Create a BOM B with P
- Create a MO M with B
- A RFQ is created with M as origin
- Create a purchase requisition PR with vendor V
- Set PR as purchase agreement on the RFQ
Bug:
- The field origin with M was erased by the name of PR
- The field partner_ref was erased by the name of PR
The fix is inspired by: c914df5a36
opw:1860430
In b446930dc there has been a number of changes in report to improve
performances.
In one of these change, printing several documents with result such as:
```
<div class="article"><h1><span data-oe-model="mymodel" data-oe-id="1" data-oe-field="myfield" /></h1></div>
<div class="article"><h1><span data-oe-model="mymodel" data-oe-id="3" data-oe-field="myfield" /></h1></div>
```
The system will know it is rendering 2 mymodel records (with IDs: 1, 3)
and will try from the document to determines what part (called
"outlines") of the PDF corresponds to these IDs.
This is done by splitting the document over semantical delimitations
such as h1, h2, *.
If all is fine: each part of the PDF will be saved for each record, so
if we print records 1 and 3 they will be saved separately and will be
possibly used as is the next time they are to be printed.
But in the instance of printing a report which has:
- field that are displayed,
- several records printed at the same time,
- save and getting document back from attachment enabled,
- no h1 or other semantic delimitation
The matching of part of PDF and outlines can't be done since there is no
outlines, this was not expected by the code and caused an error.
With this change, if there is no outline each part of the PDF will not
be saved as attachment.
opw-1856469
closes#25496
Steps to reproduce the bug:
- Go to Odoo on Safari browser
- Go to CRM > Operations > Manufacturing orders
- Select a MO and log a note on it with a video attachment
- Try to watch the video
Bug: it's not possible to watch the video
HTTP servers hosting media files for iOS must support byte-range requests, which iOS
uses to perform random access in media playback. (Byte-range support is also
known as content-range or partial-range support.)
Odoo server doesn't support partial requests with accept-ranges
opw:1857873
in edit_dialog added 'default_type': 'opportunity' to context.
There was a bug in specific workflows of creating a new Opportunity resulting in the Opportunity saved as a Lead.
Infected workflow:
a) Create a opportunity from the Kanban view
b) Click in create and edit
c) Save the opp
d) from this opp create a new opp by clicking on create
The second Opportunity will be saved as a Lead
related to task #1857855
When a PO is confirmed, cancelled, set back to draft and confirmed
again, the push rules don't apply because the PO lines have
move_dest_ids. So we remove those move_dest_ids from PO lines, to allow
push rules to be applied on the newly confirmed PO.
OPW-1859363
Usecase to reproduce:
- Create 2 sequence for PO(one for each company)
- Create a product with dropshipping
- Connect on the demo user with an active company different than the
admin company
- Create a SO for this product
It will create a PO with the admin's company sequence.
It happens because _run_buy use a sudo since SO user don't always
have the purchase and inventory rights. However the company is not
forced and thus the used company for sequence is the admin company.
opw-1860802
Usecase to reproduce:
- Update quantity in stock with a product inside a package
- Reserve a picking with this package.
- Go on the package form view and unpack it.
The package does not exist anymore on the quant, the reserved move line
still having the package as source package.
When the user try to unreserve the move lines, it will try to unrerserve
a quant with this package that does not exist anymore and then return
the error message 'can not unreserve more than you have in stock'.
This commit removes the source package on move lines that contain the
unpacked pack.
Due to commit 74737865d5 when a user
with demo data try to update stock it will return the location
constraint because the demo data try to update the supplier location
with the usage supplier. However there is no check if the usage is
really modify or just in values.
This commit add a check in order to only select locations with a new
usage or that effectively change the 'scrap location' switch.
The `/groups` route display mail.channel and allow:
- a public user to subscribe specifying a mail address
- a logged in user to subscribe/unsubscribe itself
The `/groups?unsubscribe` route is the same but only allow:
- a public user to unsubscribe specifying a mail address
- a logged in user to unsubscribe itself
When a user is logged in, there is the oddity that all mail.channel
appear as to "unsubscribe" even if the user is not subscribed.
With this commit, the unsubscribe is shown only if user is subscribed.
opw-1861208
closes#25439
Remove fr_BE translation file
This file contains a duplicated translation for "Stages of Notes"
Moreover the fr_BE.po file is supposed to contains only translation that are
specific for French from Belgium and different than "standard" French
Bug revealed at cb00803473
Commit: https://github.com/odoo/odoo/commit/83a4374
Introduced a parameter force_assignation to choose to overwrite the salesman
when converting a lead to an opportunity.
However the field had never been made visible in the wizard view.
opw 1859447
The commitment date is computed using every line from the sale order.
When the picking policy is set to direct, it takes the earliest date
among the sums of the order date and lead time.
However when the delivery is set, is adds a line with an order date of 'now' and
no lead time.
This date thus necessarily becomes the commitment date, bypassing what was
intended by setting a lead times on products.
We simply ignore delivery lines in this computation.
opw 1855646
Make sure to test `None` instead of any falsy value. Indeed, when we
want to explicitly pass a `False` default value, `set_multi` might
select an incorrect default value.
This is for example the case of `_inverse_product_pricelist`, where
`default_for_country` might be `False` on purpose.
opw-1858271
When reassigning the company from the destination partner, most users
don't have enough rights to update companies on partners with registered
users; hence the sudo call.
Before, when we created a picking manually with MTO+buy products,
put a scheduled date in the future and did "mark as todo", the
date on the po was related to now instead of that schedule date.
The scheduled date of the picking was passed to the date_expected
of the move, but not to the date of the move, which was passed to
the date_planned of the created procurement. By passing the
date_expected instead of the date of the stock_move to the
date_planned of the procurement, the po will have dates in function
of the scheduled date of the picking.
Courtesy of chienandalu. Closes#25223
On a sale order, when adding a line with an expensable product with a
reinvoice policy, on the linked invoiced validation, the analytic entries
are created. During this creation, the line will be reinvoiced, so a second
SO line will appears with the same product.
This should not happen, as the SO line creation from an AAL should be done
only when the amount is negative (meaning it comes from an expense or a
vendor bill).
This was introduced in 3bf8a62e0d.
With 82ca3d3f in 11.0 it was possible to have an email address on a
task, without specifying a partner.
Because of a small issue, this address was not suggested as a possible
recipients like it was in a project.issue object.
opw-1858170
closes#25427