Commit Graph
163215 Commits
Author SHA1 Message Date
paso-odoo 9e6d230715 [FIX] point_of_sale: fix archived pos config issue
If applied, this commit will solve the issue of the archived pos config issue
while session accessed from another tab, another device, or another user.

Steps to produce:
- Open the pos session.
- From another device or another tab archive the pos.config record.
- Refresh the opened session.

sentry - 4057306284
see - https://tinyurl.com/2opdugz4

closes odoo/odoo#117707

X-original-commit: 75c0f1ca2767837f3e75698ceadeedf362110bd8
Signed-off-by: Achraf <abz@odoo.com>
2023-04-12 14:02:30 +02:00
damr bceab17e68 [FIX] mail: prevent a traceback when an onclick is triggered on an empty
m2o avater user widget

This commit's purpose is to prevent a traceback when the user click on
an empty avatar user icon.

task-3254564

closes odoo/odoo#117374

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-12 14:02:27 +02:00
Lucas Lefèvre 0651424113 [FIX] documents_spreadsheet: list dates with correct format
Commit odoo/enterprise@4bbf70f was fixing a timezone issue. Datetimes coming
from lists inserted in a spreadsheet were always displayed in UTC.

However, this commit also changed the formatting behavior.
Before the fix: date/datetimes were dispalyed with the server format
After: they are displayed with the local format (FR if the user lang
is French)

This can lead to issues because spreadsheet only understands a
handfull of date(time) format.
For example, it doesn't understand dd/mm/yyyy format but only
the other way around (mm/dd/yyyy)

This commit restores the previous format (server format), while
preserving the timezone conversion.

opw-3251586

Manual forward-port of odoo/enterprise#39438

closes odoo/odoo#118285

X-original-commit: bf84195bce4fbea55d1a4e6a6cd9f17d9be86b73
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-04-12 12:26:26 +02:00
Alexandre Kühn 5ffd9c15cf [FIX] im_livechat: chatbot step answer style in external lib
Before this commit, when using chatbot on an external website,
the answers were not styled like buttons.

This happens because styling is using bootstrap classnames, which
are not available in the external lib.

This commit fixes the issue by putting SCSS equivalent style rules,
so that the answers are properly styled.

opw-3234872

closes odoo/odoo#118264

X-original-commit: c2c5eee10aa917852c942e1092c026746387e11a
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-12 12:26:23 +02:00
Rodolpho Lima 5190870a7c [FIX] web_editor: remove link when pasting over its content
This commit prevents pasting content inside a link when it is
empty (ZeroWidthSpace only) or its text content is fully selected,
making the pasted content replace the link.

task-3081254

closes odoo/odoo#118204

X-original-commit: 7d0da7f56904927f93ef3d678083f3219fadfdc9
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2023-04-12 12:26:09 +02:00
Rodolpho Lima 302f279c86 [FIX] web_editor: add missing tests for pasting URLs
This commit adds the following test cases that were missing in the
unit tests suite:

-Paste an image URL or a youtube URL as link

-Paste text containing a valid URL among other text fragments

-Paste text containing multiple URLs

-Test if the selection is properly restored after pasting content on a
non-collapsed range followed by an UNDO.

task-3099012

X-original-commit: 0167b031bc9238893c5b4f09bbda996ed0ee914f
Part-of: odoo/odoo#118204
2023-04-12 12:26:08 +02:00
Rodolpho Lima 267bce176f [FIX] web_editor: fix issues when pasting media URL
Issue # 1: pasting image/video URL as text

This commit removes this command, because it was considered to be useless.

The category names "Embed" and "Paste" for the other two commands
("Paste as URL" and "Embed Image/Video") were ommited as it is no longer
relevant to group commands, as this would result into two categories with
one command each (the powerbox does not display the category name when all
the commands are under the same one - undefined in this case).

Issue # 2: pasting image/video URL + other text fragments

The powerbox commands are not compatible with an image/video URL + text
or multiple URLs. Choosing one of its commands will lead to loss of all
text fragments but the last valid URL.

This commit ensures the powerbox options are only offered when a single
image/video URL is pasted.

Issue # 3: pasting image URL inside an exisiting link

Even though the Editor's specs do not allow a URL to be transformed into
a link when pasting it inside an exisiting link, before this commit,
pasting an image URL inside a link would open the powerbox with 3 commands,
one of them allowing to transform the URL into a link.

This commit ensures the powerbox with the "Paste as URL" command is not
opened in such case. When pasting an image URL inside an existing link, the
image is directly embedded, and other URLs are pasted as text.

Issue # 4: unnecessary regex matching

Before this commit, every text fragment in "text URL text" was being
prepended with "https://" and a match with the URL regex was attempted.
Every fragment (text or URL) was also probed for a match with the
youtube video URL regex, but such matches would be discarded anyway in
modules like note and mass_mailing where the allowCommandVideo option
is set to false.

This commit avoids unnecessary searching with regular expressions by treating
pasting of a single URL (possibly an image or video URL that would lead
to powerbox commands) differently than URLs pasted among other text fragments
or other URLs (see issue # 2 above).

Issue # 5: `historyPauseSteps` with argument

This function takes no arguments. Yet, it was called with the string 'onPaste'
as argument. This commit removes it.

task-3099012

X-original-commit: 3fb93d7e9047a73a8e84f165e2ff52b9887d34a4
Part-of: odoo/odoo#118204
2023-04-12 12:26:08 +02:00
Rodolpho Lima dcd93a6685 [FIX] web_editor: hide powerbox category name when single one
Powerbox commands are grouped under categories.
But this is not very usefull when:
- All commands are under of the same category
- Each command is under a different category

This commit hides the category name when all the commands passed to the
powebox are under the same category.

In order to avoid the second scenario, the commands array should be passed
to `Powerbox.open()` with all commands having the same category name (the name
 does not matter), or even with `category` undefined.

X-original-commit: 93d632861996c78502b33538cc7ff06d8419602c
Part-of: odoo/odoo#118204
2023-04-12 12:26:07 +02:00
Rodolpho Lima d49da8aae4 [FIX] web_editor: restore selection after paste and undo
Before this commit, after pasting a valid URL on a non-collapsed selection
followed by UNDO, the selection was not restored to the original range.
This was due to not recording the selection in the current history step
before creating the link.
After pasting text composed of a valid URL between text fragments on a
non-collapsed selection followed by UNDO, the selection was again not
properly restored. This time, because each text fragment insertion was
done via execCommand, which calls _computeHistorySelection and thus
overwrites the current step's selection.

This commit:
- refactors code for link creation into a single function;
- wraps the link creation at `_onPaste` in a 'insertHTML' command called
via `_applyCommand`, which records the selection properly in the history
step;
- replaces `execCommand` by `_applyCommand` for text fragments
insertion.

task-3099012

X-original-commit: 20bb1a2090c90f87a819fdc1c3bbb332cae3720e
Part-of: odoo/odoo#118204
2023-04-12 12:26:07 +02:00
Matheus Leal Viana (malv) 794d1407e0 [FIX] mrp: Modify hotkey of scrap action in MO
Steps to reproduce:

Go to Manufacturing App
Click on some MO
When pressing the 'ALT' shortcut key the Scrap and Cancel tabs offer the letter 'Z'.
According to this spreadsheet
the scrap action (line 79) should be assigned to shortkey 'Y'

OPW-3202893

closes odoo/odoo#118075

X-original-commit: 577a467ca757b1d0c02e13e0710f2c0216c1e6a0
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: malv-odoo <malv@odoo.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-04-12 12:26:02 +02:00
MerlinGuillaume c27f1f77d7 [FIX] mail: disable the tracking of binary fields
Tracked binary fields do not produce any message in the chatter

Steps to reproduce:
1. Install Sales and Studio
2. Open any quotation
3. Trigger Studio and add a signature field to the form
4. With debug mode enabled, edit the field (by clicking on MORE when the
   field is selected) and set the Enable Ordered Tracking to 1
5. Close Studio
6. Edit the signature and save
7. No message appears in the chatter to track the value

Solution:
Remove the `tracking` field from binary fields to prevent the user from
trying to track it

Problem:
We shouldn't track binary data in the chatter and we cannot use the
filenames

opw-3055108
task-3255810

closes odoo/odoo#118278

X-original-commit: 4e309ce5eae282fd28e77bf46d3fdf6bb91bd92b
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2023-04-12 10:38:00 +02:00
Jurgen (jugj) 5ce307a2b5 [IMP] hr_work_entry : make general UX improvements
This commit aims to improve usability of work entries by improving the form and adding a default start and end hour going from 9 to 17
task - 3062158

closes odoo/odoo#118252

X-original-commit: 36eca7e6b0ad6b3570ce2478b10ec4da1a157617
Related: odoo/enterprise#39592
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-04-12 10:37:54 +02:00
det f3569d1c9c [FIX] hr_expense: amount in needed terms
Steps to reproduce:

- set early_pay_discount_computation on company to mixed.
- create an expense with taxes
- try to post entries from the expense
> traceback

This commit adds the missing key in the needed_terms computed
on in hr_expense. We could have bypassed the computation in the
case of expenses but simply adding the key sounds like a more
future-proof solution.

opw-3244294

closes odoo/odoo#118250

X-original-commit: 7922a7db0d840a33a3db54da1a359ac95e61cb7b
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: Detry Thomas (det) <det@odoo.com>
2023-04-12 08:05:47 +02:00
det 23d32ae167 [IMP] account: filter for unmatched payments
Replace matched filter by unmatched in payment view.

It makes more sense to find payments that are unmatched.

closes odoo/odoo#118249

Task-id: 3231191
X-original-commit: f1143800676dacce3956d207b778d82422b3005a
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: Detry Thomas (det) <det@odoo.com>
2023-04-12 08:05:44 +02:00
Ricardo Gomes Rodrigues (rigr) 698e2bcfa8 [FIX] account_edi_ubl_cii: wrong journal selected when uploading an invoice in a company with multiple journals of the same type
Steps to reproduce:
- Create two sales journals
- Select the second journal
- Upload an invoice
- The invoice is in the first journal instead of the second

Fix:
We can simply use the context to retrieve the current selected journal
if it's given, otherwise we use the previous fallback (infering the
journal with the move type)

task-id 3258956

closes odoo/odoo#118258

X-original-commit: 12f22cd06a7b25fc4740a689aad63e0ebc357e4c
Signed-off-by: William André (wan) <wan@odoo.com>
2023-04-11 19:48:40 +02:00
Walid HANNICHE (waha) 82787d2b98 [FIX] purchase_stock: units rounding
Steps to reproduce:
1-create a weight unit 'jm' bigger than reference
    ratio 2.47541 rounding 0.001
2-create a stored product uom:'jm' / purchase_uom: 'kg'
3-set valuation method to automated (fifo)
4-create a replenishement for 200 (jm)
5-confirm and recieve the products
6-valuation for that stock move is null

Bug:
computations in the stock module are done with rounding method (half-up)
when computing the unit price the recieved quantity is computed with up
rounding which leads to a mismatch

Fix:
applied the same rounding method on all the Steps

opw-3213997

closes odoo/odoo#118251

X-original-commit: c305942958c73414def47ebd299227999841c6ed
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-04-11 18:49:46 +02:00
Alexandre Kühn 5293827949 [FIX] mail: no white leak on rounded border of chat window
Before this commit, in white theme, chat window rounded borders
had some white color leak.

This comes from background color of chat window, which is white,
while the header background color is purple.

This commit fixes the issue by setting the chat window background
color to purple. The content now defines its own color, and the
header just inherit from the chat window background color.

This commit also fixes a bug where the chat window hidden menu
items were below visible chat windows.

closes odoo/odoo#118242

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-11 18:49:43 +02:00
Habib (ayh) 87c91139c6 [FIX] account: tax totals currency issue
The tax totals widget is formatting data using the old props instead of the new. When viewing an invoice the currency is correct, but when scrolling through records or changing currencies, the currency in the widget is not correct.

To replicate:
1. Create 2 invoices, one in EUR, one in USD, ideally both with tax
2. Scroll through the record form views using the next/previous pager buttons
3. Observe the currency is not correct (display USD instead of EUR, and EUR instead of USD)

This fix modifies the way the record data (props.value) is formatted, and ensures using the correct currency (nextProps) instead of the old one (props)

OPW-3244079

closes odoo/odoo#118241

X-original-commit: 15a610acddf4ea19082a88aaf1eee231aa1fe91f
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Ayob Habib (ayh) <ayh@odoo.com>
2023-04-11 18:49:38 +02:00
nni-odoo 8c11af649a [FIX] l10n_id_efaktur: use invoice address
Based on change from PR odoo@df74fb6,
the rule stated on the document attached has been reverted.
It should be using the customer's tax address rather
than the delivery address'.

3230742

closes odoo/odoo#118230

X-original-commit: 40399e570ca1b04af44e45a5305bc67c7fbf01e2
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2023-04-11 18:49:32 +02:00
Alexandre Kühn c1ad2a6f18 [FIX] mail: chat window adapts height to global height
Before this commit, when global height was below height
of a chat window, the chat window was overflowing.

This commit fixes the issue by ceiling the height of chat
window to the global height.

closes odoo/odoo#118229

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-04-11 18:49:29 +02:00
Joseph Caburnay d7c12e6039 [FIX] partner_autocomplete: show confirmation dialog on blur
Make the res_partner_many2one behave similarly to the many2one field
during blur where a confirmation dialog is shown.

closes odoo/odoo#118008

Task-id: 3205625
X-original-commit: 198fdca401ff6b0062111f513138af76eeb68e23
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-04-11 18:49:27 +02:00
Zelong Lin 6705c2f4fd [IMP] mail,im_livechat: no canned reply in mail
Canned response should only enabled in livechat thread.
task-3208438

closes odoo/odoo#116388

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-04-11 18:49:24 +02:00
fdardenne 044f2a9c58 [FIX] web: x2manylist: fix record opening when edit=false editable="bottom"
Steps to reproduce:
- Install appointments
- Log in as Marc Demo
- Go to Calendar/Online appointments
- Click on a record in the availability x2many fields

Current behaviour:
It opens the record in a form modal.

Expected behaviour
It should not open the record since #110838 because the x2manyfield
is in `editable="bottom"`.

closes odoo/odoo#118225

X-original-commit: d4399a87f1ca59389d7e58754b67c3fc816cb25a
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-04-11 17:53:54 +02:00
niyasraphy db41acb153 [FIX] stock: remove quick_add from picking calendar view
before this commit, on clicking the picking calendar view, it allows the quick adding from the calendar view and entered value is going to the name field of stock.picking model.

after this commit, quick adding will be disabled and on clicking form will be opened with selected date.

closes odoo/odoo#118222

X-original-commit: c06f88c2535f959bc60416b6f32cb51ea1481c2a
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-04-11 17:53:52 +02:00
niyasraphy 01c37a970c [FIX] website_forum: show correct karma in faq
before this commit, in the website forum faq section,
it is shown, for each down vote it will reduce 10 xp,
but actually it is reducing 2 XP.

after this commit, the points shown in the faq
will be corrected to 2 xp from 10 xp.

closes odoo/odoo#118216

X-original-commit: 3168a39885ec8d4bdf3f9029ab0716beaee11ba1
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-04-11 17:53:49 +02:00
03dd2513b5 [FIX] web_editor, website: fix website editor as restricted editor
When assigned the role of restricted editor, there are many ways to
break the web_editor when trying to do actions that should be
unavailable. There is a traceback for the following scenarios under
some circumstances (mainly because of pages without editable areas or
features without the proper access rights):

- Drag and dropping snippet when Restricted Editor.
- Clicking on product when Restricted Editor in /shop.
- Clicking on product image on specific product page.
- Clicking on user name (e.g. Marc Demo).
- Clicking on menu items or logo.
- Clicking on a blog's image in /blog.
- Clicking on a blog's image on specific blog page.
- Clicking on calendar's image in /calendar.

There is now no longer a traceback which makes the editor crash or
freeze. This mimics the behavior in other cases where the editor does
not show a traceback, but there is no message indicating that the action
is unauthorized.

When accessing a menu that cannot be edited, the "Edit the menu" button
is not shown to the restricted editor.

task-2747895
opw-3164176

closes odoo/odoo#118116

X-original-commit: 15c85e4f9f967ee04af3cdeb766d280a2c00731e
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: Benjamin Vray <bvr@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
2023-04-11 16:53:47 +02:00
Alexandre Kühn fbb909b24b [FIX] mail: improved visibility of other bubbles
closes odoo/odoo#117520

Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
2023-04-11 16:53:44 +02:00
Didier (did) 1ea917278f [IMP] mail: type suggestion service
closes odoo/odoo#118212

Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
2023-04-11 15:17:40 +02:00
Didier (did) c184c2d78d [FIX] mail: remove outdated /new in type path
closes odoo/odoo#118200

Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
2023-04-11 15:17:38 +02:00
Didier (did)andSébastien Theys 611069fb65 [IMP] mail: improve get_mention_suggestion performance
"Order by" makes the query really slow.

On a database with 1000000 partner and 10000 user, this query goes from 5.5s to
600ms. Once cached by Pgsql it goes down below 100ms.

task-2982401

closes odoo/odoo#118198

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
2023-04-11 15:17:35 +02:00
Xavier Morel cedc968f22 [FIX] base: better filter drop table warnings
Along with improving the table_kind API, #117439 added a warning when
dropping non-tables.

This warning turns out to trigger on many models, in two major cases:

- the hook is called on abstract models, which don't have a table in
  the first place, it probably should not be called for those but can
  easily be skipped
- the hook is also called on `_auto = False` which don't have a table
  anymore, this is because we use `DROP TABLE $table CASCADE`, which
  implicitly drops any view (or table) depending on the table, it
  might be possible to avoid this by ensuring we drop models in
  reverse topological order *and* drop all of a module's views then
  tables at once (by passing multiple names to `DROP`, but for now
  just ignore the case where we're trying to drop an object which
  can't be found

closes odoo/odoo#118194

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2023-04-11 15:17:32 +02:00
Jorge Pinna Puissant baebb6a5b0 [REF] web, *: Unique id for field nodes
Before this commit, the field node id (`field_id`) uses the field name
for the first occurrence on the arch, and add an underscore and a number
for the rest of the occurrences. This can create inconsistencies when
sombody assumes that the field_id is equal to the name, and don't take
into account the possibility of multiple occurrences.

Now, a unique id is created since the first occurrence, this remove all
ambiguity between the id and the name.

Part-of task-id 3179751

closes odoo/odoo#117799

Related: odoo/enterprise#39511
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-04-11 15:17:20 +02:00
Pieter Claeys (clpi) c6d0c12c44 [FIX] stock: stock scrap locations readonly
Since https://github.com/odoo/odoo/pull/104062, the location and
scrap location id fields on a scrap order are no longer editable
(even while still in draft).

To reproduce:
- Enable storage locations in settings
- Create a new scrap order
Bug: The source and draft location are readonly.

This fix restores the intended behaviour to make these fields editable
while in draft state and adds a test to confirm this behaviour.

Task: 3266655
Community PR: https://github.com/odoo/odoo/pull/117931

closes odoo/odoo#118177

X-original-commit: 1dcc9ade1793a562e5df20336241d2a025c5e14c
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-04-11 14:11:54 +02:00
Rohitkumar (roku) d21b61cbf0 [IMP] hr_timesheet, _*: improve wording
_* = sale_timesheet, account

In this commit, we have replaced the cancel button string with discord instead
of cancel.

task-3216495

closes odoo/odoo#115693

Related: odoo/enterprise#38341
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-11 14:11:49 +02:00
aliya 1723670898 [FIX] account: change error type in name_create
Accounts can be created with help of `name_create`, where a user can add a code and a name in one place and we split that for them.
To prevent the user creating accounts by mistake too often, we've made it so that the quick create always raises an error to display the modal (pop-up to edit the account before creating it). However, now UserError does not bring the modal, but the error message is displayed instead.
ValidationError in name_create makes more sense and also lets users see the modal.

task-3262539

closes odoo/odoo#118132

X-original-commit: 4a7411a972edc52fdf1b2fae77dddf1d9e558505
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Aliya Tastemirova (alta) <alta@odoo.com>
2023-04-11 11:33:56 +02:00
Mahdi cheikh rouhou (macr) de1d04db4c [FIX] calendar : change stop date for recurrent event
Changing end time for recurrent event will generate an error.

steps to reproduce the error:
1- Create an event in the calendar app with recurrence on
2- Save and close
3- Edit this event again and select change all events at the top
4- Change the ending time

The error was happening because the wrong key was accessed in a
dictionary

opw-3236432

closes odoo/odoo#118087

X-original-commit: 97f51b24da5db1a0217121aae583a9c1d715adc4
Signed-off-by: Adrien Widart <awt@odoo.com>
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
2023-04-11 11:33:54 +02:00
std-odoo 5f1f4d4170 [FIX] account: fix a failing test about digest
Bug
===
The tagged had only `post_install`, so it wasn't run on the runbot.

In the meantime, the account team removed `user_type_id` and so the
test is failing (and I could have been merged because of the tag).

closes odoo/odoo#118037

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2023-04-11 11:33:51 +02:00
abd-msyukyu-odoo b9551a5070 [FIX] web: compute containing block layout in position hook
How to reproduce:
- create a list embedded view in Knowledge (/item list)
- in the control panel click on "Filters"

Current behavior:
- the dropdown is not correctly positioned

Expected behavior:
- the dropdown should be positioned around the button

Fix:
`getBestPosition` uses dimensions and layout positionning based on the viewport,
but `reposition` modifies the style properties `top` and `left` of the element,
which are relative to the closest containing block. Since in that case the style
position is `fixed`, there are a number of factor that can influence the
containing block, as specified in:
https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
We can easily compute the layout offset caused by the containing block just
after resetting the popper top and left to `0px` and take it into account for
the final value.

Task-3267555

closes odoo/odoo#118018

Signed-off-by: Bruno Boi (boi) <boi@odoo.com>
2023-04-11 11:33:48 +02:00
niyasraphy 81bb17091f [FIX] mrp_subcontracting: show lot field only when lot/serial number is activated
before this commit the lot field is visible even without activating the
lot and serial number feature from the settings.

after this commit the field will be visible only when the feature is
activated in the settings.

closes odoo/odoo#117850

X-original-commit: 9c02bc50b46f6544b4696632274045fad751aad5
Related: odoo/enterprise#39400
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-04-11 11:33:40 +02:00
Alexandre Kühn e8567dadbd [FIX] web: upload same file twice in discuss composer
Before this commit, when clicking on "Attach files" in discuss
composer, then removing it, it was not possible to upload the same
file again.

This happens because file input of file uploader relies on `change`
from the input. The `input.value` contains the filepath, so if we
upload the exact same file without clearing the value, the value
will be unchanged and it won't trigger uploading as a result.

This commit fixes the issue by clearing the input just after
the file has been uploaded, so that we can upload the same file.

Cannot reproduce bug in QUnit tests because `inputFile` helper
programmatically always trigger "change" on input file.

closes odoo/odoo#117704

Signed-off-by: Luca Vitali <luvi@odoo.com>
2023-04-11 11:33:38 +02:00
kais-odoo 120ac7566f [IMP] im_livechat: modify mail short code demo data
In this commit, remove space and modify content in demo data.

task-3067151

closes odoo/odoo#106233

Related: odoo/enterprise#34232
Related: odoo/upgrade#4184
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-04-11 11:33:29 +02:00
kais-odoo 9b2c19b945 [IMP] project: improve generic UX of project
In this commit made following changes:
- added copy writing content in project form view for
  access_instruction_message field.

task-3067151

Part-of: odoo/odoo#106233
2023-04-11 11:33:29 +02:00
Rémy Voet (ryv) 016f26a931 [FIX] base: wrong value profiled
closes #odoo/odoo#88276

Signed-off-by: Christophe Matthieu (chm) <chm@odoo.com>
2023-03-13 11:03:46 +01:00
Denis Ledoux 536e670f8c [FIX] http: ensure values of session are serializable when stored
closes odoo/odoo#86015
Signed-off-by: Julien Castiaux <juc@odoo.com>
2023-02-07 09:12:32 +01:00
niyasraphy 40be0ebf9b [IMP] website_forum: remove milli seconds from vote datetime
before this commit, in the votes tab in the website
user profile, the date time is shown including the
milli seconds in it.

* open forum
* open own user profile
* click votes tab and see the date time

after this commit, the milli seconds info will be
removed from the date time.

closes odoo/odoo#118152

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-04-11 09:21:23 +02:00
amdi-odoo 6bd14cd39a [FIX] web: fix phone field button text alignment
Fix the phone field buttons text alignment
("Call", "SMS", ...) which is currently rendering
the letters on different lines because of a text-break
css class introduced by: odoo/odoo#114442

Override this text-break class for the phone field
buttons links.

Task-3258943

closes odoo/odoo#118109

X-original-commit: 012f97b7e6811bfa4804ba49696811f7f6b98582
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-04-11 09:21:21 +02:00
niyasraphy 85fc6e09d8 [FIX] website_profile: remove duplicated import in init
before this commit, the controllers directory is
imported twice in the init file.

after this commit, the duplicated import is
removed.

closes odoo/odoo#118105

X-original-commit: 3496c25b677dfe8695b00cea0cd5eff095941321
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-04-11 09:21:19 +02:00
oco-odoo 4f93fd0800 [FIX] account_reports: aggregation engine: properly expand aggregation expressions when using an if_other_expr_[above|below] subformula
The if_other_expr_[above|below] subformulas were introduced in stable by https://github.com/odoo/enterprise/commit/f39862263c7e2332468a69736589a35d66d87b16. They basically allow displaying the value of an aggregation expression if another line's amount is above/below a provided bound. When using an expression with such a subformula to compute a carryover value (hence giving the expression a _carryover_... label) on a tax report, the posting of the said tax report's closing entry looped forever. No report from Odoo falls into this use case at the moment, but the issue occured on a development branch (for l10n_ma).

This was due to the fact the tax closing expands only the aggregation expressions needed in the computation of the carryover to compute its value, hence not providing all the expressions of the report. Doing so, _get_aggregation_terms_details was called, and it neglected to include the expression used as comparison term by the subformula into the dependencies of the aggregation to expand. As a result, the comparison term could never be evaluated, and the loop went on forever, waiting for the comparison term to receive a value.

closes odoo/odoo#118104

X-original-commit: 76288d1fd654c9ff4c721cc1d96596b6adbf95d0
Related: odoo/enterprise#39535
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-04-11 09:21:13 +02:00
Fabien Meghazi 5cbb0738be [IMP] sql_db: allow to customize pg connection's application_name
This is an improvement over commit f6c13d7 in order to allow full
customization of postgresql connection's `application_name`.

In a PID linux namespace the containers processes IDs might not be relevant
for a system administrator and one might want to customize the content of the
`application_name` just like it was possible to do before commit f6c13d7
using the `PGAPPNAME` environment variable.

This commit allows to expose an `ODOO_PGAPPNAME` environment variable whose
content will be interpolated with the PID (optional)

closes odoo/odoo#117921

X-original-commit: a4108eee91f8e9bf82be5a4be4b91bab16baa0df
Signed-off-by: Olivier Dony (odo) <odo@odoo.com>
2023-04-11 09:21:08 +02:00
rhe-odoo 7db7b3ef04 [FIX] pos_sale: show correct shipping address
When creating a quotation in the sales app with a different shipping address, this is not shown on the invoice report from the point of sale.
Before it was always using the pos order partner address.
Now we check if the sale order had a different shipping address before setting the address on the report.

closes odoo/odoo#117603

Task-id: 3258679
X-original-commit: f12abb338501a745716480e055e9a8d33229bb0c
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-04-11 09:21:05 +02:00