Use case to reproduce:
- Create a BOM with a byproduct tracked and a routing
- Mark the last workorder as done
- by products move line are not created
With the wizard produce (MO without routing) move lines
are created. Thus there is an inconsistency.
It happpens because workorders and produce button do not use
the same function. commit 1a09bcc622
already fix it for production wizard however it forgets workorders
process.
opw-1838707
When creating an activity, the date saved will be the choosen one in the
tought in the client timezone.
But when displaying the counts of activities Late/Today/Future, the date
is tought out as the one in the server timezone.
Thus we would have activity today/future/late not corresponding with the
date in the current timezone.
This is solved in this change and follow what was done in 72254129.
A second change is made so the default "Due date" is today in the
timezone and not today in UTC date.
opw-1837894
closes#24554
- Create a bill for partner A of an amount X
- Create a bill for partner B of an amount Y
- Validate both bills
- Select both and register a payment by check.
Two payments are created with the same amount in words: X + Y.
In this specific case, we recompute the amount in words automatically.
note: this commit reintroduce the fix c52b18e65 which was lost after
changes in 10.0 (line was removed then brought back with 416d07f0b).
opw-805842
closes#24569
Before this commit, the compare button from the customized view "Alternative
Products" would create the URL by joining `alternative_product_ids` which are
ids from product.template.
But the route /shop/compare is supposed to receive variants (product.product)
IDs.
Thus, it would try to search given product.template IDs in product.product
records.
It would then show incorrect items or no items at all if the ID does not exist.
Now, we create the URL with the first variant (product.product) of the
product.template.
Obviously, the first product.product is arbitrary but we can't retrieve all the
variants ids, it would most of the time returns too many items.
opw-1840321
In a situation where there's a negative quant next to a positive one,
they should be merged when the scheduler runs or when the user open its
inventory view. However, if in the meantime the user reserves and
unreserves, there may be some issues.
The system will only reserve on positive quant ;
the system will unreserve on the first encountered quant (even negative)
The issue is the second part of the early break condition:
float_is_zero(available_quantity, precision_rounding=rounding):
The issue here is `available_quantity`. In a reservation scenario, it
represents the maximum quantity we can reserve across quant. It is
useful so we do not lose time loopin over quants where nothing will be
available. In an unreserve scenario however, it represented the same
thing, which is wrong. In the case you reserved all the quantities,
`available_quantity` will be 0 we'll loop only on the first quant where
we won't do anything.
As the code doesn't check the success or failure of the unreserve, move
lines were unlinked while the reserved quantity on the quants were not
updated, resulting in the desynchronization of the move lines/ reserved
quantities.
This continues the work done at [1] to track down the "cannot unreserve
more than" errors.
[1] cce6030c0d
Assume a one2many field inside a form, displaying field A in its
list view, and a field B in its (dialog) form view. Moreover, there
is an action button in the dialog, which updates the value of B.
Before this rev., B wasn't correctly reloaded when the button was
clicked, because the BasicModel reloaded the fields on the list
view (i.e. field A), whereas it should reload the fields in both
views.
This fix is twofold. First, we force the viewType to 'form' when
the record is reloaded, instead of the default ('list'), so that
fields in the form view are correctly reloaded. Second, when we
open the form view in the dialog, we add the fields of the list
view to the dict of fields of the form view, so that the form
is aware of those fields and can ask the model to reload them
(still without displaying them).
Fixes#24189
When the virtual machine used to build MS Win package takes too much
time (to build or to test the build), a warning is logged and the VM is killed.
Before this commit, the PID of the process was passed as an argument to
the warning method, causing a traceback.
Instead of searching for ids in the whole cache, search for the ones we will potentially prefetch.
Example: imagine you have 1K records in cache, and only 3 records in your prefetch set. Instead of retrieving the 1K records that have a value in cache, retrieve which of the 3 records that have no value in cache.
The precision digit on the produce lines is not set to the product unit
of measure one. That can lead to a lost of precision when a small values
are set in the manufacturing order and not in the produce wizard.
OPW-1838077
When moves of a MO are generated, they are rounded up to the decimal
precision of the rounding, what is not done in the wizard.
So to keep it consistent, we also round up the quantity to consume in
the wizard.
If document viewer is opened from chat window and when document viewer is opened then focus
remains on it's modal, pressing escape should set focus back to chat window's input element,
if file selecor dialog is opened and if user press ESCAPE on file selector dialog to cancel file selector
dialog then it should not close chat window instead it should set focus on chat window input and on
second ESCAPE key chat window should be closed
also increase z-index of document viewer dialog so image remain on top of cht window
OPW: 1777937
When an internal locations has its `scrapped` field set to True,
reserving will increment the quant's `reserved_quantity` while
unreserving will bypass the reservation mechanism (as in a supplier
location). This leads to a desynchronisation between the
partially_available/available move lines and the quant's
`reserved_quantity`, leading later on to "cannot unreserve more than
available" errors.
To prevent this kind of issues, there's a `should_bypass_reservation`
method set on the location that we *should* use everywhere, it was
implemented by [0]. Sadly, this line was not adapted since its
implementaton in [1].
Co-authored by len-odoo <len@odoo.com>
opw 1837900
[0] e1cea2640f
[1] 0469d2e712
This constraint was added during the Great Accounting Reform of v9, in
an attempt to help users avoid reconciliation mistakes.
It turns out that such mistakes are difficult to make in normal
situations, since the system only offers matching entries to reconcile,
so the constraint is largely redundant.
On the other hand, it does block legit cases of reconciliation,
such as those where a large number of lines with different partners are
reconciled together. This often happens when reversing a Journal Entry
that encompasses multiple customers, such as a POS closing entry, or a
manual entry.
To make the system more flexible, let's consider that when a manual
reconciliation breaks the "single partner" rule explicitly, it's for a
good reason, so we should allow it.
OPW: 1840437
Backport of 8e73023f68
This constraint was added during the Great Accounting Reform of v9, in
an attempt to help users avoid reconciliation mistakes.
It turns out that such mistakes are difficult to make in normal
situations, since the system only offers matching entries to reconcile,
so the constraint is largely redundant.
On the other hand, it does block legit cases of reconciliation,
such as those where a large number of lines with different partners are
reconciled together. This often happens when reversing a Journal Entry
that encompasses multiple customers, such as a POS closing entry, or a
manual entry.
To make the system more flexible, let's consider that when a manual
reconciliation breaks the "single partner" rule explicitly, it's for a
good reason, so we should allow it.
OPW: 1840437
When creating a transfer from:
Dashboard > Planned Transfer
The scheduled date is not configurable as explained in commit:a57a290bd89bee0c50c9c1b03e7185c0497e89ed
opw:1838620
When we edit a list view and change page before the change has been
savec, the saving and page changing will be done concurrently thus
possibly causing an error if the page is changed before the saved is
finished: the save will try to modify the page that is no more
displayed.
In this change, the list view editable wait for the saving to be
finished before reloading its content.
note: for 9.0 up to saas-15
opw-1839149
closes#24471
update_goals is called through the 'Run Goal Challenge Checker'
cron, potentially on a large amount of goals.
With self containing ~400k records a worker has been observed to use
~3.4 GiB. With sensible memory limits this will probably cause the
worker to be killed.
To avoid this turn of prefetching in this initial loop. Performance
shouldn't be affected too much because in the following loop
prefetching for goals will still take place per definition.
opw-1840666
These translations were for the first company only ('1_' part)
The process_translation part in l10n_multilang is enough to propagate the
translations of the templates to the accounts
- Set the system parameter "stock.propagate_uom" to 1.
- Create a Sale Order with a product (1 Dozen).
- Confirm the Sale Order
- Validate the stock picking with 1 Dozen of quantity done.
- See the stock move form.
The value of the stock move is the price unit and not the correct value
because the amount is computed by the quantity_done (1) and not
12 Units.
Closes#24352
opw-1838335
- Create a product named 'toto'
- Perform a call to `name_search`:
`self.env['product.product'].name_search('pouet', [], 'not ilike')`
Product 'toto' doesn't show up in the result list.
The domain should take into account that `default_code` can be `False`.
Note: the bug also occurs if the product is called 'trululu'.
opw-1837957
- Create a product with 2 variants (e.g. black and white)
- Create an invoice with one of the variant
The description doesn't contain the attribute name, as it would be in a
SO.
This is because the invoice uses `partner_ref`, which doesn't include
the attribute name.
opw-1839598
On existing databases, the SQL not null constrain is not removed, making
the creation of new assets impossible. This is because a computed field
is not inserted at creation, but written afterwards.
This reverts commit 0c76bd3c63.
opw-1840661
Have a One2Many
The views of that o2m define two inline views: the list and the form
in the list view, put a field that isn't in the form and used in a domain
Try to add an item to the list
The form pops up
Fill in the data and save & close
Before this commit:
It crashed when evaluating the domain on a field using the field that is not in the form
After this commit:
Subviews share their fields in a special object on the parent record
In our case, the form view checks in that shared resource if the fields it is supposed to initialize
are there.
Hence, this flow doesn't crash anymore
OPW 1837511
closes#24350
The way the calendar view selected its form view was broken for two
reasons:
- any value given in the form_view_id attribute was kept as string,
which means that the string value would be sent to the server, and
this is not good.
- if no value was set, the calendar view then simply did a do_action
with the form view id set to false, which means that the default form
view is used. This is mostly ok, except when we are in the context of
an action with a form view which is not the default one. In that
case, we clearly prefer the form view from the action.
For example, before this commit, the form view in the timesheet
application (community) is not the same as the default form view on
account.analytic.line.
Note that this commit also adds a small tweak to the mock server to
better simulate errors like the web client does (in session.js).
Have a nginx set up with HTTPS (and the web.base.url too, obviously)
HAve a multilang website
Call a slide with the https domain with the non-default lang in the path of the resource
[https://domain/fr_FR/slide....]
Before this commit, when the iframe src is requested for by the browser
the python will transform the url of the iframe by injecting /fr_FR/
When the request for the *content* of the iframe is actually fetched by the browser, there is a mixed content
(though in the SAAS case and through cloudFlare for some reason)
After this commit, since we explicitly form the iframe src with lang, there is no error of mixed content
OPW 1839308
closes#24445
Since these server actions are triggering python code, their 'state' field must explicitely be set to 'code'.
Currently it is taking default value for 'state' field which is, since saas-15, 'object_write' and thus not working as intended.
Was PR #22706
Was task: 1813998