Commit Graph
167994 Commits
Author SHA1 Message Date
suth-odoo 7550bcd61e [FIX] odoo: fixes the error when deleting the worksheet template
Steps to reproduce :
- install field service module
- install industry_fsm_report bridge module
- click on configuration
- click on worksheet template
- try to delete more than one record

Issue:
-  error while deleting more than one record

Cause:
- because ,this issue is from base while deleting the model id's

Solution:
- if we write condition for filtering manual models and calling prepare_update()
   method and then non manual models ,then the issue will be solved

  task-3607053

closes odoo/odoo#144761

X-original-commit: 0d9d7e5fd944e3ef6e1c53d63a6aec61da51cbf5
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
2023-12-04 16:36:41 +00:00
Romain Derie 0e0a74f8c5 [FIX] web_editor: disable delay translation until a deeper fix is done
The delay translation feature [1], when the website main language is not
English, is not working alongside the HTML Editor.

There seems to be multiple bugs, both in Odoo 16 and Odoo 17 following
jsonb and then delay translation.

A full investigation will need to be done (and tests written for it) for
all possible flows:
1. English DB + Website FR (only)
2. English DB + Website FR (main lang) + Website EN (translated version)
3. French DB + French Website (English is not even enabled on DB)
4. French DB + English website
5. Case 3. + Website EN (translated version)
6. Case 4. + Website FR (translated version)

Also, for each of those flows:
- both the website builder and the HTML Editor need to behaves correctly
  (at least not wipe user content).
- both the Odoo records (xml views eg) and user records (new website
  page eg) need to behaves correctly.

This commit, for now, disables the delay translation to restore what we
have in Odoo 16.
The whole investigation, fixes and tests will be done after this commit
in both Odoo 16 and Odoo 17.

Step to reproduce (one of the flow, which is problematic for one of our
big client to go in production):
- Have DB and admin in English
- Have FR only on the website
- Enter edit mode on a page (website builder)
- Drag & drop a snippet and save
- Open HTML Editor, add a blank line
- The page content is gone, user lost its page

------- Technical Details about above case ------------
In Odoo 16, before delay translation, in such a setup (FR only on
website), when modifying the html editor, it would have the same effect
as modifying the page content in the builder, because the English
version (not used because website only use the fr translation) would
also receive the website builder changes, both EN and FR would actually
be sync'd in DB.
For this particular case, it kind of worked, but probably not for other
cases like adding english as translation lang on the website where this
lang sync would not make sense.

This "urgent" fix/feature disabling is done because people are unable to
create or maintain website when they use the HTML Editor. Worst, they
lose all their work again and again.
Indeed, it's not yet sure how but module update also wipe user changes
in such configuration in Odoo 17.

All this is based on feedback of our "PS tech" which is unable to go in
production because of those bugs.
-------------------------------------------------------

Related to PR [2]  which is the Odoo 17 forward port of commit [3]
introduced in Odoo 16.0.

[1]: https://github.com/odoo/odoo/commit/2d08f97c0778469b409fca23f2be5f5a98ce3df8
[2]: https://github.com/odoo/odoo/pull/144693
[3]: https://github.com/odoo/odoo/commit/f54aa6f58d494bca940a3e575d4092ee386d488c

task-3621753 (where the deep investigation and fixes will happen)

closes odoo/odoo#144760

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-12-04 15:10:31 +00:00
Jorge Pinna Puissant c7b07f4ec5 [FIX] web: avoid closing dropdown outside the active element
When a dropdown open a dialog and on the dialog there is a new dropdown,
before this commit, when clicking on the second dropdown, the first one
will close.

This is an issue with closing the first dropdown, is if the dialog is
opened using useOwnedDialogs, the dialog will also close.

Also, if the dialog is open to throw a "find more" of a x2many field,
even if the dialog is not close, as the dropdown will close, the
original field will also be destroyed and it will raise an error.

Now, we avoid closing dropdown's, when opening new dropdowns that there
are not on the same active element.

opw-3464528

closes odoo/odoo#144238

X-original-commit: 6fec387d258dfd945dbbd48a9aab91ce6113ccaa
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2023-12-04 15:10:30 +00:00
Mathieu Duckerts-Antoine 167999c350 [FIX] web: pivot: no duplicates in read_group groupby
Since https://github.com/odoo/odoo/pull/103510, the read_group parameter "groupby" can no longer contain
implicit duplicates. For example groupby=['date', 'date:month] doesn't work
anymore. Here we remove all duplicates from groupby before making a read_group.

closes odoo/odoo#143792

Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2023-12-04 15:10:29 +00:00
Adrien Guilliams (adgu) 1e0ac54d6b [IMP] point_of_sale: Increase receipt size on receipt screen
This commit increase the receipt size on the receipt screen and
shrink the new order button to fit the new size.

closes odoo/odoo#143292

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-12-04 15:10:28 +00:00
Atul Patel 6151d3381d [FIX] account: fixed syntax error for res.company
1. minor mistake, prefix for account move line
instead of line.company_id, use `aml.company_id`
2. syntax error : typecase for `::int =`
to compare parent_path with integer value.

closes odoo/odoo#144764

X-original-commit: 286a911f640351640d60efdf597461055f42f9c5
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Atul Patel (atp) <atp@odoo.com>
2023-12-04 13:23:46 +00:00
Romeo Fragomeli e39efcaa52 [FIX] mail: dark mode: text attachment readability
There is a specific rule that set the `o_AttachmentViewer_view`
background color to a static white color (i.e. `#FFFFFF`).
Then in dark mode, while the font color for the attachement "view"
is set to white due to the `color-scheme` meta, the background
keeps its white color, which makes the content unreadable. In this
commit we use instead the `$white` variable, which is properly
adapted in "dark mode", for the background color.

Steps to reproduce:
* Open Odoo
* Set Odoo in Dark mode using the dropdown menu of the user
* Open the Note app
* Make a note or open one
* Upload a JSON attachment in the chatter
* Open the preview of the attachment
  => BUG text in white and background color in white => text not visible

closes odoo/odoo#144763

X-original-commit: 2af9edb3ca45db0a36552ca751136b7b0c7b6a18
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Signed-off-by: Romeo Fragomeli (rfr) <rfr@odoo.com>
2023-12-04 13:23:46 +00:00
Anh Thao Pham (pta) 0f3bae290a [FIX] account: fix compute of invoice partner display name
Steps to reproduce:
- Install Accounting and Contacts
- Create a contact (e.g. Contact X)
- Add an Invoice Address to the contact (e.g. Invoice Address X)
- Create an invoice with Invoice Address X as partner
- Confirm it
- In invoices list view, Customer field is "Contact X, Invoice Address X"
- Go to Contacts and rename "Contact X" to "Contact Y"
=> In invoices list view, Customer field is still "Contact X, Invoice Address X"

Cause:
"invoice_partner_display_name" field is not recomputed when the name
of the parent partner is changed.

opw-3597741

closes odoo/odoo#144739

X-original-commit: 3254c4e278d559d4cee41fd2c30c6b26094dd09e
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Anh Thao Pham (pta) <pta@odoo.com>
2023-12-04 13:23:45 +00:00
Arnaud Joset bed623c2cb [IMP] calendar: update calendar_event_menu sequence to prevent shift
The sequence is equal to 10 and it is causing issues during upgrade. The order used by the menus is _order = sequence, id

As the menu has a new xmlid, it will be placed after the existing one because if his sequence. We could

1) lower the sequence value
2) don't provide a sequence (menuitem is noupdate False) and update the value in the upgrade script.

Proposal 1 is chosen as it does not require an upgrade script.

closes odoo/odoo#144716

Taskid: 3618126
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
2023-12-04 13:23:44 +00:00
Rahul Prajapati 275063d6a2 [FIX] calendar: meeting activity unlink with calendar event
Before this commit:

When we try to delete a Meeting type Activity from the technical menu
"Settings > Technical > Activities" it do not delete the associated calendar
event.

After this commit:

The calendar event will be deleted when the associated Activity gets deleted.

task-3493426

closes odoo/odoo#144674

X-original-commit: 71dc58acfcc4589bc5996b48e157aea6b0f8a609
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-12-04 13:23:42 +00:00
Leonardo Pavan Rocha 9db5b10298 [IMP] calendar: apply tag colors on popover and tree views
The color was only used on the calendar event form view, but it was ignored in
these other views.

closes odoo/odoo#144621

X-original-commit: cab9ccb2f9f4168f03ad97b34e2fb6a7474a53a3
Signed-off-by: Leonardo Pavan Rocha <lpr@odoo.com>
2023-12-04 13:23:41 +00:00
roen-odoo 194d166dbe [FIX] l10n_sa_pos: Fix QRCode positionning for iOS when printing receipt
Current behavior:
When printing receipt from an iOS device, the QRCode is not printed at
the good position.

Steps to reproduce:
- Install l10n_sa_pos
- Install an ePoS printer
- Go on an iOS device
- Go to POS
- Create a new order
- Pay the order
- Print the receipt

opw-3560424

closes odoo/odoo#144583

X-original-commit: fe46d3a76d49e7753755d4f6d0bee2c628953d6b
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-12-04 13:23:39 +00:00
Sébastien Theys 0a62497445 [FIX] mail: make deterministic "open the chatWindow of a channel..."
Very rarely the "project" channel would be created in a different second
than the general "channel", which lead to last interest taking priority
over id when sorting them and unexpectedly putting project first.

runbot-28637

closes odoo/odoo#144580

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-12-04 13:23:38 +00:00
Sébastien Theys a445f36550 [FIX] mail: make getRecentChannels order deterministic
Fallback to ID compare when the dates are the same.

Added some extra steps in the test to help further debugging if this PR
does not completely resolve the issue.

runbot-28637

Part-of: odoo/odoo#144580
2023-12-04 13:23:38 +00:00
Sébastien Theys 9342f8ab2d [FIX] mail: prevent crash when using channel palette before init
`joinChannel` expects messaging to be initialized (in particular to
access store user) but doesn't actually wait for it.

Part-of: odoo/odoo#144580
2023-12-04 13:23:38 +00:00
snd a4b21bf5c8 [FIX] stock: unreserve the correct quantity
case:
- create a UoM 'Hundreds' related to UoM 'Units', bigger by factor x100
- create a delivery picking
- create a move with the UoM Hundreds, indicate 10 Hundreds
- validate, 1000 should be reserved
- unreserve, only 10 units are unreserved, 990 are still reserved

This is because the stock move line takes the UoM of the stock move by default on the `quantity` field
and `unreserve` uses that field instead of `quantity_product_uom`

This bug led to the discovery of other cases where `quantity_product_uom` should be used instead of `quantity`

closes odoo/odoo#144574

Related: odoo/enterprise#51964
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-12-04 13:23:37 +00:00
Kartik Chavda dcec4ad28d [FIX] project: fix no content helper in project sharing
Steps:
- Install project app.
- Share project editable to user which has no
task.
- Open that project in project sharing.

Issue:
- No content hepler is not properly showing.

Cause:
- Helper in project sharing action is not markup
even and that action is type object so we have to
markup no content manually.

Fix:
- Markup project sharing helper.

task-3293310

closes odoo/odoo#144516

X-original-commit: 34aa8c46a50ebb0923565594c6c74d15c83756b8
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-12-04 13:23:35 +00:00
Manushi Shah (mash) b3e3c92b52 [FIX] project: prevent name overflow in kanban view
Steps:
- Open Settings > Users
- Change the name of the user by typing it multiple times
- Open Project > Choose a Project
- Create a task with the assignee as our user
- Now open the Kanban view of the Project, where we have the task stages.

Issue:
- In the Kanban view, we can see the name of the assignee overflowing.
(This same issue is also present in Project Sharing)

Cause:
- The text is not truncated due to which the name overflows.

Fix:
- adding the class text-truncate and d-block to correct it

closes odoo/odoo#144492

Task: 3383519
X-original-commit: 93d0b7bb81cf9c682a46626323f4baee9b808cfb
Related: odoo/enterprise#52012
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-12-04 13:23:32 +00:00
mano-odoo bb24a4cf65 [FIX] web: fix day selection arrow & responsiveness
In commit[1] the class `order-3` is applied on the ViewScaleSelector 
component but it breaks the view in timesheet. This commit creates a 
props to contextually use this class on the component.

[1]: f9222c4976 

task-3580643

closes odoo/odoo#140750

Related: odoo/enterprise#50055
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-12-04 13:23:31 +00:00
Arnaud Sibille bf2b1b1347 [FIX] l10n_es_edi_sii: remove call to _post_invoice_edi
a66ac063e01afbcc5bec2e6f56da81340b28aaa7 introduced the use of
`_post_invoice_edi` method on `account.edi.format`, as it is a forward
port of a fix in v15, where this method still existed.
But it doesn't exist anymore in v16, due to
0e5626ca5126e6fea7fb95b694229948540764d7.

The fix is to use the method specific to the spain edi:
`_l10n_es_edi_sii_post_invoices`

opw-3604907

closes odoo/odoo#144385

X-original-commit: 7df4deacd37e4c34d0b276a087467b41dc4cf14e
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Arnaud Sibille (arsi) <arsi@odoo.com>
2023-12-04 11:58:24 +00:00
Pedram (PEBR) 8037bec6d8 [FIX] l10n_gcc_pos: include is_gcc_country in ReceiptHeader
There was an inconsistency due to the separation of ReceiptHeader from
OrderReceipt. The 'is_gcc_country', which is utilized in both
l10n_gcc_pos and l10n_sa_pos modules within the ReceiptHeader, was not
being appropriately passed due to this separation.

This commit resolves the issue by overriding the 'getReceiptHeaderData'
method to include the 'is_gcc_country' in the ReceiptHeader data. This
ensures that the ReceiptHeader correctly reflects the necessary
information.

opw-3610862

closes odoo/odoo#144223

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-12-04 11:58:20 +00:00
Chrysanthe (chgo) c34518283f [FIX] mail: improve arrow buttons label readability
This commit improves the readability of the label inside an arrow button.

Prior to this commit, the label of an arrow button was styled with a
`opacity-50` class. This would render well visually, but does not provide
sufficient contrast.

To improve the readability of this label, we simply set a `text-muted`
class to it, which will still apply an opacity, but more subtle, making
our label readable.

task-3575154

closes odoo/odoo#144110

X-original-commit: a008b0f8e794a7c00719838c6f2a05b97b021262
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-12-04 11:58:18 +00:00
Elisabeth Dickinson 28b0168463 [IMP] web: truncate date in list view
When the width of the column is too small to fit the date, the date was
cut by the following column instead of having its content
truncated. This could be seen on the "Creation date" in the list view of
Sales Quotations.

task-3463329
part of task-3326263

closes odoo/odoo#144039

X-original-commit: b9675c38b49d99e00e401dbdb90445354aab43c3
Related: odoo/enterprise#51684
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-12-04 11:58:16 +00:00
Joseph Caburnay 38dfa6ca27 [FIX] pos_sale: fw-port mistake in tour test
The forward port commit 96645bd31b introduce a
wrong tour step which uses the old way of declaring a tour step in pos. We fix
that in this commit.

closes odoo/odoo#143929

Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
2023-12-04 11:58:15 +00:00
Vivek Pathak 6603358361 [FIX] website_slides: fix template for 'Join This Course' button
Before this commit:
Clicking on the 'Join This Course' button without login triggers an error.

Reason:
The 'slide.course.join.popupContent' template contains multiple root nodes.
For correct template rendering text and anchor tags are placed inside div tags.

After this commit:
Correct popup content renders when clicking on the 'Join This Course' button,
without login.

Task-3559181

closes odoo/odoo#143280

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-12-04 11:58:13 +00:00
Soam (sold)andJulien Van Roy 027e45596e [FIX] account_edi : search checks for identically named product first
1.
If the name of a product on an imported EDI document is a substring
of the name of a product on the DB, said product could be used instead
of the correct one, depending on their order (i.e. ID) in the DB.

Example: There are 2 products named "Placement" and "Displacement" in
a DB. A PDF is imported. It contains a product named "Placement". If
the "Displacement" product on the DB appears before the "Placement"
one, the product on the AML will be set to the "Displacement" one.

To fix this, we first check if there is a product identically named to
the one in the EDI document.

2.
In case a product from the DB is used, if possible, the UoM used should
be the one present on the EDI document. Thus there should be a check to
ensure that the UoM category on said document matches the one of the
product's UoM before assigning it, to avoid a compatibility error.

opw-3470969

closes odoo/odoo#143252

X-original-commit: 84911fe007b229b97081a6f5aa298e7b213d43be
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Co-authored-by: Julien Van Roy <juvr@odoo.com>
2023-12-04 11:58:12 +00:00
Elisabeth Dickinson 15295e317f [IMP] website_slides: add o_avatar to User Avatar template
Prior to this commit, if the avatar image didn't have a 1:1 ratio,
the `rounded-circle` image would be oval instead of the intended circle.
To fix this we add the `o_avatar` class to the `img`, and since this
class already contains `object-fit: cover` from the element's inline
styles.

closes odoo/odoo#143109

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-12-04 11:58:11 +00:00
Arthur Detroux (ard) e8477eb90a [FIX] web_editor: fix drag and drop tooltip
Since [commit 1], the tooltip that appears when a user clicks on a
snippet (instead of dragging it) is no longer displayed.

The reason is because [commit 1] replaced jQueryUI with Odoo's own code
and that triggers `preventDefault` on the `pointerdown` event which then
cancels `mousedown` and thus prevents the mousedown call back that
displays the tooltip.

To fix this, this commit replaces mousedown and mouseup events on the
`SnippetsMenu` by pointerdown and pointerup.

[commit 1]: https://github.com/odoo/odoo/commit/7594d71ca8610d5947e80f325ccb57abc23c2c76

task-3582562

closes odoo/odoo#141026

Signed-off-by: Soukéina Bojabza (sobo) <sobo@odoo.com>
2023-12-04 11:58:10 +00:00
Adrien Widart (awt) f512f8a650 [FIX] purchase_stock: compute pdiff based on bill date
Multi-currency setup. On a bill, if the bill date and the accounting
date are not the same, there will be some errors in the stock
valuation.

To reproduce the issue:
(Company in USD)
1. Enable EUR, with specific rates:
   - Today: 100 EUR = 150 USD
   - One day ago: 100 EUR = 130 USD
   - Two days ago: 100 EUR = 125 USD
2. Create an auto-avco storable product P
3. Confirm a PO with 1 x P at 100 EUR
4. Receive the product
5. Bill it:
   - Bill date: two days ago
   - Accounting date: one day ago
6. Open the inventory valuation

Error: a price diff layer has been created, which makes sense, but
its value is incorrect: -20 USD. It should be -25 USD.

When computing the price difference, we use the bill value at
accounting date (130 USD). This is incorrect, it should be based on
the bill date (125 USD).

OPW-3544318

closes odoo/odoo#144649

X-original-commit: 2d3d01594e09297f74d657c0ab3a0181e3754dc5
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
2023-12-04 10:21:34 +00:00
Xavier-Do f744e90fc4 [IMP] base: improve assetbundle logging
The clean attachement was invalidation the cache before 16.4,
mainly because if an attachement is in cache of another worker and
deleted, this will cause a 404 when this worker serves a page needing
this attachment.

This was changed because an attachment should be unlink through
clean_attachments in two cases:
- the code source change on the server and a cold worker generates a
bundle
- an ir_asset was modified

In the first case, we consider that the server restarted (normally) and
all caches should be emptied.

In the second case, a specific invalidation is made.

But when something goes wrong, it is hard to debug, especially because
there is no information on when the new attachment was created, and the
previous one deleted.

This should solve the issue by helping to identify the cause of the
deletion.

closes odoo/odoo#143962

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2023-12-04 08:51:55 +00:00
Maximilien (malb) a42f975df2 [IMP] l10_dk_bookkeeping: rate at transaction
Following the Bookkeeping Act Request we needed to have the conversion rate at
the time of the move (only when having a move with a currency different as the
one of the company) on the header of the form view.

This pr will add a new compute stored field, that will be displayed on the
header of the move only when the current company is Danemark, when the company
currency is different as the move currency and if there is at least a line.

The information we will display is the currency_rate of the first line since on
invoice and bill the currency_rate is the same for all the lines.

We also added a related on account_move_line to be able to see the rate on the
journal items list view.

closes odoo/odoo#141954

Task: 3592881
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2023-12-04 08:51:53 +00:00
Youssef Bashandy 8b22980e25 [FIX] mail : HTML characters displayed in email
Current behavior before PR:
When you send an email at the receivers end you will see '&nbsp;' shown before you open the mail and it disappears once you open the email

Desired behavior after PR is merged:
Corrected and now the '&nbsp;' character doesn't appear where I replace it in the HTML template with its equivalent character

Test changes:
The test case that was there was comparing static strings with the HTML entities where my solution is removing those entities so I change the strings to be after escaping those HTML

opw-3481781

closes odoo/odoo#144648

X-original-commit: 1fcd45f19c2d6900ad5d1848a988ab0ae5f287a8
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
2023-12-04 07:16:06 +00:00
Gabriel de Paula Felix (gdpf) 55b452ac00 [FIX] microsoft_calendar: missing attendees confirmation
Before this commit, when a user was invited to an event from an account outside Outlook (e.g. Google account), accepting the invitation in Outlook Calendar didn't send the 'accept' status to Odoo Calendar, and vice-versa. This problem was also happening with recurrent events accepted in Outlook, the events weren't being accepted in Odoo Calendar correctly. Additionaly, when 2+ attendees from Odoo were synced (having the organizer as an external user), only the last user to sync the event was able to answer it in Odoo due to its outdated 'microsoft_id'.

After this commit, both ways are fixed: accepting an event in Outlook Calendar or Odoo Calendar notifies the other calendar correctly. For recurrent events, accepting them in Outlook Calendar also updates the events status to 'accept' in Odoo Calendar (reminder: due to a limitation in Outlook Calendar synchronization, when the synchronization is active recurrent events acceptance can only be done through Outlook). In addition, all attendees from Odoo can now answer an event that came from external organizers.

closes odoo/odoo#144690

Task-id: 3290922
X-original-commit: a0e628985a19f732830a1f4a732ee35e5f779fe1
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Signed-off-by: Gabriel de Paula Felix (gdpf) <gdpf@odoo.com>
2023-12-03 15:23:20 +00:00
Odoo Translation Bot 2ac98dc2e5 [I18N] Update translation terms from Transifex 2023-12-03 00:18:54 +01:00
Sven Fuehr 6e68fdd959 [FIX] l10n_de: DIN5008: fix margin between top edge and image below
Previously a 10mm margin was added between the top edge and the image below.
The way the margin was added only offsets the picture by 10mm without
adjusting the image size (see PR #143383).

This may lead to an overlap between the image and text
below (depending on the dimensions of the image).

This fixes this issue by putting the 10mm margin "inside" the image
instead of "outside" of it. Thus the size of the image is adjusted correctly.

closes odoo/odoo#144687

X-original-commit: 1676436f522399e78877725d99e845550f1b5c9a
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2023-12-02 00:42:53 +00:00
damr 77b5499b4e [FIX] project: give read access on milestone to portal user
This commit's purpose is to give back to the portal user the access
rigth to read on the model project.milestone. This access was removed
because it was judge that it was not needed to give access to portal
user to an entire model. The issue it created is that while the name_get
still works, it is no longer possible to do a search on the milestone
field on the portal sharing

step to reproduce :
- install db with project and demo data
- log in with mitchel admin
- open the project app
- click on the 'share' option of the deco addict project
- select 'edit' and type 'joel' in the partner section. Select the
suggested portal user 'my company joel willis'
- click on 'send invitation'
- log out and log in with the portal user
- select the project menu
- click on the shared project 'deco addict'
- start typing in the search bar and select the 'milestone' option

An access right error is raised.

source of the issue :
The name_search function is not executed in sudo and since the
portal user has no read access on the project.milestone model,
an access right error is raised.

Solution :
Give the read access to the project.milestone model to portal user.
Ideally, that is something we'd like to avoid, but since the other
option is to execute the name_search in sudo, giving read access is the
better option. An ir.rule was also added to ensure that the portal user
has only access to the milestone linked to his shared project. A local
script was added, and the version of the manifest was changed in order
to trigger the script when the module is updated.
Some tests were added.

affected version 16.0 -> 17.0 (another fix will be applied in master)
ticket -
https://www.odoo.com/web#id=3548142&cids=1&model=project.task&view_type=form

closes odoo/odoo#144525

X-original-commit: d74a6ca46d208fbbe5142bcbb39d8985ee1e1f23
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-12-01 21:10:54 +00:00
maad-odoo 797b6a7684 [FIX] mail: tour marker is visible on full screen
Before this commit:
When we are in a call in full-screen mode, if we have a tour marker
visible in the background, it also becomes visible in the call.

After the commit:
The tour marker is not visible if we are in a call in full-screen mode

task-3502417

closes odoo/odoo#144640

X-original-commit: 7975f404bf98ed7fb9d701ef9951dedca7ec6072
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-12-01 19:25:37 +00:00
amreladl a86c4f589e [CLA] Sign CLA
closes odoo/odoo#144628

X-original-commit: 0f06246ccd1a42f1d7579c69bbdaa105976e22a7
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-12-01 19:25:36 +00:00
Antoine (ande) 364be6ebad [FIX] web_editor: traceback when changing color
Current behaviour:
When coloring a word multiple colors,
then wanting to re-color it a unified color,
there is a traceback.

Steps to reproduce:
1. Go to Settings
2. Click on Configure Document Layout
3. In Company Details, select a word
4. (eg: YourCompany)
5. Color half in yellow and half in red
6. (eg: Your in yellow, Company in red)
7. Then select the whole word
8. Color it in a unified color (eg: black)
9. Traceback

Cause of the issue:
range.setEnd(...endPos(last)) was throwing a warning:
During applyColor, Sanitize is called,
which merges similar nodes. (using moveNodes)
After the merge, out of n similar nodes,
only the first one is still contained in the document.

opw-3502124

closes odoo/odoo#144619

X-original-commit: 43a5aec38809f3e7e29b278704fc2143d6cc236e
Signed-off-by: Nicolas Bayet (nby) <nby@odoo.com>
Signed-off-by: Antoine Demany (ande) <ande@odoo.com>
2023-12-01 19:25:35 +00:00
clesgow b243849b07 [FIX] stock: set orderpoint date to the middle of the day
Issue:
When triggering an orderpoint, the date will be set to midnight UTC.
This will cause issue with users in timezones UTC-x, as it will display
the date as the day before.

This is a so-so fix to reduce the number of impacted users by moving the
orderpoint date from 0.00 to 12.00.

opw-3579318

closes odoo/odoo#144587

X-original-commit: 201ade0cfb0dc34021d6eded28630d8df2f27ab0
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
2023-12-01 19:25:34 +00:00
Walid c4ab9711f5 [FIX] stock_picking_batch: use lots id/name depending on picking type
Steps to reproduce:
- Create a Batch transfer and create two reciept in it
each with a serial tracked product in them
- Confirm the batch transfer

Bug:
in the detailed operation tab of the batch transfer (use existing lots/
create lots) options of the picking type are not respected and lot id is
displayed instead of lot name (many2one instead of char field)

Fix:
keep the same batch transfer as in the pickings that constitute it

opw-3541324

closes odoo/odoo#144582

X-original-commit: 53498d92f1f4de516f4452dd44d3a2c12fd5eb02
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-12-01 19:25:33 +00:00
Sven Fuehr bf9e47e479 [FIX] l10n_es_edi_tbai: fix discount computation traceback
Currently there is a traceback in case of a 100% discount on an invoice line.
This commit fixes the issue by computing the discount differently.

Previously it was tried to calculate the discount amount from the
discounted value and the discount factor.
This is (mathematically) not possible if the discounted value is 0.
After this commit we compute and use the undiscounted value in case
the discount is 100% to compute the discount amount.

The computation was adapted from '_prepare_edi_vals_to_export' from account.move.line

Reproduce
  1. Install l10n_es_edi_tbai
  2. Select the Spanish company
  3. Settings > Accounting: Ensure "Test Mode" is set in Spain Localization section
  4. Create a new invoice with Spanish customer
  5. Add a line with a 100% discount
  6. Confirm the invoice
  7. Process the invocie with TicketBAI
  8. Error / Traceback

opw-3572426

closes odoo/odoo#144571

X-original-commit: 74aa7136fea8bd0f962c577fba89bbd4f7618742
Signed-off-by: Cedric Snauwaert <csn@odoo.com>
Signed-off-by: Sven Führ (svfu) <svfu@odoo.com>
2023-12-01 19:25:32 +00:00
Hugo Carlier (Huca) f3d565738f [FIX] web: take arrow size into account when displaying popup
Currently, the arrow of a popup is not taken into account when computing
its position resulting in an overlap with its parent element in some
cases. This commit fixes this situation.

Steps
=====
- Install module project_enterprise
- Create a project with a milestone set at the end of the current month
- Assign this milestone to a task with planned dates set
- Open the Gantt view of the project
- Hover the milestone diamond

Issue
=====
- The popup displaying the milestone name is partually overlapping the
diamond resulting in a flicker when the mouse is positioned on the left
of the diamond.

Cause
=====
Margin-bottom and margin-right are used in the style of popover. This
has no effect on the positioning of the popover that relies on left/top properties.

Fix
===
Those are replaced by negative top/left margins

task-3457106

closes odoo/odoo#144546

X-original-commit: d10d38c8ff67b0912055d9cfd680d606b24aebc0
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-12-01 18:14:24 +00:00
Atul Patel d76e608da4 [FIX] product: fixed wrong value for cost_currency_id
will get multiple company with multiple currency record
as it will try to calculate multiple template
cost currency field value. we need to do iteration
for template record then it will resolve the error.
Error has been introduced during upgrade.

```
  File "/home/odoo/src/odoo/saas-16.4/addons/product/models/product_template.py", line 189, in _compute_cost_currency_id
    self.cost_currency_id = self.company_id.currency_id or self.env.company.currency_id.id
   File "/home/odoo/src/odoo/saas-16.4/odoo/fields.py", line 1306, in __set__
    self.write(protected_records, value)
   File "/home/odoo/src/odoo/saas-16.4/odoo/fields.py", line 3087, in write
    cache_value = self.convert_to_cache(value, records)
   File "/home/odoo/src/odoo/saas-16.4/odoo/fields.py", line 3010, in convert_to_cache
    raise ValueError("Wrong value for %s: %r" % (self, value))
 ValueError: Wrong value for product.template.cost_currency_id: res.currency(2, 139)
```

closes odoo/odoo#144523

X-original-commit: a8d884b8fb47ad0ac3960ffc5f84f5c6316d20a6
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Atul Patel (atp) <atp@odoo.com>
2023-12-01 18:14:22 +00:00
Sébastien Theys 94785b9889 [FIX] mail: more deterministic "channel preview ... from the past"
The main issue is partially fixed by https://github.com/odoo/odoo/pull/144228

There is an extra issue where jump/load around in the past was not
properly resetting the thread loaded state, and the "load newer" was not
waiting for the jump to be completed before loading newer messages
because the loaded state reset was not taken into account, and also a
scroll restore to bottom was applied too early (there should be none, as
the jumping already highlights the message).

Technically the same thread component was re-used, but the visible hook
and the loaded state should always be reset when there is a jump with
gap (load around).

Extra assertions are added to ensure the expected scenario is fully
explicited and awaited in this test.

runbot-46308

closes odoo/odoo#144520

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-12-01 18:14:21 +00:00
asm 64e3aad2dd [IMP] base: add CNH currency
With this improvmenet now user can select the currency Chinese Yuan Offshore and use it.
opw-3599124

closes odoo/odoo#144472

X-original-commit: 0e431aded4a7d6ff8dd8ac03860859a19518e254
Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
2023-12-01 18:14:20 +00:00
tsm-odoo 018c5c178d [FIX] mail: only play rtc sounds on main tab
Before this commit, rtc join/leave sounds were played on every
tab. This can be due to two issues:
- notifications related to the current user should not play sound
since it is already played by the tab that triggered the action.
- only the main tab should play the sound.

This commit implements this behavior.

Steps to reproduce the issue:
- Open two tabs
- Start a call on the general channel
- Notice that the "join" sound was played twice
- Leave the call
- The same applies for the "leave" sound

task-3355352

closes odoo/odoo#144436

X-original-commit: dfbd95f
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-12-01 18:14:19 +00:00
dhba 3f3a654952 [FIX] web: traceback in emoji picker
Before this commit:

- Attempting to press the Enter key in the emoji picker when the search result
  was empty would lead to a traceback error.

After this commit:

- Now, Pressing Enter key in the emoji picker with an empty search result no
  longer triggers a traceback error.

task-3576930

closes odoo/odoo#144434

X-original-commit: d9ea54fe8b3cf73da0e32155f2f08803ffe7440a
Signed-off-by: Geelen Sébastien (sge) <sge@odoo.com>
2023-12-01 18:14:18 +00:00
Sébastien Theys 8a99a9d281 [FIX] mail, base_automation: fix composer tour without demo
runbot-26628

closes odoo/odoo#144402

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-12-01 18:14:17 +00:00
Benoit Socias 9f845c0942 [FIX] website: survive missing manifests when generating templates
During upgrades, customization modules are defined in the database but
their codebase is not in the addons path.
Because of this, when running an upgrade the manifest of such modules
does not exist which makes `_generate_primary_snippet_templates` fail
because it cannot locate some default keys.

This commit adapts the access to the manifest in order to use a default
value in case the manifest is not available.

closes odoo/odoo#144222

Related: odoo/design-themes#751
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-12-01 18:14:16 +00:00