Commit Graph
163072 Commits
Author SHA1 Message Date
Audric Onockx (auon) dfd5d33a05 [REM] hr_timesheet_attendance: remove unused view
We had a view in this module that was not used
and didn't seem to make any sense, so we delete it here.

task-3251675

Part-of: odoo/odoo#127492
2023-07-13 14:47:44 +02:00
Pierre Pulinckx (pipu) 504b4a7178 [REF] *:Replace moment usages with luxon
luxon and moment are both used in the solution, but
these two libraries facilitate the manipulation of dates.
It was decided to replace all uses of moment with
luxon so we can then remove moment.js from the
code and lighten the assets.

task-3391739

closes odoo/odoo#127406

Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-07-13 14:47:41 +02:00
hupo-odoo 5b5699e0c1 [IMP] l10n_gr: complete rework of Greece localization
Greece localization package was previously based on deprecated documentation. This commit add
- A new Chart of Accounts based on Greek Accounting Standards (Law 4308/2014)
- Account Groups
- Tax Report (based on Greece F2 Form)
- Taxes
- Tax Groups
- Fiscal Positions

task-2744373

closes odoo/odoo#126923

Related: odoo/enterprise#43415
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-07-13 14:47:36 +02:00
Julien Alardot (jual) 81fe11fabb [IMP] hr_expense: Split company payments per expense
When an expense sheet move is created, there is only one
outstanding line, but it is usual to pay separately.
That makes the reconciliation step harder.

This makes sure one move is created per expense

Task-3328877

closes odoo/odoo#126805

Related: odoo/upgrade#4873
Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-07-13 14:47:30 +02:00
SaddemAmine 35ea7f5979 [IMP] account: added default order by invoice_date
This commit aims to improve the order of draft bills / invoices. Currently when importing multiple vendor bills they aren't ordered logically since they're still draft bills. Adding a fallback order by invoice_date until they're posted will help the user find the bill he's looking for more easily. It also allows to preserve the order of the imported bills in case of validation in batches.

Task ID: 3383575

closes odoo/odoo#126691

Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-07-13 14:47:27 +02:00
Zelong Lin 5438599af9 [IMP] mail: add single user to self-chat makes a DM chat
Opening DM chat or making group chat is determined by amount of
members in the resulting conversation to start. Before this commit,
starting a conversation with self and another user was wrongly
considered as making a group chat, because it wrongly assumed there'd
be 3 channel members in this conversation: the other user,
self (explicitly), and self again (implicitly).

This commit makes DM or group chat more natural when dealing with
self user:

- Adding only self to start a conversation should open a self-chat
- Adding a user to self-chat should open DM chat
- Invite more than one user in self-chat should make a group chat

task-3382231

closes odoo/odoo#126361

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-13 14:47:24 +02:00
Sohail JAIDI (soja) 5a51816415 [IMP] account_move: Adding a warning when uploading duplicate invoice
The aim of this commit is to add a warning when an invoice is uploaded and a duplicate of this invoice already exists in db.
It is the same behaviour that we already have for vendor bills

Previous to this commit:
When uploading duplicate vendor bill -> Warning
When uploading duplicate invoice -> NO Warning

After this commit:

Warning in both cases

closes odoo/odoo#126096

Task: 3378169
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-07-13 14:47:21 +02:00
Adrien Guilliams (adgu) 4901518252 [FIX] pos: "more" showing on TicketScreen
Before this commit, the "More" button was shown on the TicketScreen
in mobile view as it is on the review page (still on mobile view).
The problem is that we do not want it there as it does not go well with
the correct flow of a refund. This commit also fix part of the code
that had to be changed after following the review of
this PR: odoo/odoo#121286

closes odoo/odoo#122881

Signed-off-by: David Monnom (moda) <moda@odoo.com>
2023-07-13 14:47:16 +02:00
Mathieu Duckerts-Antoine 9c8c2a8c30 [FIX] web: model field selector: padding below path description
We make the elements of the path description be a bit above the bottom
line in the model field selector.

closes odoo/odoo#121688

Related: odoo/enterprise#41660
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-07-13 14:47:13 +02:00
Mathieu Duckerts-Antoine db67719fd6 [FIX] web: domain selector: bar below autocomplete
We add the class o_input to the root node of the DomainSelectorAutocomplete
component in order to get a line below the tags and the input value.

Part-of: odoo/odoo#121688
2023-07-13 14:47:13 +02:00
Mathieu Duckerts-Antoine fb9629cb6d [IMP] web: domain selector: autocompletion for relational fields
For the relational fields and the operators =,!=,in,not in, we allow
the user to use autocompletion as in a many2one or a x2many field.

Task ID: 3291990

Part-of: odoo/odoo#121688
2023-07-13 14:47:12 +02:00
Mathieu Duckerts-Antoine ff2ee462a5 [IMP] web: search bar: facet descriptions
We improve the facet descriptions of the domain created via the domain
selector. We do this in several ways like it was done for the readonly
mode of the domain selector:
    - instead of displaying ids for relational fields, we display the
      associated names.
    - instead of displaying values for selection fields, we display the
      associated labels.
    - quotes around strings are not displayed by default. They are if
      there is some ambiguity: the presence of a value of another type
      like 0, false or an expression makes necessary to put them.

Task ID: 3291990

Part-of: odoo/odoo#121688
2023-07-13 14:47:12 +02:00
Mathieu Duckerts-Antoine 56ede17854 [IMP] web: domain selector: display in readonly mode
We improve the readonly mode in several ways:

    - instead of displaying ids for relational fields, we display the
      associated names.
    - instead of displaying values for selection fields, we display the
      associated labels.
    - quotes around strings are not displayed by default. They are if
      there is some ambiguity: the presence of a value of another type
      like 0, false or an expression makes necessary to put them.

Task ID: 3291990

Part-of: odoo/odoo#121688
2023-07-13 14:47:12 +02:00
Mathieu Duckerts-Antoine e10f965c36 [FIX] web: domain selector: 'New rule' button size
The button "New rule" was too easily clickable since it took a whole
line. We reduce its size.

Part-of: odoo/odoo#121688
2023-07-13 14:47:12 +02:00
Mathieu Duckerts-Antoine a1365d7655 [IMP] web: model field selector: search on string and name in debug mode
We allow the user to make a fuzzy search on the string and the name of
the fields when the props isDebugMode is true.

Part-of: odoo/odoo#121688
2023-07-13 14:47:11 +02:00
Mathieu Duckerts-Antoine a3b00f2dca [FIX] web: domain selector: operators with same key
Before that commit, we could get two operators with the same key to
display at the same time. In that case, an error would be thrown by OWL:
Got duplicate key in t-foreach... . We fix that problem.

Part-of: odoo/odoo#121688
2023-07-13 14:47:11 +02:00
Odoo's Mergebot cb8a590bfa [IMP] web: add onWillStart in calendar's model
This commit allows to define a `onWillStartModel` method in the calendar controller that will be used as `onWillStart` option of the calendar model.

Purpose
--------

The related enterprise PR introduces a new "item calendar" feature in Knowledge that allows to embed calendar views using article properties to display these articles in the calendar.

To do so, one needs to modify the fields mapping before the model is loaded for the first time, so that the records are fetched using the properties in the search domain.
The `onWillStart` option of the `useModel` function is perfectly suited for this.

Task-3239985

closes odoo/odoo#121608

Related: odoo/enterprise#40993
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-07-13 14:47:00 +02:00
Adrien Schoffeniels a084c5f156 [IMP] web: rename properties 'view in kanban' label
Purpose:
--------
Rename the label "view in kanban" to "display in cards" in the properties
definition popover. The rationale is that the related enterprise PR allows
to display the `article_properties` in the popover of the `item calendar`,
using the kanban properties widget.
Therefore, checking the now called "display in cards" checkbox now allows
to show the property in the kanban cards and in the calendar popovers.

Task-3239985

Part-of: odoo/odoo#121608
2023-07-13 14:47:00 +02:00
Adrien Schoffeniels 5511ffe03b [IMP] web: add onWillStart in calendar's model
This commit allows to define a `onWillStartModel` method in the calendar
controller that will be used as `onWillStart` option of the calendar
model.

Purpose:
--------
The related enterprise PR introduces a new "item calendar" feature in
Knowledge that allows to embed calendar views using article properties
to display these articles in the calendar.

To do so, one needs to modify the fields mapping before the model is
loaded for the first time, so that the records are fetched using the
properties in the search domain.
The `onWillStart` option of the `useModel` function is perfectly suited
for this.

Task-3239985

Part-of: odoo/odoo#121608
2023-07-13 14:46:59 +02:00
Prakash Prajapati a2cceb04f7 [IMP] project, *-: improve the project settings UI
-* = sale_timesheet, sale_project

Issue:
Currently, the fields and description are not appeared in the full width in the
project setting.

Technical description:
  Currently, the content does not appear in full row because col-lg-6 is given in the
  settings component. Other col-lg-6 is empty.So in this commit we have shown content in
  full row.

task-3183771

closes odoo/odoo#114405

Related: odoo/enterprise#37802
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-07-13 14:46:46 +02:00
Ivan Rasputin 4b283a69cc [FIX] mass_mailing_event_sms: add missing dependency
The module `mass_mailing_event_sms` extends couple methods [1] that are defined
in  module `mass_mailing_event` [2]. However, because of the missing dependency
in manifest, user can uninstall `mass_mailing_event`, while keep
`mass_mailing_event_sms` installed. This leads to error `'super' object has no
attribute 'action_invite_contacts'` [3].

Fix it by adding the missing dependency explicitly.

[1]: https://github.com/odoo/odoo/blob/fd508fe436c64780a8454ddeb6b7ec8f1f80d7c5/addons/mass_mailing_event_sms/models/event.py

[2]:
https://github.com/odoo/odoo/blob/fd508fe436c64780a8454ddeb6b7ec8f1f80d7c5/addons/mass_mailing_event/models/event.py#L23

[3]: https://online.sentry.io/issues/4280254156/

closes odoo/odoo#128024

X-original-commit: add78c904779615796b5318cc11727700f3564bb
Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
2023-07-13 12:26:17 +02:00
Alexandre Kühn dd56346c48 [FIX] mail: link preview should have at most 2 lines of text content
Before this commit, link preview showed the whole text content
of the link preview, which has it's limit at around 300 characters.

When description is long, the link preview was too long, which made
it too visible as a "preview".

This commit fixes the issue by truncating the description to at most
2 lines.

Task-3416429

closes odoo/odoo#128347

X-original-commit: 73025d977f6960a829f914a3f0f0c0d87abbb561
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-13 10:46:21 +02:00
Nasreddin Boulif (bon) 4db8a60619 [FIX] mail,test_mail: message_route; filter emails with wrong domain
Steps to reproduce:

  - Install CRM and Helpdesk modules (for test purposes)
  - Set a custom alias domain (e.g. "mydomain.com")
  - Go to CRM > Configuration > Sales Teams
  - Check that a team has en email Alias (e.g. "info@mydomain.com")
  - Go to Helpdesk > Configuration > Helpdesk Teams
  - Check that a team has en email Alias (e.g. "support@mydomain.com")
  - Email your instance with the following `to` value:
    info@mydomain.com, support@test.com
    (notice second email does not match the DB alias domain)
  - Go to CRM : A task has been created
  - Go to Helpdesk : A ticket has been created

Issue:

  The ticket in Helpdesk should not have been created.

Cause:

  The message_route method does not check the domain of the email
  address before creating the routes.

Solution:

  If `mail.catchall.domain.allowed` system parameter is set, filter to
  only keep the emails address that match the allowed domains (including
  domain set in `mail.catchall.domain` system parameter).

  The value of `mail.catchall.domain.allowed` system parameter should
  be a comma separated list of domains. e.g. `example.com,example.org`

opw-3150972

closes odoo/odoo#128346

X-original-commit: 5b73428104789433fd65431f7631a2e9eb863b2f
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-07-13 10:46:18 +02:00
Benjamin Vray d96aa1784f [FIX] website: fix anchor selector not updating
Steps to reproduce the bugs:

- Add a banner on the homepage
- Click on the "create a link to target this section" button.
- Edit the anchor name to "bannerAnchor".
- Drop the image-text snippet.
- Double click on the button inside the snippet.
- Choose the homepage as the URL ("/")
- Open the "Page Anchor" select, choose "#bannerAnchor"
- Validate the changes.
- Double Click on the snippet button again.
- First bug: The URL properly shows "/#bannerAnchor" but the page anchor
select does not show anything.
- Open the page anchor select again.
- Second Bug: the "bannerAnchor" option does not appear as a choice.

This commit fixes the two bugs described above.

task-3378864

closes odoo/odoo#128345

X-original-commit: 62ed601bcf53fd6572118e742a5e27f7f3c7b6f6
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Benjamin Vray (bvr) <bvr@odoo.com>
2023-07-13 10:46:16 +02:00
Alexandre Kühn 9726a414e9 [FIX] mail: do not show Odoobot has a request in mobile
The Odoo mobile app manages push notifications by the app
itself, not the web app. Therefore there's no need to enable
web push notifications.

This commit fixes the issue by considering web push notification
being denied in the mobile app.

closes odoo/odoo#128344

X-original-commit: 045aeaace279d585a7ebefcd5cba7d32207ba9ba
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-13 10:46:13 +02:00
Julien Van Roy 0bb419cf11 [FIX] account_edi_ubl_cii: import with missing unit prices
Sometimes, the net price and the gross price are not present in the
invoice line, but the line subtotal is (for instance, with some xml from
Billit). In this case, it is still possible to infer the Odoo unit price
and parse the xml correctly.

opw-3384704

closes odoo/odoo#128338

X-original-commit: a8c82e6e4e47d951601364f1714a4150fa63f62a
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Julien Van Roy (juvr) <juvr@odoo.com>
2023-07-13 08:28:22 +02:00
Alexandre Kühn 11eebe12bf [FIX] mail: post message in chat window of chatter should log note
Before this commit, when posting a message in chat window of chatter,
it was posting it in "Send message" mode. This mode notifies all
followers of the chatter.

Even though this is the default mode of chatter, there's no explicit
way to define the composer mode in chat window of chatter. Usually
chatter in chat window is used for internal communication, where
logging notes and pinging users with `@`-mentions is mostly used.
Since the chat window was in "Send message", it could inadvertly
notify users of message content not addressed to them. Logging note
is much safer, as it notifies users only when explicitly mentionned
in the message content.

This commit fixes the issue by putting composer mode of chatter
in chat window in "Log note", so that there's no longer a risk to
send message to wrong recipients by mistake.

Also put proper placeholder in chatter of chat window and reply-to
in discuss app, so it's clear posting message will either send
message or log a note.

closes odoo/odoo#128337

X-original-commit: e2609b2f8134b7c3248fb2d519daaadabf5401bf
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-13 08:28:20 +02:00
Alexandre Kühn 72f8407292 [IMP] mail: move follower button menu into FollowerList component
closes odoo/odoo#128326

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-13 08:28:17 +02:00
pedrambiria dac0e87e0f [FIX] point_of_sale: enhance cash input handling
This commit addresses several issues with inputting cash values in the
closing and opening pop-up, particularly when the computer's locale
doesn't match the Odoo instance's locale and when using the Safari
browser. Previously, pressing the wrong decimal point would remove the
inputted value, and the input handling was not consistent in Safari.

Changes:
- Added restrictions similar to the number popup
- Ensured compatibility with localization settings, allowing the
configured decimal point to work correctly
- Improved input handling consistency across browsers, including Safari

opw-3288550

closes odoo/odoo#128308

X-original-commit: c017a9f947843dbef99546e12057452be2fd5e76
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-07-13 08:28:14 +02:00
Didier (did) c348ea89a6 [FIX] mail: fix default_partner_ids in full composer
Before this PR suggested recipients were not correctly moved to the full
composer because the partner id is stored on the persona.

closes odoo/odoo#128291

X-original-commit: 38902e19389d2d559bf5866bfa96f638ca619c34
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-13 08:28:12 +02:00
Sébastien Theys d289d8a7d0 [FIX] mail: make file upload consistent between guest and portal
opw-3370926

closes odoo/odoo#128290

X-original-commit: 2e5f8a3c9e7cff8c61f66e56da7b0f9a59f9bf2e
Signed-off-by: Vranckx Florian (flvr) <flvr@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-07-13 08:28:06 +02:00
Sébastien Theys 89e6beff36 [FIX] mail: allow message edit when livechat is installed
Livechat override of `_message_update_content` accesses `self` channel
but it was not called with the guest env, leading to access error.

Part-of: odoo/odoo#128290
2023-07-13 08:28:06 +02:00
Sébastien Theys d700cd39b2 [FIX] mail: properly re-render attachment list
The attachment list was not displaying extra attachments that were
received from the bus if the list had at least one attachment.

Part-of: odoo/odoo#128290
2023-07-13 08:28:06 +02:00
Sébastien Theys 1aad11ba49 [FIX] mail: fix message edit as guest
Mentions are disabled for guest, so partners was undefined.

Part-of: odoo/odoo#128290
2023-07-13 08:28:05 +02:00
Sébastien Theys fac4c9c1c5 [FIX] mail: remove duplicate steps in discuss guest tour
`discuss_public_tour` is ran after `discuss_channel_as_guest_tour`
leading to all steps presents in both to be executed twice.

The opportunity is taken to add empty `run` functions to avoid
unnecessary clicks.

Part-of: odoo/odoo#128290
2023-07-13 08:28:05 +02:00
Adrien Widart (awt) 4333b16d8c [FIX] purchase_stock: update RR's qty_to_order on POL's qty change
When a RR updates the qty of a POL, the qty to order of that RR will
be incorrect

To reproduce the issue:
1. Create a product
   - Storable
   - With a vendor
2. Create a RR:
   - Min 0
   - Max 0
   - Factor 1
3. Confirm a delivery with 1 x P
   - It should create a PO
4. Confirm a second delivery with 1 x P
    - The POL of the PO should be updated
5. Open the Replenishment page

Error: The qty to order of the product is 1 while it should be 0

`qty_to_order` is a computed field and one of the `depends` is the POL
related to the product. This explains why, after step 3, everything
is ok: the compute is triggered (because of the new POL) and the qty
to order becomes 0. However, step 4, the POL qty is updated -> it
does not concern any `depends` -> the compute is not triggered,
hence the error

OPW-3292297

closes odoo/odoo#128279

X-original-commit: 80521431601323c1eb7c85cafbf08e8ae0adbdd6
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
2023-07-13 07:18:51 +02:00
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