Current behavior:
In a sale order: a wizard pops up to complete the link with the event
and attendee when we add an event product (same issue with event booth).
In quotation template: the wizard doesn't pop up when we add an event as
optional product.
When we create a sales order with the quotation template, the event
is added as product but the wizard still does not pop up, and therefore,
the SO is not linked to the event.
After this commit:
Don't allow adding event (or event booth) as optional product to a
quotation template.
A same fix was already done on products (not optional) here:
https://github.com/odoo/odoo/pull/100499
opw-3081853
closesodoo/odoo#113730
X-original-commit: a6bc38598f695ead9d9816b6858823b28b4ba95d
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Nasreddin Boulif (bon) <bon@odoo.com>
Since
https://github.com/odoo/odoo/commit/1b8d663cdccced35fd294ef3481aa7ce294880f0,
in `updateValue`, the `value` and `lastValue` could have different
`data-last-history-steps` and still be the same value.
This commit fixes the method to compare the values stripped of their
history ids.
opw-3134569
closesodoo/odoo#113726
X-original-commit: 5abb2ced63caffaf528f7b71eb1c193729ecd327
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Move QR from header to next to the invoice total,
now it's look like this https://drive.google.com/file/d/1kNge9eWUc0rMD_6VIDni7F4iHDa4QAE7/view?usp=sharing
Fix the QR code size, increase the QR code pixel and give max size so the quality of the QR code is improved.
Merged waybill number and valid until date so it takes less space, same for E-invoice Acknowledgement
task - 3147187
closesodoo/odoo#113671
Signed-off-by: Josse Colpaert <jco@odoo.com>
Steps to reproduce:
- Install pos, pos_loyalty, sales and activate the discounts and coupons
- Create a Discount code for the POS.
- Go to the POS see panel of buttons.
Issue:
Having discount codes in active won't trigger the button for enter the
code to be activated.
Solution:
We added the discount codes (`promo_code`) to the part in
`PromoCodeButton.js` that handles when we display the button.
opw-3193426
closesodoo/odoo#113646
X-original-commit: 200cf4ffa2e18498fdda62c51f7016cf0172e273
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Maruan Aguerdouh Mohtar (magm) <magm@odoo.com>
Commit [1] cloned the contents of the edited e-mail to a temporary
iframe before inlining its HTML (`convert_inline`). However, the assets
were not properly loaded in the iframe, which prevented the inliner from
doing its job properly, in particular with fonts (e.g., Font Awesome
icons were not loaded so they couldn't be converted to images).
This uses the `srcdoc` attribute of the iframe instead of replacing its
HTML element with a clone of the edited e-mail's, making sure to remove
all scripts from the iframe to prevent them from running, and disabling
script execution in it as a safeguard.
Steps to reproduce an example bug fixed by this commit:
1. Start a new e-mail with the "empty" template
2. Add a "Left Logo" snippet
3. Save
-> The Font Awesome icons are missing from the saved e-mail, the font of
the text is wrong, and the image is stretched out.
[1]: https://github.com/odoo/odoo/commit/582567fa13cef3e5fee00a17ff52c623ba5422f2closesodoo/odoo#113687
X-original-commit: 79dc6384329b1e8bd2338160d62028ac0c1cdce4
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
To reproduce the issue:
- Website > Edit mode > Click on header
- Change the shadow color of the header to a suggested gray > it only
works with normal colors but not grays.
- Change the header to "Header full" (it has no shadow by default)
- Add a shadow > It works
- Change the shadow color to a gray > it is reverted to no shadow.
To explain what happens exactly, let's suppose we want to set the gray
color from the custom property "--900":
When this color selected on colorpicker, the `customizeWebsiteVariable`
method will update assets to set a new user value:
`'menu-box-shadow': var(--900) ...`
But when the SCSS is compiled, the property name (here "--900") is
computed as a number which generates a wrong CSS value: `var(900) ...`
The goal of this commit is to prevent this behaviour by protecting
colorpicker variable names so they cannot be used for any further math.
task-3069518
closesodoo/odoo#113376
X-original-commit: 3e58af4bd9151f491c6a609b23f956191c594632
Signed-off-by: Arthur Detroux (ard) <ard@odoo.com>
Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
*: hr_skills, project
This commit improves the behavior of the ProgressBar field. Before 16.0,
views had a readonly mode, and to avoid having the inputs always visible,
the user had to click on the progressbar to enter into an edition mode.
Nowadays, this is redundant, and make it difficult to guess that the field
is editable. With this commit, the input is always visible, which also
allow to improve the template and the code of the component. The commit
delete unused props/options that were no longer used by the widget.
This commit also remove a legacy scss file that was still present, and the
style of the component has been moved to its own file. Some dead classnames
have been dropped, or replaced by bootstrap classes, reducing the size of
the scss file.
Tests had to be adapted, because some assertions were irrelevant, or were
triggering the click to enter edition mode.
task #3178958closesodoo/odoo#113002
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
The external button of the Many2one field has been changed with the
"always edit" feature of the form view, s.t. it displays by default
another icon (a right arrow) and when clicked, opens the related
record in another plain screen action instead of a FormViewDialog.
However, this doesn't work for Many2One fields that are already in
dialogs, because
1) if it's an action dialog (target="new"), that dialog will be
closed when opening the related record and the user loses its
working context
2) if it's another type of dialog (e.g. FormViewDialog), the
related record opens in the background and the dialog remains
open, which is obviously a bad UX experiment. This had been
locally fixes at some places [2].
This commit fixes the issue by automatically opening the related
record in a FormViewDialog if the Many2One is itself already in a
dialog.
This commit also fixes an issue with the scenario where the related
record opens in a dialog: if there were changes done in the main
record, those changes where lost when the user clicked on "Save"
in the dialog of the related record. We now only reload the
display_name of the related record, and apply it to the model.
[2] https://github.com/odoo/enterprise/commit/ba0e95fe42696dcf44b8feddeb302f04876fcbdc
Task 3191319
closesodoo/odoo#112959
Related: odoo/enterprise#37213
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
*:point_of_sale,pos_ayden,pos_discount,pos_hr,pos_loyalty,pos_mercury,
pos_restaurant,pos_sale,pos_six
Previously, the point of sale and related modules made heavy usage of
`useListener`. This is because the pos was converted early to owl, and
in owl 1, using events to communicate between components was encouraged.
In owl 2, the decision was made to stop encouraging this way of
communicating between components, because it encourages communication
accross many layers of components, and is also hard to debug. In
addition, in owl 2, because components can have 0 or more than node,
including non HTMLElement nodes like text or comment nodes, owl removed
the implementation of useListener, as useListener relies on the presence
and unicity of a root HTMLElement per component on which we can attach
event listeners.
Another problem is that events rely on the fact that the components are
in the DOM so that the event can propagate, which can lead to issues in
some cases and in particular, in the PoS, if you load the point of sale
and switch tabs, some things will be broken because we are triggering
events, but there have not been any animation frame fired in the tab
because it's not focussed, and so owl has not mounted the component yet.
When migrating odoo to owl 2, we introduced a shim for this.el and
useListener in LegacyComponent, with the hope to remove it as soon as
possible.
This commit removes all usage of useListener from the pos modules for
those reasons. In some cases, useListener was incorrectly used intstead
of t-on, and the event was triggered and handled by the same component,
in other cases, a simple callback could be passed to a child component.
In a few cases, a method had to be implemented on the store as we wanted
this method to be available everywhere.
closesodoo/odoo#112219
Related: odoo/enterprise#36888
Signed-off-by: Samuel Degueldre <sad@odoo.com>
As PyPDF2 was bumped from 1.2.6 to 2.12.1 and made some breaking
changes, we made an attempt in 8e0564dff to have Odoo working with both
versions. This is necessary because of the imminent release of Debian
Bookworm that will provide PyPDF 2.12.1. In the meanwhile this import
broke the Bookworm nightly build.
While at it, let's remove the unused `textwrap` import.
closesodoo/odoo#113667
X-original-commit: 7431019b35ee71813ce8602f46ddc50a70c661ed
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
To reproduce
============
- on website add or edit **contact us** form to create a task on a project
- fill the form from Incognito
- on project -> the created task : try to send message on chatter
- you will find the email used when filling the form with possibilty
to check it as receiver
- check the box, a dialog will open to create a Partner for this email
- close the dialog without modifying anything
Problem
=======
the checkbox will remain checked, but when you send a message no email will be sent
Solution
========
as stated in this comment https://github.com/odoo/odoo/blob/de1f701e7bd7ebb6f7ebea5c097d980039c4f904/addons/mail/static/src/components/composer_suggested_recipient/composer_suggested_recipient.js#L128-L130
we will only send the message to partnenrs, so if no partner is
created we must uncheck the checkbox.
opw-3168779
closesodoo/odoo#113701
X-original-commit: 24e6a16e349e1521fadc8c18574c15389c550f0c
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: abla001 <abla@odoo.com>
If there's a l10n_it_edi_transaction id on the move, then the move
has been sent to the SdI and it has received no rejection yet.
So we avoid showing the Reset To Draft button in that case.
Task link: https://www.odoo.com/web#id=3191726&model=project.task
Task-3191726
closesodoo/odoo#113694
X-original-commit: dc088f2dabc369a3c7a00be7d20e81a56aeffef5
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Paolo Gatti (pgi) <pgi@odoo.com>
Steps to reproduce:
- go to any sale order
- force mobile view
- refresh
Bug:
there is no space between the quantity and the unit
Fix:
putting both in the same line makes odoo add the space between them
OPW-3185674
closesodoo/odoo#113273
X-original-commit: 1a0d4c32161444902467c3ec18003c24e885edd1
Signed-off-by: Mohamed Megahed Abbas Megahed SALLAM (mome) <mome@odoo.com>
Steps to reproduce:
- create a project with an analytic account;
- create sale orders/invoices and purchase order/bills for a project;
- use other currencies;
- go to the "Project Updates".
Issue:
The amounts are used without being converted
into the currency of the analytic account.
Solution:
Convert amounts used in the currency of the analytic account.
Note:
For performance reasons, it is acceptable to fetch all currency
on the same date to get the conversion rate.
In this case, today's date is the most appropriate
(as the project is in progress).
opw-3193676
closesodoo/odoo#113684
X-original-commit: 68b4ea69c173dd5894bcb42b99e6818f241f9734
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This commit adds a trigger in the table of content test to make sure the
edit mode is ready before clicking on the first TOC block. This is
necessary because the test often failed on the runbot.
task-3203031
runbot-17505
closesodoo/odoo#113668
X-original-commit: 4775cfc38ed4e601c9ab6ae88c39c77299a50636
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Guillaume-gdi <gdi@odoo.com>
Creating a new partner with no company selected should raise the
same VAT partner warning if there is any other partner **in any**
company with the same VAT.
closesodoo/odoo#113649
X-original-commit: 97bf59848e6e0dabda28db4b6fc1cc20844f0b97
Signed-off-by: William André (wan) <wan@odoo.com>
Current behavior:
When there is an opening difference, the closing popup does not show it.
Steps to reproduce:
- Create a new POS session
- Add some cash to the register (100€)
- Close the session with the same amount
- Open the session again
- Change the cash amount in the register (80€)
- When closing the session the popup should show the -20€ difference
opw-3101297
closesodoo/odoo#113539
X-original-commit: 03860317dfcc998b5d0716d08b4267b6ee4689e5
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
PayPal no longer supports receiving payments without an account.
task-3166217
closesodoo/odoo#113138
Related: odoo/upgrade#4354
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Prior to this commit, the responsive behaviour of the toolbar was a
scroll-x.
I added conditions with widget.isMobile(), to allow the layout to change
in mobile (ex: all the list options in a dropdown).
closesodoo/odoo#110161
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit fixes the issues in the mass_mailing module where the display
needs to be grid, and the dropdown dynamic is causing issues because of
the css rules transform and unset.
Popper.js manipulates transform and the position of the dropdown, and
in mass_mailing, its calculations are wrong.
These !important rules stops it from doing so, by unsetting the automatic
rules generated by Popper.
Part-of: odoo/odoo#110161
Prior to this commit, there were functional issues for the floating toolbar
and design issues for the Powerbox in the web editor.
This commit fixes those issues, like alignement for the icons in the list
of the commandbar, box shadows, and the responsiveness of the floating
toolbar on mobile.
In commit [1], the toolbar dropdown had the display static added, but it
causes problems to the responsiveness.
This commit put the display back to dynamic on the dropdown and so, fixes
the dropdown not showing on mobile because of the overflow-x on auto.
The dynamic state also allows the dropdown to change direction (dropdown
to dropup) when there's not enough space for the content of the dropdown.
Would be nice to have : use display state on the all the editor
toolbars (frontend and backend) to modify the layout of the toolbar for
mobile, for a better behavior and design (ex: the different lists in a
dropdown).
For now, it's just a horizontal scroll.
[1]: 459d4e27a8
task-3087826
Part-of: odoo/odoo#110161
Some providers require additional allowed states due to their refund or
transaction process justifying it. Until now, these extra states were
specified in the `payment` module, which was not ideal as it allowed
every provider in every flow to accept these additional states.
With this commit, additional states are now specified only in the
coresponding flow of a provider that requires them.
task-2869678
closesodoo/odoo#107110
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Purpose
=======
Improve the results page filter to allow the filtering
on questions of type text_box, char_box, numerical_box,
date and datetime.
Specifications
==============
Updating the URL filters representation to avoid passing the
question types directly in the URL parameters.
Answer matching per question type:
- char_box, text_box: 'ilike'
- numerical_box, date, datetime: '='
Adding a new filter restricts the current filter results.
Handling the filters depending on the 2 different answer models:
'survey.question.answer': matrix, simple_choice, multiple_choice
'survey.user_input.line': char_box, text_box, numerical_box, date,
datetime.
The filters can be combined but their query count doesn't add up
if their related answers data are stored in the same model.
Task-3138245
closesodoo/odoo#110252
Related: odoo/enterprise#36383
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Add a tour that test the basics of the dynamic placeholder
dropdown functionality.
task-3081325
closesodoo/odoo#109326
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
The presence of the history ids in the html resulted in false
positive in the `_isDirty()` comparison. This lead to unwanted
writes when switching records, even when no change were made.
task-3186072
closesodoo/odoo#113633
X-original-commit: dcd3a538ecd4d7dc35bd7de6a8e2655e7392660a
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
The `format_float` function is calling `float_repr`, which should not be
used for rounding operation (see its docstring). Instead, we should use
the `float_round` function.
opw-3171987
closesodoo/odoo#113631
X-original-commit: 0267c0d11ad1a5882aa5520bbf9455156b83149c
Signed-off-by: Nicolas Viseur (vin) <vin@odoo.com>
Signed-off-by: Julien Van Roy <juvr@odoo.com>
From a practical point of view, it seems better to also add the
dialog service in the service registry when calling
setupControlPanelServiceRegistry.
closesodoo/odoo#113610
Related: odoo/enterprise#37510
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
When selecting the content of a tab with Chrome, if the selection
reaches the end of the tab content and there is additional content after
the Tabs snippet, the selected range also includes the next inactive
tabs that are hidden. Because of this, when replacing that selection,
the next inactive tabs are removed, and the Tabs snippet is corrupted.
This commit avoids this by including the `.tab-pane`s in the read-only
areas while including its `.oe_structure` in the content-editable areas.
This makes the selection adjustment mechanism stop within the active
tab pane.
Steps to reproduce:
- Use Chrome.
- Drop two Tabs blocks inside a web page.
- Select the first tab of the first one.
- Select the last word, including the dot. (Double-click the word and
drag beyond the dot before releasing the mouse button.)
- Change the selected text's color.
=> The content of the second and third tab also had the chosen color.
- Select the text in the first tab with a triple click.
- Type something to replace the text.
=> The content of the second and third tab were removed and clicking
on the tab's header did therefore not reach them anymore.
opw-3117305
closesodoo/odoo#113624
X-original-commit: fd57dae13179c286da99749e77a3b26efd2f73f2
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Steps to reproduce:
Create an expense with a product which has a cost.
Issue:
There is no label that explains the amount displayed.
Solution:
Correct the label display.
opw-3132937
closesodoo/odoo#113623
X-original-commit: e1a90c39111a0210d043d6708fd283af720bd128
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
Renamed brain-tec.md to braintec-group.md and removed the contributors who never contributed.
Created a new file braintec.md and added the currently needed contributors there.
Due to our rebranding and the associated change of the domain, this adjustment was necessary.
closesodoo/odoo#113619
X-original-commit: a1dab0536744086297d5d7407dc9ba873c8e8117
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Remove the "generate leads" buttons from most crm lead views:
we do not show buttons if active_model is set to something else
than crm.lead. It is both done in the kanban and in the list views.
Some create are also set to False.
Task-3107232
closesodoo/odoo#108445
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Reproduction:
1. Install Sales
2. Go to the quotations
3. Drag the column “name” and change the size
4. Check any sale order in checkbox
5. The column size is reset to default
Reason: the keepColumnWidths parameter isn’t set to True after changing
the size. This happens to all the list views
Fix: we freeze the list after resizing the columns. Remove the extra
keepColumnWidths setting in reordering since it's already set to true
after resizing. Also added tests to check the column size is kept after
toggling the checkboxes
A similar fix is here: https://github.com/odoo/odoo/pull/10902
opw-3113822
closesodoo/odoo#113607
X-original-commit: 30a346a90b633dd73fa823de2cdaf37a0e52c526
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Liu Jinjiu (jili) <jili@odoo.com>
Starting from [1], the `_updateColorpicker` method was added on the
"link tools" widget to update colorpickers with the selected link colors
(and it will create the colorpicker for each CSS property on widget
`start`).
Following this update, the code on [2] and [3] added some fixes to
handle the async parts of `_updateColorpicker`. [3] was done very
recently, more than one year later after the introduction of [1]. It
turned a synchronous method into an asynchronous one (rightfully
considering the async calls to `_updateColorpicker` that were inside).
As a fix, this commit will try to re-made it a synchronous method, and
other parts related to `_updateColorpicker` too.
The goal of this commit is to separate the link tools colorpicker
"creation" code (`_addColorPicker` now) from colorpicker's "update"
code. These changes are supposed to fix a race condition issue that
appeared on 16.0, but since the code is the same on 15.0 and subject to
the same issues, we target 15.0 with this fix. Hopefully, this prepares
for an easier refactoring in master.
[1]: https://github.com/odoo/odoo/commit/26d37812f0217ae913c8ddf761bcb26b5c44bff5
[2]: https://github.com/odoo/odoo/pull/78301/commits/6f1a6b76642db2e4f81cf3474ad0ec745a4bb3c9
[3]: https://github.com/odoo/odoo/commit/d15fdca644ef9ed1dfb011d3790f403e0157f55b
runbot-5753
closesodoo/odoo#113510
X-original-commit: 2d4a3efe0d7c9618c388575b4bb652a26913fe68
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
This commit intends to add information about the number of slides,
as well as the time needed to finish said slides to the slide sections.
We now also round completion time values up to minute when getting said values
from youtube, google drive or vimeo.
In addition, we add responsible, course and tags options in the search bar.
Task-3054391
closesodoo/odoo#107507
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
If one of the theme was not migrated to the new tx api, still support
the previous notation.
Happened on the design-theme repository
closesodoo/odoo#113571
X-original-commit: a8355ba3dddb5f3c8a8e8e777aff85d558410971
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
A set iteration was creating a random number of queries on some tests.
This was noticed in TestEventPerformance were a random additionnal query
could appear in default_get depending on _get_description and
_get_default_stage_id order.
This commit uses a list to get a deterministic order. It looks like
the set was not useful anyway.
closesodoo/odoo#113563
X-original-commit: 13572df256ccc6351588851d385c381ace155e0d
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
This commit is part of the preliminary work to rewrite the form,
list and kanban model. We want this new Model to only be aware of
field related information it needs (whereas in its current
implementation, the model stores all the information extracted
from the field node in the arch). This would allow to properly
manage multiple occurrences of the same field in views, that is,
each occurrence would be represented by a field component (if
visible of course), and that field component would use the field
information of the arch node it represents. To this end, we want
fields from not using anymore information stored in activeFields
in the record datapoint. Instead, we now call extractProps with
the whole fieldInfo (the information extracted from the arch), s.t.
each field can generate the props it needs from those information
(e.g. sub views for x2manys).
This commit doesn't remove the use of record.activeFields in
concrete fields (this will come later), but reworks the fieldInfo
object generated by parseFieldNode, and provide it to the calls of
extractProps. In fieldInfo, the `options` key is no longer inside
`attrs`, as it is now top-level, alongside several other generic
keys that have been processed (like on_change, modifiers...). For
that reason, a lot of extractProps definitions had to be adapted.
Part of task 3179751
closesodoo/odoo#113092
Related: odoo/enterprise#37266
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Current behaviour:
When trying the resend a snailmail that had a format error, by
adding a cover we get an error that a record we trying to access is
deleted.
Expected behaviour:
We shouldn't delete the letter that we are trying to resend.
Steps to reproduce:
- Install Invoicing
- Add an IAP account with some credits
- Create a contact with a reallllyyyy long address, to overfill the
fields.
- Create an invoice for that customer, try to print/send a snailmail
- It should fail without a message, then scroll down to the red
paperplane, add the cover and update resend, you get an error
about the missing record.
Reason for the problem:
This legacy code, so maybe in the past it used to work a bit
differently. When trying to resend the letter, we are unlinking it's
attachment (reasons for that are unknown to me), which is linked
with a `Many2One` with letter with a cascading delete, so we end up
deleting the `snailmail_letter` that we are iterating over, then
when trying to write, it throws the error.
Fix:
Remove the link between the attachment and the letter before the deletion
of the `attachment_id`, so the letter is not being deleted.
Affected versions:
- 14.0
- 15.0
- saas-15.2
- 16.0
- saas-16.1
- master
opw-3111774
closesodoo/odoo#113596
X-original-commit: 5cfbfa8e1103081dab89a3114b20edfe9c724c26
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>