Commit Graph
164258 Commits
Author SHA1 Message Date
Loan (LSE) e403eec89b [FIX] mail: "Invalid Date" errors on iOS Safari
Before this commit:
JS errors on iOS with Safari's browser due to the date syntax not being
supported:
```js
new Date("2023-08-18 14:02:53")
-> Invalid Date
```
This does prevent Odoo's backend to start up on the browser and the app
on iOS devices.

opw-3465337

closes odoo/odoo#132461

X-original-commit: a39391d0df644fce86f435ba3f39e7634d8e5172
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-20 16:35:51 +02:00
lrizzi1 698e14a003 [FIX] mail: closing hidden chat window should not crash
Before this commit, closing a hidden chat window may crash.

This happens because closing a chat window was always treated as the
closing of a visible chat window, which should make the 1st hidden
chat window visible, if any. This code should not be called when
closing a hidden chat window, otherwise unexpected behaviour are
to be expected, e.g. closing 2nd hidden chat window swaps last visible
with 1st hidden chat window, or even a crash.

This commit makes sure auto-swapping of 1st hidden chat window only
occurs when closing a visible chat window.

opw-3460466

closes odoo/odoo#132458

X-original-commit: b49364b687757385a2a7356d17dc428edafd2767
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-20 14:43:56 +02:00
Valeriya(vchu) cd887a8289 [FIX] payment_stripe: disable tokenisation that will not be supported
disable tokenisation of payment methods that use sepa debit because
it will not be supported in the future versions

closes odoo/odoo#132424

X-original-commit: df2a358fb22ed50d86bd655858785a31adf934a9
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-08-19 12:03:00 +02:00
MerlinGuillaumeandVictor Feyens d5878829cd [FIX] product: use configurator with deleted attribute
The product configurator can have irrelevant disabled options if the
product selected has some archived variants

Steps to reproduce:
1. Install Sales and Inventory
2. Create a product with two attributes, each with two values (e.g.
   Color: C1, C2 and Weight: W1, W2)
3. Open one of the variant, add some stock then archive it
4. Delete the attribute Weight from the product
5. Create a SO for any customer and add the product
6. The product configurator dialog opens but the C1 color is unavailable

Solution:
Only return the archived combinations for which all of the attribute are
still used in the product

opw-3427753

closes odoo/odoo#132420

X-original-commit: d5cd215dcf1b7e633c86ad734274a65827368ade
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Co-authored-by: Victor Feyens <vfe@odoo.com>
2023-08-19 12:02:52 +02:00
Christophe Simonis 522c8cd783 [FIX] delivery: correct selection value
Oversight of view-pocalypse (odoo/odoo#104741) that wrongly changed it.

closes odoo/odoo#132408

Signed-off-by: Christophe Simonis (chs) <chs@odoo.com>
2023-08-19 12:02:42 +02:00
Hugo Carlier (Huca) ab809baca1 [FIX] *mail, mass_mailing_sms: take domain into account for activity
This commit allows to take domain into account for custom activity
groups in the systray.

Steps
=====
In debug mode:
- Install module mass_mailing_sms
- Add an activity for a mailing.mailing record with mailing_type set to
'sms' (i.e. a record visible in the SMS Marketing app).
- Add an activity for a mailing.mailing record with mailing_type !=
'sms' (i.e. a record visible in the Email Marketing app).
- Open the activity menu

Not in debug mode:
- Do the same step as above
- Click on the category "SMS Marketing" in the activity menu

Issue
=====
- In debug mode: a traceback will pop up when the activity menu is
opened with an error message similar to `Got duplicate key in t-foreach:
1182`.
- Not in debug mode: when clicking on the SMS Marketing category in the
activity menu, all records of model mailing.mailing with activities set
will be displayed and not only the one with mailing_type set to 'sms'.

Cause
=====
- In the method systray_get_activities, the id of each model is used to
create groups of activities. In mass_mailing_sms, the same logic is used
but two groups are created for the model mailing.mailing, thus with the
same id. This create a traceback in debug mode when displaying the
activity menu are the id of the groups are used as key for a foreach in
the view template.

- The methods openActivityGroup and onClickAction called when the user
click on an activity group (or on the activity icon next to it) do not
take the domain of the group into account correctly.

Fix
===
- The id key of activity groups is renamed in sequence
- The value of sequence is only used to sort activity groups on the
client side
- group_index is used as t-key value in the template of the activity
menu
- The domain of each group (if any) is combined with the domains used in
openActivityGroup and onClickAction

closes odoo/odoo#132402

X-original-commit: 1f154b4ba21e34c9021f07c5e62d8de460eb824e
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-08-19 12:02:38 +02:00
Daniel Kosky (dako) ca5051b1ed [FIX] l10n_ke_edi_tremol:credit note currency rate
The problem:
- Multi-currency is allowed, although the fiscal device expects amounts
only in KSh.
- The amounts are converted from the invoice amounts at the moment of
sending to the device.
- When sending a credit note to the device, the amount of the credit
note cannot exceed the amount of the original invoice (otherwise the
device will throw an error).
- In odoo, the journal items of the credit note are created using the
current currency rate (not that of the original invoice), and thus the
amount can exceed the original amount (depending on changes in the
currency rate).

This commit addresses this issue by using the currency rate from the
original invoice (reversed_entry_id) in the case of a credit note.

opw-3422555

closes odoo/odoo#132385

X-original-commit: f28ec1f419fb6e35f6f8a86604796f826283ff20
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Daniel Kosky (dako) <dako@odoo.com>
2023-08-19 12:02:24 +02:00
momegahed e74d383f69 [FIX] l10n_de: foreign vat doesn't work with din8005
Steps to reproduce:
1. Install l10n_at, l10n_de
2. Activate EU intra community option in accounting settings
3. Configure BSS Germany to have a foreign fiscal ID
4. Select document layout DIN 5008
5. Create and print PDF of an invoice for a german customer
6. Foreign fiscal ID does not appear

Issue:
the logic to handle `forced_vat` is missing in din5008 layout

opw-3381688

closes odoo/odoo#132381

X-original-commit: 0a0ddc98924e5fdd5fa10a7b858009b953d0236a
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Mohamed Megahed Abbas Megahed SALLAM (mome) <mome@odoo.com>
2023-08-19 12:02:20 +02:00
Alexandre Kühn 941e28cee1 [FIX] mail: show seconds in message datetime
Before this commit, when mouse hovering on relative time of the
message, it showed the datetime without the seconds.

Not showing the seconds can make it hard to determine chronological
order of 2 messages in different conversations.

This commit fixes the issue by showing the seconds in datetime format
of message when mouse hovering on relative datetime part.

opw-3423016

closes odoo/odoo#132376

X-original-commit: b0019f5b92b9cebab9f1162631cbf00be5101b6f
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-19 12:02:15 +02:00
Habib (ayh) 0a19ea1b35 [FIX] web: currency reload
The currency service is responsible for reloading currencies from the session_info, however it does not retrieve the correct key/value.
The issue can be reproduced  in saas-16.4:
- Activate a currency
- Accounting Dashboard > Reconcile x items
- Client stack trace
(after hard refresh the correct currencies are loaded)

closes odoo/odoo#132375

Cause: the `reloadCurrencies` method is assigning the entire session_info response object to the session's currencies
X-original-commit: bbbf836f99b0271442e5e3a7ec03f108de69ec78
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
2023-08-19 12:02:10 +02:00
Florian Charlier bb27a340f9 [IMP] website_slides: add populate
We make sure to have courses with a huge number of
attendees w/r to partners count.

Task-3463533

closes odoo/odoo#132374

X-original-commit: abd040a1084d462167d13cb071b4faf8439112f0
Signed-off-by: Florian Charlier (flch) <flch@odoo.com>
2023-08-19 12:02:06 +02:00
luvi 440c72f2aa [FIX] web: fix draggable with touch input
This commit fixes some isues with touch behaviors in the drag and
drop feature. Since commit (1), pointer events are used instead of
mouse events in the draggable hook. This makes the drag and drop
available with touch, but some issues appeared.

The following issues have been adressed by the commit:
- Scrolling in a kanban view has become difficult, since items are
dragged, and columns are moved. A simple scroll in the view to show
other items was nearly impossible without interacting with elements.
A small delay has now be introduced in the draggable_hook_builder by
default for touch interactions. The user has to do a long press (500ms)
to instanciate the drag sequence.

- on Windows laptops, the hasTouch helper would not return true, even
on PCs and tablets with a touchscreen, because 'ontouchstart' is not
present in the window object. It meant that any touch feature was not
working properly (e.g. moving icons from the home screen).
This commit adds a mediaQuery check right after the current check on
the window object, to also consider those laptops as touch devices.

Tests have been added to check the behavior of the touch drag, and the
presence of a bouncing animation when initiated. The corresponding drag
helper now has the possibility to set a custom pointerType.

task-3436591

closes odoo/odoo#132373

X-original-commit: 4c5cf0962f91d05085fea75e9c26ecdca9c0eb13
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2023-08-19 12:01:57 +02:00
Antoine Guenet cd527b9394 [FIX] mail: replace local url of background image with single quotes
Relative image urls have to be replaced with absolute urls in order to
be able to display them in the email. This failed to be done for urls in
styles attributes if they were enclosed in (unicode decimal) single
quotes.

opw-3452655

closes odoo/odoo#132339

X-original-commit: d952e0117a68dd19e86c45ae75250807231e82ad
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-08-19 12:01:52 +02:00
yhu-odoo 6624cbf75b [FIX] mrp_subcontracting_purchase, purchase_stock: price difference
entry wrong when resupply subcontractor

In case product is using standard price and automated inventory valuation.
We post account entries in price difference account when the price on
purchase order is different from the cost of product. However, when we
do subcontracting and resupply our subcontractor, the cost is not just
the price on purchase order, but also the cost of the components we sent
to the subcontractor. Currently, we didn't take the components cost in
to account when post price difference entries. Fix it in this commit.

Task-3223451

closes odoo/odoo#132282

X-original-commit: e771535b487e76f4e5a23b767d220d7f640292a6
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Yuchen Huang (yhu) <yhu@odoo.com>
2023-08-19 11:01:00 +02:00
yhu-odoo 77a8616263 [FIX] mrp_subcontracting_account: subcontract cost don't match the price
When doing subcontracting with standard price product. If
Final procut cost != Components cost + subcontracting cost
When posting account entries for final product, the amount of componets
entry is adjusted for the difference of the two costs.
After this commit, we will post components cost according to it's price
so that it can match the value change of the stock. We adjust the amount
on subcontracting cost for the cost difference.
NOTE: the remaining of subcontracting cost will be post in price
difference account when create vendor bill.

Task-3223451

X-original-commit: 514f5b51ad30cce0048abb4cf343e830f0288b36
Part-of: odoo/odoo#132282
2023-08-19 11:00:59 +02:00
yhu-odoo be911c2c58 [FIX] mrp_subcontracting_account: wrong account subcontracting
When we do subcontracting, components and final products are sent to/
received from production location. The account entries are also post
using the accounting setting on production location like normal
manufacturing which is not correct.
To fix, we use account setting on product categories instead of
production location for subcontracting.

Task-3223451

X-original-commit: 017209068f308e87870e2b352afbdf6febc41da0
Part-of: odoo/odoo#132282
2023-08-19 11:00:57 +02:00
Saurabh Choraria ea9d6649ee [FIX] base: handle error when editing comment in view's architecture
Currently, When the user is adding a double hyphen or space or anything within a
comment in a view's architecture and tries to save the view, then an error
occurs.

To reproduce the issue:
1. Go to Settings > Technical > Views > open a view.
2. In View Architecture comment out a line.
3. Add a double hyphen or space or anything within the comment.
4. Then save manually, the error will occur.

To solve this issue the error has been handled using a try-except block in
'parse_html' method.

sentry-4306359331

closes odoo/odoo#132267

X-original-commit: ba6f90fac142ae53995f4fce4b75799e61b95b6c
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Saurabh Choraria (sauc) <sauc@odoo.com>
2023-08-19 10:05:45 +02:00
Antoine Vandevenne (anv) d5bee8b86f [REM] payment(_alipay,_demo,_paypal), website_payment: drop fees support
The "fees" or "extra fees" or "customer fees" feature was meant to make
customers pay for the processing fee charged by the payment provider
they choose to make their payment. The fee was also displayed on the
payment form to deter customers and encourage them to choose another,
cheaper, payment provider.

In practice, it didn't hold up because:
1. the provider's API must allow sending the fee as a separate amount,
   and PayPal was the only supported provider to do it;
2. charging extra fees is highly discouraged by providers, and forbidden
   in Europe;
3. the final fee amount depends on the customer, country, payment
   method, risk profile... rendering charging the actual fees amount
   infeasible;
4. most of the time, only one payment provider is enabled at a time,
   thus alienating customers who would have no other choice than paying
   the fee;

task-3358581

closes odoo/odoo#132104

Related: odoo/documentation#5517
Related: odoo/upgrade#5053
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-08-19 09:06:59 +02:00
William Henrotin 743f174a63 [ADD] mrp: complete demo data
closes odoo/odoo#132366

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-08-19 07:58:50 +02:00
Habib (ayh) 7a78f5856e [FIX] account: save on tab change
Due to the new relational model (218ad8456a), a new property isInEdition is available while `mode` has been removed.
Due to mode always being undefined, the save method was never actually called, preventing the journal items from being available when switching tabs.

Task-3471248

closes odoo/odoo#132345

Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-08-19 06:59:49 +02:00
Romain Estievenart 2057dd3bfe [FIX] web: traceback occurs on Quick assigns (M2M_tags_avatars)
This traceback only occurs if you quickly assign and close the popover
during the rerender of the popover. We call an element inside the
popover already destroyed.

Steps to reproduce:

- Open a kanban view inside the project app
- Click on the "Quick Assign icon"
- Select a user A
- Press directly "escape" to close the dropdown a traceback occurs
  => bug

closes odoo/odoo#132337

X-original-commit: f75074d225a05571bea87589b81fbefb11b054f4
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
Signed-off-by: Romain Estievenart (res) <res@odoo.com>
2023-08-19 06:59:44 +02:00
Loukas Wets (lowe) 885d52f75a [FIX] point_of_sale: blockui should be above the closing popup
The z index of the closing popup div was changed to a higher index than
the blockui z index. This commit sets the z index of the closing popup
to a lower value then the blockui z index.

task-3471040

closes odoo/odoo#132310

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-08-19 05:11:15 +02:00
Laurent Smet fd910639da [FIX] account: Fix reconciliation with very tiny rate with one foreign currency
Suppose a very tiny rate 1:10000.
l1 is expressed in company currency and has an amount of -10.
l2 is expressed in foreign currency and has 1000000 in company currency for 100 in foreign currency.

The reconciliation is made in foreign currency but there is nothing left to reconcile after converting
-10 to the foreign currency because -10 / 10000 = 0.0001 ~= 0.0
So no partial is created.

After this fix, the reconciliation fallbacks to a reconciliation in company currency if there is nothing
left to reconcile after applying the rate.

closes odoo/odoo#132304

Issue: 128234
X-original-commit: 359710c7d51ee2b7510cae59cec5b728226a26c1
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-08-19 04:09:02 +02:00
Abdelouahab (abla) 6a3f65ff63 [FIX] web : export property fields
To Reproduce
============
- on project task add a property
- go back to list of tasks and try to export the modified task
an error is raised

Problem
=======
The property field is represented as dict (same for JSON fields)
Which is not expected in `write_cell`

Solution
========
handle `dict` type

opw-3431718

closes odoo/odoo#132303

X-original-commit: 1e9ed945c637e78b1003115dfd4042b3d87d8365
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
Signed-off-by: Abdelouahab Laaroussi (abla) <abla@odoo.com>
2023-08-19 04:08:57 +02:00
Julien Carion (juca) cd26c31c59 [FIX] web: fix darkmode switch display
This commit simply corrects how the darkmode switch is displayed in the
user menu so that the switch won't overlap with its label.

task-3470052

closes odoo/odoo#132299

X-original-commit: 49176fe372dc09be65017013de8499b33d114045
Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
Signed-off-by: Julien Carion (juca) <juca@odoo.com>
2023-08-19 04:08:53 +02:00
Loukas Wets (lowe) fd4ead60cc [FIX] point_of_sale: restore quantity buttons location
The quantity buttons of the mobile view product configurator where moved
during the boostrap refactoring of the pos. This task moves them to the
previous location.

task-3446503

closes odoo/odoo#132293

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-08-19 04:08:49 +02:00
baa d2ed1d7277 [FIX] l10n_eg_edi_eta: moved the ETA QR code in a place where it will always show
Starting v16, the invoice template changed and the ETA QR code would stop showing in some cases. This commit moves it next to the payment QR Code so that it displays in all cases

closes odoo/odoo#131938

X-original-commit: 28661fa7a14713c9d06b7faa505a54f53baf66d3
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-08-18 23:05:55 +02:00
tsm-odoo 01fa22e0c9 [FIX] mail, *: fix suggestions after search/fetch returned no result
*: im_livechat.

Before this commit, suggestions were not showing anymore after
search/fetch returned no results. This commit fixes the issue
by resetting the search state when nothing is found.

task-3459933/3455060

closes odoo/odoo#132264

X-original-commit: 13b3f36a0d71bb55e2ca56fd207c7dfaba23aa86
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-08-18 21:45:11 +02:00
Pedram (PEBR) 9e012914af [FIX] point_of_sale: ensure customer presence for split_transactions
This commit addresses an issue where `split_transactions` payments were
allowed to be added without adding a customer during the creation of
return orders. The problem led to errors during session closure.

The solution is that in the backend when creating return orders and
adding payments, enforce the presence of a customer for
`split_transactions` by showing an error.

opw-3468160

closes odoo/odoo#132262

X-original-commit: 147f559a8b8c7b107cbeeb3aa289f6d642271e86
Signed-off-by: David Monnom (moda) <moda@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-08-18 21:45:06 +02:00
Pedram (PEBR) c53877c774 [FIX] point_of_sale: ensure Cash/Bank journals for PoS payment
This commit enforces the use of only Cash or Bank journal types for
PoS payment methods. Before this commit, it wasn't possible to select
other journal types, but it was possible to create a journal during
the selection, with any type. This was leading to potential issues.

opw-3442317

closes odoo/odoo#132252

X-original-commit: ff274d121a17c94ca342b0f92f72d3e1b2656f98
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-08-18 21:44:50 +02:00
Pierre Pulinckx (pipu) c07181b20b [REF] *: Replace env._t() by _t()
In this commit, all usages of env._t() are replaced by _t().
In templates files, env._t() didn't work because terms used
in attributes where not extracted into the translation files.
Only string are exported from .xml files to translation files.
So, to make it works, we set a variable that is then used
in attributes.
For example :

<t t-set="string_to_translate">String to translate</t>
<Dialog title="string_to_translate>...</Dialog>

task-3292454

closes odoo/odoo#131390

Related: odoo/enterprise#45631
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-08-18 19:17:16 +02:00
Yash Vaishnav 48e3f725a2 [IMP] calendar: improve calendar recurrence in event
Before this commit, if you had a recurring event and tried to change any
recurrence-related fields while selecting the 'This Event' option from
the header, the changes you made would not be applied. The desired
behavior is that when we changed the recurrence of an event,
we intend to modify both the current event and the following events.
When you update the event recurrence to 'This and following events,
all other updated events will have no recurrence.

In this commit, a UserError is now thrown to notify that changing the
recurrence of an event is not allowed when the 'This Event' option is selected.
In the values of the updated events 'recurrency': True' is passed to make sure
that updated events have recurrence

Task-3425216

closes odoo/odoo#128835

Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
2023-08-18 19:17:01 +02:00
Raphael Collet 5b146bdeca [FIX] repair: split the computation of some fields on repair.order
This fix splits the compute method of fields location_id,
location_dest_id, parts_location_id, recycle_location_id.  This enables
to independently compute those fields at record creation when some of
them have a default value.

closes odoo/odoo#124614

Signed-off-by: Raphael Collet <rco@odoo.com>
2023-08-18 19:16:51 +02:00
Raphael Collet 24747d112f [FIX] base: execute tests using Form post-install
Part-of: odoo/odoo#124614
2023-08-18 19:16:50 +02:00
Raphael Collet 3a9675b426 [FIX] test_testing_utilities: add dependency on 'web' to enable Form to use onchange2()
Part-of: odoo/odoo#124614
2023-08-18 19:16:49 +02:00
Raphael Collet 26cfa95f11 [IMP] tests: improve fields_spec for web_read() and onchange2() used in Form
This includes the context in fields.

Part-of: odoo/odoo#124614
2023-08-18 19:16:48 +02:00
Raphael Collet 7a86ad8957 [IMP] tests: make Form use onchange2() instead of onchange()
Part-of: odoo/odoo#124614
2023-08-18 19:16:46 +02:00
Raphael Collet aa87c0a6ba [IMP] tests: make Form use web_read() instead of read()
Part-of: odoo/odoo#124614
2023-08-18 19:16:45 +02:00
Odoo's MergebotandPratik Raval b531185533 [MERGE][IMP] survey: enable multiple trigger questions and answers
Purpose: allowing users to select multiple answers, even from
different questions, as triggers to display a subsequent question.

For example, we could ask the question
"What qualities do you look for in a desk?"
if the participant selected one of the following answers before:
"What furniture did you already buy from us?" - "A desk"
"What kind of furniture are you looking for?" - "Office furniture"

Demo data and tests are adapted and new ones are added.

We also take this opportunity to remove `is_conditional` because:
1. This field isn't useful anymore.
2. It could cause inconsistencies as it is not supported to check
 with a sql constraint that `suggested_answer_ids` is set when this
  flag is `True`.

Task-2937533

closes odoo/odoo#109903

Related: odoo/upgrade#4233
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Co-authored-by: Pratik Raval <prra@odoo.com>
2023-08-18 19:16:19 +02:00
Florian Charlier 273afd57c2 [MOV] survey: reorder some survey_form methods
Methods kept in the event handlers section for
traceability can now be moved with the tools, which we
reorder alphabetically.

Task-2937533

Part-of: odoo/odoo#109903
2023-08-18 19:16:17 +02:00
Florian CharlierandPratik Raval 55fa52be8a [IMP] survey: enable multiple trigger questions and answers
Purpose: allowing users to select multiple answers, even from
different questions, as triggers to display a subsequent question.

For example, we could ask the question
"What qualities do you look for in a desk?"
if the participant selected one of the following answers before:
"What furniture did you already buy from us?" - "A desk"
"What kind of furniture are you looking for?" - "Office furniture"

Demo data and tests are adapted and new ones are added.

We also take this opportunity to remove `is_conditional` because:
1. This field isn't useful anymore.
2. It could cause inconsistencies as it is not supported to check
 with a sql constraint that `suggested_answer_ids` is set when this
  flag is `True`.

Task-2937533

Part-of: odoo/odoo#109903
Co-authored-by: Pratik Raval <prra@odoo.com>
2023-08-18 19:16:15 +02:00
Elisabeth Dickinson c9af4abfd3 [FIX] website_forum: fix redesign layout glitches
- Improve last activity column
Allow the columns to resize to fit the date line without wrapping
and set the actual date to the title to appear on hover.

- Header fixes
To avoid the searchbar shrinking too much when there are multiple
elements in the header (long title, tag or search filter, ...), we've
set a `min-width` to it , and the `max-width` has been moved
from the second section of the header to the searchbar instead.

The alignment of the title and the rest of the bar is now aligned on the
breadcrumb's baseline instead of vertically centered.

- Fix dropdown title disappearing on selecting a tag
The dropdown's title disappeared when a tag was selected as a filter.

- Height of container and aside
We've removed the `h-100` on the aside to place it on the parent under
the condition that the `forum_welcome_message` has been dismissed.

Because `<main>` has a `flex-grow` is applied to it,
the `#wrap` has a gap under the content where it doesn't meet the full
height of the main.
This blank space is made visible by the grey background of the aside.
This could be solved by a simple `h-100` on the wrap, but it overflows
onto the footer when the `forum_welcome_message` displayed.

- Add missing pages names
Some titles weren't appearing in the breadcrumb due to misplacement of
the `_page_name` t-set or absence of it.

- Switch static image for animation
The empty moderation pages now have an animated svg instead of a static
one. Fun.

- Hide filter tool on empty mod pages
The moderation pages don't need the filter tool to appear when there
are no results.

- Switch conditionals `and/or` to `if`

Although it works, in python we don't use `X and A or B`
but `A if X else B`

- Other visual fixes

In JS : put back removed classes on voteCount element
Tags: fix the overflowing text when tag is long and switch position with
icon for more readability
Remove useless `not inDropdown` condition on form
Fix inverted plural/singular of `Views`

Other minor alignment fixes

task-3083657
part of task-3316555

closes odoo/odoo#132226

X-original-commit: c2ed6257f8a2fe74a7f4fa2977b44aac1c0bb0c5
Signed-off-by: Florian Charlier (flch) <flch@odoo.com>
2023-08-18 17:13:59 +02:00
FrancoisGe c82d7872a8 [FIX] web: KanbanRecord in x2m
Before this commit, opening a record from an x2m in kanban mode could
cause a crash. For example, if the form view of the x2m contained an x2m.

Why:
The KanbanRecord listens to changes on activeFields through fieldNames
because activeFields is reactive and when the record is opened the missing
fields are added to the kanban view. This will cause a recalculation of
getFormattedRecord before the data has been loaded.

Solution:
ActiveFields and fields should not be reactive because we can only add
new activeFields or fields and we need to wait for the data to be present
before rendering them.

How to reproduce:
- Go to a form view with an x2m in kanban mode
- Click on a record (the form dialog must contain an x2m field)

Before this commit:
    We have a crash

After this commit:
    The form view dialog opens correctly

closes odoo/odoo#132225

Taskid: 3460126
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-08-18 17:13:55 +02:00
niyasraphy 85e16b66ce [IMP] point_of_sale: show opening and closing note as multi line
before this commit, on printing sales report from pos ui or
from the backend, the opening note and closing note in the
report is shown as single line text, even though user enter
the input in multi line.

* point of sale -> reporting -> session report

after this commit, the opening and closing details in the
same way in which user enter the input also fixed a typo
opening session note

closes odoo/odoo#131992

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-08-18 15:46:50 +02:00
Pedram (PEBR) 80bff89cb3 [FIX] point_of_sale: reverse order of paid orders to match backend
This commit modifies the `search_paid_order_ids` function to reverse
the order of fetched orders before returning them. The change ensures
that the order of fetched orders aligns with the sorting order of the
backend, providing a consistent and expected display of data on
the frontend.

opw-3462740

closes odoo/odoo#132253

X-original-commit: 92066ea0ae2e1da7dce18d173638a9695c73e31b
Signed-off-by: David Monnom (moda) <moda@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-08-18 14:25:38 +02:00
Theo VINCENT (thvi) c8e83a894a [FIX] point_of_sale: closing session without cash
The closing session popup input for bank payment methods throws an error when no cash payment method is configured.

Steps to reproduce:
 - Configure a shop without any cash payment method and with at least one bank payment method
 - Open a session for that shop
 - Click on the button to display the closing session popup
 - In the popup, change the amount of the bank payment method

An error is thrown.

The fix simply consists in correctly checking if there is a cash payment method.

closes odoo/odoo#132243

Task-id: 3468828
X-original-commit: 554ccb12a154f30f03c01931dc66eb04394f8154
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-08-18 14:25:33 +02:00
Javier Vega 920262f55c [FIX] point_of_sale: validations added to tip lines
This change comes from an issue with the method `get_tip`, it
does not takes into account the actual quantity of the line.
So if you have `qty == 0` or `qty == 99`, the result will be
the same if it where `qty == 1`.

Because of the behavior just mentioned, when modifiyng any tip
line in the UI of the PoS, incoherence with data appears in the
backend field `(pos.order).tip_amount`. Since this field with
the unit price of the tip line. But the tip line can be actually 0,
or 9999 units. Causing the total of the order to be confusing,
because it does not match with the `(pos.order).tip_amount`.

To fix this, we have added some valiadtions FOR TIP LINES:
- Avoid qty modifications on those lines (with an error message for the user)
- If trying to delete a line, instead of going to qty, it gets deleted.

closes odoo/odoo#132227

X-original-commit: 03e66cb0c16567c5fa8dba1312132ff66c5916fc
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-08-18 14:25:28 +02:00
Rémy Voet (ryv) fcb092af12 [FIX] core: add test to ensure correct call of _compute_display_name
Add test to ensure that `_compute_display_name` is called once with
the correct recordset during `read_group`. Also
fix and small typo in the documentation of `read_group`.

closes odoo/odoo#132261

X-original-commit: 60477586f11ca7eb698240a6bd3f565b5a9e3279
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
Signed-off-by: Raphael Collet <rco@odoo.com>
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
2023-08-18 12:17:57 +02:00
Rémy Voet (ryv) 4dc9e42a64 [FIX] *: fix usages of _read_group with NewId
In https://github.com/odoo/odoo/pull/110737, I didn't consider that
compute could be called on NewId record with `_origin`. Some compute
methods are badly refactored with the new signature of `_read_group`.
We use recordsets returning from `_read_group` to assign field value to
`self`. But if `self` contains `NewId` with `origin`, these records
don't represent `self`, it contains real record instead of the one with
NewId + origin. Then the assignations are done on records not in `self`
which may lead to generate traceback or write to other records during
an onchange.

Fix multiple compute to work correctly with NewId (origin set) record.

X-original-commit: bd22d0a5c479a72cdaf799309387e41ce692bb29
Part-of: odoo/odoo#132261
2023-08-18 12:17:56 +02:00
Gorash 0d99f4b9d9 [REF] base,all: Update modifier syntax: adapt JavaScript
closes odoo/odoo#104741

Related: odoo/enterprise#35255
Related: odoo/documentation#3523
Related: odoo/upgrade#4884
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
2023-08-18 09:49:16 +02:00