Previously, when selecting an image, the user could optimize their
images by clicking a little cog icon in the media dialog. They would
also be prompted to optimize their images when uploading them. In most
cases, it makes a lot more sense to always save the original in the
database, and optimize the original whenever it's dropped in the page
automatically.
A second problem is that when using the optimization feature, optimized
images would be displayed along the originals by default, resulting in a
lot of duplicates while browsing the media dialog.
This commit changes both of these things:
- By default, when uploading an image, the original uploaded image is
used. The user can still optimize their image manually through the
media-dialog by using the cog icon. When choosing an image in the
media-dialog, if it's not already an optimized image, an optimized copy
is automatically created and used instead.
- Optimized images are now hidden by default, in the media dialog, and
can be shown by clicking a checkbox at the top of the modal when in
debug mode
task-2091417
closesodoo/odoo#45174
Previously, searching for images in the database and on unsplash was
mutually exclusive, and controlled by a dropdown menu next to the search
bar. Additionally, the display of db images and unsplash images was very
different, making using the search function inconsistent and awkward.
This commit merges the unsplash search into the db search. When
searching, the first few matches from the database are displayed, then
results from unsplash.
Additionally, the layout of images has been greatly improved,
eliminating almost all padding, using some flex-box magic to allow the
images to take up all the available space without being cropped or
deformed.
The input to add an attachment by URL is now collapsed by
default, and clicking on it will expand it to reduce visual clutter.
Finally, when not in multi-images mode, the clicked image is immediately
used, rather than the user having to click it and then click the add
button, or having to double click, which was not obvious.
task-2091417
closesodoo/odoo#45174
Before this commit, the template of the "Tip" widget was loaded on test runtime
and caused a concurrency issue.
Now, the template is loaded before the test suite is launched and is ready when
the test is executed.
closesodoo/odoo#48589
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
The problem is described in https://github.com/odoo/odoo/issues/48550.
This is caused by reconciled receivable line in the invoice being
reconciled with another reconciled receivable line in pos_session's
move_id. The lines are already reconciled because their balance is zero.
So to avoid trying to reconcile those reconciled lines, we do not
include them in the list of lines to be reconciled.
closesodoo/odoo#48587
X-original-commit: f24677098bec9b96108a901dde08bf75dc7d4c5f
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
PURPOSE
Before this commit when an administrator edit another user's profile it
was his own data that displayed for the changes.
This commit fixes this issue.
SPECIFICATION
Add a test in both controller route when displaying the edit view and
when submitting the changes that check if the edited user is the same
as the actual user.
LINKS
Task ID : 2222043
PR : #48262closesodoo/odoo#48575
X-original-commit: 4ab4de5b57a17002d8b14584c7d39a29e8bca357
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Whe a pos session is opened, it is impossible to install discount
anymore, because the module tries to set a default value for the product
discount.
To fi this error, we are setting the default value, only on config that
are closed.
closesodoo/odoo#48576
X-original-commit: 4c4adf472453de65e45e71f0cbd22a36ef2ed0db
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
========
Purpose
========
Currently, purchase missing some billing functions that we have in sale
invoicing:
- Create credit note when necessary
- Create vendor bill in batch in list view
========
Spec
========
- In case of retures, when create a bill for a purchase order, we check
the total amount we want to bill to decide whether it's a vendor bill or
a credit note.
- In the list view, add a new action to create vendor bill/credit note
for all selected order.
========
Links
========
Task 2170715
PR #44210
Related: odoo/upgrade#919
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Usecase to reproduce:
- Create a MO as draft
- The stock move inside don't have a reference despite the MO name is
already set.
It happens because the reference and the group are set during the
action_confirm. However it's not great if the user takes time before
confirmation or if he cancels the MO. In those case the reference
on the moves remains 'new'.
opw-2201986
closesodoo/odoo#48568
X-original-commit: 1b7e304a907d8a43d5f561226028a4b353902fab
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Before this commit, method `postprocess_pdf_report` was public and can
be called over RPC while there is no usecase to allow it to be called
over RPC.
Clarify helper of field attachment_use
Remove helper of report_name as QWeb is the only supported type
Log wkhtmlerror
closesodoo/odoo#33770
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Change the decimal point and thousands separator for es_PE and es_CR
Set the currency symbol and position for Colon CRC
closesodoo/odoo#48535
X-original-commit: 88f420f37c305a7451be31ee36c479c2dffd4db8
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Steps to reproduce the bug:
- Let consider a user U from a single company C (Multi companies = False)
- Let's consider a BOM B for a finished product FP with product P1 as component and product P2 as byproduct
- Let's consider that P2 is tracked by lot
- Log as U and create a MO for FP
- Produce the MO
Bug:
A widard was opened but it was impossible to create a lot for P2
opw:2216028
closesodoo/odoo#48556
X-original-commit: 30ebdee091362b8c857bdcad2bdf44bd698572c4
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Creation of production order from a bom with 0 quantity to produce will
fail. As there is already a constraint on the quantity to produce on MO,
this commit adds the same constraint on BoM.
closesodoo/odoo#48485
X-original-commit: 1330500885ae096372ab32fba4ffc9db252dd2d4
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
- Create a new course;
- Add content line;
- save.
Before this commit, Odoo raises an invalid field error on 'Course' which
is empty. If you try to select the newly created course, it is missing
in the list.
Now, the course is removed from the view when creating a new content
from a course. But it stays if the content is created directly from the
content menu.
opw-2210360
closesodoo/odoo#48534
X-original-commit: f0b616348f11e00aae8c9b30df4c0ed922041b26
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
added test case for text paste in autocomplete in the searchbar using mouse,
it should populate the autocomplete dropdown.
task-2204174
closesodoo/odoo#48251
X-original-commit: 010961ee3eac55a1e885ce918b597943078324f6
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Create a new contact with:
- Name [DEMO]
- VAT RORO790707I47
- Country Mexico
An error inform the user that the vat is not valid, this happens because
the vat number is recognized as romanian and compacted before passing
to actual vat checking. Skip the check if the country of the new
partner does not match what is detected on the vat, assuming the user
know what he/she is doing
opw-2218491
closesodoo/odoo#48273
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Now we have the mobile search_panel in enterprise,
this commit simply adapt the Odoo repos part with:
- Css Clean up
- Remove the no longer existing step inside the tour
the button 'o_enable_searchview' no longer exist
inside a M2X dialog
Task ID: 2200099
closesodoo/odoo#48376
Related: odoo/enterprise#9494
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
Bug
===
In ffe1d4047d "onchange" were replaced
by computed fields. But in 950296f661499f499b0a5776ce7fd91a66c2a63f,
they use manually this onchange method in the copy, which is not needed
with computed field (bug introduced certainly during a forward port).
Task-2226235
closesodoo/odoo#48531
X-original-commit: 63712e106dfae6ef99d93a0ba2ff4102ed430719
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
journals that were not of type sales and journals.
We update the hence of the view to take into account the original
invisible domain plus the domain we need for journals that use documents
closesodoo/odoo#48526
X-original-commit: 085fd43fd0b8a13dd713fbb4e34126ebe63ea504
Signed-off-by: Josse Colpaert <jco@openerp.com>
During the recent refactoring, the order reversal of the post messages
was dropped by mistake;
closesodoo/odoo#48523
X-original-commit: cffe6c305a64abfcc7a10fd8ab837398915ed906
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
PURPOSE
After the latest developments on survey, notable sessions and "free text
questions", a few minor bugs have been introduced.
SPECIFICATIONS
General specifications, see sub-commits for details:
- When showing correct/incorrect answers on bar charts, the correct answers
bars should not be faded out.
- When going from the Leaderboard to the "Final Leaderboard", it should not
duplicate the results.
- Correctly handle "free text sections" in survey sessions.
- Exclude pages that have no description in 'page_per_question' layout
- Correctly navigate through survey with conditional questions activated
- Fix minor issues with the "back" button on survey
- Skip section with no active questions (when conditional questions configured)
Task 2208574
closesodoo/odoo#48442
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit applies conditional questions management on the
"_get_next_page_or_question" method in "page_per_section" questions layout.
We choose the first section that has at least one active question when
searching the next section to display.
Indeed, a whole section could contain only disabled questions based on the
previously selected answers of the attendee.
(The logic is obviously reverted when "go_back" is True).
PR #48442
Task ID 2208574
This commit fixes 2 small problems when the user goes back on the survey form:
- The back button should not be shown on "page_per_question" layout if we are
on the first page of the survey.
Pages can be displayed on "page_per_question" layout if they have a
description since #44271
- Can't go back on "page_per_section" layout if you are on the second page of
the survey, introduced by 0675d68afb
LINKS
PR #48442
Task 2208574
This commit remove unecessary array around triggered_questions_by_answer values
that is used at the client side to find inactive questions.
Before this fix, when looping through every elements of
triggered_questions_by_answer, we got an array, instead of each question id
separately.
PR #48442
Task ID 2208574
We now have a way to display "free text sections" during the survey flow.
(Since 5b74f54396 )
However, the behavior during survey sessions was not optimal:
- Attendees could click on "submit" and it would raise an error
- The section description was not displayed on the host screen
- The section description was never the "current question" of the session of it
was the first item of the question_and_page_ids
This commit fixes all those points to have a nice session flow.
While the host is explaining the section description to the attendees, they get
a waiting message on their screen.
In addition, we fixed the display to avoid showing pages that lack a
description, and we reworked the '_get_pages_or_questions' method to have more
meaningful and readable cases for every layouts.
LINKS
PR #48442
Task 2208574
This commit fixes a problem where the "final leaderboard" would duplicate the
attendees ranking display if the last question of the survey is scored.
We now also directly close the session when the host hits "next" on the last
question and there is no leaderboard to display.
LINKS
PR #48442
Task 2208574
This commit fixes the faded out answers bars on choice questions during a
survey session.
The logic is currently inverted (correct answers are faded out instead of wrong
ones).
LINKS
PR #48442
Task 2208574
There is a discrepancy between what country is used to compute the
fees for a transaction depending on where we are in the payment flow.
At rendering, the country of the order's shipping partner is used (since
it is set as the main partner in the rendering values dict through
`render_sale_button`).
At creation, the country of the partner is used (since the
`payment.transaction` record is created with the order's main
`partner_id` in `_create_payment_transaction`).
This is unfortunate and can cause issues with payment flows if there is
a mismatch between countries of the shipping/invoice/main partner, as
the fees may be computed as 'international' in one case and 'domestic'
in another - this causes the values sent to Paypal to differ from those
saved on the transaction, which causes the transaction to be rejected
upon return from Paypal because of an amount mismatch.
Since the transaction is created using the main partner of the order,
I believe it is preferrable to use it for the rendering as well. Some
may dislike this choice, as it means that if you use these fees to
manage your delivery fees, a customer with a shipping address to is not
the same as the company's country will pay domestic fees, while they
should pay international ones. However, this is mitigated by the fact
that:
- this did not work before this commit (hell of an argument)
- the delivery module is there to handle those cases with much higher
configurability
- having a consistent computation is more important than managing this
case
opw-2225023
closesodoo/odoo#48519
X-original-commit: a8689769afa22fb633f2e911f1a4dea6caa193d3
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
Change icon for documentation link to fa-question-circle in green.
Task ID 2226026
closesodoo/odoo#48469
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Before this commit, tours were activated in a non deterministic way and there was
no way to control the order.
Now there is a `sequence` key in the options dict (i.e. the second parameters of
`tour.register`) which will determine the tour sequence order, the lowest being
first and going upward. Unsequenced tours will behave as before with no particular
order.
Task 2191192
Issue
- Install Mass Mailing
- Activate debug mode
- Create a mass mailing
- Select any template
- Go in codeview
The snippets hide a part of the code
Cause
When toggling the codeview, we apply
a position absolute (all to 0) which
shift the #wrapwrap
Solution
Add an intermediary parent and apply
position relative to #wrapwrap like
in 12.0
OPW-2220639
closesodoo/odoo#48496
X-original-commit: e415cffa2ffb3fe4b5f0e32bd96b3433387a95e3
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
When routing an HTTP request, the dispatcher uses an environment with a
placeholder for the user (the object `RequestUID`). This environment is
not supposed to be used after routing has been done. However, the
flushing function takes any environment with a given cursor, and it
crashes when this environment is chosen (`psycopg2` cannot adapt the
type `RequestUID` for `write_uid`), and simply does not make sense.
closesodoo/odoo#48495
X-original-commit: da61a64bf6731a08557d23680eabf4d910035ebd
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
When a serialization error occurs in a given code context, the call is
retried. However, currently the environment is flushed outside this
context, which may cause a serialization error that is not handled by a
retry. Move the flush inside the checked call to catch all
serialization errors, and handle them properly.
X-original-commit: 6197bfb3b2d51873416780c96cd4cb538a1f219c
Before this commit, creating a new email template from the field
didn't have a default model
In this commit, event.registration is set as default value for
model_id on new templates
closesodoo/odoo#43606
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, the account on the original line was replaced by the
accrual account. This could be problematic for hashed journals. Instead
of having 2 different behaviors for hashed/non hashed journals, we
decided to always create 2 journal entries, which is also more academic:
* We don't replace something on an entry that has been posted
* We don't end up with taxes on the accrual account
* Accountants are used to do it this way
closesodoo/odoo#42787
Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
Commit https://github.com/odoo/odoo/commit/bb0cdec4594fab8c22265ed8af0c2d431a263b72#diff-e4ca107fe5c84ec39ba346fb90d1bdf6R76
added strange code affecting the whole editor when website_blog was
installed. To stay consistent, commit https://github.com/odoo/odoo/commit/80f54f563a3917828c5f67dfe9c44d0f6b0c5324
moved it in standard website and marked it as to review.
It is in fact the cause of a bug: *all* drop areas appeared with a big
editor text "Drag and drop a building block here" because of this code.
As a fix in stable, the problem was solved so that the code works as
intended: adding an editor message on a normal .oe_structure makes it
an .oe_structure.oe_empty automatically. Here in master, this code will
simply be removed and it will be up to the devs to not make errors in
their xml so that the editor messages appear. This commit in fact
keeps the "removing spaces" feature and enables it for all oe_structure.
Related to task-2210733
closesodoo/odoo#48463
X-original-commit: 5381e9d900b344e7d48a6b347c5fc551d433b15e
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit it was difficile to express xpath into these
group elements. By setting a name on the elements we no longer need to
use indexes or longer xpath expressions and can easily xpath on the
element itself right away. This will be more tolerant to form view
redesign.
closesodoo/odoo#48083
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
In the same xml file (meaning one of the two rule is useless, or wrong
if giving less rights than the other).
Removing rules that had no impact will ease the understanding of
security problems, by reducing the number of interconnecting rules.
From opw-2200219 opw-2210285 (v12)
Use case (2200219):
- Install CRM, sales and Automated Action
- Create the automated action
* Model -> Sale Order
* Trigger Condition -> On creation
* Action To Do -> Add followers
* Add Channels -> sales
- Create a new CRM opportunity with a partner set, Save
- Click on the "New quotation"
- Save
A Traceback "Error: A follower must be either a partner or
a channel (but not both)." will popup, blocking the user from
completing the action.
Use case (2210285):
After adding a channel as a follower to a sales team it is not
possible to create a sale order from a contact or opportunity. You can
only create a sale order from the sales app in that case.
End of use cases-----
This occur because the context flag default_partner_id is used by
the model to override the empty partner_id which should remain empty
Fixed in v12, forwarding the test for v13 and upward
closesodoo/odoo#48476
X-original-commit: 049aa5c2297938bcd378d1dee1aa766a646cb461
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Issue
- Install eCommerce with any theme
- Website > Enable optional product
- Create a SO with an optional product
- Save > Customer Preview
- Mobile view with inspector
- Click on the shopping cart icon in
the optional product line
Quantity selector is not correctly
displayed
Cause
First, the input width is 50%, which
means very small on mobile and there
are paddings on the input and the buttons
Solution
Remove the 50% width and paddings on mobile
It allows to see 3 chars on very small
mobile screen.
OPW-2220893
closesodoo/odoo#48423
X-original-commit: 38e90e09239eb75bd25001c7870758b380159ad0
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
Website has a behavior that will ask you which menu you want to edit if you
click on 'Edit Menu' in the topbar and there is more than one menu in the DOM.
This is typically the case for the event pages where the event has its own menu
on top of the website one.
This event menu was not triggering that behavior since 5b563549fa where is
was accidentally broken.
closesodoo/odoo#48459
X-original-commit: 5c3c91e4a8da7b7b9f5e05f9c0ec5a6dea782d87
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
Purpose
This merge fixes several issues on the slide list in front-end.
Specifications
* fixes reordering of slides in case there are some uncategorized
slides in the course;
* fix slide upload issues when adding it in an uncategorized category;
* fix resequencing based on a category;
* fix empty flag display whenever a slide gets drag&dropped/archived;
More info in sub-commits.
Links
TaskID 2090927
closesodoo/odoo#48452
Forward-port-of: odoo/odoo#48411
Forward-port-of: odoo/odoo#39086
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>