Commit Graph
164380 Commits
Author SHA1 Message Date
Maryam Kia f5dd14e8ce [FIX] mail: message sent twice because of the wrong tempId
task #3356870
Before this fix, at the first time of sending message in a chat, the tempId of the message in the chatter, crashes the getting lastMessageId and the first tempId in the chat becomes NaN.

closes odoo/odoo#125424

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-19 13:35:34 +02:00
Samuel Degueldre 81be42d8f9 [FIX] *: ensure tour tips are correctly translated
*: account, crm, crm_iap_mine, event, hr_expense, hr_holidays,
hr_recruitment, lunch, mail, mass_mailing, point_of_sale, project,
purchase, purchase_stock, sale, survey, web, website, website_blog,
website_event, website_forum, website_sale, website_slides,
test_main_flows

In odoo/odoo#111103 the tour system was rewritten. The previous tour
system used to depend on the `root.widget` js module, and this module
was an async module that indirectly depended on `session_bind` which
would load the translations, meaning that the js module definition code
of the tours would only run after the translations were loaded. This is
no longer the case with the new tour system, this means that the module
definition code is executed as soon as the dependencies of that module
are fulfilled, which is generally befoe the translations are loaded,
causing most tour tips to not be translated.

This commit adds a hacky workaround for this problem: it creates a new
module that has a default export which is a promise, and has a legacy
alias, this creates an async module that waits for the translations to
be loaded. This module is then imported for its side-effect in all
onboarding tours, causing them to be translated correctly once again.

This commit also needs to convert the steps key in the tours internal
registry to a getter. In previous versions, the steps were directly
added as is to the internal state of the tour service, but since
odoo/odoo#122834 the steps are now mapped, and without a getter, any
edits to the steps occurring after registration will not be taken into
account. This causes issues in some modules that change original
behaviour of other modules (eg accounting makes invoices into a menu in
the accounting app instead of a top-level app in the home menu) as they
need to edit the steps of existing tours to make them work.

In a separate PR, we will implement a more proper fix by changing the
API of the tour manager so that we no longer need this workaround.

closes odoo/odoo#125284

X-original-commit: d130699ba82dc9919c9116f4b64a5e461ebb6319
Related: odoo/enterprise#42655
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-06-19 13:35:28 +02:00
Jorge Pinna Puissant 00cedbad65 [REF] web: Settings, labels search
This commit, removes from the compiler all the code made to collect all
the labels of the setting for the search. Now, the labels are collected
at mounted time, by the setting itself.

This commit prepares and is part of the task that aim to refactor the
relational model and migrate it to owl.

part-of task-id 3179751

closes odoo/odoo#125332

Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2023-06-19 11:58:41 +02:00
aliya fbeee26f15 [IMP] account: rename call_web_service
We added another hook to call the web service after the pdfs were rendered.
It would be clearer if the first hook was renamed to remain consistent.

closes odoo/odoo#125536

Signed-off-by: Laurent Smet <las@odoo.com>
2023-06-19 10:41:06 +02:00
Andrea Grazioso (agr-odoo) f0e0e2ea38 [FIX] account: skip banner on faulty PDF
create a vendor Bill
attach the PDF
go back to list view, select the bill > print Original Bills

Issue: a traceback is raised
Similar to f814c607e5ab7ed6f1e594ec8c602a749fcc775d
In some malformed PDF files zlib is unable to extract the data properly.

opw-3368907

closes odoo/odoo#125501

X-original-commit: 6dd9fee03a50310a4db63e3f263eb43ab808dbc7
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2023-06-19 10:41:03 +02:00
niyasraphy 69f3f53364 [FIX] payment_mollie: neutralize mollie token
before this commit, on neutralizing the database the
mollie token is not cleared from the payment provider.

after this commit, on neutralizing a database, the
token from mollie payment provider is cleared.

closes odoo/odoo#125482

X-original-commit: dfdd9c3cf563bebd862ac7d06653273abcc09bd9
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-06-19 10:41:00 +02:00
Tom De Caluwé b9d6163d68 [FIX] web: handle early option selections in autocomplete
The autocomplete component intercepts certain key presses allowing the end-user
to select an option from the autocomplete dropdown using either the enter or
tab keys. Before this commit those keypresses where only intercepted when the
autcomplete selection list was already completely loaded.

Consider now for example an x2many list where the lines can be selected using
the autocomplete component. To add a line to the list the end-user will usually
type part of the record name and then select it with tab or enter. Three things
can happen:

* The enter keypress is handled after the list of options is fully loaded
* The enter keypress is handled while waiting for the list of options to load
* The enter keypress is handled while still debouncing the input, no request
to load the options has been made so far

The last two cases commonly occur when inputting lines with a barcode scanner
for example. In this case the enter keypress is ignored by the autocomplete
component and is instead handled by the list renderer component. This generally
results in the list renderer trying to create a new line but failing because
of missing required fields in the previous line. This seems more or less
acceptable. However, if required fields are already filled out or not present
in the list view, a new line is created while the current one remains empty.

This behavior is clearly counterintuitive, as such, this commit proposes to
wait for handling tab and enter keypresses while debouncing the input or
loading the list of options.

opw-3235288

closes odoo/odoo#125464

X-original-commit: 7776e89e293045731e077801113d4ff40507b7c1
Signed-off-by: Tom De Caluwé (tdc) <tdc@odoo.com>
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-06-19 10:40:57 +02:00
Tom De Caluwé b73c9c9213 [FIX] account: enable barcode inputs on account move lines field
Use the many2one_barcode widget for the product field in the account.move.line
list view, similar to the sales order and purchase order views.

X-original-commit: c8918e799b23bd4e57a63f354731be78d308b97b
Part-of: odoo/odoo#125464
2023-06-19 10:40:57 +02:00
Florent de Labarre 2855884f8d [FIX] l10n_fr_fec : can be downloaded by unallowed user
By RPC an other user in other company can access to an other fec.

closes odoo/odoo#125435

X-original-commit: 857f2e026dd9e4307adda786e2745aa7cb36a2c3
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-06-19 10:40:54 +02:00
Bert Stomphorst 6d315aa873 [CLA] bertstomphorst
closes odoo/odoo#125383

X-original-commit: d65f54485ed188a222e7b9617101ff80ab07a93b
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-06-19 10:40:51 +02:00
vlst 1f655ffcc7 [REF] pos*: merge PosStore and PosGlobalState
*: l10n_ae_pos, l10n_co_pos, l10n_fr_pos_cert, l10n_gcc_pos, l10n_in_pos, point_of_sale,
pos_adyen, pos_discount, pos_epson_printer, pos_hr, pos_loyalty, pos_mercury,
pos_restaurant, pos_sale, pos_sale_product_configurator, pos_six, pos_stripe

After the architectural refactor of the PoS App, there are two classes that make sense to merge.
In this refactoring task, we're merging them.

closes odoo/odoo#124477

Task: 3358550
Related: odoo/enterprise#42257
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-06-19 10:40:43 +02:00
Rohit Kumar eb0934c9b5 [IMP] project: task stage improvement in the project app
This commit removes the tooltip of the `fold` field because
the second part is no longer true and the first part does not
provide any added value.
It also makes `project_ids` field required in the form view of
Task Stage model (`project.task.type`) to force the user to link
his new stage to a project. Otherwise, the stage won't ever be
visible anywhere in the interface. Indeed, stages not holding
tasks are hidden in cross-projects views.

task-3251621

closes odoo/odoo#121154

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-19 10:40:41 +02:00
luvi b5e52601bc [IMP] web: add currency_field option documentation in monetary field
This commit add the documentation for the currency_field in monetary
field.

closes odoo/odoo#118199

Related: odoo/enterprise#40597
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2023-06-19 10:40:38 +02:00
fdardenne 71ab15e4d5 [IMP] base: store currency_field in the database
Before this commit, it was not possible to create a custom monetary
field without having currencies named `currency_id` or `x_currency_id`
in the model.

With this commit, we store the currency_field from the Monetary field
in the database. This allows to create custom monetary field with
currencies name we want.

A good use case for this IMP is for Studio, we can now create and edit
monetary field easily without storing it as a `float` in the ORM.

Part-of: odoo/odoo#118199
2023-06-19 10:40:38 +02:00
Bruno Boi debefffd26 [FIX] web: sync reposition for nested poppers
This commit will have nested components making use of
the usePosition hook to synchronize their repositioning.

**Before this commit**
Each component handles its own repositioning logic.
If it is mounted somehow inside another component using that
same logic, conflicts occur in some circumstances.

**After this commit**
It is now ensured that, in case of nested positioned components,
the whole chain of repositioning computations is called in the
proper order: from the parent to the children.

**Example**
- Before
  ![before]
- After
  ![after]

[before]: https://github.com/odoo/odoo/assets/1159815/3c9cfae7-db68-4707-a73c-ad7e2e71d4bf
[after]: https://github.com/odoo/odoo/assets/1159815/a21f56e0-d8e3-48c1-9509-8e6ee5040d4b

closes odoo/odoo#125531

X-original-commit: 9f947ba3fd3a00a0c80efc40186c36e0de78de16
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-06-19 09:30:58 +02:00
Maruan Aguerdouh (magm) 6e05d55b04 [FIX] web: proper display of pages headers for companies view form
Steps to reproduce:

1. Activate Dev mode
2. Settings > Technical > User Interface > Views
3. res.company.form
4. In the architecture add more pages
`<page name="test1" string="This is a test ABC DEF"/>
<page name="test2" string="This is a test ABC DEF"/>
<page name="test3" string="This is a test ABC DEF"/>
<page name="test4" string="This is a test ABC DEF"/>
<page name="test5" string="This is a test ABC DEF"/>
<page name="test6" string="This is a test ABC DEF"/>
<page name="test7" string="This is a test ABC DEF"/>` Save manually
5. Settings > Users & Companies > Companies
6. Open any company.

Issue:

Tabs go off the screen instead of moving down a row like in previous
versions.

Solution:

Adding the proper `overflow-x=auto` will handle the issue.

opw-3079492

closes odoo/odoo#125476

X-original-commit: 19c03accdb5754a6c223bce8ce2cc142e9b2be08
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-06-19 09:30:50 +02:00
Odoo b6a4f87af2 [FIX] web_editor: table insertion in mobile
Before this commit:

In mobile view, the user was unable to select the table size form table
table picker, making table picker of no use.

After this commit:

In mobile view, the picker will not be visible visible and when the user will
write '/table' then a table of 3x3 dimension will automatically be inserted
without displaying the table picker.

Task id: 3283083

closes odoo/odoo#125480

X-original-commit: a1fa78cdc1c18aa663d09641f81a971e2a5aa683
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-06-19 08:23:02 +02:00
Kevin Baptiste ef121c559e [FIX] hr: show plan with no company
Plans with no company defined were not showing in the list when
launching a plan on an employee.

task-3366394

closes odoo/odoo#125478

X-original-commit: d15587e252b55cdcf71c0088482361773dafc8a1
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-19 08:22:59 +02:00
Jurgen (jugj) 543f4c89c9 [IMP] website_hr_recruitment: Make website_id field always visible
task-3337958

closes odoo/odoo#125477

X-original-commit: 8446039f2a8c9e2686b8b0671b2dcabd3fa2849f
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-19 08:22:56 +02:00
Thomas Lefebvre (thle) 5c76d3ddd2 [FIX] website_hr_recruitment: prevent applying for unpublished job
Issue:
------
When we have the link to the form to apply for a job,
even if the job is not published, we can still apply.

Solution:
---------
Check that the job is published before the creation of the record
in the `website_form_input_filter`.

opw-3331717

closes odoo/odoo#125429

X-original-commit: d68eab464654441d51f618c5d3d036999316ed7f
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2023-06-19 07:14:56 +02:00
Julien Van Roy 9a2e53e45c [FIX] account_edi_ubl_cii: no xml declaration with the send & print
Issue: the xml declaration "<?xml version='1.0' encoding='UTF-8'?>" is
lost when opening the send & print wizard with existing xml attachments.

Explanation: When opening the send and print wizard, the PDF are
generated and postprocessed by `_postprocess_pdf_report`. In the
`_postprocess_pdf_report` override in `account_edi_ubl_cii`, the xml
attachments are parsed through `tree = etree.fromstring(xml)`, then the
base64 PDF is inserted, and the etree is converted to a bytes through
`etree.tostring(cleanup_xml_node(tree))` and the resulting bytes is
written back on the attachment, but the xml declaration disappeared.

Solution: include the arguments `xml_declaration=True, encoding='UTF-8'`
in the `tostring` function when converting the etree to a bytes.

opw-3144519

closes odoo/odoo#125523

X-original-commit: ed9a1d83bd7d496a316e8da6a201ca3a14c99d19
Signed-off-by: Julien Van Roy <juvr@odoo.com>
Signed-off-by: Laurent Smet <las@odoo.com>
2023-06-19 03:24:39 +02:00
Habib (ayh) 4e09f0d86e [FIX] account: term is not translatable
The bills upload widget uses a custom attr "linkText". translate.py will only generate terms that are in the TRANSLATED_ATTRS constant, thereby not including these in the po template file.

To fix this, the attribute is changed to a recognised attr "title".
The JS widget will still recognize linkText, for databases that have not updated the module.

Task-3335585

closes odoo/odoo#125516

X-original-commit: 8569ceb101f6dfe5882c33c120b9ed6d76ccf5be
Related: odoo/enterprise#42755
Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-06-17 22:02:28 +02:00
Pulinckx Pierre (PIPU) 860c57e1a7 [FIX] website_sale : Fix disabled reason on submit
With Jquery.data, you can set everything as value (array, object,
string, etc) wich is confusing. This commit fix the function that check
if the button is ready. It didn't work because the data declared
in this.$submitButton is not a boolean but an object.

Bug was introduced in PR 118012
commit : a6b46fdfdb855

closes odoo/odoo#124795

X-original-commit: 04059d09dfd7dc57a5c86c842d6fea300e1441aa
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-06-17 12:12:53 +02:00
Ali Alfie (alal) f5f13b3ebc [FIX] account: wrong quick encoding calculation with cash discount
Before: when using the quick encoding feature on an invoice or bill with payment term containing an early payment discount and the epd computation is set to "Always (upon invoice)", the calculation was done incorrectly.

Example: if you invoice a 100€ product with a 21% tax with a 2% cash discount, the total of the invoice will be 120.58 (the 21% is calculated on 98€ (100€*2%) which is 20.28€).
In our case, if you tried to calculate suggestions from a quick encoding value of 120.58, the calculation would calculate the untaxed amount from the 120.58 based on the 21% tax without applying the 2% discount.

After: when calculating the suggestions check if an early discount is set on the payment term and the epd computation is set to "mixed" ("Always (upon invoice)") and if so, apply the discount to the tax before calculating the untaxed amount from the total.

task-3339223

closes odoo/odoo#125505

X-original-commit: 162443f1ad913a0388bea60f04ff140e75fdb0ed
Signed-off-by: Laurent Smet <las@odoo.com>
2023-06-17 08:00:07 +02:00
Habib (ayh) da77c8fe45 [FIX] web: redirectWarningDialog does not markup noContentHelp HTML
The bank recon custom view relies on the noContentHelper. (When there are no records, a custom noContentHelper is  displayed including buttons to clear filters)

When the view is activated from a RedirectWarning, the action's help text is not marked up
therefore displaying raw html in the UI.

With this fix, the actions help key is marked up (very similar to the doActionButton)

To reproduce:
- On a DB with demo data
- Accounting -> Actions -> Lock Dates
- Set a lock date for all users (after the last unreconciled date, ensure there are no unposted moved before this date)
- You will be presented with a Redirect Warning Dialog
- Click Show Unreconiled Bank Statement Lines
- If there are lines, use the filter to search for "SomethingThatWontReturnRecords"
- You will see raw html

Task-3366470

closes odoo/odoo#125493

X-original-commit: 0086841addfc5b0e3293d205bdfe8dde67b32ce4
Related: odoo/enterprise#42740
Signed-off-by: Laurent Smet <las@odoo.com>
2023-06-17 00:10:49 +02:00
Laurent Smet 60c513b75c [FIX] account: Fix wrong attrs
Fix wrong attrs introduced by:
https://github.com/odoo/odoo/commit/ef9e266c86cbc4abc24e2a6f597a2014e6e3439a

Comparing a Many2one with True is wrong.

closes odoo/odoo#125443

X-original-commit: 21fb1869e42874667bc369688af4185e7cf3ec12
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Laurent Smet <las@odoo.com>
2023-06-16 23:01:29 +02:00
Sébastien Theys 70b4ba4539 [FIX] mail: load around not formatting parent messages
This results in parent message being displayed as text when it is part
of the result of a load around call.

closes odoo/odoo#125439

X-original-commit: 783a5186cf7529161d95c34c9290dc57a32b8200
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-06-16 23:01:24 +02:00
Sébastien Theys d619908772 [FIX] mail: fix mock server of load around
Forgot to properly sort messages, resulting in returning messages not
actually around but the most recent instead.

X-original-commit: 803f1ad7e3bceaa8f03fca06f920447ce9d8eb69
Part-of: odoo/odoo#125439
2023-06-16 23:01:24 +02:00
Sébastien Theys 22fa09f63e [FIX] mail: fix message create returning proxified version
Double assignation does not chain, resulting in the non proxified
message being returned, which can potentially cause issues either when
comparing messages by reference or if a reactive version is expected.

X-original-commit: 30a77cb2778ec0fce5892cfd3903aa1982825626
Part-of: odoo/odoo#125439
2023-06-16 23:01:23 +02:00
aliya 874e1e7f24 [FIX] account: add another hook for calling webservice
Currently, we call the web service before the PDF is rendered. This is often required for some localizations, for example Mexico.
However, in some other cases, we need to embed the pdf document in the xml file, like in Peppol. In this case, we need to call the proxy after the pdf has been rendered.

This commit adds an additional hook that is being called in the end of `_generate_invoice_documents`, after all the documents have been generated and postprocessed. `account_peppol` will use the new hook instead of the old one.

closes odoo/odoo#125438

X-original-commit: dd56297e8b462539c913803eeb23a224fc9e93ac
Signed-off-by: Laurent Smet <las@odoo.com>
2023-06-16 23:01:20 +02:00
aliya 13960a6725 [FIX] account_peppol: fix several bugs
This commit fixes small bugs:

- Sometimes we don't receive the attachments' file name from the proxy. Instead of saving the attachment with `False` as the filename, we should default to something.
- If for some reason the participant's status is changed on the proxy server after documents have been sent, retrieving the message status will traceback. This commit adds a condition to catch this case.
- Currently, the participant status is only updated if their application is pending. But it can happen that they are approved but not registered to the SMP. Participant status should be checked for approved edi users too.

closes odoo/odoo#125437

X-original-commit: a70a388cc6cba1f0f440ca7b9dafe9b6ef6593f4
Signed-off-by: Laurent Smet <las@odoo.com>
2023-06-16 23:01:17 +02:00
Victor Feyens 71e10bc650 [FIX] sale: multi-company conflict at reinvoicing
Since d88409e8e5ce77ff3ec3b24fcdc108d8df380994, taxes from different companies
are forbidden on sale.order.line records (which is the expected behavior).

Nonetheless, this highlighted some flows where the taxes were not properly
set/recomputed, especially re-invoicing, which is fixed by the current commit.

Fixes #123675

closes odoo/odoo#125434

X-original-commit: 6ce4019968bd0a1a11475910d35aa2ccfc2c6a9a
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-06-16 23:01:14 +02:00
Brieuc-brd 3d44eb38d0 [FIX] web: binary_field: space between buttons
Prior to this commit, the buttons in `binary_field` didn't have space
between them.

This commit fixes this issue.

task-3334887
Part of task-3326263

closes odoo/odoo#125261

X-original-commit: 998f8cc8d096df9e2099df59bb35148f56c88533
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-06-16 23:01:12 +02:00
Chintan Panchal (can) 9b4190dafd [FIX] web_editor: fix video size in grid mode
Before this commit, `o_grid_item_image` was not handling videos but image-only.

This commit adds support for `.media_iframe_video` in addition to `img` to
ensure consistent styling across both images and videos within the grid items.

task-3103775

closes odoo/odoo#125075

X-original-commit: b54b34e6c34f435b2923e7b571b2bb2e4e9e0f08
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-06-16 23:01:09 +02:00
Louis (loco) 58e16192a9 [FIX] *: transfer the dataset when changing background options target
*: web_editor, website

Steps to reproduce the bug:
- Add a Cover snippet on the website.
- Put a "Blur" filter on the background image.
- Save.
- Change the parallax from "Fixed" to "None".
- Save and edit.
=> The "Filter" option displays "None" but should display "Blur".

When changing the parallax, `setTarget()` is called. The goal of this
function is to transfer the `background-image` from the old target to
the new one. The commit modifies this function by adding the transfer of
the dataset information relative to the background image from the old
target to the new one. It also transfers the `o_modified_image_to_save`
class from the old target to the new one if needed.

Upgrade PR: https://github.com/odoo/upgrade/pull/4767

task-3287330

closes odoo/odoo#123873

X-original-commit: c82d01f7532b5b120bedfbc40bf8f2f07d750ed6
Related: odoo/upgrade#4767
Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
Signed-off-by: Colin Louis (loco) <loco@odoo.com>
2023-06-16 23:01:02 +02:00
Louis (loco) 93f69ec9d7 [FIX] web_editor: modify background element at option change
For background images, modifying options such as "Filter" does not
directly lead to the modification of their corresponding data attributes
in the DOM as those modifications are done at the save request. This
should not be the case. The goal of this commit is to, as for regular
images, modify their corresponding DOM data attributes at the option
update.

Steps to reproduce the bug:
- Add a Cover snippet on the website.
- Replace the background image by one of your own.
- Add a filter to the background image.
- Inspect the Cover snippet.
=> The `data-gl-filter` attribute has not been added in the DOM and you
have to click on "Save" for it to be actually added.

task-3287330

X-original-commit: ed19a1e91a2706b157532778b15d4a581a4da0e2
Part-of: odoo/odoo#123873
2023-06-16 23:01:02 +02:00
Louis (loco) f19e787952 [FIX] web_editor: show background image options after save
Steps to reproduce the bug:
- Add a cover snippet on the website.
- Change the background image with one of your own.
- Save and edit again.
=> Options such as "Filter", "Width" and "Quality" do not appear
anymore.

The problem is that the `src` attribute of the background image is not
correctly updated when initializing the image. This is because the
target used to recover the URL of the background image is the snippet
and not the image itself. This problem is resolved by ensuring that the
argument of the function `getBgImageURL` is the background image. Now
that the `src` attribute is correctly updated, the `computeVisibility`
function of the the `BackgroundOptimize` option works properly and the
options "Filter", "Width" and "Quality" are displayed as wanted.

Note that now, the dataset of the target is filtered with a "white list"
(BACKGROUND_IMAGE_ATTRIBUTES) before being copied in the dataset of
`this.img`. Indeed, if the parallax is set to "None" for example, we do
not want data attributes such as `data-snippet` to be copied in the
dataset of `this.img`.

task-3287330

X-original-commit: 4356917d0d5cfa560794e4a0464c6ebc9a5ff3e7
Part-of: odoo/odoo#123873
2023-06-16 23:01:02 +02:00
Robin Lejeune (role) 8aaaccfcc7 [IMP] web_editor: toggle background shape on mobile
Currently, all background shapes of snippets are hidden on mobile,
because most of them don't look great on small screens. This commit
adds a button in the website editor to toggle the shape on mobile.
It remains hidden by default if added on desktop, but displayed by
default if added on mobile.

task-3096132

closes odoo/odoo#116958

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-06-16 23:00:52 +02:00
bve-odoo 78b63340cb [FIX] account_edi_ubl_cii: allow none-admin to create xml
Process has been refactor on 16.2:
955091e707

Steps to reproduce on fresh SaaS~16.2:
Connected as Admin:

1. Install localization module LUX `l10n_lu`,
Switch to the `LU company`

2. Modify a `res.partner`, on the tab "Invoicing":
Handle his electronic invoicing to use the format `ubl_bis3`
described as `Peppol BIS Billing 3.0`
Select any value in the field `Peppol e-address (EAS)`
And put any value in the field `Peppol Endpoint`(I used `1234567890`)

3. On the tab "Sales&Purchaes", inner group "MISC",
Add anything in the `reference` field (required for Peppol)

4. Create an invoice, selection the partner modified,
add a product and a recipient bank

5. Confirm & Send&Print button, save the document layout.
On the Send Wizard: uncheck all except "Peppol BIS Billing 3.0",
hit Save&Print button.

If you create a new Invoice for the same customer as Marc Demo,
You should also see that the icon on the attached xml is of
mimetype "application/xml". Which is displayed on the icon
as "</>".

Prior to this fix:
If you do the same steps with a user that does not have
the write access right to the model ir_ui_view
(see _check_contents in base), the attachment will be
of type text/plain.

The issue that this trigger, is that the email going out
will have the wrong Content-Type for the attachments.
Which will lead to incorrect management on other provider.

We can bypass the security here as the XML is generated
by Odoo.

opw-3263542
X-original-commit: 04c2bb022b0f9263e2682bf8cc75fed19fd443a8
Forward-port of https://github.com/odoo/odoo/pull/124507 (15.0)

closes odoo/odoo#125258

X-original-commit: 9dc60e69110dac949e04ff8288b25fb0d0f65178
Signed-off-by: William André (wan) <wan@odoo.com>
2023-06-16 20:36:41 +02:00
amdi-odoo 1dc8d10310 [IMP] website_slides: auto-collapse categories
Purpose
=======
Improve the behavior of the collapse/expand categories
in front-end for large courses.

Specifications
==============
In channel content view and channel fullscreen view:
- When following the course, expand the ongoing section and
collapse the other ones.
- When the section is completed, open the next one and
keep the previous one(s) opened.
- If an attendee leaves and comes back, only open the ongoing one.

Task-3284195

closes odoo/odoo#121003

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-06-16 19:30:41 +02:00
Antoine Guenet 06885a11e9 [FIX] web_editor: make sidebar toolbar buttons smaller to avoid overflow
When a scrollbar appears in the sidebar, the toolbar could end up being
to wide, making a horizontal scrollbar appear. This commit makes the
toolbar buttons smaller (smaller padding) to avoid this.

closes odoo/odoo#119972

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-06-16 18:21:47 +02:00
Antoine Guenet 033b49e1a8 [ADD] web_editor: allow the user to input a font size in the toolbar
With this commit, when a user clicks on the font size number in the
editor's toolbar, two things happen:
1. Same as before: the list of recommended sizes opens.
2. The current font size is selected, and the user can type any value
   they want. They need to confirm with "Enter" or blur the input to use
   a custom value.

task-3167041

Part-of: odoo/odoo#119972
2023-06-16 18:21:46 +02:00
Antoine Guenet c7a5ed99ba [FIX] web_editor: properly handle exec toolbar command after input click
When clicking on an input in the toolbar, the selection was lost and
the commands could not be executed. This restores the latest selection
in the editable in these cases.

Part-of: odoo/odoo#119972
2023-06-16 18:21:46 +02:00
Alexandre Kühn 2d5194f8a3 [FIX] mail: show correct button style for "Send" in chatter
Small mistake during forward-port of [1],
`btn-link` was moved from `t-att-class` to `class`.

The `btn-link` visual is specific to non-chatter, therefore
it should be in `t-att-class`.

[1] https://github.com/odoo/odoo/pull/124905

closes odoo/odoo#125395

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-06-16 14:59:53 +02:00
Laurent Smet cab9ed9a9d [IMP] account: Remove _compute_is_move_sent
Since https://github.com/odoo/odoo/pull/125302/commits/a5aefc7f415cda0959d90b5d21b94fc8b8ee47e6
this compute is no longer necessary

closes odoo/odoo#125392

Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-06-16 14:59:50 +02:00
Harsh Bhatt (habh) 9a48d00706 [FIX] account: fix traceback on opening bank statement
When user changes the default_account_id on a journal and tries to open a
statement line, they will get the traceback.

Note: This is reproduceable by using account_accountant only.

Steps to reproduce:
1) open configuration of bank journal
2) change default_account_id (bank account) from bank to cash
3) open bank statement
4) open any statement line
5) by following these steps, traceback occurs.

This commit will prevent the above traceback.

sentry - 4059226840

closes odoo/odoo#125375

X-original-commit: 12410133d548f3c9ff44fd548bbf664f008a3ae3
Related: odoo/enterprise#42685
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: habh-odoo <habh@odoo.com>
2023-06-16 14:59:42 +02:00
dasz dd013e6934 [FIX] hr: too long department name
fix display of too long department names
task 3360172

closes odoo/odoo#124497

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-06-16 14:59:34 +02:00
David Monnom (moda) a0aff5bda2 [IMP] pos_self_order: refacto, models and serverside price calculation
General refactoring of the codebase. Inline of certain components
that had no logic in the JS side, the XML of these components was
directly added to the place where they were called.

Simplification of the python controller, inline of many functions and
separation of the logic. There is now one function that manages new
orders and another that manages and updates existing orders if we are
in "pay after meal" mode. In "pay after each" mode, orders cannot be
edited.

Addition of different models, product, order and orderlines in order to
facilitate the use of these objects between the backend and the
frontend.

Added price calculation on the serverside because we can't trust the
data coming from the customer in the self since no identification
is required.

Management of last change sent added. Thanks to this, users will no
longer be able to click on the order button if no changes have been
made to the order.

closes odoo/odoo#122901

Signed-off-by: Heinz Robin (rhe) <rhe@odoo.com>
2023-06-16 14:59:31 +02:00
Rodolpho Lima d01a1bd382 [FIX] web_editor: readonly links opening in the same tab
Before this commit, when viewing the content of an html field in
readonly mode, internal links (same origin or relative links) that did
not have the target attribute set to "_blank" would be opened in the
same browser tab. This is undesired, and particularly disturbing when
the content is inside an iframe.

This commit ensures that, in readonly mode, all links are opened
in a new tab.

task-3323602

closes odoo/odoo#125382

X-original-commit: cb84f993bbf38130482c1f50e550bfdf94a60845
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-06-16 13:41:20 +02:00
Hubert Van de Walle (huvw) 426d95eecd [FIX] web: remove duplicate month in arabic
Steps to reproduce
==================

- Switch to arabic
- Open a datepicker
- Select the month

The month are displayed twice in two different arabic namings.

Cause of the issue
==================

There is an issue in the moment locale files since [0]. It has been made
apparent since [1].

Solution
========

Cherry pick a fix from the moment repo [2].

Revert the ar.js locale from before [0]

[0]: 11f3e7351a899848ec4df0107c3f6e2a627807ba
[1]: 6a1183f4c93ad068524a3242cd7b4e37f68fbf95
[2]: https://github.com/moment/moment/commit/251fba65cca5d5b2cf79f1f51a9d413c5e0cb161

opw-3349560

closes odoo/odoo#125381

X-original-commit: bfdf5baf4017058d7aff7c93fd504e684ed6783a
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2023-06-16 13:41:17 +02:00