commit 47654e98e0 modified a defaultdict by an OrderedDict.
When multiple orderpoints use the same location the key is the same and
location_data dict entry is removed for the new one.
This commit only call makedefault when there is not current entry for
the dict.
The to_refund attribute is set to copy=False.
However when splitting a move to create a backorder, a new move is created as
a copy with the remaining work to do.
This attribute is needed so that the backorder refund is consistently applied.
opw 1865324
Due to this commit: 6e93fe0de1
the stock user has the all rights on model 'product.pricelist'
As the repair order model has the field pricelist_id on it,
the stock user must have the right to read it.
opw:1865814
The `active_id` when clicking on "Receive Products" on a purchase order
is the one of the purchase order.
But the action used has a context with:
```
{
'search_default_picking_type_id': [active_id],
'default_picking_type_id': active_id,
'contact_display': 'partner_address',
}
```
So the active_id should be a stock.picking.type and not a purchase
order, thus:
- we could get an error at some instance (eg. a refresh) when loading
the facet of the stock.picking.type with the ID of a purchase order
- we could erroneously show a facet for a stock.picking.type with the ID
being the same as the purchase order
So this commit uses the same action without the offending `active_id` in
context.
opw-1870687
closes#26160
Purchase creates an activity when some stock move is deleted.
Howver when two moves are merged "behind the scenes", some moves may be deleted.
As a result it creates an activity "warning: some move has been deleted" for no
good reason.
We add a hook to clean moves before the merge.
opw 1826791
On the pipeline action change the sequence of the view_ids to
change the order of the view_mode string
Put tree first instead of kanban for example
Before this commit, clicking on CRM menu app still displays the kanban
This was because the action window is wrapped around a server action that modifies it
After this commit, we recompute the view list to match what is on the original action
OPW 1863425
closes#26159
From a SO (for example), create an activity with type meeting
Create the calendar event
Access it as a guest with the route with the token
Before this commit, there was an error 500 because the description
of the event actually contained "\n" and was not parseable
After this commit, we strip the string at event creation, and no error occur
OPW 1867283
closes#25795
Currently, when a digital product is purchased, the list of attachments
is incorrectly computed. Product template's portal files are retrieved
correctly, but all product variant's attachments are taken into account,
not only its portal files.
This commit causes the portal attachments to be computed correctly,
taking into account only portal files from both the product template and
product variant.
Closes#25609
third positional argument is places not msg (which expects a number not a str)
https://docs.python.org/2/library/unittest.html#unittest.TestCase.assertAlmostEqual
fixes errors like these:
if round(abs(second-first), places) == 0:
TypeError: 'str' object cannot be interpreted as an integer
and gives the intended message when assertion is errornous
In Python 3.5, items() on a dictionary return keys in a randomized order.
location_data can thus be processed in different orders, leading to
different quantities in the MO's created by the procurement scheduler.
This fix makes the output of the scheduler deterministic.
(thanks to @odony for his help in troubleshooting this issue)
opw-1865711
Steps to reproduce:
- activate the EUR currency
- set a currency rate 1 USD = 1.2 EUR
- create a Bank journal in EUR with a EUR account
- create a Vendor Bill in EUR for 1200 EUR in total
- go in the Vendor Bill list view (Accounting > Purchase > Vendor Bills)
- select the created Vendor Bill
- click "Register Payment" in the action menu
- select the EUR Bank journal you created
Bug:
The payment amount is 1000 EUR instead of 1200 EUR.
opw:1870351
Since 6a3324a7 and 0c489cf1fa, a translation can not contain a \n
Previous text was not correct rst anyway.
Reexport base translations to include all missing modules
Open the web/database/manager and create a db with a country set.
The country of the first company will be set to the country set on the form
Before this commit, the currency was not set, eventhough it is a field
on res.country
After this commit, we also set the currency of the first company
opw 1869435
closes#26097
Create an asset and confirm it.
Click on Sell or Dispose
The form view of the disposal move opens
With the breadcrums, back to the asset
Click again on sell or dispose
Before this commit, literally nothing happens
This is because there is no more business to do
After this commit, in the case there is no business to do
we fallback onto the smartbutton's action
OPW 1864318
closes#26086
Before this commit, the function that computes the aged partner balance
could return a list instead of a dict if no partner were found
After this commit, we make the function's signature consistent
closes#26095
Before this commit, saving a file being watched by watchdog
(--dev=reload) with vim (and possibly other text editors) would
crash the server via a KeyboardInterrupt error.
This happens because vim, emacs cause multiple filesystem events to
happen when saving a single file, the FSWatcher registers these events
as multiple SIGHUPs which in turn calls restart() multiple times in a
very small amount of time which makes the KeyboardInterrupts completely
shut down the server
This is fixed by only calling restart() if odoo.phoenix is False, since
catching a SIGHUP sets it to true.
Fixes#21178
Special thanks to @odony for the help :)
This reverts commit 2054b59285 which
already has been fixed multiple times [0].
However this change does not correctly handle successive onchange calls on
ony2many fields which alter existing rows.
i.e., in saas~11.4, an onchange has been added on move lines [1] in
order to create and/or update lines containing taxes amounts.
However, with diff-only onchange, a second call to onchange will discard
changes made by a first one as nothing change between the 2 calls.
Scenario: On an existing account.move, add a new credit line with a tax set.
The first onchange will update the tax line with new amount. Add a
second line (with debit amount balanced). The onchange will not change
the tax line, resulting as it value being reset to initial value. As a
result, the move is not balanced and cannot be saved.
[0] cd2ccc4110, 5e58ac16c3, 07023137cd
[1] d49ab568a2
This field is used by the multiple payment wizard; the payments it generates are always individual and should never have multi=True. Before this commit, they did, because of the values given in context when calling the payment wizard.
Avoid sharing of users'groups when writing on multiple users.
When changing groups of multiple users, all implied groups were shared
between written users.
Oversight of new-api rewrite.
Fixes#26036
The 'drag and drop' function defined in test_utils should be aware of four
different cases, moving up or down, above or below another row.
We need an offset of one pixel for the function to work when moving down
(this is a case of broken symmetry because of <=)
Related to opw 1867049 regarding sequences of resequence moves.
Steps to reproduce the bug:
- Go on a picking with an operation type of type "vendor" (e.g. a receipt) :
the field source location appears while it should be the destination location.
- Go on a picking with an operation type of type "customer " (e.g. a delivery) :
the field destination location appears while it should be the source location.
opw:1869145
3869cdf7d8 merged a fix which used a
P3-style super call, which is not compatible with Python 2.
While 11.0 is not really exactly officially supported on Python 2,
we originally decided not to break compatibility unless there were
very good reasons to do so.
Steps to reproduce:
1. Activate multi-currency and associate a price list "Other list" with secondary currency as an alternative for "Public Price List".
2. Enable the price list to be selectable on the website.
3. Enable wishlist functionality on Website module
4. Navigate to website without logging in
5. Add a product to the wishlist (with the default price list)
6. Switch price lists.
Bug:
The wrong currency was displayed in the wishlist for the new price.
PS: In function "compute_new_price", price_new = website_price
opw:1867314
With 60300fc, people can use promo code on website.
But the condition leads to a side effect, if a partner has a pricelist set for
him, he will never be able to see the dropdown list of pricelist since he will
enter the else condition with show_visible set to true.
Now, user is able to see selectable pricelists.
opw-1869371
Have a statement line with multiple pages of propositions
Go to the last page
Add everything
Before this commit, after clicking on the last item of the list,
a write-off creation was displayed, without any means to come back to the other
propositions
After this commit, we display the page before
In manual reconciliation, have an accound with no direct proposal.
An empty line should be present
Click on it
Before this commit, there was a traceback
After this commit, a write-off creation appears
In manual reconciliation (but probably automatic too)
Have 3 lines for one account
2 of them are balanced
the third is of an amount X
Add the three lines to the reconciliation
A write-off proposal of -X should appear
Now, remove the third line by clicking on it
Click on Reconcile
Before this commit, the values sent to the server were wrong, as the write-off
was still included
After this commit, we make sure we don't send lines that are not displayed
Create an account.move, create a line, then add an item to start to add a second aml
The current balance of the move is put in debit (or credit) to help automatically making the second line
Save the move.
Edit the move
Delete a line
Add a new line
Before this commit, the balance was not correctly computed because the default_get did not compute
the balance on deleted lines
The move ended up with wrong unbalanced new lines
After this commit, the balance is computed with deleted lines taken into account