Commit Graph
152529 Commits
Author SHA1 Message Date
Brieuc-brd dc942516d4 [IMP] mail: MessageInReplyToView, redesign
This commit redesigns the `MessageInReplyToView` component.
Part of the ChatWindow/Discuss redesign

task-2823627

Part-of: odoo/odoo#92872
2022-07-29 15:53:06 +02:00
Brieuc-brd 9b995e5b7d [IMP] mail: Message, redesign
This commit redesigns the `Message` component for the ChatWindow,
Discuss and the Chatter. The purpose is to make the chats more
user-friendly.

task-2823627

Part-of: odoo/odoo#92872
2022-07-29 15:53:06 +02:00
Brieuc-brd 15039761eb [IMP] mail: Adapt placeholder color
Prior to this commit the placeholder color was different when inputs
used the `.form-control` class.
This commit fixes this color difference.

task-2823627

Part-of: odoo/odoo#92872
2022-07-29 15:53:06 +02:00
Brieuc-brd f169280275 [IMP] mail: increase the ChatWindow size
Following the redesign of ChatWindow, this commit increases its size.

task-2823627

Part-of: odoo/odoo#92872
2022-07-29 15:53:05 +02:00
Zelong Lin 1c1bcced26 [ADD] mail: compact message action list
task-2869932

Part-of: odoo/odoo#92872
2022-07-29 15:53:05 +02:00
Eleftherios Kritsotakis 0dd267a270 [FIX] point_of_sale: global discount taxes
In this commit we fix the tax calculation
when applying a global discount in PoS.

Before this commit, when applying a discount
tax was calculated properly only in the use
case where in one order we had:
- products with a single one tax

After this commit, the calculation of discount
and taxes is extendeted to include these additonal
use cases:
- products with more than one tax applied to them
ex. Product A -> 10% + 20%
- products with different taxes in the same order
ex. Product A -> 10%
      Product B -> 20%
- products with taxes that are included in prices
ex. Product A -> 10% (included in price) + 20%

Overall, we tried to follow a general approach
that will include as many use cases as possible
and every combination between them.

task-2421429

closes odoo/odoo#90505

Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-07-29 15:52:53 +02:00
Horacio Tellez f8bebc407b [FIX] payment: do not add fee for validation transaction
When making transaction with 'validation' type and where fees
were active, fees were added to the amount.
This behaviour is problematic because
validation operations are used for tokenization for example where
no credit should charged to the customer.
Now validation operations have no fees even if fees are active
on the acquirer.

Task - 2784765

closes odoo/odoo#96712

X-original-commit: 69b04e753ab4e90e68b9d3e678ebea277586e7ac
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-07-29 14:31:49 +02:00
Touati Djamel (otd) d108db36ca [FIX] mrp: prevent the creation of component SN if option is disabled
Steps to reproduce the bug:
- Go to Inventory→ Configuration→ Warehouse Management →Operations Types
- Go inside “Manufacturing”, and disable the checkbox
“Create New Lots/Serial Numbers for Components” under the traceability
section
- create a MO with a traceable component
- Confirm the MO

Problem:
You can create a new SN for the component without any warning,
while the user is supposed to be blocked by a user error:
https://github.com/odoo/odoo/blob/master/addons/mrp/models/stock_lot.py#L11-L16

The solution:
We need to add the `active_mo_id` key in the context so that the user
error will be triggered

opw-2900256

closes odoo/odoo#96648

X-original-commit: 6d0ddc388d1c389e1911a6bb1c59c252870da1a7
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2022-07-29 13:11:04 +02:00
Florian Vranckxandnle-odoo f294079a89 [FIX] web : error when filter has empty selection
Steps to reproduce:
	- install approvals
	- in the approvals app go to filters>add custome filter> approval type
Issue:
	- traceback
Cause:
	- When no other module is installed, there is nothing to display under
	the approval type filter. Even if the field is not required,
	the javascript try to access the first element of the selection array
	to auto-fill the menu.
Solution:
	Add a check, if empty and not required, do not display it and leave the
	field empty

opw-2895516

closes odoo/odoo#96617

X-original-commit: 7fdbb1783ec65919a709e5fcac111994d0eb3cd5
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Vranckx Florian (flvr) <flvr@odoo.com>
Co-authored-by: nle-odoo <nle@odoo.com>
2022-07-29 11:32:59 +02:00
Alexandre de Pape (alpa)andMorgane 2b29fc2dc8 [IMP] website_sale: add to cart button
This commit adds an 'Add To cart' snippet to the 'Web Editor'.

The snippet works as follow:

1. You choose the `product template` that you wish your users to buy.
2. If the product has more than 1 `variant`, a widget will offer you to either
let the visitor choose - this will open a modal for him to choose the variant
by himself - or select a variant yourself.
3. if `visitor choice` is not selected, a `buy_now` or `add_to_cart` action can
be configured; this will determine the behaviour of the button after the user
clicks it.

task-2824359

closes odoo/odoo#91882

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
Co-authored-by: Morgane <morm@odoo.com>
2022-07-29 11:32:56 +02:00
Jorge Pinna Puissant aaa7336a1f [FIX] web: btn-secondary was applied on all buttons without an
explicit-rank class

Before this commit, on all buttons without an explicit rank class (that
means, a button that don't have any of the following classes:
btn-primary, btn-secondary, btn-link, btn-success, btn-info,
btn-warning, btn-danger) the class on the props.defaultRank or the class
btn-secondary was applied.

Now, the class on the props.defaultRank or the class btn-secondary are
applied as following these rules:
-  if there is no explicit rank class and there exists a
    props.defaultRank, the class on the props.defaultRank will be
    applied;
- if there is no explicit rank class and the props forceRank is set
    (for instance, on the headers on the form view), the class
    btn-secondary will be applied;
- if the button don't have any class, the class btn-secondary will be
applied.

closes odoo/odoo#96655

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-29 09:12:27 +02:00
Pierre Masereel 4a996060e6 [FIX] point_of_sale: unable to change pos.config currency
This change moves the compute of the available pricelists to the compute of
the default pricelist. This reduces complexity in the compute of the pricelists
in response to the changes in the journal and/or it's currency.
This also avoid using the default method in the compute field that lead to errors.

closes odoo/odoo#97032

Related: odoo/enterprise#29931
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-07-29 01:51:13 +02:00
Joseph Caburnay 48aff86c42 [FIX] point_of_sale,*pos*: remove 'pos' field attribute
With this change, we are now assuming each field that starts with
'pos_' to be a 'pos.config' field that has value that will be saved
to the 'pos_config_id' record. We made that modification because by keeping
some related fields not written at the same time can trigger contraints at the
wrong moments that would lead to validation errors when not supposed to be.

Part-of: odoo/odoo#97032
2022-07-29 01:51:13 +02:00
Joseph Caburnay 633f0b6330 [FIX] point_of_sale: payment method check
When we are validating a pos configuration, a constraint is triggered to check
that the payment methods in cash have a journal with the correct currency. Since
there is also a journal_id on bank methods, we should also check those ones, and
also correctly set the defaults payment methods according to the current journal_id.

Part-of: odoo/odoo#97032
2022-07-29 01:51:13 +02:00
Alexandre Kühn 86167977ea [IMP] im_livechat, *: Refactor JS Public Livechat (step 10)
*: website_livechat

This commit is a step towards refactoring the JS of public livechat,
so that it reuses the same architecture as the code of Discuss.
This implies code that uses JS models and OWL components.

Task-2937174

closes odoo/odoo#97030

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-07-29 01:51:07 +02:00
Romain Derie 51e53743db [FIX] website: prevent click on scroll btn to remove it in edit mode
Step to reproduce:
- Enter edit mode
- Drag & drop Cover snippet
- Select height 100% in the right panel
- It will now show the "Scroll btn" option (toggle), enable it
- Now click on footer (to focus out of the Cover snippet options)
- Click on the scroll btn, it will disappear

There were 2 portions of code now in charge of handling that button
removal when a different height is chosen, since [1] was introduced. It
actually made the original portion of code obsolete. This commit removes
it as it was the cause of the bug described above.

[1]: https://github.com/odoo/odoo/commit/85ae7fe56e93fcc18b3842e6c116bcb6968988e3

opw-2920287

closes odoo/odoo#96719

X-original-commit: f777abf697adcadcf717976edd88a3b4bae0ad79
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-07-29 00:41:30 +02:00
Pierre Paridans 21f22f3b7c [FIX] web: daterangepicker style in mobile
The DateRangePicker on mobile has a few caveats (sic) like its
positionning which prevents the user from accessing the buttons (cf. out
of the viewport).

Steps to reproduce (on small device like iPhone 5/Moto G4):
- Open Time Off
- Click on New Time Off
- Click on From/To field
=> buttons are inaccessible

This commit fixes it restyling the daterangepicker on smaller screens to
display it as Bottom Sheet-like element (cf. popping from the bottom of
the screen and growing upto 90% of the viewport).

opw-2803227

closes odoo/odoo#97024

X-original-commit: dd2bd3c22c22c49a60ca0541f84a64c3a613971c
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2022-07-28 21:01:56 +02:00
Simon Genin (ges) df2562e4f0 [FIX] web, base_setup: template didn't exist because of deps
An enterprise without apps would crash on launch because of a template
web_enterprise would inherit but was only there with base_setup
installed.

closes odoo/odoo#97017

Related: odoo/enterprise#29919
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2022-07-28 21:01:50 +02:00
shsa-odoo 528ee16956 [FIX] web_editor: preventing traceback on quote icon click
Before this commit:

Onclicking quote icon of BlockQuote generates traceback

After this commit:

Now on clicking quote icon doesnot generate traceback

Task-2920794

closes odoo/odoo#96944

Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-07-28 21:01:44 +02:00
PNO 72ea4d57d2 [FIX] mrp: Wrong replenishment order notification
On the commit 69dcdd4, the order='create_date desc'
 was removed and the way of getting the MO for the notification changed. Now, the context is used, it should be written_after instead of written_date.
In addition, the now declaration should be at the beginning of the method action_replenish.
(The MO created is correct, only the notification is wrong)

Should be forwarded
OPW-2877457

closes odoo/odoo#96986

X-original-commit: 029da238a2baaf59bdf9ae828a4739ee4a9f3ede
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2022-07-28 18:01:25 +02:00
Louis Wicket (wil) 072756d9b1 [IMP] mail: remove Record/get
closes odoo/odoo#96984

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-28 18:01:22 +02:00
Romain Estievenart 5c00f30307 [FIX] web: forms inside dialog misaligned
Due to the refactor of the form view, `display:block` wasn't apply on
`o_form_nosheet` anymore; This is due to the fact that `d-flex flex-nowrap`
are now directly set in the DOM and thus has !important by default.

We now only use flex when this is not a `o_form_nosheet` element.

Steps to reproduce:
1. Open Sign
2. Click on "Send"
-> the style of the dialog form content is broken

task-2871070

Link:
https://github.com/odoo/odoo/commit/28200c5ad584e9b7f51ffcf7902c8d366b93e2de#diff-26a45bff860d45f36003c55996b92ced0762c62dcd94d5d79bf7b5e4094a1ee0R191

closes odoo/odoo#96964

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-07-28 16:40:35 +02:00
tsm-odoo ecd4cba040 [FIX] mail: runbot error accessing messaging on undefined
This PR fixes the 4427 runbot error.

closes odoo/odoo#96966

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-28 15:03:54 +02:00
Pierre Paridans 171d9cffc7 [FIX] web: weird modal effect on backdrop click
Since BS5 migration, clicking on the backdrop of a "static" modal
triggers a weird scaling-up/down effect on the modal.

Steps to reproduce:
- Open Livechat Channels
- Open a channel
- Click on operator which opens a modal
- click on backdrop
=> scale-up/down effect

This commit fixes it by disabling the scaling transform effect on
modals.

closes odoo/odoo#96958

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2022-07-28 15:03:51 +02:00
Bastien Dosimont 3958d15086 [IMP] website_sale : llow bulk uploading of images from frontend
This commit adds more functionalities to the web editor when editing a
product's page in order to make it more user friendly to add change or
resequence the many images a product may have.

TaskId-2692189

closes odoo/odoo#85686

Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-07-28 15:03:48 +02:00
frc-odoo 8821fb0641 [FIX] web_editor: adds missing not null check
closes odoo/odoo#96975

X-original-commit: c2f6be56a09e3dd627922036c6deaa22aa2238dd
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2022-07-28 13:21:33 +02:00
FrancoisGe 4b7b89b040 [FIX] web: duplicate blank option in selection field
Before this commit, in a field selection, it was possible to have two
blank options.

To reproduce this problem, you need to have a non required selection
field and one of the selection sent by the server has the value false.

Our solution is to ignore the false selection returned by the server
and add the false option only if the field is not required.

closes odoo/odoo#96951

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-28 13:21:25 +02:00
tsm-odoo 8a04a0297a [IMP] mail, im_livechat: remove createComposerComponent
task-2871066

closes odoo/odoo#96886

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-28 13:21:22 +02:00
FrancoisGe 19c2bbfa3a [FIX] web: KanbanView multi edit
Before this commit, in a kanban view, if you try to create a new record
while another one is being saved, then a crash is displayed.

To avoid this problem, when we create a new record in quickCreate mode,
we will first wait until the first one has finished saving before
creating the new one.

closes odoo/odoo#96826

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-28 13:21:18 +02:00
qsm-odoo a234b8b9b6 [FIX] website_crm: remove useless confusing contact form option
Follow-up of [1].

With [2], the contact us page was made entirely static to ease and allow
more things in its customization. The customize_show option of the
website_crm app which added the possibility to switch between sending
emails or creating opportunities was to be removed to rather be done via
the standard edit-mode option, by clicking on the form itself. Part of
this option view was however kept (the auto-fill of some more values)...
but it was not supposed to be kept as a customize_show view. With this,
a customize_show option with the same name "Contact Form (Opportunity)"
still appeared and gave the illusion that this is the way to make the
form create opportunities instead of sending emails. In master with [3],
the customize_show was removed but refactored to appear in the editor
panel.

After this commit, we remove the editor panel option that was converted
by mistake.
We also re-enable the view automatically via the 16.0 migration scripts.

[1]: https://github.com/odoo/odoo/pull/69888#discussion_r921081562
[2]: https://github.com/odoo/odoo/commit/417138b44311a05aa206b6e2e38bb67863843c74
[3]: https://github.com/odoo/odoo/commit/31cc10b91dc7762e23b4bde9b945be0c4ce3fe3b

Related to task-2462993

closes odoo/odoo#96145

X-original-commit: 8620c3bc71183b5ebd7801c139eab1736070d846
Related: odoo/upgrade#3690
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-07-28 11:54:24 +02:00
Rahul Prajapati fda3a48e94 [IMP] mail: move oncomponentupdate from discuss_view to thread
PURPOSE:

The whole process depends on `thread_view` render, not `discuss`. So, it's
unnecessarily making `discuss_view` observe and rerender on a lot of useless
values.

SPECIFICATION:

Remove method from `discuss_view`. Make some onChange methods for handling
the functionality.

Task-2869417

closes odoo/odoo#94147

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-07-28 11:54:21 +02:00
Eleftherios Kritsotakis aee820510d [IMP] point_of_sale: responsive ClosePosPopup
In this commit, we adapt our design
to match the needs of smaller screens.

closes odoo/odoo#88006

Related: odoo/enterprise#25910
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-07-28 11:54:09 +02:00
Eleftherios Kritsotakis b3067091ca [IMP] point_of_sale: download/print saleDetailsReport from closePosPopup
In this commit we make it possible for a user to
download/print the Sales Report of the current
session by clicking at the "download"/"printer"
icon at the lower right corner of the closing pos
popup. This is a commonly used feature. Thus, we
make the UI more usable.

In general, the sales report can be generated by two
different ways:

- either by providing a start and end time (products
within that time span will be included).

- or by providing a session_id (products that are sold
during this specific pos_session will be included) which
is used in some localisation modules (e.g. pos_l10n_se).

To achieve this, we generalized the `_get_report_values`
function to consider both possibilities. As a result,
the inherited version of the function at the
pos_l10n_se module was made reduntant, so we deleted
it.

NOTE: the "Printer" button will be displayed only when
a printer is connected to the IoT box.

task-2755384

Part-of: odoo/odoo#88006
2022-07-28 11:54:09 +02:00
Eleftherios Kritsotakis 201e782dfb [IMP] point_of_sale: usability of ClosePosPopup
In this commit we modify the ClosePosPopup
so that we make it more usable.

For this reason we expose less info in order
to keep it simple for the user and we rename
the footer buttons respecting the Odoo standards.

Finally, since we want to make it more obvious
to the user and avoid unwanted acceptance of the
payment difference, we show ConfirmPopup with the
relevant information.

task-2755384
subtask of task-2669747

Part-of: odoo/odoo#88006
2022-07-28 11:54:09 +02:00
Nshimiyimana Séna 679fed2c52 [FIX] web_editor: translate editor commands
Steps to reproduce:
- switch to any language other than English
- go to a page where you can use the text editor,
  for instance you can try to edit a project's description.
- type `/` in the editor

You should see that some commands are not translated.

Some files modified in this commit are located in the
web_editor/static/lib/web-editor directory.
However, only the JS code located into /static/src/ is considered for
export of translations. This is done to avoid polluting translations for
code not managed by Odoo.

We have to update the .pot file manually. A good workaround is to copy
the web-editor folder inside to static/src, export the
translations and then delete the copy folder.

However, this means that those updates to the .pot file will be lost in
the next translation export.

opw-2918128

closes odoo/odoo#96939

X-original-commit: 0cc5505b27f29d44c25af83653b09b1b49cfec79
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Nshimiyimana Serge Séna (sesn) <sesn@odoo.com>
2022-07-28 10:28:06 +02:00
Alvaro Fuentes 27854c787a [IMP] test_base: test add/remove implied groups
Given a recordset R of (at least two) groups, and a group A.
We want to ensure that:
* `R._apply_group(A)` adds A to the list of implied groups of _all_
  groups in R.
* `R._remove_group(A)` removes A from the list of implied groups of
  _all_ groups in R

This is especially problematic for config settings of the form
```
class MyConfig(models.TransientModel):
    _inherit = 'res.config.settings'
    group_imply_A = fields.Boolean('x',implied_group='A',group='B1,B2')
```
since activating the implication via `group_imply_A=True` currently
fails in case only one of B1,B2 already implies A.

opw-2832741

closes odoo/odoo#96928

X-original-commit: 81dc64740ba46355462ed2169e57fc0ce694ccdb
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: Alvaro Fuentes Suarez (afu) <afu@odoo.com>
2022-07-28 10:28:03 +02:00
Alvaro Fuentes af886f3673 [FIX] base: correctly apply implied groups
If one of the groups in `self` implies the group `implied_group` then
the rest won't be updated.

This also contradicts the way the settings are later checked (which is
correct) on
https://github.com/odoo/odoo/blob/f2c214e227db7c9ec2340ef87644f2f7c2e370c5/odoo/addons/base/models/res_config.py#L508

See 4f19f29a

opw-2832741
upg-356843

X-original-commit: 1754c744c8d00925d40c44742de3600389f7af47
Part-of: odoo/odoo#96928
2022-07-28 10:28:02 +02:00
Lin WenwenandJulien Castiaux c06cee44fe [FIX] base: serialization bug when acquiring cron
Start Odoo with multiple cron threads (e.g. --max-cron-threads=4),
trigger many crons at once, there is a chance one of the cron thread
fails due to a serialization error.

Inside of the `_acquire_one_job` function, the query evaluates many rows
to find one that fit multiple requirements. Two of those requirements
are (1) that the `nextcall` of the row is in the past or (2) that it
exists a cron trigger for that cron with a `call_at` in the past.

In case the `nextcall` of one of those rows is modified or the cron
triggers are removed by another transaction then there can be a
serialisation failure in the current transaction. This serialisation
error is important, it prevents the current cron worker from acquiring a
cron job that has been processed in another cron worker.

The problem is that that postgres doesn't tell which row was modified by
the other transaction (=processed by another worker cron) so it is not
possible to just skip that cron and continue with the others.

Our solution is to limit the WHERE clause of the `_acquire_one_job`
function to a single row. In case there is a serialization failure we
know the cron was processed in another job and we can skip it.

Closes #96584

closes odoo/odoo#96926

X-original-commit: 684750a0c2c83acffb32e555bd3140a2c76d7219
Signed-off-by: Julien Castiaux <juc@odoo.com>
Co-authored-by: Julien Castiaux <juc@odoo.com>
2022-07-28 10:27:58 +02:00
Victor Feyens d3c935ff27 [CLN] payment: unnecessary csrf token
The csrf token given to the assignTokenRoute is not necessary
and will trigger warnings in the logs.

closes odoo/odoo#94020

Related: odoo/enterprise#28595
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-07-28 10:27:55 +02:00
Victor Feyens 5e2d675149 [IMP] payment: provide the access token to the assign route
to be able to safely check the user is allowed to modify the specified
portal record.

Part-of: odoo/odoo#94020
2022-07-28 10:27:54 +02:00
Nguyen Hong Quang 869f933252 [FIX] account:'Journal Entry' being hidden by their container
Currently, button 'Journal Entry' not wrap with classes `.o_stat_info
.o_stat_text` which make this
text being hidden by their own container.

This PR will fix this problem.

closes odoo/odoo#96927

X-original-commit: 8b7d548cdab9d9e6169553c2b8cde5a4e68004dd
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2022-07-28 09:14:53 +02:00
Florian Damhaut 3009863bc5 [FIX] sale_coupon: Apply taxes to fixed_price discount
Step to reproduce:

    Create a promotion with fixed price discount
    Create a SO where the promotion can apply with taxes on the
    products
    Trigger the computation of the taxes

Current behaviour:

    No taxes are applied on the fixed price discount

Behaviour after PR:

    Taxes are applied on the fixed price based on their
    proportion to the total amount.

opw-2806780

--------------

FW port of #88393

closes odoo/odoo#96923

X-original-commit: 43b34e9a38f1291db7b85521dee3266541812dd6
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2022-07-28 09:14:50 +02:00
sofiagvaladze edcda35087 [FIX] hr_expense: set quantity to 1 when choosing 0-cost-product
Scenario:

Open expense, choose product with cost, set quantity to 5, now choose
any 0-cost product. Save the expense.

Behavior: quantity is 5

Expected behavior: quantity should be set to 1

Implications: As a result, in the list view on expenses, we see incorrect quantity.
Moreover, in SO, price_unit will be incorrectly computed.

task - 2867723

closes odoo/odoo#96732

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-07-28 09:14:47 +02:00
Lucas Perais cea8a6adaf [FIX] views: fields: one2many open record containing another one2many
Have a form view with a one2many list with one record inside.
Click on it to open it. The form view that will open must also have a one2many list

Before this commit, there was a crash because the information of the main record's view
was not propagated to the form view of the opened record. Generally speaking, env.config was lost.

After this commit, we propagate correctly the config.

closes odoo/odoo#96618

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-07-28 09:14:43 +02:00
Lucas Perais 6eb2238294 [FIX] tests: views: helpers: the view's env is not the global env
Before this commit in tests, when creating a view with makeView, the same env was shared for services, view and
main_components_container. This is rather wrong as bugs in prod could not be reproduced in tests.

For example: env.config was present in the env for every services and components, this is wrong as
only View must receive it in its env.

After this commit, makeView separates the env for services and top-level components from the one dedicated for View.

Part-of: odoo/odoo#96618
2022-07-28 09:14:43 +02:00
Simon Genin (ges) 6ab02de109 [REF] base_setup: convert module to new js framework
convert res_config_dev_tool widget
convert res_config_edition widget
convert res_config_invite_users widget

closes odoo/odoo#96615

Related: odoo/enterprise#29804
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-28 08:10:45 +02:00
Jorge Pinna Puissant cd624c891f [IMP] web: focus trap on the dialog
This commit will trap the focus on the dialog, this will avoid modifying
a background record when a dialog is open. Trapping the focus on the
dialog is a well-known technique for modals (dialog).

closes odoo/odoo#96361

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-07-28 08:10:42 +02:00
John Laterre (jol) e55196375a [FIX] account: prevent tracebacks from PDF read errors
Until now, an invalid PDF file would generate a traceback
during the export, which is not very user friendly.

The export happens when on the vendor bills list view,
by selecting one or more bill(s) that were generated
by the OCR (via the 'Upload' button),
clicking on 'Print' then 'Original Bills'.

The goal here is simply to catch those errors and display
a slightly more helpful message.

closes odoo/odoo#96935

X-original-commit: 7e7bd50403b6f5e2dabc39caf5fddb57d7052ebc
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2022-07-28 05:05:04 +02:00
Nshimiyimana Séna 3aee7a8cc8 [FIX] stock: count request sets the wrong user
Steps to reproduce:
- go to Inventory > Operations > Inventory Adjustments
- Select at least one product
- Click on Request a count; A dialog box containing a form should appear
- Select a user other than the current user
- Make sure to check "Set Current Value"
- Click "Confirm"

You should see that the user you selected is not the one assigned for
the count. Instead, the count is assigned to the current user.

This is happening because currently, calling
`action_set_inventory_quantity` also sets the user as the current one
if the quantity is not already set.

opw-2924694

closes odoo/odoo#96914

X-original-commit: f2b79bc4c6198aacca33eea8905fd62c629706a1
Signed-off-by: Tiffany Chang <tic@odoo.com>
2022-07-28 05:04:57 +02:00
momegahed 270a78b89f [REV] point_of_sale: res.partner doesn't belong to a specific company
This reverts commit 3aa03eb65d431cb9749a2b31a9a09d6b41cd34a4.

based on:

https://github.com/odoo/odoo/pull/94153#issuecomment-1194580295

closes odoo/odoo#96909

X-original-commit: a1eb4049a40a6ff198c8222083715b474b094f82
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-07-28 05:04:54 +02:00