When using barcode to change the customer to a customer with a different
pricelist than the pos default, the customer pricelist was not
automatically selected.
This is a fine-tuning on 5603b778f6
opw-2047070
closesodoo/odoo#35602
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Before this commit, most new messages added to the mail manager were
handled as if recently posted from a document thread. As a result, it
was frequently setting a new item in the local storage to notify
other tabs from these new messages.
The intent of this behaviour is to notify other tabs of newly posted
messages in a document thread, without using a longpolling
notification. That means this logic should only apply on messages
that have been recently posted on a document thread.
Sometimes, this issue was breaking the local storage on Firefox.
It showed the error message "Quota Exceeded Error" whenever `setItem`
was used, even when items were removed beforehand. The capacity of
the storage was only a few Kbs on this domain, far from reaching the
maximum capacity. We think that this error comes from the concurrent
`setItem` on multiple tabs, but this is very hard to reproduce.
This commit fixes the issue by limiting the `setItem` to the tab
that really posted the message. Tests have been adapted in order to
pass only with this fix.
note: backport of 12.2 4bde721f9
opw-2031960
closes#35588
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Backport from 12.0, commit : 1b753b0d53
note: there was also report of PDF content blocking that when indexed
blocked an instance worker indefinitely
Since PyPDF2 gives bad results for PDF indexing, stop using it since it
raises more issues than it helps users.
opw-2044679
closesodoo/odoo#35310closesodoo/odoo#35525
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Steps to reproduce the bug:
- Install stock_dropshipping module and enable Routes on SO lines
- Create a storable product P with a supplier S
- Create a SO with P and set this line with the route dropship
- Confirm the SO ( a PO has been created to S with P)
- Change P on the SO with an other product
Bug:
The product P stayed on the PO.
So a product linked to a PO line cannot be changed on a SO.
Do not forward-port in 12.0 and upper
opw:2040249
closesodoo/odoo#35454
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Make a transfer payment from bank to cash
validate, check the journal entries
You see that there are two moves, each with the name
given by their journal's sequence (one in bank, one in cash)
Now, unreconcile, and cancel the payment
set it to draft, re-confirm it
Before this commit, the entries created had the same name which was
the name of the previous journal entry
This was because, at cancel time, the move_name of the payment was not reset
After this commit, the move name is reset on cancel, and both
journal entries have a new sequence based name when
confirming the payment the second time
OPW 2046412
closesodoo/odoo#35478
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Open the reconciliation widget, with a statement line that has
some move lines to reconcile with
Put your browser in Fast 3G to slow down stuff
then click multiple times on a move line to add it to
the reconciliation chain of the statement line
Before this commit, as many lines appeared in the reconciliation
chain as many clicks were made
After this commit, one can only click once on the lines
linked to #35194
OPW 2042751
closesodoo/odoo#35417
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
A user without stock acces rights was not able to read the fields
added by the stock module
The statbuttons display the number of items available which are
computed fields An accountant (no inventory or sale access rights),
opening the product view will trigger the recompute which will fail
(no access on stock.warehouse.orderpoint)
closesodoo/odoo#32499
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
With some printers (ex: Epson TM-m30), the cash drawer only opens 50%
of the time if you just send the kick command.
A fix has already been made (odoo/odoo#33328). In the previous fix, we
retried up to five times to send the pulse, checking the status of the
drawer between each pulse. The problem was that, when we read the value
of the status, the pulse was not yet done and the status was not yet
updated. The pulse was then always sent five times, even if the first
pulse worked, making a lot of noise.
For some reason, if you read the status right after sending the pulse,
the drawer always opens and the loop is not needed anymore.
TaskID: 2045581
closesodoo/odoo#35368
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
- Set the rounding of Unit(s) to 1.0
- Create a PO for 1.4 Unit(s), validate => the picking contains
1.4 Unit(s)
- Validate the picking
The backorder wizard is displayed, and if no backorder is selected, a
crash occurs.
The quantity should be rounded when the picking is created. Otherwise,
inconsistencies will appears when it is rounded in subsequent processes.
opw-2046965
closesodoo/odoo#35560
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
_on_login_cooldown is documented as being disabled when
"base.login_cooldown_after" is set to 0, however the incorrect return
value meant setting this parameter to 0 would put every user on login
cooldown permanently.
Closesodoo/odoo#35544 reported by @rodrig92
closesodoo/odoo#35555
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
The following rounding is incorrect:
```
>>> float_round(6.6 * 0.175, precision_digits=2)
1.15
```
Indeed, 6.6 * 0.175 = 1.155 ≈ 1.16.
In this specific case, the `epsilon` computed is not sufficient. A
precision of 53 gives:
normalized_value = 115.49999999999997
epsilon = 1.2823075934420547e-14
=> new normalized_value = 115.49999999999999
Bad luck, this is just not enough to tip the value in the right
direction.
However, a precision of 52 is sufficient:
normalized_value = 115.49999999999997
epsilon = 2.5646151868841094e-14
=> new normalized_value = 115.5
The value of 53 was chosen from the `binary64` number format precision.
In case of Python, the corresponding machine epsilon is 2^-52 [1].
Therefore, using 52 instead of 53 does make sense.
It is worth noting that the value of the machine epsilon
2^-52 = 2.2204460492503131e-16, which is still 2 orders of magnitude
below our dynamic estimation.
[1] https://en.wikipedia.org/wiki/Machine_epsilon
[2] `numpy.finfo(float).eps = 2.2204460492503131e-16`
opw-2047368
closesodoo/odoo#35521
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
When the product has a lot of variants which are displayed as checkboxes
or as colors, the jQuery selector was matching as many items, and the
event was triggered for each of them.
The result was the change event of website_sale being triggered many
times, where only one call would be enough.
The change replicates what was made on v12.0 on the same line by commit
f8dad1bb4b.
opw 2036356
closesodoo/odoo#35322
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
In the calendar view
In the partner filter in the calendar side bar
type something, and backspace rapidly to remove everything
Before this commit, there was a error because the framework tried to write something
in the corresponding field
This was because the o2m field was not initialized
with the correct values
After this commit, there is no error
OPW 2043975
closesodoo/odoo#35330
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Before this commit, the field intrastat_country_id was not propagated when refunding an invoice
After this commit, the refund invoice takes the same values for that field
as the invoice it is refunding
OPW 2028333
closesodoo/odoo#35309
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
- Admin (U1) user, Demo (U2) with Sales Manager rights
- Create parent company A and child company AA, U2 has access to A (U1 to both)
- Create 2 taxes, T1 for A, T2 for AA
- For product P, add tax T1 in company A, and T2 in company AA
- U2 creates a new SO in company A with no lines, export Order Lines/Product
- U2 edits the file to add product P
- U2 imports the file
Before this commit, the sale order's line had the taxes for bot company
After this commit, it only has the taxes for the company of the sale order
OPW 2036453
closesodoo/odoo#35294
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
In the planner the url are generated by prepare_backend_url that takes
an action's xml id as argument. The id passed should have the format
'module_name_where_the_action_is.action_name'. In this case the id passed
was product.product_template_action_product but the action is defined in
stock thus the prepare_backend_url was not able to find the associate action
and return a wrong(default) url.
This commit change the action id passed with the correct module.
closesodoo/odoo#18812
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
https://docs.python.org/3/library/stdtypes.html#truth
By default, an object is considered true unless
its class defines either a __bool__() method that returns False
or a __len__() method that returns zero
Since etree elements are iterator, they define a len function.
However it turns out that customerProfileId has always no children.
So bool(find(x)) is always False; the intended meaning was find(x) is None.
opw 1999427
closesodoo/odoo#34922
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
closesodoo/odoo#35246
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
Before this commit, for the following view tree:
P (active)
|
I (inactive)
|
II (active)
When calling `customize_template_get()` on 'P', it would wrongly return 'II'.
It shouldn't, since its parent 'I' is inactive.
Step to reproduce:
- Go to /shop
- Enable ecommerce categories
- Enable Collapsible Cateogories
- Disable ecommerce categories
- Collapsible categories is still shown even if its parent got archived
Test writen in 12.0 with #35154closesodoo/odoo#35155
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Before this patch, if a website is deleted, its redirections will stay, affecting other websites.
Now, website-specific redirections will disappear along with their corresponding website.
closesodoo/odoo#35130
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Since 5c9cea4ee7, it was not possible to remove an applied promo code
pricelist by adding an empty promo code on checkout (eg removing the one shown
in the promo code input).
Indeed, when sending an empty promo code, the `search()` done in the controller
would not find any pricelist as promo would be en empty string. For the rest,
check code on mentionned commit.
See `sale_get_order()` method docstring about `code` param: "If empty, it's a
special case to reset the pricelist with the first available else the default.".
Fixes#34633
On mobile devices, by default Odoo will uses a kanban view instead of a
list view if avaiable.
In the case of "Point of Sale > Reporting > Sale Details", we can select
the list of point of sale configs. It works fine on desktop, but on
mobile we had the kanban view that does not allow to remove selected
configs (and there is "New Session", "Resume" and so on buttons that
make little to no sense).
With this changeset we force in the case usage of the list view.
opw-2040954
closes#35104
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Before this commit, the unit price of the quote template line were
hidden.
Now, the unit price are shown. This is necessary because the unit price
is used if :
- the template is selected before the customer (price_list) is selected.
- the price_list is "Show public price & discount to the customer"
This commit revert 9416483465
opw-2039071
closesodoo/odoo#35069
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This section of log mentionned two profilers making think they were the
same.
The odoo/tools/misc.py `profile` logs a method calls inside a file that
can be used to generate a graph of method calls.
The odoo/tools/profiler.py `profile` logs a method lines calls, queries
and time spend inside the log.
fixes#31278
opw-2038941
closes#35074
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>