In order to detect if a barcode scanner is being used, we detect the
delay between keypresses. The value is hardcoded to 55 ms. However, in
the case of a bluetooth scanner, this delay is often not enough,
resulting in an incorrect capture of the barcode.
We add the config parameter `barcode.max_time_between_keys_in_ms` which
allows the user to fine tune this delay for his hardware.
opw-806398
To have the same behavior as `_compute_decimal_places` in python
When setting rounding of currency > 10, POS will get negative decimals
instead value 0 and crash
Closes#22199
When using product variants, the product page shows:
- The product variant if different from the product image
- The product image
- Extra product images
The product variant image has to be switched dynamically when the user
choose another variant. This was broken with commit https://github.com/odoo/odoo/commit/f98bb2b86bb7c3ff0a549f24b31616c1539420a7
Indeed, it was switching the product image with the product image
variant instead.
This was because the variant/template order changed without switching
their classes. This commit changes their order again.
Also see opw-784737
Instead of looking for the "denied" permission, rather look for the "granted"
since there are three permissions: "default", "denied", "granted" - only
"granted" counts toward permission actually being granted
Closes#22633
Before this commit, all the mailto:xx@ww.com in emails were transformed into
http://web.base.url/xx@ww.com
This was due to the url parsing of werkzeug urls.py, which definitely get the scheme
(mailto), but doesn't get the netloc of the url -- because it has no //
Ater this commit, we transform links to local ones, except if the scheme is mailto,
and the issue disappears.
OPW 807795
- 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.
opw-805842
When we pass two disjoint intervals the behaviour of _interval_and is a
little strange, it returns an interval wich begins after it finishes.
In order to fix that we return None when the intervals are disjoint.
- Create 2 companies A & B
- Create a product P with 2 phantom BOMs:
Component C1 for company A, with sequence = 10
Component C2 for company B, with sequence = 0
- Create a SO in company A for P, validate
The picking contains C2, while one would expect C1 since C2 is only for
company B.
opw-807640
If you have stock installed before 0322f6e5 and try to install stock_account
today, the installation fails.
Should not rely on a field added after the stable freeze
Fixes#21823
opw-802767
It seems that firefox has some difference of behavior from other
browsers as said in:
- https://bugzilla.mozilla.org/show_bug.cgi?id=548397
- https://github.com/whatwg/html/issues/1813
- https://github.com/w3c/csswg-drafts/issues/571
It seems that at least in one instance (a html field hidden on the pos
configuration), firefox fails because of something similar:
window.getComputedStyle(element) returns `null` instead of the element
styles.
In my tests, using the parent window (possible if current frame and
parent have the same origin which should be the case) worked in this
instance, this is examplified by this jsfiddle:
https://jsfiddle.net/Lpv898ve/2/
This work with window.parent and not using window directly.
So this commit adds fallback on doing getComputedStyle from the parent
window (when testing on chromium this gave exactly the same result that
before).
opw-813363
fixes#22211closes#22610
- Create a product with name 'EN' in English and 'FR' in French
- Connect to the POS interface with a user having the French language
set up.
The product name is loaded as 'EN' instead of 'FR'.
The language is missing from the context of the `search_read` calls.
Therefore, the product names (as well as categories, UOM...) are loaded
in the default language.
opw-805431
This action was not working as the tree view has been removed
This feature was replaced by hr_org_chart module
Just display a list of the employee and subordinates
Fixes#20203Fixes#22312Fixes#22536
onchange function getting called when modifying the 'amount' field of account.payment always changed the journal of the payment when this amount was equal to zero. This caused a bug with batch deposits, when trying to create a new payment from the tree view contained in the form view of account.batch.deposit: passed default value for journal_id was ignored.
On a production database with ~10000 products and multiple stock
locations, uunning the 'Inventory at date' tales ~50 minutes. Most of
the time is spent in the loop populating `group_lines` thanks to
multiple search queries.
We get rid of this loop by selecting the stock history lines and making
the match between these lines and the `read_group` result manually. On
the reference database, the duration falls to ~30 seconds.
Based on preliminary work by amoyaux
opw-803460
In df69b5bb the aggregates of a column with currency was shown only if
records were of the same currency when a grouping was closed.
But when the list view is grouped, this would cause a number of issue:
- error if with first grouping is opened, another one is closed
- if the first grouping was closed aggregates were always shown
- the code only acts when closing a grouping
- aggregates could be shown when they should not
- aggregates could be not shown when they should
So this commit change things so this feature is ignored when the list
view is grouped.
There is also a fix so `currency_field` of the column is used instead of
just using `currency_id` that may be wrong.
note: only for saas-14 and saas-15 (feature is not present in saas-16)
opw-810835
closes#22598
The result of the following:
```
float_round(2.5, precision_rounding=0.05, rounding_method='DOWN')
```
is 2.45. Instead, 2.5 is expected.
In case of the `DOWN` method, epsilon should be added, not subtracted.
In the meantime, we introduce a slight reorganization of the method to
make it clearer.
opw-805008
on account.payment, when changing the payment type to Internal Transfer,
the result of the onchange was erroneous as inbound and outbound methods
lack relevance in that case
After this commit, We choose to display all bank and cash journals in this case
OPW 804214
Before this commit, the dashboard pill taht allows the user to consult
his iap accounts was hidden for saas users as it is grouped with the
app store and theme buttons which are not supposed to be shown since
they are not available in saas.
This commit ensures taht the button will be shown both on saas and premise instances.
When clicking on a link in the editor, the "center" alignment button
was always marked as active whatever the real alignment of the link.
This was because it considered the alignment of the text inside the
link instead of the link's one inside its parent.
In the alternative products with 66994856 the thumbnail blocks were
restricted in size.
This is not very nice in the basic theme (the text of a product is cut
unexpectedly by the block border) but seems outright wrong on other
theme without border.
This commit forces the alternative product name to be on only one line
and be ellipsed. There was a lot of possible solution but for supported
browser compatibility and not breaking possible existing customization,
this one was choosen.
A better solution would probably use "flex" but we can't use it
currently (because of internet explorer support).
opw-806285
closes#22547
Mail content is wrapped in a table to properly allow centering the
layout in all mail clients. The problem was that this table was able
to be customized by the editor while it should not.
When duplicating a project, a command [(6, _, ids)] may be generated.
This fail with the commit aa8a39fc4f because all comodels records with
id not in `ids` will have their inverse field unset.
But eg. in the case of copy, this would trigger an error because this
would be done to an empty recordset and unexpectedly trigger an error.
opw-807655
closes#22525
- Main currency: USD
- Create a PO in EUR
- Create an invoice from the PO
- The invoice is in USD and the exchange rate is applied
- Change the currency to EUR
The conversion is not applied anymore.
The original issue was that changing the date would overwrite any amount
modified in the invoice. Actually, the dependency on the date is not
really necessary. Indeed, this is supposed to help enconding invoices,
but it is likely that:
- If the PO is issued in a currency A, the bill received is in currency
A.
=> no conversion necessary (solved from 11.1).
- If the PO is issued in a currency A and the bill received is in
currency B, the exchange rate used by the vendor is different from
ours.
=> manual corrections are necessary
Therefore, we remove the dependency on the date for the amount
recomputation. However, we still use it in the onchange. This way:
- the amount estimated should be close to the amount requested
- we avoid unexpected recomputation of amounts
Introduced with d8112b0238.
opw-805926
Url in the web client are supposed to open in a new tab. This was the
way it worked in v10.0 and was lost with the refactoring of the new
views.
We just reintroduce that behaviour with this commit.
Closes github issue #22389