Commit Graph
163036 Commits
Author SHA1 Message Date
Alexandre Kühn 4e2256dc6a [FIX] mail: align message actions with 1st line of message
Before this commit, action list of message was centered with
message. This can be hard to notice where the actions are shown
on long messages.

This commit fixes the issue by positioning action lists always
next to the 1st line of message content.

closes odoo/odoo#128274

X-original-commit: 7227513eac8242f9f94d75eed6b84ef99098cff2
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-07-13 07:18:48 +02:00
Aman Patel 33413b0d32 [FIX] project: traceback on inviting collaborators
Steps:
- Open project.
- Configuration -> Projects.
- Click the collaborator's stat button.
- Invite Collaborators.

Issue:
- Traceback comes ''frozendict' object is not callable'

Cause:
- The _context object is being treated as a callable function instead of a
dictionary-like object.
Reference PR:  https://github.com/odoo/odoo/pull/119771

Fix:
- Adding .get() so that it ensures that the value of 'default_project_id' is
retrieved correctly from the _context object without treating it as a callable
function.

task-3422050

closes odoo/odoo#128246

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-07-13 07:18:46 +02:00
Adrien Guilliams (adgu) 4fe7ae52a1 [FIX] pos_daily_sales_reports: correct invoice ref
This commit corrects the invoice reference showed in the daily reports
of the PoS.

closes odoo/odoo#127920

X-original-commit: 779f2abbb5b36a05add2c1c0fbf087c0a01cf4b3
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
2023-07-13 03:57:43 +02:00
Mathieu Duckerts-Antoine bac8c7a5d6 [FIX] web: domain selector dialog: do not validate domain server side
Even with a limit of 1, the domain validation done in the domain selector
dialog at confirmation can be too costly (see PR message). Since we do
not have (yet) the tools to validate quickly domains server side, we
simply drop the validation server side.

closes odoo/odoo#127832

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-07-13 03:57:40 +02:00
Mathieu Duckerts-Antoine 15bbf69a76 [FIX] web: domain selector dialog: disable confirm button on click
On confirmation of a domain created in the domain selector dialog, a
validation check involving the server is done. That validation based on
a search_count can be rather/too costly (see PR message). Since the
search_count is done in silent mode and the confirmation button is not
disabled on click, if the validation takes too much time, the user is
lead to think that the first click did not work and clicks again, and so
on...

Here we disable the button on appropriate time to avoid that situation.

Part-of: odoo/odoo#127832
2023-07-13 03:57:40 +02:00
tsm-odoo 7be977af4d [FIX] im_livechat, mail: fix add member to livechat channel
Before this commit, inviting a partner to a livechat channel
had no effect. This commit solves this issue.

Steps to reproduce:
- Go to a livechat channel in the discuss app
- Click on invite a member on the top right corner
- Select a member
- Click on the invite button
- Nothing happens

closes odoo/odoo#128173

X-original-commit: 94086d9289222008f59a97611a80de4e1310e41c
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-07-13 02:21:53 +02:00
Dylan Kiss (dyki) 75c6917b4e [FIX] account,sale: split partner credit from sales and invoices
Since 7bd93cc64b, we add the amounts to
invoice from sales order to the credit limit warning. When looking at
the credit amount on a partner from an accounting perspective, it is
not correct though that sales orders to invoice are considered as well.

In this change we split the credit amount from invoices and from sales
orders to invoice. On the partner we only show the credit amount from
invoices. In other places we add both.

task-3375260

closes odoo/odoo#128158

X-original-commit: 94eae9b73995dbf2175ecee65548ace5a382f5f8
Signed-off-by: John Laterre (jol) <jol@odoo.com>
Signed-off-by: Dylan Kiss (dyki) <dyki@odoo.com>
2023-07-13 02:21:50 +02:00
Arnold Moyaux 0be5070983 [FIX] stock: Usererror during PO import
Usecase to reproduce:
- Create and validate a PO + receipt
- Import a file containing a different PO line quantity

Expected behavior:
The PO line is modified and the receipt has the a new move

Current behavior:
UserError asking to modify the quantity done of stock.move.line instead
reserved quantity.

Following commit 76ad7b7dedab3c504c9231359b07d01505d0cc0e

The purpose is to block import with reserved quantity

It happens because the PO line import trigger the creation of a new
stock.move and reserve it (create the stock.move.line). However since
it's created by the system the data are correct.

There is no issue in multiple step since the internal step requires
the move_orig_ids and thus the product_uom_qty is empty

To fix it:
- Relax the constraint to only consider sml having an impact on quant

opw-3336131

closes odoo/odoo#128157

X-original-commit: a755db18981f23f031fdf21b58b309e3210df262
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-07-13 02:21:48 +02:00
Jinane Maksoud a4a94fa133 [FIX] account: match journal by type and name
When upgrading and loading data from templates, there could
be journals that match our target but the code is modified by
the users. The code may be different due to translations or simply
a user choice, but the journal can be the standard one. And the
noupdate=True that is on the xmlids of the created journals
confirm that it is possible for the users to keep their
customizations on the journals.
Matching the journals by type and name can be an alternative
to creating a duplicate journal, which will cause more conflict
down the line (for ex. the unique constraint on mail aliases)

closes odoo/odoo#128139

X-original-commit: 069714ee8e7175ab92a4d28b75e3725ea0be1b0f
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Jinane Maksoud (maji) <maji@odoo.com>
2023-07-13 02:21:45 +02:00
Xavier Morel 6533c081fb [FIX] mail: resilience of get_link_preview_from_html
`get_link_preview_from_html` was coded to avoid fetching the entire page content when it only needs page data, however it tries to decode the entire input buffer even though the fetch window might cut off a codepoint in two.

Fix by stripping out anything which follows the `</head>` tag, which might contain partial codepoints.

Also add a few more improvements:

- avoid visiting the entire buffer if we parsed more than 16k (as unlikely as that is), even when offsetted `find` returns an offset from the start of the buffer
- don't decode upfront, as `html.fromstring` will decode just fine internally (better really as it has decoding fallbacks)

closes odoo/odoo#128240

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2023-07-13 00:46:21 +02:00
tsm-odoo ff30c6e0ee [FIX] im_livechat: replace attendees by participant
Change "attendees" by "participant(s)" the discuss channel "session history"
views in the livechat module.

part of task-3332872

closes odoo/odoo#128239

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-07-13 00:46:19 +02:00
Maitri Patel d7d1d832d9 [FIX] account: validate the correct order of the account report lines
Issue Description

When a user changes the sequence of the lines which have a parent_id field,
particularly when it changes the sequence and the parent field of the line is
after the line, then it will give an error in the opening of the reports.

Steps to Reproduce:

[This step is only used for this traceback. But the issue occurs in all the
account reports.]

1. Install the account_reports module.
2. Open accounting and go to configuration.
3. Then, click on accounting reports and select the profit and loss report.
4. Change the sequence of the lines.
5. Save the changes.
6. Click on the reporting menu and select the profit and loss report.
7. The traceback will generate.

Fix:

This commit resolves the above issue by throwing a validation exception
when the parent line is set after the line. And also throws a validation
exception when the user sets the parent line as itself.

Sentry ID: 3944989529

closes odoo/odoo#128209

X-original-commit: a8a147dab40af4732bbe072cfd9cff1d1ba80e36
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-07-13 00:46:13 +02:00
Andrea Grazioso (agr-odoo) f9e09bc7a3 [FIX] account: dashboard actions search filter
Create a Bill
Register payment
Create the bank statement
Match with the payment
Go to accounting dashboard, hit "Vendor Bill" (open bill list view)
Clear filters
Add filter: Unpaid

Issue: Users should not be able to clear the journal filter when opening
the bill view

This commit align the behavior of the dashboard to the menu entries
by adding a default search domain to the actions instead of the default
search filter

opw-3228450

closes odoo/odoo#128203

X-original-commit: 4e612d5434d8254c3ba44b8a00d7d71bc0ab4084
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Andrea Grazioso (agr) <agr@odoo.com>
2023-07-13 00:46:10 +02:00
Aurelien van Delft (avd) d534fdaa55 [IMP] purchase_stock: add ir_config_parameter to on_time_rate comp.
On-time-rate is a non-stored computed fields that can take
some time to load because some partners may have lots of
related purchase_orders. The compute function in itself
is relatively difficult to optimize further. This commit
introduces a new system parameter to reduce the timerange of
orders to consider when computing On-Time Delivery Rate.

That way, if for some customers the on_time_rate computation takes too
much time (leading to a slow FormView loading), they can reduce
the accuracy of the estimation to speedup the field's computation.

closes odoo/odoo#128199

X-original-commit: 2e766f11024e9bb905f8e98d7218cf924c43a0c9
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Aurélien van Delft (avd) <avd@odoo.com>
2023-07-13 00:46:08 +02:00
Romain Derie aca9a4e9da [FIX] website: hide optimize seo menu when model is not seo capable
When user creates a new 'livechat channel' in website, and click on
'Optimize SEO' a traceback will appear.

Step to reproduce:
- Install 'website' and 'im_livechat' module
- Go to 'website' module
- Click on 'NEW' and then create a new 'Livechat Widget'
- Go to 'Site' and click on 'Optimize SEO'

Error: A traceback appears: Invalid field 'website_meta_title' on model
'im_livechat.channel'

The menu should not be shown for such model which do not inherit the
SEO mixin. This commit ensures that.

sentry-4241511888

closes odoo/odoo#128187

X-original-commit: b2bcf950bd62872fe5dc9455636256d9213b58dc
Signed-off-by: Colin Louis (loco) <loco@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-07-13 00:46:05 +02:00
Maximilien (malb) f4e96bf3a6 [IMP] l10n_gcc: Payment Reference
When working on incoterm and the placement on the invoice, we saw that the
payment reference was weirdly displayed. This commit put the payment reference
on the right with the same display as the invoice date or due date.

closes odoo/odoo#118954

Task-id: 3273460
Related: odoo/enterprise#43363
Related: odoo/upgrade#4598
Signed-off-by: William André (wan) <wan@odoo.com>
2023-07-12 21:45:44 +02:00
Maximilien (malb) 9ddc128d7b [IMP] sale, purchase, account: incoterm location
Before this PR, the incoterm location was not present in the account module.

This pr does multiple things:
- Add the Incoterm Location field in Accounting on Customer Invoices and Vendor
Bills. The field already exists on Sale Orders and Purchase Orders. When you
create an Invoice from a Sales Order, or a Vendor Bill from a PO, copy the value
of the field on the invoices.

- Update the PDF to display the field value if present, and remove the useless
duplication

- Remove incoterm setting on sale

- Remove useless xpath since now it is displayed directly on invoice when
incoterm field is fill.

Task-id: 3273460
Part-of: odoo/odoo#118954
2023-07-12 21:45:44 +02:00
Leonardo Pavan Rocha bc63d134eb [IMP] web: merge quick_add with quick_create_form_view_id
https://github.com/odoo/odoo/pull/114827 added a new attribute in the calendar
view that allowed passing a form view id that is used in the calendar module to
show a different form view when trying to quick create an event. This new
attribute, however, was only used in the calendar module. With this in mind, it
made sense to allow using this attribute in other modules. This commit
implements this, however, the approach used was different. It was decided to
merge quick_create_form_view_id with quick_add as both are related to the
same feature: quick creation of a record in the calendar view. Now, quick_add
receives either a boolean (original behavior) or a number representing the form
view id to be shown when quick creating a record.

task-3286969

closes odoo/odoo#122923

Related: odoo/documentation#4707
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
2023-07-12 20:33:50 +02:00
pash-odoo 93f365c000 [IMP] sale_timesheet,project: improved create project wizard
Before this commit when creating new project then in wizard form Billable is by
default checked and no placeholder is given for partner field in Billable.

This commit focuses on improvement in create project wizard by removing checked
by default from Billable so that user get simplified and less complex view of
tasks during the onboarding. Added a placeholder for partner field which help
user to understand the purpose of field and switched the position of Billable
and Timesheets. change test case according to new changes.

task-3377998

closes odoo/odoo#126010

Related: odoo/enterprise#43037
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-07-12 18:43:06 +02:00
arpr-odoo 6bc74c4b9f [IMP] project: remove edit button from kanban card
This commit focuses on enhancing the Kanban card
functionality by removing a redundant button. Previously,
users were already able to access the form view by
clicking directly on the Kanban card itself. However, the
presence of the redundant button caused potential
confusion and cluttered the interface. With this update,
we have improved the user experience by eliminating the
unnecessary button, allowing users to seamlessly access
the form view with a simple click on the card. This change
simplifies the workflow, removes redundant elements, and
contributes to a cleaner and more visually appealing user
interface. The aim is to optimize usability and improve
the overall aesthetic of the application.

closes odoo/odoo#125364

Task: 3369698
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-07-12 18:43:03 +02:00
Julien MougenotandXavier Bol 029dd9c567 [FIX] web: fix date fields appearance
Before this commit, in readonly daterange fields in list views, if one
of the dates was set, it was unclear which of the 2 fields it was (it
simply diplays the formatted value of the field which is set).

Now, the arrow icon appears on the right or left side to clearly reflect
whether the value is the start date or the end date (list views only).

closes odoo/odoo#127734

Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Xavier Bol <xbo@odoo.com>
2023-07-12 16:53:10 +02:00
Julien Mougenot fd64757d82 [FIX] web: fix focus issues with datetime hook
Before this commit, the way focus was handled by the DateTime feature
hook was inconsistent. This caused the date/datetime/daterange fields to
not be able to open the picker when clicking on the "Add start/end date"
button, and effectively lose the value set on the field on save.

This commit introduces a more consistent focus handling as well as a
helper returned by the hook to open the picker on command.

Part-of: odoo/odoo#127734
2023-07-12 16:53:10 +02:00
Julien Mougenot f962d071ad [FIX] web: fix datetime picker buttons overflowing
Before this commit, the "Apply" button in date pickers (not datetime)
would overflow from its popover in desktop view since its position is
set to absolute, and since there are no time pickers to extend the
height of the picker it simply overflows.

This commit ensures that the buttons are correctly displayed when there
are no time pickers.

Part-of: odoo/odoo#127734
2023-07-12 16:53:09 +02:00
Julien Mougenot 44df785656 [FIX] web: use allowed CSS selectors in datepicker
Before this commit, there were some uses of illegal CSS selectors such
as `:not(.classA, .classB)`. The proper way to use multiple `:not`
statements is to chain them. This commit takes care of that.

Part-of: odoo/odoo#127734
2023-07-12 16:53:09 +02:00
Habib (ayh) a638442a3d [IMP] base: force dialog size of layout configurator
action_base_document_layout_configurator should always have a dialog_size = 'large'
this ensures that the context from a calling function is not applied

closes odoo/odoo#127630

Related: odoo/enterprise#43770
Related: odoo/upgrade#4918
Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-07-12 16:52:59 +02:00
Habib (ayh) 9299f81f19 [IMP] account: statement management 2.1
In the process of making bank statements optional, the usability of bank statement was reduced.
This PR aims improve that, by providing the ability to view and manage bank statements on the bank reconciliation widget.
See the Enterprise PR.

Task-3270046

Part-of: odoo/odoo#127630
2023-07-12 16:52:58 +02:00
FrancoisGe 42e5e247bf [FIX] web: m2o must only use the context of the field
From commit 2ecfed335d, clicking on the arrow of a m2o opens the
record in form view and passes it the context of the current view.
After this commit, only the context defined on the <field> is passed.

Problem:
An example of a problem, is the use of an incorrect active_id in the
second view that is passed through the first form view to the second.
Previously, the active_id of a form view was always the id of the record
and not that of the previous view. This behaviour is debatable, but it
leads to major changes. We therefore prefer to revert to the old behaviour
and no longer pass the entire context in order to avoid this problem.

How to reproduce:
- Go to a form view with a m2o
- Click on the arrow of the m2o

Before this commit:
    The view context contains all the context from the first form
    view and the second.

After this commit:
    The view context contains the context of the m2o field and the second view.

closes odoo/odoo#127538

Taskid: 3394945
X-original-commit: a9bec1fec3ff08461732ef2717457524339eb716
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-07-12 16:52:54 +02:00
Rob Coekaerts 2de114a37f [FIX] hr_holidays: make holiday tests (demo) data independent
Before this commit, the hr_holiday tests used base_company to setup the
tests. This resulted in the tests interacting with the demo data that
were linked to this company, eg stress days.

With this commit, the tests are now independent of this data, and will
therefore not be affected by any changes it.

closes odoo/odoo#127415

Related: odoo/enterprise#43717
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-07-12 16:52:49 +02:00
Hugo Carlier (Huca) 0afd96e669 [IMP] project_todo: keep the breadcrumb after to-do conversion
When a to-do is converted to task, the breadcrumb was reseted
preventing the user to go back to the to-do app in one click after
conversion. This commit reintroduces the full breadcrumb after
conversion.

task-3369510

closes odoo/odoo#126966

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-07-12 16:52:44 +02:00
Maruan Aguerdouh (magm) 2adcb5a989 [FIX] website_slides: quiz success modal displayed properly
After refactoring the modal options to stop using the `Underscore.js`
library, the modal was not displayed properly anymore. You can check the
behavior by completing a quiz in the website_slides module.

If we set the `option` as the target of the `Object.assign()` we then
got the optiond properly applied and we got the same behavior as before.

Refactoring commit:
https://github.com/odoo/odoo/commit/f4f0f783183507df8227b37fe1234c256325df6d

opw-3389193

closes odoo/odoo#128132

X-original-commit: 46ed163e39238f7f4d7115711fe9dee93abd4cde
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-07-12 13:58:09 +02:00
Julien (jula) cf187ab43e [FIX] website_form: prevent crashing while parsing python dict in JS
__Description of the issue:__
- The `replace` method in JS only replace the first occurrence of a
string (unless `g` flag is used in the regex)
- There could be an apostrophe (`‘`) in a string value which would be
replaced by a quote (`“`)
- There could be “None”, “False” in a string value which would be
replaced too
- “True” is not taken into account

__Description of the fix:__
Those regex are meant to deal with more edge cases when transforming a
python dict to a JSON in JS. However there are still ways it could go
wrong. For the forward port in master, it could be a good idea to
consider converting dictionnaries directly in the backend using the
`json` python library.

__Steps to reproduce the issue:__
1. Edit the view `website.contactus`
(If `website_crm` is installed, either uninstall it or disable the
`website_crm.contactus_form` view)
2. At line 5, change the attribute `t-att-data-values` to a more
complicated dict like:
```
"{'email_to': res_company.email, 'name': 'Alice True', 'age': None, 'active': True, 'attr1': None , 'attr2': False , 'attr3': 'let\'s go'}"
```
3. Go to `/contactus` on the website
↳ Traceback

opw-3328690
task-3340946

closes odoo/odoo#128127

X-original-commit: 5360e10dcd89bdbae6d01a0f6597571c8592301f
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-07-12 13:58:06 +02:00
Thibault Delavallée e2711f46ff [IMP] event: format mobile / phone number of attendees when possible
ISSUE

SMS reminders are not always correctly sent, as people fill form using local
numbers. When scheduler run the number is not always recognized to be
formatted using E164 format. We should try to normalize numbers when possible.

SPECIFICATIONS

Try a sanitize: format number based on event country (or partner if set).
If formatting it works, use the given number, otherwise use the original
number.

Do it at registration creation, as classic flow is the frontend where customers
give numbers used to create registrations. When the number is coming from the
partner through the compute, do not do anything and keep current behavior
which copies partner number if not given directly on the registration.

Add an onchange to try to format the number in the form view, like what is
done on leads. Do not automatically do it at write as it is not really
required currently from business point of view, it is more an helper for
frontend registration.

Task-3342820

closes odoo/odoo#128118

X-original-commit: 94fa8d962535a754c9fb26997a38cc8b51b8974e
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-07-12 12:38:48 +02:00
Thibault Delavallée 0f26b490e1 [FIX] crm, phone_validation: format numbers using E164 standard
Most number formatting is done using E164 standard, see notably
'phone_get_sanitized_number' method in mail.thread.phone.

Some calls are still done using INTERNATIONAL format. Notably on 'partner'
and 'lead' model, an onchange is implemented that formats numbers according
to INTL format. However this leads to inconsistent computation where sanitize
is done using E164, and format using INTL. This makes some computation and
comparisons harders without much real added value.

In this commit we choose to make the onchange on those models use the same
E164 format as the sanitized one. This eases comparisons and usage of phone
numbers through Odoo.

Task-3342820

X-original-commit: 51d571fab4871fd62ce154b6fc1ed573407c7f86
Part-of: odoo/odoo#128118
2023-07-12 12:38:47 +02:00
paso-odoo aa9642215a [FIX] hr: launch plan for archived employees
Issue 1
=======
When an employee is archived and the user clicks on the 'Launch Plan' button
from that employee, it will throw an IndexError saying the tuple index is out
of range.

Steps to produce:
- Open any Employee > Action > Archive > Apply.
- Open archived employee(s) from the Filters > Archived.
- From list view or form view, Click on the 'Launch Plan' button.
- Error: IndexError: tuple index out of range.

Fixed this issue using the current company if the employee and their company
are not found.

Issue 2
=======
When a user clicks on the 'Launch Plan' button from that employee, It will
throw an IndexError saying the tuple index is out of range.

Steps to produce:
- Open any Employee.
- Make the 'name' field unrequired (Studio or Edit form view).
- Now create a new employee - before clicking on the Save button click on the
'Launch Plan' button.
- Discard Changes > Error will produce.

Fixed this issue using the check before using the employee record.

sentry-4259555464

closes odoo/odoo#128138

X-original-commit: 7ebe9dcdbe80f8309a82521986437b512ce656c4
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Parth Solanki (paso) <paso@odoo.com>
2023-07-12 11:20:02 +02:00
Tommy Ng 88b2e4f669 [FIX] hr_contract: fix new contracts searching with correct state
Current behaviour:
Next contracts searching will search incorrect state.

Expected behaviour:
Next contracts should not contain draft state contract.

Explanation:
Contracts state field new state should use the value draft.

closes odoo/odoo#128136

X-original-commit: aaf36439fa11acf4335dd803c6269e6e4596012b
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-07-12 11:19:59 +02:00
Tommy Ng 05385ee8f3 [CLA] signature for SlaveWilson
X-original-commit: f158abd53c7001fad02d1f03c64f50d16209db40
Part-of: odoo/odoo#128136
2023-07-12 11:19:58 +02:00
Benjamin Vray 529fdea32c [FIX] website: fix image gallery arrows hidden after click
Steps to reproduce the bug:

- Drag and drop an Image Gallery Snippet onto the page.
- Add an image in the Gallery.
- Click on the "right" arrows.
- The arrow is gone.

A bug similar to this one had already been fixed by the commit [1] that
added the "o_not_editable" class to the "carousel-control" elements of
the "s_image_gallery" snippet. However, it was also necessary to make
this change in the QWeb template used when the slideshow is regenerated
upon adding an image.

[1]: https://github.com/odoo/odoo/commit/ef7adab23b310001ea8f7ff8cd304b11a5464c7d

task-3414584

closes odoo/odoo#128133

X-original-commit: 0983553f4df2b027290082c03142db4bfb5f288c
Signed-off-by: Colin Louis (loco) <loco@odoo.com>
Signed-off-by: Benjamin Vray (bvr) <bvr@odoo.com>
2023-07-12 11:19:55 +02:00
Claire Bretton (clbr) 3d895b9f87 [FIX] payment: fix constraint on account.payment.method.line
Change a constraint that was meant to prevent deletion of an
account.payment.method.line when related provider is in 'enabled'
or 'test' state. The constraint is now handled only on the payment method
lines that are actually modified, and not on everything like previously.
This constraint was failing during upgrades because it was too broad,
its initial purpose was to raise error to user at the moment he tries
to remove payment method lines from its journals.

closes odoo/odoo#128214

X-original-commit: fca76bcc6c8be6e38827641555d62ab2973ab1fe
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Claire Bretton (clbr) <clbr@odoo.com>
2023-07-12 09:15:09 +02:00
Gurupreet Singh 9fdc834207 [FIX] project: fix search view issue in website for milestone in tasks
Before this commit if we go to website and choose tasks and if we search
anything it shows no tasks available and if we select milestone it shows table.

Steps:
- Go to website and select tasks and search anything in search bar.
- Showing  no tasks available
- choose milestone from drop-down and search anything it will show table labels.

Fix:
- Added condition for checking if milestone is passing empty record set  and
 added another condition to handle it

task-3183771

closes odoo/odoo#128204

X-original-commit: bcbfa314fb54039536b07446aa9c925378e68ab0
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-07-12 09:15:03 +02:00
Alexandre Kühn 5e917281b2 [FIX] project: no big chatter in project portal task
Before this commit, the portal chatter of a project task
on an XXL screen was huge, making form view to shrink
extremely.

This happens because chatter is in `flex-grow: 1`, and assumes
form view also has a specific width to adapt chatter accordingly.
However, in portal chatter, the form view defines a width of 1px
... Therefore giving the room of chatter to take the whole width.

Apparently this rule was defined as a workaround for list view,
which has no chatter. Somehow this rule is affecting form view
in portal, but not in backend.

This commit fixes the issue by removing the `flex-grow: 1` rule
on chatter, so that it always has a fixed size of `530px`.
This is not necessarily the best fix, but at least the most
important content, the form view, is more visible.

closes odoo/odoo#128191

X-original-commit: 15a8200a83ad00760fed0e5c46140c8539ccd8f3
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-12 09:15:00 +02:00
Brieuc-brd 89227a62db [FIX] mail: mobileTopbar buttons spacing
Prior to this commit, there was a spacing issue between `mobileTopbar`
buttons.

This PR fixes this issue.

task-3415575
Part of task-3326263

closes odoo/odoo#128190

X-original-commit: c599df12fe99bbf6ca5eaef2abc4ac94d27a59ae
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-12 09:14:57 +02:00
Adrien Schoffeniels a52e2fdb80 [FIX] web: use right color class for calendar popovers
Purpose:
--------
Currently, the calendar common popover has an incorrect color class if
the value of the field used to color the records in the calendar is not
a number. Therefore the popover header remains grey although the event
is colored, and the header content is misaligned.

This commit fixes this behavior by using the `getColor` method to obtain
the class name to use in the popover, which is the method currently used
to obtain the class name to use in the event. If this method does not
return a number, the default color class (o_calendar_color_0) is used.

Task-3239985

closes odoo/odoo#128169

X-original-commit: b159a98e0f0c89fab91b706895bbc1884a8cbd4e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-07-12 09:14:54 +02:00
oco-odoo f36ad3523b [IMP] account_reports: reset country_id when switching the availability condition of a report manually to something else than 'country'
Otherwise, when displaying the field in the view, the field might remain set, causing confusion.

closes odoo/odoo#128143

X-original-commit: 003edebd7e90d3e24a2f932c5ff90b1b13758b35
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-07-12 09:14:51 +02:00
divy-odoo f88e827126 [IMP] web_editor: open internal link in edit mode
Before this commit, when the user was clicking on a link to another page
of the website, it was opening in another tab but in frontend mode.
However, in most cases the user actually wanted it to open in backend
mode.

Here is an example of users who started an eCommerce trial. They are
editing their homepage and want to create a product. They open the
"/shop" page using popover but because they are in the frontend, they
don't see the "+NEW" button. This behaviour seems a little odd.

Therefore, this commit aims to open internal links in the edit(backend)
mode instead of the frontend mode.

task-3177126

closes odoo/odoo#128114

X-original-commit: f7dacce18bf44914972da292ff041505289d1e16
Signed-off-by: Divyesh Vyas (divy) <divy@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-07-12 07:40:29 +02:00
momegahed c378868f16 [FIX] pos_discount: remove rounding from discount
Summary
-------
Currently, in POS, global discounts percentages are rounded to the
nearest *whole* number.

Steps to reproduce
------------------
- install the Point Of Sale
- activate Global Discounts on a POS
- start a session and add a product
- add a 5.5% global discount

Look at the added 'Discount' line, you should see that its amount
doesn't match the discount. (6% is applied instead of 5.5%)

opw-3347127

closes odoo/odoo#128111

X-original-commit: cbe314e35911f8c71987f2ae21a0fe446d97c360
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-07-12 07:40:24 +02:00
niyasraphy e588e25a5d [FIX] pos_daily_sales_reports: traceback on printing daily sales
before this commit, on printing the daily sales report
without selecting the pos session in the wizard, it
raises traceback.

traceback:

ValueError: Not naive datetime (tzinfo is already set)
Template: point_of_sale.report_saledetails
Path: /t/t[2]/t/div/div[1]/t[3]/strong/t[1]
Node: <t t-esc="date_start" t-options="{\'widget\': \'datetime\'}"/>

after this commit, the session field will be required
in the wizard and report will get correctly printed

closes odoo/odoo#128096

X-original-commit: a77e2936790fdb179f88c3cd2de08aec801bb24c
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-07-12 07:40:15 +02:00
tsm-odoo f5da99c0ad [FIX] mail: fix crash when unknown member leaves channel
Before this commit, a crash occurred when an unknown member
left a channel.

Steps to reproduce:
- Open two browsers, one for admin, one for demo
- Ensures both users are on the general channel
- Execute the `/leave` command with demo
- A traceback appears on the admin browser

This issue occurs because the `action_unfollow` only sends
the channel member id through the bus but the client relies
on other keys without checking for their presence. This
commit fixes this issue.

closes odoo/odoo#128090

X-original-commit: f8452b2eb8f9243402984d78184ed494384a187c
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
2023-07-12 07:40:11 +02:00
hupo-odoo f85ddd5964 [IMP] account : tax_tags switch on accounting reports
Improves the update of accounting report expression when switching the engine to 'tax_tags'.

To reproduce:
1) Create a new report line in a report with an expression using the 'external' engine, giving it "dudu" as formula.
2) Save your changes.
3) Modify your expression to use 'tax_tags' instead of 'external'. Save your changes.
=> +dudu and -dudu tax tags are now created (with this commit), as expected

task : 3270506

closes odoo/odoo#128053

X-original-commit: a7dfd79ec13bae3d43cda7be06ebd07ba3ce135c
Related: odoo/enterprise#43918
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Hugo Poncelet (hupo) <hupo@odoo.com>
2023-07-12 07:40:08 +02:00
Maruan Aguerdouh (magm) 71233fa2cb [FIX] website_slides: do not crash when deleting a slide
Steps to reproduce:

- Install the elearning module and go to a course not created by you.
- Try to delete or add any slide.
Note: the bug is not consistent it might happen for some courses and not
for others.

Issue: We get a traceback error when trying to modify anything about the
slides in this course.

Solution:
Adding the `'channel_id.slide_ids.slide_ids'` dependece to the
`_compute_category_id` will make the computation to take into account
the changes on the slides.

opw-3316697

closes odoo/odoo#128022

X-original-commit: 1d6f8f4c606ddb7f57acd7ef2a9f983d7de84a34
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-07-12 07:40:03 +02:00
tsm-odoo 1fd39b35b2 [FIX] mail: fix suggestion hook char deletion
Before this commit, the suggestion list would not work when
a string with no match was entered then modified.

Steps to reproduce:
- Open a channel
- Type `/hee` (this string matches no suggestion)
- Delete one of the `e` in order to get `/he`
- This string should match the `/help` suggestion but nothing
is shown.

There is several issues here:
- The suggestion hook is based on the composer selection but
the `selectionChange` event is not triggered when deleting text
from the textarea which leads to incorrect selection.
- The search is cleared in the `suggestionHook` when nothing is
found which leads to incorrect delimiter position after a deletion.

This commit fixes both issues.

closes odoo/odoo#127997

X-original-commit: b8bf65478cad558e02a5902886b3e4272483944e
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-12 07:40:00 +02:00