Recommended by GitHub's repository alerts.
We normally stick as close as possible to the version we depend
on in the official DEB packages. This in turn depends on the version of
Debian stable at the time of release - for 11.0 that would be Debian 9
(stretch) and thus Jinja 2.8 (with security backports).
However Jinja2 before 2.10.1 suffers from a few issues that could lead
to crashes of Odoo processes.
It seems it's worth an exception to our rule for pip users, similarly to
previous bump up at d2605bccdb.
closesodoo/odoo#32601
Signed-off-by: Christophe Simonis <chs@odoo.com>
When a user register a payment for multiple invoices,
the communication field is populated using all invoices.
However the payment should use the communication individually for each invoice.
This is a behaviour closer to what is done in 74b6f84cc8 for v12.
opw 1954887
closesodoo/odoo#32143
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
Commit 1be873d removed the modification of the reference field
from the _onchange_origin.
The reasoning was that since this is an onchange on invoice_line_ids, it was
applied too often, which annoyed users in the case they overwrote that field.
However when using the "Autocomplete" field (purchase_id),
then the user expects values to by modified.
Before, it worked by setting the origin field, which trickled down
to the reference.
Since that commit removed this, we re-add it explicitly in that case.
opw 1962364
closesodoo/odoo#32656
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
The field `order_mail_template`'s purpose is to provide a shortcut to
help the configuration. When `website_quote` is installed, it points to
a template which is actually never used anywhere.
opw-1961866
closesodoo/odoo#32543
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
To comply with Mexican laws, this l10n_mx_edi should always be installed when
both l10n_mx and the accounting modules are installed.
It should ease the onboarding process a bit too.
opw-1960982
closes#32566
Signed-off-by: Christophe Simonis <chs@odoo.com>
Before this commit, Odoo notifies the user of all the recurring past
events, existing before the installation of the module Calendar (old
events imported when synchronizing with Google, for instance). This
occurs only the first time a synchronization with Google is made. This
occurs because Odoo notify all the events that occurs since the last
time it notified, and the first time you install the module the date of
the last notification is empty.
Now, when the module Calendar is installed, the date of the last
notification is set by default to the current date (the date of the
installation of the module)
opw-1942443
closesodoo/odoo#32535
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
In mass mailing access to partners when performing a mass mailing has been
done in batch to speedup computation [1]. Emails are put into a dictionary
allowing to find back the email based on partner_id.
However the matching between the partner and its emails is done using a
shortcut using the current document ID as partner ID. It works when performing
a mass mailing on partners but fails when performing a mass mailing on models
having message_get_default_recipients not returning only emails. Currently
in saas-14 main models return only emails (crm, event, mailing contacts) but
other models may encounter issues (applicants, tickets).
This commit fixes it by correctly matching partner id and its found email.
[1] See 65ed4553a5
_compute_website_url can only be called on singletons
It should not be called with self but the record we are iterating on
closesodoo/odoo#32369
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
For existing installations, creating indices might not always be
possible, e.g. if you have a Text/Char field that has an index=True
set on it in a field override and pre-existing rows longer than
the pg supported size , the index creation will fail.
Instead of failing miserably during the schema modification, simply
log the problem instead and keep going.
closesodoo/odoo#32442
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
When a asset is confirmed, it's not allowed to link it to an invoice.
Side effect, it recomputed the depreciation lines of the confirmed asset.
opw:1961468
closesodoo/odoo#32388
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Since 79af654fc61 if we had unexpected configuration of usage such as
being in HTTPS, having a POS hardware in HTTPS but an error is received
(eg. the device is closed) => the POS interface can't be opened being
blocked on an error:
Https connection to IoT Box failed
Make sure you are using IoT Box v18.10 or higher.
Navigate to {proxy_ip} to accept the certificate of your IoT Box.
With this changeset, we have a popup that does not prevent to open the
point of sale interface (and the red disconnected status in the top
left allow to retry connection as before) on first load.
opw-1934413
closes#32306
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
- Create 2 companies A & B
- For a product P, create a supplier info for each company using the
same partner, with a different price and delay.
- Order the supplier so that the one for A has a higher priority than
the one for B.
- Create a reordering rule for P in company B.
- Run the scheduler as admin (e.g. thanks to the cron).
The price taken is the price for company A instead of B.
`_select_seller` is not company-aware, therefore the first matching
supplier is chosen.
opw-1959263
closesodoo/odoo#32328
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Google maps used to be free, but became a paid API.
Technically, the usage could be part of the free offer,
but to benefit from it the account needs to have billing enabled.
Since it's a paid feature security had to be ramped up,
so now APIs have to be explicitly enabled (here geolocating/geocoding).
All this makes it so that the Google account has to be properly configured
before the calls to the Maps API can work.
As a result we add an explicit UserError if the request fails,
to help the user configure the Google account
(before the error was entirely hidden as to give the user no chance at all).
Also exports transaltions, including for commit e6ca846c65
which raised a similar error message if no API key was found.
opw 1946485
opw 1947292
opw 1947337
closesodoo/odoo#32162
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
The editor has a tooltip editor wizard "Change media description and
tooltip", but when selecting an image there is also a tooltip:
"Double-click to edit"
added by the editor.
The combination of the two break the functionality, eg:
- if a tooltip is set with editor, then selecting the tooltip: we see
the set tooltip and not "Double-click to edit"
- if a tooltip is set with editor, then selecting the image back, then
opening the tooltip editor => the set tooltip is lost
With this changeset, we just do not show "Double-click to edit" tooltip
if there is a tooltip set on the element.
opw-1946801
closes#32482
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Have the module 'City Addresses' installed.
Open a contact, with the city field and the zip code field filled.
Before this commit, there is a display error, the city and the zip code
are bonded. This occurs because the 'City Addresses' module override all
views with the city field. In this override the city field don't had a
CSS class.
Now, the city and the zip code are display correctly.
opw-1958175
closesodoo/odoo#32455
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Before this commit, some constrains rose UserError
Which is not compliant with the api.constrains
After this commit, the constrains raise ValidationError
OPW 1949572
closesodoo/odoo#32444
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
The payment token was created using the partner of the invoice,
not the one really paying the bill.
opw 1938787
closesodoo/odoo#32176
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
Creating field indexes might not always be possible. For instance,
adding an index on an existing Char/Text field will fail if the column
contains values longer than 8192 bytes (PostgreSQL limit for BTrees).
Instead of failing miserably during the schema modification, simply log
the problem and continue.
closesodoo/odoo#32416
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
- Set up a stockable product for which the product category is FIFO / Perpetual
- Create a PO for this product with a unit price of 100$
- Confirm the purchase order
- Receive the item in stock
- Create a SO for this product
- Confirm the SO
- Deliver the item
- Unlock the delivery order and change the done quantity to 0
- Unlock the delivery order and change again the done quantity to a positive value
A `ZeroDivisionError` is raised.
Since `move.product_qty` is still zero, we fallback to `quantity`.
opw-1963984
closesodoo/odoo#32421
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Reintroduces 5324284f5 that was reverted because in the case of an URL
like /payment_stripe/static/src/js/stripe.js directly inside a QWeb
template, we would possibly get:
/fr_FR/payment_stripe/static/src/js/stripe.js
Which is not accepted by werkzeug SharedDataMiddleware we use to serve
static data in /{module_name}/static/ directories.
Added test without changeset failed with:
- test_process_att_no_request_lang: <AssertionError>
line: self._test_att('/en_US/', {'href': '/'})
wrong result: {'href': '/en_US/'}
- test_process_att_with_request_lang: <AssertionError>
line: self._test_att('/', {'href': '/fr_FR/'})
wrong result: {'href': '/'}
- test_process_att_matching_cdn_and_lang: <AssertionError>
line: self._test_att('/en_US/a', {'href': 'http://test.cdn/a'})
wrong result: {'href': 'http://test.cdn/en_US/a'}
- test_process_att_no_route: <AssertionError>
line: self._test_att('/my-page', {'href': '/fr_FR/my-page'})
wrong result: {'href': '/my-page'}
- test_process_att_url_crap: <IndexError: list index out of range>
line: request.httprequest.app._log_call[-1],
opw-1922051
closes#32095
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
- Sell 4 units of a product in stock
- On the picking, create a scrap for 1 unit
- Validate
- In the immediate transfer wizard, validate
The scrap is reset to zero.
This is because the wizard overwrite the done quantity with the reserved
quantity (0.0).
If the move is already done, there is no reason to overwrite the
quantity.
opw-1958514
closesodoo/odoo#32410
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
The jQuery selector is slightly too permissive, and therefore incorrect
elements may be matched. See opw for example.
Co-authored-by: Nicolas Martinelli <nim@odoo.com>
opw-1947698
closesodoo/odoo#32149
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Because of rev. d3453f7d15
when none of the pos order lines were reconciled,
the closing of the point of sale sessions failed
because of the tax cash basis entry generation.
There is no need to create the tax cash basis entries as nothing has been reconciled.
A known case is when the the bank journal credit account is set to a receivable account,
which has as effect to fully reconcile the payment line with its counterpart,
leaving no payment lines to reconcile with the order debit lines.
This is obviously not a correct accounting configuration,
but the point of sale validation did no fail because of this previously.
Fixes#32330closesodoo/odoo#32399
Signed-off-by: Denis Ledoux <beledouxdenis@users.noreply.github.com>
Often an invoice with the same amount is send to the same customer every week/month. If the customer pays just the amount, without any matching invoice information, common practice is to take the oldest invoice first.
Odoo currently suggests the invoice with the highest due date.
After the fix Odoo will suggest the invoice with the lowest due date.
closesodoo/odoo#32334
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>