Let's consider a product P with a unit price = 100€
When a price list PL with a discount of 20% was applied, and
a coupon program CP with a discount of 10% was also applied,
system still calculated the rate based on unit price of the product
and not on the discounted price.
So in this example, the amount of the CP discount was 10€ instead of
8€ because the CP discount was computed on the unit price 100€
instead of the discounted price 80€ (with 20% discount of PL)
opw:2006829
X-port/Cherry-pick of odoo/enterprise@23739e8a71
In case of failure at token creation, raise a proper UserError instead
of a generic traceback.
opw-2025723
closesodoo/odoo#34420
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Avoid crash at currency conversion when no company is set on the SO
opw-2009044
closesodoo/odoo#34408
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
The error message is built from string pieces except one that is a list.
This commit cast this list into a proper string to be able to build the
error message.
closesodoo/odoo#34402
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
- Make a SO with a product that have a carriage return in its
description
- Export FEC report
The CSV contains new lines and is not correctly formatted.
opw-2026861
closesodoo/odoo#34385
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
- Install stock module
- Activate multi-company and variants
- Create a second company
- Create a product with 2 variants
- Create a picking with the product for both companies
- Add an attribute on the product with 2 values
- Save
An AccessError is raised on `stock.move`.
It arises because the field `product_qty` on `stock.move` must be
recomputed but is on a record in a different company.
The `try` / `except` clause doesn't protect against the recomputation.
Indeed, what happens is:
- try to unlink in batch => AccessError due to recomputation
- try to unlink individually => AccessError due to recomputation
- try to write individually => the field couldn't be recomputed before
(flagged as dirty), so try again to recompute => AccessError
We perform the operation as sudo, and take care of checking the access
rights beforehand.
opw-2009450
closesodoo/odoo#34369
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
There is a conflict in saas-12.3.
Indeed, the optional popup on a product when adding to cart got encapsulated
into a new module with 55ed70f405.
But 9308180089 introduced a new test in 12.0 about free delivery.
The tour expects the popup to be shown, but it is not the case anymore.
The tour needed to be adapted. Standard runbot was green since the test would
luckily be executed after `website_sale_product_configurator` would be
installed. That was not the case on runbot theme.
The chance is also taken to ensure the test is executed on the correct
delivery.
closesodoo/odoo#34367
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
When creating a new tax, before saving, the default-computed repartition lines had no country_id associated. It only 'appeared' when saving the record.
closesodoo/odoo#34359
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Before this fix, the many2one text in the list view was not wrapping.
After this fix, the text will wrap according to the available space
(managed automatically by the browser).
closesodoo/odoo#34345
Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
When registering a payment against multiple vendor bills and change the memo,
the memo must be populated to all the payments. This behavior has been introduced
with the following commit in stable 11.0: c04065abd8
opw:2024652
closesodoo/odoo#34322
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Backport from 12.0 to 11.0 (commit: 3cbdfe8807)
- Have two crm teams with the same team leader, and without team members
(team1, team2 as instance).
- Create a new lead, add as Salesperson the team leader, and as Sales
team the second previously created team (team2).
- Save the new lead.
Before this commit, when we save the lead, the sales team will change,
to set the default sales team for the chosen Salesperson, in this case
team1.
opw-2005924
closesodoo/odoo#33898closesodoo/odoo#34327
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
This commit improves the elearning onboarding on the quizzes
If the user is not logged in, a log in button will show up under
the quiz
If he is logged in but not a member of the course and the course is public,
a join button will appear under the quiz
If the course needs to be bought, a buy button will appear under the quiz.
If the course is on invite only, a message under the quiz will inform the
user about it
TaskID: 2003986
PR: #33861
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
closes odoo/odoo#31520
---
backport of 8e2f9a4fe2
Initially a improvement, it is now backported in 12.0 to fix#34430closesodoo/odoo#34474
Signed-off-by: Christophe Simonis <chs@odoo.com>
Before this commit, when an address would be edited or created from checkout,
we would always add a website_id on it.
(values_postprocess -> _checkout_form_save)
That would be incorrect if the website has not 'specific user account' enabled.
It would lead to an error as the user would not be able to connect to another
website. Indeed, the billing address is stored on the partner directly. Since
the res.user website_id is a related to the partner one, the user would then be
restricted to that website.
Fixes https://github.com/odoo/odoo/issues/34308closesodoo/odoo#34396
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Parent commit moved needed functions into misc so this test could use those.
This test is for parent's parent commit which fix checkout billing address
edition.
Part of #34396
1. Set "Round Globally" on Invoicing settings;
2. Create a new vendors receipts and validate it;
There are an error messages that said : "Cannot create unbalanced
journal entry."
Fine turning of : 3e147220fd
opw-2026534
closes#32667closesodoo/odoo#34415
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Add record to the email values to allow the use of more complex
email layout as : "mail.mail_notification_paynow"
opw-2025099
closesodoo/odoo#34375
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
The terms were already exported but it was not in the configuration file
Courtesy of Erwin Van der Ploeg
closesodoo/odoo#34467
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
- Create 2 rates:
2019-05-01: 1.0
2019-06-01: 0.5
- Set-up a product A in AVCO
- Create a PO for A on 2019-05-15
- Receive the product after 2019-06-01
The AML are created with a rate of 0.5, but the product cost is updated
with the rate of 1.0.
This is because the stock move date is used when it is still assigned,
and not done yet. As described in:
https://github.com/odoo/odoo/blob/2f789b6863407e63f90b3a2d4cc3be09815f7002/addons/stock/models/stock_move.py#L36
The date is the scheduled date until the move is done, then it is the
date of the actual move processing.
We change the date to today's date, since it is the value used to update
the move date:
https://github.com/odoo/odoo/blob/2f789b6863407e63f90b3a2d4cc3be09815f7002/addons/stock/models/stock_move.py#L1143
opw-2006368
Note: the test has been slightly refactored to avoid an inconsistency
between `fields.Date.context_today` and `fields.Datetime.now`. Now, they
both return the same day. Moreover, the date is updated before each
action.
closesodoo/odoo#34444
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Configure two companies, add a bunch of attachments to each company so
at least one has more attachments than the default 80 search limit. List
the attachments of that company, only the 7à-ish firsts are displayed
and the pager is disabled.
The `_search` method is override in `ir.attachment` to filter the
original record set. If the original record set had reached the limit,
the filter may only return a subset whose length is lower than the
limit, this trick the different JS views making them think there are no
more records to return and disable the pager.
The fix has been to recursively re-search until the subset length is
equal to the limit.
opw-2025940
closes#34287closesodoo/odoo#34450
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
Before this commit, all url of channel were using `web.base.url` instead of the
current website domain.
Fixes#32348
The override of `get_base_url` method should not be forward ported after
saas-12.4 as since saas-12.5 it is now a model method (f727cd2645).
closesodoo/odoo#34421
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
Two different problems on the box and resulted in the crash of the Odoo
instance running on the IoT Box:
When `usblp` had troubles communicating with a printer, a NoDeviceError
was raised. The `printer` variable was still set from the last time the
loop was processed, so we tried to close it, resulting in an error.
The code handling generic execptions was broken.
closesodoo/odoo#34437
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
This popup shows in the rare situation where somebody has 2 payment
methods that use Mercury. It allows them to choose which one to use
when swiping a card.
It would show the amount due in the title of the popup however this
isn't correct when a "pending swipe" payment line has been added.
Fix it by removing this amount, it's clear what will be paid from the
information on the payment screen. Also use this opportunity to make
it translatable.
opw-2006596
closesodoo/odoo#34398
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
We have multiple ways of simulating a frontend context while running python
tests (mainly during TransactionCase):
- `MockObject` class from 8557bcfa30
- `simulate_frontend_context` method from a5a5a57e48
- `DotDict` from f8efc9a957
This commit moves `MockObject` to misc to be reusable and adapt it to be
accessible by dot notation with `DotDict`.
Part of #34396
Before this commit, when an address would be edited or created from checkout,
we would always add a website_id on it.
(values_postprocess -> _checkout_form_save)
That would be incorrect if the website has not 'specific user account' enabled.
It would lead to an error as the user would not be able to connect to another
website. Indeed, the billing address is stored on the partner directly. Since
the res.user website_id is a related to the partner one, the user would then be
restricted to that website.
Closes#34396Fixes#34308
Card readers act as barcode scanners, they produce barcodes in a
certain format (see pos_mercury.barcode_rule_credit). Update the label
of the option to reflect this.
opw-2006596
Currently, while editing user profile from frontend, biography is displayed in
textarea despite of being an HTML field.
This commit fixes the behavior by providing users with wysiwyg ediotr to
update their biography while editing profile from frondend.
task-2007731
closesodoo/odoo#34207
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, it was considered as an error because status was not OK
closesodoo/odoo#34377
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Commit https://github.com/odoo/odoo/commit/0c6e0d660ea00ad7ee9a3e94c0ac944cdf46565f
used flex to properly align address information and the fa icons. The
problem is that using flex prevents the parent div to ask for the
address information to be center/right aligned. This is the case for
the job pages in internal.
This commit uses display: inline-block on the top-level element of the
address to solve the problem.
opw-2000947
closesodoo/odoo#34371
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>