This fix avoids wild prefetching when serializing
onchange results.
We fell on a strange situation in method `onchange`, where
some data was missing from cache when serializing the
result. In that case, the prefetching overwrites so
many stuff in cache that the results of the onchanges
are lost.
Don't let that happen.
This is a backport of 5f660cd, with rco-odoo's blessing.
A use case this commit solve is
- Install the sale app.
- Create new quotation and assign new partner
- From inline editable listview add a new order line
(created the product inline) then directly save.
- Click on the order line (NOT IN EDIT MODE). This opens
the order line in a popup.
- Close the popup.
- Click edit again.
- Now change the order line description.
When unfocusing order line field, the description is reset
to previous one.
Closes#23276Closes#23277
Make sure the user id received by the RPC call is an integer
Avoids errors like #23534
Crash early in case of bad uid format instead of propagating another value
Commit c06f0f3a35 changed the base navbar zindex.
But the navbar of the translation mode still had old zindex values making the
navbar invisible, in fact under the base navbar.
task-1804662
Before this commit, discount was never displayed in the portal.
So if you bought 1 iPad at 1800$ with 50% you see in your poral:
Product Unit P. Qty Subtotal
[photo] Ipad $1800 1.0 $900
Now, similarly to the report pdf, we show discount if at least
one line contains a discount.
This commit closes#11305
Before this patch, when a user searched something in the shop and no results were yielded, there was no clue that the problem might be the search query itself.
After this patch, this UX becomes more obvious:
- *(0 found)* appears next to search button.
- _No results found for **"search term"**_ appears clearly in the middle of the page.
This commit closes#14359
the "company_id" value wasn't declared explicitly in the "_prepare_procurement_values" method, wich caused the procurement "run" method to set a company by default regardless of the company associated to the orderpoint.
this caused issues in a multi-company config. ( see #23764 )
the only goal of this change is not to use a jquery selector on the
body of the document.
Jquery adds an ID attribute to all the nodes it selects. This in turn
triggers the attribute change debugger in chrome, and creates a lot
of noise while debuging.
When a user imports a file with a datetime field set to a blank space,
the value is computed as 1900-01-01 00:00:00. However, when converted in
the user's TZ, this can lead to a value < 1900-01-01, which is not
recognized at the JS level as a valid value.
This makes the access to the record impossible, and possibly makes the
access to an app impossible. It is for example the case with Purchase,
where the order date is displayed on the default's action view (list
view).
We strip the value before testing if the value exists to avoid this
case.
opw-1826344
Steps to reproduce the bug:
- create an invoice
- add one line without product but with a uom
- validate it
Bug:
A traceback was raised because no product was set on the invoice line.
opw:1825464
Commit e011d58bee add the possibility to unselect images on the media dialog.
But it introduced a collateral bug preventing double click to set the image.
Indeed, double click event triggers not only the double click event but also
twice the single click event.
Before commit e011d58bee, it would work fine and as intented on double click:
1. It would trigger twice the single click, selecting twice the image.
2. Then, it would trigger the double click that would save the selected image.
But after the commit:
1. It triggers twice the single click, selecting and then deselecting the image.
2. Then, it triggers the double click that saves nothing since the image got
unselected on second single click event.
Now, before saving on double click event, we select the image.
task-1815165
Commit 34da40a44d improved all activities filters used through various
apps. However in maintenance model maintenance equipment model was forgotten.
This commits fixes that in order to have same filters on all models using
activities.
Without this commit, a valid route /web/content with an extra
params eg utm or adwords will return a 500 with:
TypeError: content_common() got an unexpected keyword argument 'extra_param_name'
This commit closes#21221
Task-32836 should fix for all routes in a future version
Customers without an user account can do nothing with the button
in the notification, so it's better they don't have it.
partial backport of #4732a1
This commit closes#22487
When a portal user changes his account details and presses the 'Save' button
when a mandatory field is not set, the selected country will be reset even when
the user did change the country in the form. This fix prevents this from
happening and leads to an improvement for the end user.
This commit closes#22439
- Create a picking to deliver 10 units, save
- Edit and change to 12 units
- Print the Delivery Slip => the qty is 10
- Validate the picking with 12 units
- Print the Delivery Slip => the qty is still 10
The use of `ordered_qty` is misleading, since it corresponds to the qty
ordered at creation.
Backport of 0a2999cdd9
opw-1825396
- Create a customer, set an address
- Create an opportunity from the kanban view
The address fields are not filled in in the opportunity.
We add all fields filled in by `_onchange_partner_id_values`
Complement of commit e2bbee6df5
opw-1816438
opw-1826859
Commit 78ac6de52d refactored methods checking alias security on the
routing found for a given destination address. Indeed if a routing is found
linked to an alias a security check is performed according to the restriction
defined on the alias itself.
HR module adds the 'employees only' restriction. A bug has been introduced
in the mentioned commit concerning employees-based aliases. Indeed a condition
on having a recordset has been added (self.ids, changed to record.ids at
20d8025036). This condition is actually not necessary as checking the
email author is linked to an existing employee has nothing to do with the
alias being linked to a record or creating new record.
This may causes issues notably using employees-restricted aliases in
expense application. Indeed you could use aliases to create new expenses
for employees and you could have issues with this condition.
This commit is linked to task ID 1829860 and ID 35093. Closes#22960 .
Steps to reproduce the bug:
- Create a customer credit note
- Add a new item
- Don't input Product, input Description and Unit of Measure
- Click on Validate
Bug:
A traceback was raised because no product was set on the invoice line.
opw:1825972
- Create a SO for a customer of 100 $
- Create Invoice for the Sales Order and Register the payment
- Create a Refund Invoice, Validate it and keep it in "Open" state
- Create a second SO for 5 $
- Create an invoice for this order and validate it
- It will show you outstanding payments
- Apply the credit and the invoice will be fulfilled => Now you have a
credit left for 95 $
- Create a third Sales order for the same customer for 5 $
- Create an Invoice for it
- It will show you outstanding credit (95 $)
- Apply the credits
- Now 90 $ are left
- In the same invoice, the credit which you applied, Unreconcile it
- It should have shown you 95 $, but it shows you 100 $ which means it
removed the credit which we applied to second SO
The unreconcile process does not filter the partial reconciliations of
the selected invoice. All partial reconciliations on the AML are
removed instead.
opw-1819602
Before this commit, the barcode value wasn't triggered on
some Android devices with Google Chrome and using the Odoo app.
In fact, the keypress event may not trigger with some devices.
This is probably due to the fact that this event is marked as
'Legacy'.
See: https://www.w3.org/TR/uievents/#legacy-keyboardevent-event-types
To fix this, we can use 'keydown' event but we have to handle an
other issue: there is no way to know which key is typed.
The auto-suggest feature on Android invalidate all the following
properties: Keycode, charCode, key, which, keyIdentifier, code.
This is a well-known issue:
https://bugs.chromium.org/p/chromium/issues/detail?id=118639
For more infos, please read this blog:
https://www.outsystems.com/blog/javascript-events-unmasked-how-to-create-input-mask-for-mobile.html
As a work around, we create a temporary input field that stores
the barcode value.
The focus is set on this input when a keydown is detected.
Note that when an input has the focus, the android virtual keyboard
will be opened. We can't avoid this behavior.
The only thing we can do is to automatically close it after 800 ms.
See: https://bugs.chromium.org/p/chromium/issues/detail?id=662386
As this fix is specific for Chrome only, it's not possible
to test it easily. Some tests will be added in master.
This fixes an issue occurring with Firefox.
Some events was buffered with an undefined value and it wasn't
possible to build the barcode value from these events.
See 'handle_buffered_keys' function.
So now, we simply skip this kind of event.
We consider this as 'special keys'.
Until now invoice_id is filled on the transaction only when we make
payments through invoice. However if we make payments through sale order
then invoice_id is not filled.
This commit fixes that issue. As there is no common point between
sale_payment and account_payment except payment, a void method is added
in payment and an override done in account_payment. That was when both
modules are installed code is correctly triggered.
This commit is related to task ID 1813602. Closes#22746 .
Before this commit:
1. The delivery price on checkout would always be shown without the taxes.
This would make the cart total unclear since it is not indicated that this
price is tax excluded. You could only assume that this was the price the
delivery would cost you (and not just the untaxed delivery cost which you
can't even find the full price anyway since taxes in subtotal is the sum of
all products taxes).
2. The sale order line in payment step of checkout are always displayed with
taxes.
Now:
We ensure that both 1. and 2. show the delivery price with or without taxes
according to which mode (B2C or B2B) is enabled.
This fixes#12872, closes#13592 and closes#23746
Since e9734f4975 assignation is now a notification sent in the
inbox or by email to the newly-assigned responsible. It is therefore
considered as not necessary to link a subtype to the assignation itself.
Indeed having it logged in the discussion history as a classic tracking
in addition to the notification is considered as sufficient.
This commit is related to task ID 60790. Closes#23244 .
Since e9734f4975 assignation is now a notification sent in the
inbox or by email to the newly-assigned responsible. It is therefore
considered as not necessary to link a subtype to the assignation itself.
Indeed having it logged in the discussion history as a classic tracking
in addition to the notification is considered as sufficient.
In project module the task opened subtype was linked to task creation and
task assignation. This subtype is now used only for task creation. It also
fixes a strange behavior. Changing assigned user in an ongoing task was
trigerring the task opened subtype which was strange. This is not the case
anymore.
This commit is related to task ID 60790. Closes#23244 .
Some status were shown in the statusbar even though they were not specified in
the `statusbar_visible` attribute. This happened when the value was a substring
of one specified value.
Example:
```
hello = fields.Selection([('hello', 'Hello'), ('hello_world', 'Hello World')])
<field name='hello' widget='statusbar' statusbar_visible='hello_world'/>
```
In this case, both status were shown ('hello' is a substring of 'hello_world').
Fixes#20034
As Admin:
- Set up 2 languages for the installation, e.g. English and French
- Admin language is English, Demo language is French
- Create a `res.partner.category` named 'Test English'
- Assign the category to a newly created partner
- Create a French translation for 'Test English', e.g. 'Test Francais'
As Demo:
- Create a Mass Mailing
- Select a custom domain: ('category_id', '=', 'Test Francais') => it
should match one partner
- Save and validate
Now either:
- manually run the scheduled action "Process Mass Mailing Queue" as
Admin
- wait for the cron to process the mass mailing
No mail will be sent since the domain will be evaluated in the Admin
language, i.e. English. Indeed, the domain
`('category_id', '=', 'Test Francais')` does not match any record in
English.
The solution/workaround is to use the language of the last user who wrote
on the mass mailing.
Closes#20906, Closes#15467, Closes#15445
opw-778922
If user choose custom report type with background, we don't want the
background on the ISR report that is intended to be printed on
preprinted paper.
opw-1820123
closes#23743
When creating a task in a project generated from
an SO line, we want this to be linked to that
sale line too.
When creating a subtask, the sale line is forced
to be the one of the parent, in `create` method.
But we want to see it on the form view.
Steps to reproduce the bug:
-Create a tax of 21% tax included but don't select the "affect base" checkbox.
-Create another tax of 5.2% (no tax include)
-Create a sale order with a line that has a unit price of 121 and both taxes.
Notice that the total amount is: 126.2 (100 base amount + 21 from 21% tax + 5.2 from 5.2 tax)
-Click on "Print the proforma invoice"
Bug:
The total amount was still 126.2 and base=100, however taxes were wrong, there were 21 for the 21% tax
and 6.29 instead of 5.2 for the 5.2 tax.
opw:1819882
Use option recently introduced to use a minimal context when rendering
some mail templates such as
* notification template used to decorate messages sent to recipient
when using email-based notifications;
* user assignation template used when people are assigned on a record
and a notification is sent to inbox or email;
* message_post_with_template now uses minimal context meaning calls to
that method should be sure evaluation context is correctly set in
the given values;
This optimization allows to save some queries every time one of those
template is used, meaning all tests gain between 1 to 4 queries depending
on their complexity.
This commit is related to task ID 1817951. Closes#23291 .