Commit Graph
163215 Commits
Author SHA1 Message Date
Lucas Lefèvre e136b43e9b [FIX] spreadsheet: use localized week start
Steps to reproduce:
Go to CRM pivot view, group create_date by week, insert into spreadsheet.
=> week numbers are offset by one (W23 instead of W24)

Since 3a177c448, `read_group` returns week aggregates according to the
user's language first day (e.g Sunday for en_US, Monday for fr_FR).

Before the commit, it was always Monday (ISO week start).
This commit changes the moment formats from "W" (Week of Year (ISO)) to
"w" which is the localized week of year*.

Note there can still be some inconsistencies if the browser language is
different than the user's language. This hasn't changed and is a regular
known issue.

* https://momentjscom.readthedocs.io/en/latest/moment/04-displaying/01-format/

opw-3372581

closes odoo/odoo#127089

X-original-commit: c5738479dc1c1879a9ac0169e1ec87eb5098c525
Related: odoo/enterprise#43516
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-07-04 07:55:08 +02:00
Guillaume (guva) c373be77b6 [FIX] account: date on cash basis move
When having lock date for non advisor
set before all user lock date, reconiling
lines between the two lock dates leads
to a wrong calculation of the cash basis
move, even for user with advisor rights.

Steps:

- With a company having cash basis activated
- Set a period_lock_date to a specific date
- Set a fiscalyear_lock_date one month later
  than period_lock_date
- With user having Advisor rights, create
  an invoice between the two lock dates
- Register a payment in the same period
-> Cash Basis move is created with date == today,
   it should be the date of the payment.

opw-3245409

closes odoo/odoo#127060

X-original-commit: ffb9230afbfb5b0f76148e102463e37a55b42f64
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-07-04 04:54:42 +02:00
Alexandre Kühn 987eeef710 [FIX] mail: debounce suggestion (and channel selector) searches
Before this commit, fetching suggestions (e.g. channel selector
in discuss sidebar "Find or create a channel", or `@`-mentions)
were performing RPCs on each user input, resulting in wasted
network and server load.

This commit fixes the issue by debouncing the fetching of
suggestions to 0.5 sec.

closes odoo/odoo#126952

X-original-commit: 6770ac3
Related: odoo/enterprise#43502
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-04 03:43:48 +02:00
Hugo Carlier (Huca) 9c338783af [FIX] project: avoid invalid subtask when customer is required (FSM)
Steps
=====
- Install module industry_fsm
- Create a task from the kanban view
- In the form view, add a title but no customer
- Open the subtasks tab of the notebook
- Add a subtask and add a title to it
- Save the created parent task
- A pop-up indicate that the customer is missing
- Add a customer and save the task

Issue
=====
A pop-up indicate that the subtasks field is invalid and there is no way
to save the current task with its subtask.

Cause
=====
the module industry_fsm introduces a required=True for the field
"partner_id" when edited from a view in the app Field Service. When a
parent task is created without a "partner_id" id set, it can not be
saved, but subtasks can still be created from it. Those child tasks
should have the "partner_id" set to the same value as the one of their
parent. As it is not set in the parent task, its value will be False for
the child task, and changing it in the parent task (by adding a
customer) will not update the child task. As this field is required when
a task is edited from the app Field Service, the task can not be saved.

Fix
===
A dependency to "parent_id.partner_id" is added to the method
"_compute_partner_id" of model project.task allowing to updating it if
needed when a "partner_id" is set on the parent task.

task-3343423

closes odoo/odoo#127088

X-original-commit: 7f8da6a4148c86b61d994bf692725378f8dafc52
Related: odoo/enterprise#43515
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-07-04 00:51:56 +02:00
Louis Wicket (wil) ce07b37111 [IMP] mail: make channel_info private
Make `channel_info` private so that it is no longer exposed to RPCs.

closes odoo/odoo#127078

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-07-04 00:51:54 +02:00
Thomas Lefebvre (thle)andFeyensv 0d0546c455 [FIX] website_sale_loyalty: set price_subtotal for reward
Steps to reproduce:
-------------------
- create a product that costs 100 with 10% tax excluded;
- create a discount program to obtain 10% discount on the order;
- configure website to display tax excluded;
- go to ecommerce and create a cart with the product;
- apply the discount program.

Issue:
------
The price shown for the discount is tax included (i.e. 11)
and not tax excluded (i.e. 10).

Cause:
------
Set the field `price_unit` during `new` will trigger
a chain of compute methods that will falsely modify
the value of `price_reduce_taxexcl`
(because will modify `price_subtotal`).

Solution:
---------
Set the value of `price_subtotal`,
to compute the `price_reduce_taxexcl` field.
In this way, `price_reduce_taxexcl` and `price_reduce_taxinc`
can be used if the website displays tax included or not.

opw-3302488

closes odoo/odoo#127072

X-original-commit: dd6c01f07c3bf1caa9545108429bf6537a7fef32
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
Co-authored-by: Feyensv <vfe@odoo.com>
2023-07-04 00:51:51 +02:00
Alex (roal) f3212ccede [FIX] tools: fix TypeError in literal_eval
A TypeError is thrown when an AST node is passed to `literal_eval`
because a string is expected and the object has no len().

Check the type of the expression and make sure it's a string before
calling len() on it.

closes odoo/odoo#126874

X-original-commit: 28b5cbb33a99cdca00daa35e5ae598cc8d4b2dae
Signed-off-by: Vranckx Florian (flvr) <flvr@odoo.com>
2023-07-03 21:56:06 +02:00
David Monnom (moda) 0ae2b9a3f2 [IMP] pos_self_order: change authorisation token
Previously, access_token were linked to tables. These tables were linked
to a floor_plan, which could be linked to several pos_configs.

The only way to access the self-order was to obtain a valid table
access_token. This behaviour was not correct because sometimes we would
allow table selection directly in the interface or commands without
a table.

Now, access_token is managed by pos_config. When a user has this token,
they can place commands and select the table they want if the option is
enabled.

closes odoo/odoo#126186

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-07-03 21:56:04 +02:00
tsm-odoo 61ef69a8cf [IMP] im_livechat: small name, ui changes
This PR improves several things linked to visitors in the discuss
app:
- Change window header to "Visitor #, country"
- Change operator's name to Online Chat name if defined
- Rename "Public user" to "Visitor #", add country instead of website
- Change name of the thread to "Visitor #, country" (left panel + header)
- Remove "Website" from visitor's name (small and big threads)

part of task-3332872

closes odoo/odoo#125931

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-03 21:56:01 +02:00
tsm-odoo 7ec8d66ce4 [IMP] im_livechat: improve livechat channel kanban
This PR improves livechat channel kanban:
- Remove image field (always the same and does not bring value)
- Replace the count of operators by the many2many_avatars widget with connected users
- Join button as secondary button, Leave button color should be primary
- Add options from channel card: Ratings + configure
- Compute ratings based on last 2 weeks on channel's card
- Highlight active channels (at least one operator)

part of task-3332872

closes odoo/odoo#125769

Related: odoo/enterprise#42852
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-03 21:55:56 +02:00
Ali Alfie (alal) 3c6c6e6bb3 [IMP] web: rename cancel button in RedirectWarning to close
"Cancel" button in the RedirectWarning is renamed to "Close"

task-3339621

closes odoo/odoo#125751

Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-07-03 21:55:53 +02:00
prye-odoo 7694f012cd [FIX] *: handle unlink/create access for reporting views
*: account,event_sale,fleet,hr_attendance,hr_contract,hr_timesheet,
im_livechat,point_of_sale,project

When the user tries to delete a record(s) from the reporting views,  this
traceback will be generated.

Steps to produce (Example only):

- Settings > Technical > Actions > Window Actions
- Search for the Work Entries Analysis. Open it and add a 'tree' as view_mode
in that action.
- Payroll > Reporting > Work Entries Analysis menu and select the tree view.
- Select one or more records and try to delete these records.

Error: A traceback appears: "cannot delete from view "hr_work_entry_report"

Handled the unlink access by using their model access of the reporting models.
similarly, this issue resolves in other reporting models.

Sentry-3975590063

closes odoo/odoo#125697

X-original-commit: 209d8c76ce9bb1d6cc7084d55b5623e939af8fbc
Related: odoo/enterprise#42825
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2023-07-03 21:55:48 +02:00
divy-odoo 1c2c46d96b [FIX] website: dynamic product snippet error on prev/next
The issue occurred after the merge of this PR [1]. In that, we removed
the dependency on underscore.js and introduced new functions to the
qweb engine: `range` and `uniqueId`.

The variable named `uniqueId` was clashing with the qweb function
`uniqueId()` that's why variable were getting compiled as a function
instead of the actual value, which led to unexpected behaviour.

This commit renames the uniqueId variable to avoid conflicts with the
qweb function `uniqueId()`.

[1]: https://github.com/odoo/odoo/pull/123018

task-3357115

closes odoo/odoo#124659

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-07-03 21:55:45 +02:00
Saurabh Choraria 5ee7fa1e29 [FIX] auth_signup: prevent traceback while connection refused of SMTP server
When there is no valid outgoing mail server and user tries to send email by
'send an invitation email' or 'send password reset instructions' button, it
shows the error in our locolhost.

see this traceback : https://tinyurl.com/2fdn2m5z

steps to reproduce :
    1. Go to users in settings and select a user.
    2. Click on 'send an invitation email' or 'send password reset instructions'
       button
    3. the error will occur.

Applying this commit will resolve this issue.

sentry-3961333326

closes odoo/odoo#117613

Signed-off-by: Achraf Ben Azzouz (abz) <abz@odoo.com>
2023-07-03 21:55:43 +02:00
pedrambiria 4f19f2040a [FIX] pos_loyalty: correctly compute discount with existing discount
Before this commit, if you have a discount promotion on the order,
adding a free product reward would change the discount incorrectly.

The problem is that in the `_getDiscountableOnSpecific` function the
non-discount rewards weren't excluded from `discountLinesPerReward`.

opw-3276337

closes odoo/odoo#127003

X-original-commit: 914dad0d23df4c3f8a117252a8159c07df9ee8ad
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-07-03 19:57:49 +02:00
Mathieu Duckerts-Antoine 1c2c18a0a5 [FIX] web: domain selector: invalid path/operator
We make the domain selector accept any expressions in the first and
second components of a domain condition. Along the way, we have found
necessary to refactor the Tree type (see domain_tree.js) and use it
directly in the domain selector instead of having yet another auxiliary
structure. Another simplification brought by this commit is that the
virtual operators is, is_not, set, and not_set are introduced earlier
and make possible to simplify the way operators are managed.

closes odoo/odoo#126350

Related: odoo/enterprise#43161
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-07-03 16:58:55 +02:00
Mathieu Duckerts-Antoine b72791f05b [REF] web: remove unused props in TagsList
Some props like className were declared as optional in TagsList while
they are not used by the component. We remove them from the props
declaration.

Part-of: odoo/odoo#126350
2023-07-03 16:58:55 +02:00
Mathieu Duckerts-Antoine 2b23f73f51 [IMP] web: domain selector: use TagsList in TagInput
We make TagInput use the generic component TagsList. This gives a better
looking/working to the editors used for the operators "in"/"not in" for
char fields.

Part-of: odoo/odoo#126350
2023-07-03 16:58:55 +02:00
Mathieu Duckerts-Antoine 1b94eefe26 [FIX] web: domain selector: treat false,true as in py interpreter
A string representation of a domain like "[('bar', '=', false)]" is
evaluated by py.js the same way as "[('bar', '=', False)]".So both domains
are recognized as correct while false is not a valid python expression.
We do the same in domain selector, the expression "false" ("true")
will be understood as "False" (resp. "True").

Part-of: odoo/odoo#126350
2023-07-03 16:58:54 +02:00
Mathieu Duckerts-Antoine 089e0e680c [IMP] web: domain selector: in/not in labels
We change the label of "in" to be "is in". The label of "not in" becomes
"is not in"

Task ID: 3291990

Part-of: odoo/odoo#126350
2023-07-03 16:58:54 +02:00
Mathieu Duckerts-Antoine 7a13c3f3d0 [IMP] web: domain selector: getDefaultFieldValue should know operator
The computation of the default value used by an editor used to assume
that the (default) operator is equal. We now pass the operator info to
getDefaultFieldValue in order to be able to have a different default
operator ("in" will become the default operator for relational fields).

Part-of: odoo/odoo#126350
2023-07-03 16:58:54 +02:00
Mathieu Duckerts-Antoine 03858851a9 [REF] web: domain tree: add negate key
The key negate is defined as mandatory in the definition of the type Tree.
We add them at some places (event if it did not pose a problem for now:
undefined and false are both falsy).

Part-of: odoo/odoo#126350
2023-07-03 16:58:54 +02:00
Ahmed Khalaf e8284f1afa [IMP] stock: break move_dest_ids link on location change
Before this commit, if a move is followed by a second move, if the destination
location of the first move is changed, and done, the second move will be assigned
and reserving from the new location.

This commit, compares the location destination of the move in `_action_done` with
the move_dest_id source location and breaks the link between them if they don't match,
the first move would trigger push rules if any exist and the destination move is set to MTS
to be able to reserve qty from the its source location.

Other minor improvements:
-Recomputes the state of the move when creating a backorder to correct
the backorder picking state.

-Recompute the state of move_dest_ids linked to PO when cancelling the PO
to show that it is converted to MTS.

closes odoo/odoo#123759

Task: 3321842
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-07-03 16:58:47 +02:00
Antoine Vandevenne (anv) d41b7a1f48 [CLN] payment(_stripe): cleanup of ee963d10
closes odoo/odoo#127054

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-07-03 15:37:37 +02:00
Didier (did) 56582ee3c0 [FIX] im_livechat: archived chatbot not active on the frontend
task-3374783

closes odoo/odoo#127052

X-original-commit: 2250585c21c4ad10622ed009bd4c12b82f13d945
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Didier Debondt (did) <did@odoo.com>
2023-07-03 15:37:34 +02:00
Géry Debongnie 4a5dc95fb3 [FIX] sale: sol_product_many2one should not crash
The `sol_product_many2one` field is a sub many2one field that should
open the proper configuration system, such as the product configurator.

Before this commit, when inputting some data, then clicking on another
notebook tab, we would often see a crash, because the field has been
destroyed (since it is no longer in the current tab) and it tries to
open the configurator, which requires rpcs.

It is usually a problem when a destroyed component tries to perform some
work. Note that it happens at creation and update. Also, the field
overrides some many2one methods that display confirmation dialog. To fix
this, this commit simplifies the field by only calling the configuration
methods when its value has changed. This is a different strategy that
does not interfere with the many2one basic features. Also, it does not
crash since it will only call the configuration methods on patched, so
it is guaranteed to be alive.

It is certainly not a complete solution, since we should probably move the
code somewhere else not in a field widget, but this would require a
redesign of the code, so it is not appropriate in a bug fix anyway.

Note that the tour had to be adapted, since now the methods
_onProductUpdate/_onProductTemplateUpdate are now called in an effect
(so after a render), which is slightly later than before. But the tour
would click on confirm even before the product update code was executed,
which means that the product was not properly configurated.

This is clearly a concurrency problem: the product configuration code
should be properly coordinated with the basic model, but doing so is a
significative change. Also, in practice, it is not worse than before
this commit.

opw 3178297

closes odoo/odoo#127048

X-original-commit: de7a6f5f3d83356eb02f8fc25b4a0b8aabb946b3
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-07-03 15:37:32 +02:00
Nshimiyimana Séna c0bff2262f [FIX] account: payment state when reconciling refund with bank statement
**Summary**

Currently, if you create a credit note/refund and reconcile it directly
with a statement line (without creating a payment), the
credit note/refund ends up in the "reversed" payment state, whereas it
should be "paid".

**Setup**

- Install `account_accountant`

**Steps to reproduce**

- create a credit note/refund and confirm it
- create the corresponding bank statement line
- reconcile those two

Go back to the credit/refund not, you should see that its payment state
is "reversed", instead of "paid".

opw-3328830

closes odoo/odoo#127027

X-original-commit: 2dd3fa7d4d367e38baf529fdde5d18caa2f238cf
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Séna Serge Nshimiyimana (sesn) <sesn@odoo.com>
2023-07-03 12:21:12 +02:00
Julien Mougenot 5b2593e675 [REF] web: Make datetime hook independant from props
This commit makes the datetime hook independant from the props update
mechanism it previously relied on (onWillStart & onWillUpdateProps) to
update its internal props.

This was an incoming issue as the future relational model will rely on
fine-grained reactivity to update the fields rather than updating the
model and re-rendering all child components (effectively calling
'onWillUpdateProps').

Now, the hook relies on an internal state that tracks whether the props
given by its caller changed from one render to another, which is checked
at render time (i.e. in 'setup' and 'onWillRender').

closes odoo/odoo#125039

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-07-03 12:21:05 +02:00
Julien Mougenot e74672d71d [REF] web,*: Centralize shallowEqual
Before this commit, 2 implementations of a "shallowEqual" function
coexisted, one in 'web/core/utils/objects.js' and another in
'web/core/utils/arrays.js'.

This commit only keeps the one in objects.js and makes the other simply
import and export it as well (easier to maintain while also easier to
find for those who want to work with arrays), while also taking an
optional comparison function argument in case the comparison needs to be
more specific (e.g. compare DateTime objects).

Part-of: odoo/odoo#125039
2023-07-03 12:21:05 +02:00
luvi 592794b397 [IMP] web: support new enable_formatting boolean option
This commit adds the enable_formatting option to integer and float
fields. This allow an input to display and handle unformatted values,
independantly of the localization setting.

A test has been added for each type of field to verify that the
value is entered with the default formatting as 'raw' values.

task-3307126

closes odoo/odoo#121495

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2023-07-03 12:21:02 +02:00
luvi 1239951fe0 [IMP] web: add missing documentation for widget options
This commit simply adds documentation in the supportedOptions of the text
field as well as the progressbar field. Since the support of documentation
has been added recently, those options were not yet documented in the
widget declaration.

This will improve the usability of those options in places like Studio

Part-of: odoo/odoo#121495
2023-07-03 12:21:02 +02:00
Surabhi Varma bbfd5aa614 [IMP] stock_delivery: route based on shipping method
In this commit, we added a new field in the shipping methods this field can be
used select rules. These rules can only be used when the corresponding SO has
one of the selected shipping methods.

task-3236149

closes odoo/odoo#119320

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-07-03 12:20:58 +02:00
Josse Colpaert d34cba59c6 [FIX] account: avoid to delete tax mappings when no new taxes (so on most reloads)
Before, when you click the Reload button at the chart template in the accounting
settings on an already installed CoA that has no changes in the taxes, it will
delete the tax mappings in the fiscal positions.

Apparently the values['tax_ids'] == [] was interpreted by the ORM as remove all
tax mappings instead of do nothing, so we remove the key from the dictionary
when there is nothing to change.

closes odoo/odoo#127008

X-original-commit: ca40db275f4ba8da2d6a2f1bfcb980fb387fc44d
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Josse Colpaert <jco@odoo.com>
2023-07-03 11:02:55 +02:00
Adrien Guilliams (adgu) ebbb81f2de [FIX] pos_restaurant: assertion of restaurant tour not ok
The pos_restaurant first test (test_01_pos_restaurant) has an assertion
that failed due to the fact that the deleteion of an order is
not awaited in the frontend. This led to the tour finishing very fast
after the orm call and the assertion done just after that. We add steps
in this test to see if the orm call has been done propely before ending
the tour.

Runbot Error: 22613, 22614

closes odoo/odoo#126779

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-07-03 11:02:49 +02:00
Mehdi Bendali Hacine 954426cf16 [FIX] l10n_sa_edi: ZATCA tab visibility for non-sales journals
closes odoo/odoo#126600

X-original-commit: 53b20557be5ca52d84b124f1ba29b109406858b2
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2023-07-03 11:02:41 +02:00
vlst 8278d82fa2 [IMP] point_of_sale: Partner Editor Reactivity
At the moment, the partner editor in pos does not use the owl
reactivity system, using instead an onchange function on each
input and manually keeping track of state.

This approach is overcomplicated and leads to bugs.

The necessity of this task first appeared because of one such bug,
namely: the `state` input options not changing in order to reflect
the selected `country`.

Instead of finding a patch for this problem, we decided in this PR
to replace the old logic, making use of `useState` and `t-model`.

closes odoo/odoo#126021

Task: 3323874
Related: odoo/enterprise#43372
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-07-03 11:02:36 +02:00
Yash Vaishnav ead6c03405 [IMP] project: task cannot be assigned as its own parent task
Before this commit In the task's form view, the parent field shows the other
task but also shows the current task.

In this commit, the domain is applied, ensuring that the id is not the same
as the current id. As a result, the parent field of the task does not
include itself

task-3330841

closes odoo/odoo#122286

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-07-03 11:02:34 +02:00
Victor Piryns (pivi) 2a02fbf8b0 [FIX] web: save all changes in many2many modal
Current behaviour:
When creating a new record with a many2many widget, in the modal
window, any modification done after record creation (for example
clicking on the status bar buttons) aren't being saved once we "Save
& Close" the modal window.

Expected behaviour:
All changes should be saved, regardless if we clicked the status
button that trigger *some* action.

Steps to reproduce:
- Install Project
- Settings > Sub-tasks or Task Dependencies
- In a task on a project, add a subtask > New
- Set the title to "Title 1" > Change the stage > Set the title to
  "Title 2" > Save & Close
- Observe the title of the task is "Title 1", not "Title 2".

Reason for the problem:
When we click on a status button, since it can trigger *some* action
in the backend, it forces the creation of the record front-end side,
which generates a `resId`. Upon saving & closing the modal window,
the record is not saved, only it's resId is appended to the list of
`many2many` records.

Fix:
Before appending the record to the list, we save the record if it's
dirty.

Affected versions:
- 16.0
- saas-16.1
- saas-16.2
- saas-16.3
- master

opw-3289908

closes odoo/odoo#127009

X-original-commit: 29aeafda0f75764ec5b30147fec422b47a4da164
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
2023-07-03 07:30:40 +02:00
Elisabeth Dickinson d70da05100 [FIX] spreadsheet_dashboard: fix lost margins on dropdowns
During the Milk revamp, the dropdown items in the Dashboard's header
lost their horizontal margins. These have been put back by setting a gap
property to the parent.
When in the dashboard view under Sales > Product, the dropdowns had an
awkward spacing between them despite the fix. Another fix was to set
`w-100` to the `.o_field_tags` element. And finally a `.gap-1` is also
added to the latter to give its children some space when multiple tags
are selected.

It was noticed that some CSS, specifically the `.o-filter-value` class,
was not targeting anything. This has been fixed by moving the selector
into its correct parent element.

task-3326566
part of task-3326263

closes odoo/odoo#127010

X-original-commit: bd456bc89f896de6b3d8c040706dc02ab3799e6e
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
2023-07-01 09:52:59 +02:00
Elisabeth Dickinson d71c183f19 [IMP] mail: fix chat header's close button on mobile
While being logged in on mobile and having a chat window open in the
frontend, the buttons to close the chat window and to go to
the backend — both located on the top-left side of the screen — overlap,
making it impossible to close the chat window.

To solve this issue we've removed the chat window's `.fa-arrow-left`
and replaced it with the `.fa-close` icon on the right which is the
design we already have on desktop. Padding had been removed around
the close button on mobile and has been put back.

task-3120032

closes odoo/odoo#126889

X-original-commit: 870fcceab0c4142035d257b7b6fe6e7fcbf2a372
Related: odoo/enterprise#43485
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-01 03:40:46 +02:00
Antoine (ande) e1d18960b5 [FIX] account: reversal has no partner id
Current behaviour:
When reversing a bank statement,
the partner id gets removed

Steps to reproduce:
1. Go to Accounting, Journal Entries
2. Select/Create a bank statement with partner
3. Click on Reverse entry, then Reverse
4. Head back to Journal Entries
5. Reversal of the bank statement has no partner

opw-3345594

closes odoo/odoo#126992

X-original-commit: 72d82ed813c4baa11060ebcd1df6335410c5e337
Signed-off-by: William André (wan) <wan@odoo.com>
2023-07-01 00:51:54 +02:00
Alexandre Kühn 574a5a2f48 [FIX] mail: fix project invite button alignment in chatter message
This happens because last `<p>` of message was always `inline-block`
to properly position "(edited)". However, this was breaking some
non-editable content that relies on `<p>` default displays (`block`).

This commit fixes the issue by only inlining the last `<p>` of
an edited message. Non-edited message keeps the default styling of
`<p>`.

Also slightly improve alignment of edited on empty body messages.

Related to Task-3374747

closes odoo/odoo#126988

X-original-commit: 92b359347fc3e390a75ef7a27a9fa758a21673dc
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-07-01 00:51:48 +02:00
Ali Alfie (alal) ba5a6752a4 [IMP] account, l10n_eg_edi_eta: moved L10nEgHTTPAdapter to account
For task-3347812, we needed to create the same Adapter used in l10n_eg_edi_eta. Moving the adapter to account.tools allows us to reuse the same class in different modules.

closes odoo/odoo#126985

X-original-commit: a88027af5f5eb5d0efb4d2c42d5a179aa9bd2dc1
Related: odoo/enterprise#43457
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Ali Alfie (alal) <alal@odoo.com>
2023-07-01 00:51:43 +02:00
tsm-odoo 9988476b7b [FIX] website_livechat: fix visitor banner avatar
Before this PR, the visitor id was passed to retrieve the
partner avatar which leads to wrong avatar being displayed
in the banner. This PR fixes this issue and adapt the avatar
shape from `rounded-circle` to `rounded` since it was not
adapter after the milk update.

closes odoo/odoo#126969

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-30 23:38:12 +02:00
Didier (did)andBrieuc-brd 771477b9a7 [IMP] mail: Introduce gif picker in Discuss
This commit adds a GIF picker in discuss
app. GIF feature makes use of Tenor GIF API [1].
To enable GIF picker in discuss, you must provide
a Tenor GIF API key in the General Settings.
Then the GIF picker is visible in all channels
(chat window and discuss app), next to the emoji picker
button.

[1] https://tenor.com/gifapi/documentation

task-2365705

closes odoo/odoo#116060

Related: odoo/enterprise#41959
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Co-authored-by: Brieuc-brd <brd@odoo.com>
2023-06-30 23:38:01 +02:00
Odoo's Mergebot ee963d1002 [REF] *: use onboarding module
Purpose:
Use the onboarding module to manage onboardings, steps and their progress for the different companies

This PR (and related ENT one) moves these:

* `account`:" invoicing" and "dashboard" + "vendor bill" and "sale_tax" steps
* `sale`: "quotation"
* `account_consolidation`: "dashboard"
* `(account_)payment`: payment provider setup step, used in different modules.
* `website_sale_dashboard`

The onboarding models themselves changed a little to support sharing steps between onboardings or having steps
defined in one module, only to be shown on a panel (`onboarding.onboarding`) in another module, mainly by changing the `onboarding.onboarding` <> `onboarding.onboarding.step` and `onboarding.progress` <> `onboarding.progress.step` relations to m2m.

Task-3025136
See https://github.com/odoo/enterprise/pull/33818
See https://github.com/odoo/upgrade/pull/4021

closes odoo/odoo#104223

Related: odoo/enterprise#33818
Related: odoo/upgrade#4021
Signed-off-by: Florian Charlier (flch) <flch@odoo.com>
2023-06-30 23:37:51 +02:00
Florian Charlier 77f9ff50db [REF] *: use onboarding module
* = account{_payment}, base, onboarding, payment{_stripe},
sale{_management}, web, website_sale

Use the dedicated onboarding module introduced in 16.0 instead of
the res.company model to store onboarding progress.

It allows
 * onboarding steps to be reused across panels
 * to support steps that should be completed per-database or per-company
 * to clean the res.company model from many fields and methods,
 * to remove many views, controllers, actions

Module-specific notes:
* account: We also clean the remaining two steps that are not
part of an accounting panel but make the most sense to be kept here.
* account_payment: Following 8e4e8eb8, the payment provider step is
added to the invoicing onboarding panel. We apply this change here too.
Also impacts the website_sale_dashboard panel (see related ENT PR).
(The "sale tax" one is currently used for to the website sale dashboard).
* payment: Note that the step was already not part of an onboarding
panel within this module.
* website_sale: We clean
  * a field not used (The website_sale dashboard onboarding panel used
  the payment_provider_onboarding_state field).
  * a method that was only called from website_sale_dashboard, so it is
  moved there. See related ENT PR.

Includes a few tests.

Moving views/templates/styling, as well as cleaning residual onboarding-related fields and methods in base, including populate.

This also includes restoring the "onboarding_complete" overlay panel
animating it to disappear after a few seconds so that it doesn't hide
text and block buttons to re-open steps.

Task-3025136

Part-of: odoo/odoo#104223
2023-06-30 23:37:50 +02:00
Florian Charlier 518a4e4c43 [IMP] onboarding: prepare all onboardings migration
### enable onboarding step sharing

Purpose: Allow to use the same step (and progress) for multiple
onboardings.
This is required for the migration of some onboardings such as the
`account` invoicing and sale `quotation` onboardings which both use
common steps (s.g., "Set up company data").

This is done by mutating the onboarding - onboarding step relation and
progress - progress step models relationships to m2m:
* Progress step records are now linked to several progress records if
the  step they track is used in several onboardings.
* There will still be multiple progress step records for per-company
tracking, if applicable.

### Allow steps w/o onboarding

This commit enables creating and tracking the completion of
onboarding steps that are not included in an onboarding panel.

Before this PR, such steps could already be defined and used.
This is the case of the `payment_provider` step from the payment
module, that could be included in an onboarding panel defined
in website_sale_dashboard (both are migrated in later commits of
this PR and related ENT).

### Support changing is_per_company

Having onboarding (steps) being immutably per-company or not
per-company is not convenient. We are here taking advantage of the
migration of onboardings (next commits) to have a working framework
for these changes.

The alternative solution of having to change all onboardings and linked
steps together and ensuring all or none are per-company was in fact
more complex to support and fragile as depending on python constraints
on the many2many relationship.

We also considered it wasn't worth the complexity to identify which
onboarding_progress record could safely be removed when its last
'per-company' step is updated to not per-company.
In that case, all companies will have to close the panel independently,
but the completion of each remaining step will not have to be done for
each company.

### Miscellaneous

#### add safe close action

This eases the handling closing an onboarding panel that
may have been deleted. The code for each panel can
therefore be simplified.

#### add onboarding step form controller

Extracted from `appointment` to be reused in other modules'
onboardings.
We are also cleaning the closing behavior which is no longer
required as dialogs now do close on save/discard.

Tests are added and updated.

Task-3025136

Part-of: odoo/odoo#104223
2023-06-30 23:37:50 +02:00
Florian Charlier afe71fbd3c [CLN] onboarding: remove multiple progress records precaution
As we prevented creating multiple records in beaae001 and cleaned the
databases for existing records in odoo/upgrade#4142, we can now safely
remove these checks.

Follow-up of Task-3101666
Task-3025136

Part-of: odoo/odoo#104223
2023-06-30 23:37:49 +02:00
Jorge Pinna Puissant 865e1ce376 [FIX] web: non-deterministic error with translation button on a list view
Since [1], an error was introduced when using the translation button on
a list view. This error occurs in a non-deterministic way. The issue
occurs because without the option stayInEdition when saving the record
before opening the translation dialog, the row is switch to readonly,
and the translation button is not opened.

This occurs in a non-deterministic way because there is a mutex in a
mutex. When switching the modes (in a save with mutex) a second save is
perform (with also a mutex), this commit will also fix this issue.

runbot-issue-id: 22339

1: e2d28e269d

closes odoo/odoo#126942

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-06-30 22:07:19 +02:00