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
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 .
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
Sidebar's menu items are not currently reachable when using the
keyboard, because they are missing the attribute `href`, thus are not
indexed for tabbing navigation.
This change causes that attribute to be included, so the menu items are
reachable and navigable when using the keyboard.
Some HTML attributes were missing, and are required to ensure good
compatibility with screen readers.
The following attributes are included:
- `aria-expanded`: this should be present in all dropdown menus
- `aria-label`: this should be present in all links and buttons which
don't show text, but icons or images.
Before this commit, there was an issue with input method using
composition in which typed characters were duplicated.
This was occuring until the composition ended.
This is a bug specific to Google Chrome v53+.
It has been fixed in the most recent version of ace.js [1],
and we just port the fix into our custom code.
Note that we do not simply import ace.js as a whole, because
we must update lots of custom code at the same time.
We plan to do so in the future.
Fixes#23629
[1] https://github.com/ajaxorg/ace/pull/3116
When creating a receipt with immediate payment:
Before this commit, the field payment method displayed all the journals bank or cash
After this commit, only journals made for receiving/sending payment (in function of the type of receipt)
are displayed
OPW 1819672
closes#23677
- Go to eCommerce, add a product to the cart
- At address configuration, add a delivery address. Do not field the
name or the phone
It is possible to save the address while the fields are mandatory.
opw-1827797
PR #16826 (rev fa3ff5b41a) added the
`company_id` field in the Journal Entry form.
Unfortunately that field was not marked read-only, so creating a move
would write to this field, triggering a useless and possibly very long
recomputation of many related fields based on the company of the
account. It must be read-only, its value solely driven by the value of
the account_id field.
To avoid harcorded dates in this test, we use next
monday as starting date for leaves and timesheets.
But today (19/03/2018), next monday will be after
the daylight savings time, so resource module gives
one additionnal day with one hour to be worked, so
one more timesheet is generated and fails the test.
To avoid this, we are now hardcoded dates to a monday
(to avoid weekend and global leaves) and be sure the
number of working days will be 3.
Before checking the first element of
'partner_id.child_ids', rather check that
the partner and not the object has children,
to avoid crashes when the partner of the PO
is a company.
opw-1826359
Before this commit, we had the following issue:
1. install CRM and Sales
2. Sales > Customers > (open any form)
3. Click on browser's "back" button
We are redirected to the contact kanban view in CRM
instead of Sales.
This is due to the fact that both menu items share the
same action. When the user uses the browser's "back" button
(AKA. it triggers an hashchange event), the web_client opens
the first menu_item that matches the action.
This commit fixes the issue by allowing us to open an action
by providing a menu ID:
1. If it matches the action, then it opens this menu
instead of the first match.
2. If we do not provide any menuID, or this menuID does
not match with the action, it falls back to the first
menu matching this action.
Fixes#23639
Before this commit, the menu_id displayed in the url was incorrect
when we click on a menu item for the first time.
This is due to the fact that the web_client was mistakenly using the
previous menu_id as the action's menu_id: the JS widget menu is not
up-to-date with the value of the current menuID, and the web client
was relying on its internal state instead of the server's response.
With this commit, the web client uses the server's reponse to
register the correct menuID that has been clicked.
* in _adyen_generate_merchant_sig_sha256 no need to encode dict key as we
have a normal dict. Because of this encoding it will search for byte
string key but we have string key;
* _adyen_generate_merchant_sig method requires the latest computed data
from adyen_form_generate_values method. If we directly pass the dictionary
while updating it, it will pass only business parameters and we don't need
it. After updating values we have actual transaction data.
This commit is related to task ID 1815966.
When configuring a survey with a
Multiple choice: only one answer
question,
the answers shown in the result may be in the wrong order
because of the use of a simple `Dict` instead
of an `OrderedDict`.
The behavior was increased when using Python 3.5,
as it randomizes on purpose dictionnaries.
opw-1818797
Having the 'on' using the same styling of the document name that is a link
make us think the 'on' is part of the name. Let us fix this small issue
by getting the 'on' out of the link tag.
Steps to reproduce the bug:
-Activate multi currency
-Set the receivable account with the same currency of the company.
-Create a customer invoice in the currency of the company
-Register a payment for this invoice
Bug:
The payment was not reconciliated with the invoice.
opw:1826121
- Set an employee in a department A
- Create some timesheet entries for this employee, validate them
- Change the employee to department B
An error arise:
> You cannot modify an entry in a confirmed timesheet.
The field `department_id` on the `account.analytic.line` is a related on
`user.employee_ids.department_id`. By changing the department on the
employee, it changes the department on the analytic line (= timesheet).
There is no real need of a related field. Actually, it makes more sense
to change the department with the user (e.g. at creation or change of
the user), and then do not change it later on. Indeed, a timesheet entry
that was created when the employee was in department A should remain in
department A even if the employee change of department.
opw-1824913
- This commit fixes crashes occuring when the expiry date for a credit card was invalid.
Instead of crashing we now warn the customer that the expiry date is invalid.
In the frontend only plaintext is saved without any javascript fiddling
so in the controller it should be adapted to be saved.
With this change, the behavior is more similar to backend chatter which
sends html (processed by javascript) to the server.
opw-1817918
closes#23706
- The payment template is overwriting the return url which caused it to be never valid.
This is mainly used by payment that uses 3D Secure.
If the return_url doesn't exists, then the customer is redirect to '/' which is not what we want.
If the payment doesn't use 3D Secure, then the controllers that handle it may (and it is always the case) redirect the url to a hardcoded url inside it.
IT was not possible to differenciate between variants as using the
product.template name in the message.
Same for the location were it was using the last level name (e.g. 'Shelve 42')
instead of the full path
Closes#20174
On mobile, kanban view always have its custom "menu" bar to cycle
between grouping if the kanban view is grouped.
But if the kanban view did not have the class `o_kanban_small_column`
the mobile CSS on record was not applied:
- all columns were always displayed one over the other
- switching tab did not hides other columns and show current one
- the style was the same than desktop (but on mobile and with column
after first "to be loaded)
opw-1827142
closes#23691