On the commit 69dcdd4, the order='create_date desc'
was removed and the way of getting the MO for the notification changed. Now, the context is used, it should be written_after instead of written_date.
In addition, the now declaration should be at the beginning of the method action_replenish.
(The MO created is correct, only the notification is wrong)
Should be forwarded
OPW-2877457
closesodoo/odoo#96986
X-original-commit: 029da238a2baaf59bdf9ae828a4739ee4a9f3ede
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Since BS5 migration, clicking on the backdrop of a "static" modal
triggers a weird scaling-up/down effect on the modal.
Steps to reproduce:
- Open Livechat Channels
- Open a channel
- Click on operator which opens a modal
- click on backdrop
=> scale-up/down effect
This commit fixes it by disabling the scaling transform effect on
modals.
closesodoo/odoo#96958
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
This commit adds more functionalities to the web editor when editing a
product's page in order to make it more user friendly to add change or
resequence the many images a product may have.
TaskId-2692189
closesodoo/odoo#85686
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Before this commit, in a field selection, it was possible to have two
blank options.
To reproduce this problem, you need to have a non required selection
field and one of the selection sent by the server has the value false.
Our solution is to ignore the false selection returned by the server
and add the false option only if the field is not required.
closesodoo/odoo#96951
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Before this commit, in a kanban view, if you try to create a new record
while another one is being saved, then a crash is displayed.
To avoid this problem, when we create a new record in quickCreate mode,
we will first wait until the first one has finished saving before
creating the new one.
closesodoo/odoo#96826
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Follow-up of [1].
With [2], the contact us page was made entirely static to ease and allow
more things in its customization. The customize_show option of the
website_crm app which added the possibility to switch between sending
emails or creating opportunities was to be removed to rather be done via
the standard edit-mode option, by clicking on the form itself. Part of
this option view was however kept (the auto-fill of some more values)...
but it was not supposed to be kept as a customize_show view. With this,
a customize_show option with the same name "Contact Form (Opportunity)"
still appeared and gave the illusion that this is the way to make the
form create opportunities instead of sending emails. In master with [3],
the customize_show was removed but refactored to appear in the editor
panel.
After this commit, we remove the editor panel option that was converted
by mistake.
We also re-enable the view automatically via the 16.0 migration scripts.
[1]: https://github.com/odoo/odoo/pull/69888#discussion_r921081562
[2]: https://github.com/odoo/odoo/commit/417138b44311a05aa206b6e2e38bb67863843c74
[3]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b
Related to task-2462993
closesodoo/odoo#96145
X-original-commit: 8620c3bc71183b5ebd7801c139eab1736070d846
Related: odoo/upgrade#3690
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
PURPOSE:
The whole process depends on `thread_view` render, not `discuss`. So, it's
unnecessarily making `discuss_view` observe and rerender on a lot of useless
values.
SPECIFICATION:
Remove method from `discuss_view`. Make some onChange methods for handling
the functionality.
Task-2869417
closesodoo/odoo#94147
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
In this commit we make it possible for a user to
download/print the Sales Report of the current
session by clicking at the "download"/"printer"
icon at the lower right corner of the closing pos
popup. This is a commonly used feature. Thus, we
make the UI more usable.
In general, the sales report can be generated by two
different ways:
- either by providing a start and end time (products
within that time span will be included).
- or by providing a session_id (products that are sold
during this specific pos_session will be included) which
is used in some localisation modules (e.g. pos_l10n_se).
To achieve this, we generalized the `_get_report_values`
function to consider both possibilities. As a result,
the inherited version of the function at the
pos_l10n_se module was made reduntant, so we deleted
it.
NOTE: the "Printer" button will be displayed only when
a printer is connected to the IoT box.
task-2755384
Part-of: odoo/odoo#88006
In this commit we modify the ClosePosPopup
so that we make it more usable.
For this reason we expose less info in order
to keep it simple for the user and we rename
the footer buttons respecting the Odoo standards.
Finally, since we want to make it more obvious
to the user and avoid unwanted acceptance of the
payment difference, we show ConfirmPopup with the
relevant information.
task-2755384
subtask of task-2669747
Part-of: odoo/odoo#88006
Steps to reproduce:
- switch to any language other than English
- go to a page where you can use the text editor,
for instance you can try to edit a project's description.
- type `/` in the editor
You should see that some commands are not translated.
Some files modified in this commit are located in the
web_editor/static/lib/web-editor directory.
However, only the JS code located into /static/src/ is considered for
export of translations. This is done to avoid polluting translations for
code not managed by Odoo.
We have to update the .pot file manually. A good workaround is to copy
the web-editor folder inside to static/src, export the
translations and then delete the copy folder.
However, this means that those updates to the .pot file will be lost in
the next translation export.
opw-2918128
closesodoo/odoo#96939
X-original-commit: 0cc5505b27f29d44c25af83653b09b1b49cfec79
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Nshimiyimana Serge Séna (sesn) <sesn@odoo.com>
Given a recordset R of (at least two) groups, and a group A.
We want to ensure that:
* `R._apply_group(A)` adds A to the list of implied groups of _all_
groups in R.
* `R._remove_group(A)` removes A from the list of implied groups of
_all_ groups in R
This is especially problematic for config settings of the form
```
class MyConfig(models.TransientModel):
_inherit = 'res.config.settings'
group_imply_A = fields.Boolean('x',implied_group='A',group='B1,B2')
```
since activating the implication via `group_imply_A=True` currently
fails in case only one of B1,B2 already implies A.
opw-2832741
closesodoo/odoo#96928
X-original-commit: 81dc64740ba46355462ed2169e57fc0ce694ccdb
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: Alvaro Fuentes Suarez (afu) <afu@odoo.com>
Start Odoo with multiple cron threads (e.g. --max-cron-threads=4),
trigger many crons at once, there is a chance one of the cron thread
fails due to a serialization error.
Inside of the `_acquire_one_job` function, the query evaluates many rows
to find one that fit multiple requirements. Two of those requirements
are (1) that the `nextcall` of the row is in the past or (2) that it
exists a cron trigger for that cron with a `call_at` in the past.
In case the `nextcall` of one of those rows is modified or the cron
triggers are removed by another transaction then there can be a
serialisation failure in the current transaction. This serialisation
error is important, it prevents the current cron worker from acquiring a
cron job that has been processed in another cron worker.
The problem is that that postgres doesn't tell which row was modified by
the other transaction (=processed by another worker cron) so it is not
possible to just skip that cron and continue with the others.
Our solution is to limit the WHERE clause of the `_acquire_one_job`
function to a single row. In case there is a serialization failure we
know the cron was processed in another job and we can skip it.
Closes#96584closesodoo/odoo#96926
X-original-commit: 684750a0c2c83acffb32e555bd3140a2c76d7219
Signed-off-by: Julien Castiaux <juc@odoo.com>
Co-authored-by: Julien Castiaux <juc@odoo.com>
The csrf token given to the assignTokenRoute is not necessary
and will trigger warnings in the logs.
closesodoo/odoo#94020
Related: odoo/enterprise#28595
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Currently, button 'Journal Entry' not wrap with classes `.o_stat_info
.o_stat_text` which make this
text being hidden by their own container.
This PR will fix this problem.
closesodoo/odoo#96927
X-original-commit: 8b7d548cdab9d9e6169553c2b8cde5a4e68004dd
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Step to reproduce:
Create a promotion with fixed price discount
Create a SO where the promotion can apply with taxes on the
products
Trigger the computation of the taxes
Current behaviour:
No taxes are applied on the fixed price discount
Behaviour after PR:
Taxes are applied on the fixed price based on their
proportion to the total amount.
opw-2806780
--------------
FW port of #88393closesodoo/odoo#96923
X-original-commit: 43b34e9a38f1291db7b85521dee3266541812dd6
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Scenario:
Open expense, choose product with cost, set quantity to 5, now choose
any 0-cost product. Save the expense.
Behavior: quantity is 5
Expected behavior: quantity should be set to 1
Implications: As a result, in the list view on expenses, we see incorrect quantity.
Moreover, in SO, price_unit will be incorrectly computed.
task - 2867723
closesodoo/odoo#96732
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Have a form view with a one2many list with one record inside.
Click on it to open it. The form view that will open must also have a one2many list
Before this commit, there was a crash because the information of the main record's view
was not propagated to the form view of the opened record. Generally speaking, env.config was lost.
After this commit, we propagate correctly the config.
closesodoo/odoo#96618
Signed-off-by: Géry Debongnie <ged@odoo.com>
Before this commit in tests, when creating a view with makeView, the same env was shared for services, view and
main_components_container. This is rather wrong as bugs in prod could not be reproduced in tests.
For example: env.config was present in the env for every services and components, this is wrong as
only View must receive it in its env.
After this commit, makeView separates the env for services and top-level components from the one dedicated for View.
Part-of: odoo/odoo#96618
This commit will trap the focus on the dialog, this will avoid modifying
a background record when a dialog is open. Trapping the focus on the
dialog is a well-known technique for modals (dialog).
closesodoo/odoo#96361
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Until now, an invalid PDF file would generate a traceback
during the export, which is not very user friendly.
The export happens when on the vendor bills list view,
by selecting one or more bill(s) that were generated
by the OCR (via the 'Upload' button),
clicking on 'Print' then 'Original Bills'.
The goal here is simply to catch those errors and display
a slightly more helpful message.
closesodoo/odoo#96935
X-original-commit: 7e7bd50403b6f5e2dabc39caf5fddb57d7052ebc
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Steps to reproduce:
- go to Inventory > Operations > Inventory Adjustments
- Select at least one product
- Click on Request a count; A dialog box containing a form should appear
- Select a user other than the current user
- Make sure to check "Set Current Value"
- Click "Confirm"
You should see that the user you selected is not the one assigned for
the count. Instead, the count is assigned to the current user.
This is happening because currently, calling
`action_set_inventory_quantity` also sets the user as the current one
if the quantity is not already set.
opw-2924694
closesodoo/odoo#96914
X-original-commit: f2b79bc4c6198aacca33eea8905fd62c629706a1
Signed-off-by: Tiffany Chang <tic@odoo.com>
Since eb67feb5 we had to redo the hack to read fields from public user and set them in hr_employee.
However in this hack we used `_read`, which doesn't fill the cache with fields that are not stored,
which caused a cache miss when reading the field `avatar_128` from hr.employee, to display the image of
the manager in the kanban view of hr_appraisal.
This fix uses `read` instead.
closesodoo/odoo#96889
Signed-off-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
Before this commit, the buttons without classes in a button_box were
assigned the default btn-secondary.
Now, the default class for the buttons without classes in a button_box
is the class oe_stat_button
closesodoo/odoo#96881
Signed-off-by: Géry Debongnie <ged@odoo.com>
With the merge of the new views, we introduced an owl directive which is
t-call-context, that allows a t-call to execute in a controlled context
that is not the context of the component itself. In doing so, we forgot
that some existing templates rely on the presence of the env in the
rendering context for things like knowing if we are in debug mode or if
the device is small/mobile.
This commit fixes that by simply adding the env to the rendering context
of tooltuips.
closesodoo/odoo#96875
Signed-off-by: Géry Debongnie <ged@odoo.com>
Before this commit, the `callParticipantCard` model was used separately
for both the main session and the multi-tile views
(`CallSidebarView`/`CallMainView`), this commit makes so that each
multi-tile view has its own list of tiles.
part of task-2692836
closesodoo/odoo#96868
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
On the commit 69dcdd4, the order='create_date desc'
was removed and the way of getting the MO for the notification changed. Now, the context is used, it should be written_after instead of written_date.
(The MO created is correct, only the notification is wrong)
OPW-2877457
closesodoo/odoo#96856
X-original-commit: b80287b265a4c01babedcbb58459c35d36a48066
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
This removes an extra request, targets fetched messages more reliably and
simplifies the code.
task-2847909
closesodoo/odoo#96840
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Previously, unnecessary space was present horizontally
around the status circle. This space has been adapted
to improve the style of the widget in views.
closesodoo/odoo#96831
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
Before this commit:
When we put the text direct in td and try to color it with design toolbar with
text color then text in normal should change the color.
After this commit:
When we enter the text direct and try to change the color with design toolbar
then it will change the text with defined color.
Task-2843065
closesodoo/odoo#96830
X-original-commit: 76fd633ab78d5cb47c990063040d6d1e9708df2d
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit fixes an issue with the ImageUrlField
widget. When no value was given, the image displayed
a broken file instead of being empty. A test
has been added.
closesodoo/odoo#96820
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
Form views in dialogs should not display a control panel. Before
this commit, they did. To fix the issue, we reworked a bit how we
pass to the Layout component its "display" information (e.g.
whether it should display a control panel, and which parts of it).
Before this commit, it retrieved this info from the searchModel, in
the env. This doesn't allow a specific view to override it, for
instance the form view when it's in a dialog. To ease this, we
changed the Layout component s.t. it now takes a "display" props,
and no longer looks in the searchModel. Each view thus needs to
pass this as props.
closesodoo/odoo#96818
Related: odoo/enterprise#29857
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Previously, when the name attribute was set on a notebook in a form view
arch, we would pass that as a prop to the Notebook component, but this
prop is not supported by the component, so it would crash in debug mode
when validating the props. This commit fixes that by simply not copying
this attribute to a prop as it is useless.
closesodoo/odoo#96814
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
*: website, website_mass_mailing, website_payment
When an unsafe snippet is dropped into a sanitized HTML model field, its
unsafe content gets removed on save.
We need a way to mark snippets as being (in)compatible with
sanitization. It cannot be automatic, as, for example, the snippet
introduced at [1] contains an iframe but is compatible with
sanitization.
In 13.0, we will temporarily set up an automatic mechanism that marks
existing snippets containing forms as being incompatible with
sanitization.
In 14.0 a distinction between full sanitization and form-tolerant
sanitization introduced at [2] is added with this forward-ported commit.
This commit prevents unsafe snippets from being dropped into sanitized
HTML model fields.
The "Form Builder", "Product Search" and "Product Search Input" blocks
are now prevented from being dropped or moved into form-sanitized HTML
fields.
To do this, this commit introduces a new `t-forbid-sanitize` attribute
on the `t-snippet` tag. It can have the value `true` to prevent it from
being dropped into any sanitize fields, or `form` to specifically limit
to form-sanitized fields.
Steps to reproduce (in 13.0):
- Go to a product page
- Drop a "Product Search" snippet into the product-specific section of
the
product
- Save
=> The form was removed.
[1]: https://github.com/odoo/odoo/commit/c2e9bd0e60014b6a42931cf300e0f89f8cf7c225
[2]: https://github.com/odoo/odoo/commit/388c222c6c4bb7e2fe3e67009b248359ae0fd3db
task-2829961
closesodoo/odoo#96812
X-original-commit: 9eaba23781766730b06e936dbd9c5d0c28c909c6
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
_* sale_management,sale_stock
Steps to reproduce:
- Install eCommerce
- Enable at least one more language
- Get an attribute with translations done (creation mode : never)
- Get a product with this attribute
- Go to the shop and add the product to the cart
- Go to the summary page and change the language
- Attributes fields aren't translated
Explanation:
This commit reverts the fix commit 47777ce1a7ee189c9328f53143abe492e861779e
that set the language of this description variants in function
of the order partner lang. We move where the language is added
in the context so that other cases like website_sale still have
the right translations.
opw-2790240
closesodoo/odoo#96811
X-original-commit: 9d3ffc9a1d817313764bc4b94f75711fd753fbc3
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Fockedey Martin (mafo) <mafo@odoo.com>
Cause:
The test fails because there is some demo data that added additional
website(s) and when trying to retrieve the current website without
domain, it might retrieve the wrong one.
Solution:
Unlink unused website(s).
opw-2899680
closesodoo/odoo#96810
X-original-commit: 45dfbae7301effe0d96163d67218a7854c3bde6f
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This commit fixes the API of the Notebook component
that mixed props of page templates with its attributes
(isVisible, title and index). Mixing page props and
attributes was confusing. Tests have been adapted
to reflect those changes.
closesodoo/odoo#96807
Signed-off-by: Samuel Degueldre <sad@odoo.com>
Only youtube and dailymotion were able to add this property to their
video. Maybe it was not supported by vimeo back then, but it seems to be
supported now.
It improves the vimeo youtube in two ways:
1. For background video, the controls are now hidden. There were visible
for a few seconds before this PR which is not ideal
2. For non background video, there were no way to hide the controls
which might be problematic to some users as in mobile there is the
controls display but also an ugly "Tap to unmute" in the middle of
the video.
Step to reproduce (background video):
- Drag & drop a "Text - Image" snippet and add it the biggest possible
padding, also add padding to the image (so you see the full video and
not just part of it)
- Double click on the image, then on the video tab insert a vimeo url
- Save, you will see the controls for a few seconds (progress bar, video
title, link to vimeo, etc)
Step to reproduce (non background video):
- Drag & drop a "Text - Image" snippet and double click on the image
- On the video tab, insert a vimeo url
- Select "Auto Play"
- Save and go to mobile, you will see the controls and an ugly "Tap to
mute" in the middle of the video.
The "Tap to mute" is a browser feature, not a vimeo feature. Browsers
are muting video by default when auto play.
Still, some people want to have a nice auto play video shown to users
without sounds and don't want that overlay/controls.
opw-2901256
closesodoo/odoo#96804
X-original-commit: 7128e4080511b5f224da3dce6d88ba8bcf9a0d47
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Reproduction:
1. Install Inventory and Sales, enable customer address in the setting
of Sale
2. Create a quotation, choose a customer which has different contact
address and delivery address, add a storable product.
3. Confirm the order and click the delivery in the status bar
4. Click print->delivery slip, the Customer Address and Delivery Address
are the same
Reason: The Customer Address isn’t correct in the template
Fix: replace the partner setting in the customer address part as either
the partner or its parent partner_id, e.g. the commercial_partner_id
opw-2851158
closesodoo/odoo#96800
X-original-commit: 500687e45e83a8bf7c4ab31e659c7eb9dc83aa4c
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: Liu Jinjiu (jili) <jili@odoo.com>
Pillow 9.1 deprecates most if not all toplevel Image constants:
https://pillow.readthedocs.io/en/stable/releasenotes/9.1.0.html#constants
These constants have been moved to thematic enum classes (e.g. all the
resampling constants in `PIL.Image.Resampling`).
This triggers warnings in Odoo, and the removal delay is quite short
(slated for Pillow 10, release planned mid 2023). Pillow 9.1 is also
already in Debian Bookworm (current testing).
Fix by shimming at the import level: if the enums are available import
them into the local namespace, otherwise alias `PIL.Image` itself as
to the enum.
closesodoo/odoo#96799
X-original-commit: 7be04d31bad078681ef0a2919234c11840a2e8e2
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>