Commit Graph
164380 Commits
Author SHA1 Message Date
Antoine (anso) 0a96f3b007 [FIX] web: notification button padding
Removing ps-0 class that was breaking the default button padding

To deal with the possible aligment issue when `btn-link` is used
alone (as this button style has no background), we are switching the
second possible type of buttons to `btn-secondary`. It also matches
with the `btn` combinations used in modals

closes odoo/odoo#126246

X-original-commit: 16237b7ee064a4a7047d0eb6d58a477b048daf67
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-06-23 18:00:15 +02:00
roen-odoo 075da19e4e [FIX] pos_loyalty: specific discountable take discount into account
Current behavior:
When computing the discountable values of an order, the discount of the
program where not taken into account if you used specific discountable
products.

Steps to reproduce:
- Create products A and B with a price of 20$
- Create a loyalty program
- Rule:
  - Minimum qty : 2
  - Apply on specific products : Product A and Product B
  - Reward : 5 points per order
- Reward:
  - 10$ per order
  - In exchange of 2 points
  - Apply on specific products : Product A and Product B
- Open PoS and add Product A and Product B to the order
- A reward should be added automatically with a value of -10$
- Click on the reward button, another reward should be added but it has
  the wrong value. It should be -10$ but it is not.

opw-3232565

closes odoo/odoo#126245

X-original-commit: f33d3b09ff49aae1fdaf3379915b7e7b5f03080c
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-06-23 18:00:13 +02:00
Pieter Claeys (clpi) ccb41edf2b [IMP] stock: better returns
Improve the returns process by adding the following improvements:
- Removal of the 'return' operations type. Returns of deliveries now
become receipts.
- Update of the `stock_picking_return` wizard by removing the onchange
on picking_id.
- Show returns in the sale portal, with a new 'return label' PDF report
- Enable returns for multi-step receipts on purchases

Community PR: https://github.com/odoo/odoo/pull/118568
Enterprise PR: https://github.com/odoo/enterprise/pull/39761

closes odoo/odoo#118568

Task: 3081370
Related: odoo/upgrade#4660
Related: odoo/enterprise#39761
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-06-23 18:00:05 +02:00
Pieter Claeys (clpi) f13d537a42 [IMP] mrp: New analytic for MRP
The (legacy) analytic account field on MOs, BOMs and workcenters has
been replaced by the new "analytic distribution" field.

The analytic line items are now created based on this distribution for
the raw materials, workcenter costs and employee costs.

A new analytic applicability (=domain) has been added for manufacturing
orders as well.

Community PR: https://github.com/odoo/odoo/pull/116477
Enterprise PR: https://github.com/odoo/enterprise/pull/38690

closes odoo/odoo#116477

Task: 3196563
Related: odoo/upgrade#4704
Related: odoo/enterprise#38690
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-06-23 17:59:57 +02:00
Hubert Van de Walle (huvw) f120977751 [FIX] analytic: missing currency field for aggregates
opw-3316448

closes odoo/odoo#126209

Related: odoo/enterprise#43067
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
2023-06-23 16:35:46 +02:00
Cyrus Robins 7146975815 [FIX] stock_valuation_layer: add an index to stock_valuation_layer_id field to improve performance
The index is being added because when processing a large PoS session, the method consume_specific_qty is called a large number of times if the product categories are set to automatic valuations. This method has the line:
tmp_value += qty_taken_on_candidate * ((candidate.value + sum(candidate.stock_valuation_layer_ids.mapped('value'))) / candidate.quantity)

This line, when running upwards of 20,000 times, can cause large performance issues, due to the stock_valuation_layer_ids being a related field on stock_valuation_layer_id.
This causes a doubling of the number of sql queries which causes slowdowns in performance. Adding this index drastically improves the performance of the queries generated by this line of code.

opw-3295560

closes odoo/odoo#126207

X-original-commit: 6f491e34d9355d1e45599fd0c881d7d721ea7d73
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-06-23 16:35:43 +02:00
Paweł Fertyk 357c71b768 [FIX] mrp: assign lot_id to stock moves in mass produce
Currently we skip the lot_id assignment if move.quantity_done is set,
which causes issues when using "Mass Produce" option.

closes odoo/odoo#126191

Task: 3370869
X-original-commit: 72f316a4c0ad1d443aa84051858fa6d8885b464e
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-06-23 16:35:40 +02:00
Joseph Caburnay 667d056b63 [FIX] pos_*: properly check country from company
pos_*: l10n_ae_pos,l10n_co_pos,l10n_fr_pos_cert

In many pos l10n addons, we assume that country is present in the company, and
this is a wrong assumption. Thanks to the runbot error that we are able to
detect these mistakes in the code. In this commit, we fix the issue by checking
the presence of country first before actually accession the country code.

Runbot Error: 20917

closes odoo/odoo#126117

X-original-commit: 172a5bc8628f8b774d9738c05c2eb7b0ef4db5ae
Related: odoo/enterprise#43019
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
2023-06-23 16:35:35 +02:00
qsm-odoo 8618d34953 [FIX] web_editor: restore snippet button text colors
This reverts commit [1]. It broke all snippet button colors, making
them invisible. Besides that, the fix seems not obvious to make properly
and would thus require some more testing, thus the need of reverting
this urgently.

There is probably more things to consider when remaking that fix:
- mass_mailing scss code in web_editor should not be a thing. Even if
  the comment about variables not being accessible is true, there are
  definitely other ways to do it (make them accessible, add those rules
  generically with a custom selector and fill that custom selector when
  mass_mailing is installed, etc etc)
- More than scss code, we really do not want mass_mailing *CSS* rules
  in website pages, especially in that code that generates *many* CSS
  rules. Of course web_editor.common.scss contains many things that
  should not be there and mass_mailing has probably already a lot of
  useless code in the frontend assets... but the goal is to fix those
  inconsistencies in the future.
- The fix impacts buttons which are not hovered while the goal seemed to
  be to have their hover style disabled...
- The fix impacts buttons which are in o_ccX environments only (?) but
  seemed to be about disabling all hover styles.
- Much doubt on the need of an at-root instruction, especially since
  it creates a bug in frontend pages without o_mail_wrapper containers
  so it probably does not work as intended.
- The fix should probably not be about overriding/duplicating the CSS
  rules but rather post-processing the mass_mailing assets to remove all
  hover rules. I guess it is even possible to do in JS removing the
  :hover CSS rules, at worst by moving all CSS rules to inline <style>
  rules or something like that.

Note: the main bug about button text being invisible is apparently from
16.0 and up only. This still reverts the code at its root (15.2) for all
mentioned reasons above.

[1]: https://github.com/odoo/odoo/commit/55aff2dcdf5537e16bdaf01ee68d776510572171

task-3376724

closes odoo/odoo#126116

X-original-commit: a6e861b19002b02e369d6b7c1ed5fe1401e77028
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-06-23 16:35:30 +02:00
Joseph Caburnay 66165e81ac [FIX] point_of_sale: load fonts when mounting the pos app
The `waitfont.js` module depends on the presence of the `document.body` and it's
possible that during loading of the services, it is still `null`, which results
to indeterministic random error in the test. In this commit, we make sure to use
the module (calling `waitForWebfonts`) only when the pos app is about to be
mounted, such that `document.body` is already present.

Runbot Error: 22519 (and probably others)

closes odoo/odoo#126110

X-original-commit: a1b250f555e328b2d97ae347cef3d71773329d87
Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
2023-06-23 16:35:27 +02:00
Brieuc-brd 0fba13ed0f [FIX] web: search panel: long filter on mobile
Prior to this commit, when a filter or a dropdown item had a long name,
the layout was broken on mobile, the item went out of the viewport and
wasn't readable.

This commit fixes this issue.

task-3378207
Part of task-3326263

closes odoo/odoo#126071

X-original-commit: 96d1edcdba78af3572c3395867e561c0eb3d5054
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-06-23 16:35:25 +02:00
William Henrotin 4ae28ba747 [FIX] stock: recompute move state for reservation
Creating a move line with some reserved quantity should make its stock
move recompute its state as this noew reservation quantity could make it
assigned.

closes odoo/odoo#126069

Task: 3371590
X-original-commit: ca4cf35b3450ad3246e57a34aa8f3fe7c4f187af
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-06-23 16:35:22 +02:00
William Henrotin 955a5fecc8 [FIX] stock: hide quants for consumable
do not create stock move line from quant for consumable products

Task: 3256447
X-original-commit: b327825de0b50de9cdb81fc9e8384c503351d6d7
Part-of: odoo/odoo#126069
2023-06-23 16:35:22 +02:00
William Henrotin aede5c595a [FIX] stock: always show the detailed operation button
We want be able to click on the button right at the stock move creation

Task: 3256447
X-original-commit: d8926ec8f4a2d8f7840ea4c0ddd8393a74e57d90
Part-of: odoo/odoo#126069
2023-06-23 16:35:21 +02:00
Géry Debongnie 9f6ed9f6d1 [IMP] web: display empty screen when switching app/menu
The goal is to provide a better feedback to the user, especially in
mobile mode. With this commit, when switching menus, we clear the screen
and display an empty control panel (only for act_window actions though)
so we have some initial content that get filled as soon as the
view/action is ready.

Task 2900847

closes odoo/odoo#124068

Related: odoo/enterprise#43038
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-06-23 16:35:15 +02:00
ravb-odoo 16ed8d3141 [IMP] hr: add default avatar of employee
Before this commit, when the user creates new resource and employee on
the fly in many2one field, the default avatar of Initial name should be
set instead of placeholder (grey icon). The reason why a grey icon is
displayed is because the `_compute_avatar` for employee set that icon
when avatar or image is not found.

This commit add default avatar of initial name when new resource and
employee is created.

task-3251689

closes odoo/odoo#123403

Related: odoo/enterprise#41823
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-23 16:35:07 +02:00
Laurent Smet b8f2579805 [IMP] test_main_flows: Add main flow to bank reco widget
Adapt the main flow tour to the refactoring of the bank reco widget
since the embedded form is now an owl component.

closes odoo/odoo#119185

Task: 3193121
Related: odoo/upgrade#4776
Related: odoo/enterprise#40068
Signed-off-by: Habib Ayob (ayh) <ayh@odoo.com>
2023-06-23 16:35:02 +02:00
Laurent Smet 592f0df7e2 [IMP] web: Add hook to provide options to the useModel function on kanban
Task: 3193121
Part-of: odoo/odoo#119185
2023-06-23 16:35:01 +02:00
Laurent Smet e7cbd26b08 [IMP] web: Add hook 'onWillStartAfterLoad' on useModel
Allow a custom onWillStart but after the loading of the model in useModel.

Task: 3193121
Part-of: odoo/odoo#119185
2023-06-23 16:35:01 +02:00
Laurent Smet c6b4f67238 [IMP] web: Add hook on monetary_field
Add an hook to add a custom behavior when parsing the monetary amount written by the user on the UI.

Task: 3193121
Part-of: odoo/odoo#119185
2023-06-23 16:35:01 +02:00
Nikunj Ladava 3cb6785d4b [IMP] survey: raise access error when user dont have access of survey
before this commit,
once users got an invitation to fill out any survey and if they log in with
another credential than the shared credentials, they will be redirected to the
home page instead of a survey.

after this commit,
if the user tries to fill out the survey with another credential, an error
will be raised that the user doesn't have access

Task-2960271

closes odoo/odoo#102612

Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-06-23 16:34:46 +02:00
roen-odoo 84d9344e5d [FIX] point_of_sale: fix css for cash in/out popup
Current behavior:
When the text for the button in the cash in/out popup is too long, the
first number of the amount is hidden behind the currency symbol.

Steps to reproduce:
- Install l10n_bo and PoS
- Switch language to Spanish
- Create and open a PoS with a cash payment method
- Open the cash in/out popup, enter a value.
- The first number of the amount is hidden behind the currency symbol.

opw-3324406

closes odoo/odoo#126120

X-original-commit: decafb5b7d59967d64f5bb553e95fe32c7b0ccb8
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-06-23 15:11:31 +02:00
Yash Vaishnav 8e3c9b7656 [FIX] hr_timesheet: remove 'No records' from task_id when searching task
Steps to reproduce:
1) Install the timesheet application.
2) Open the grid view and select a project.
3) Search for a task that does not exist, for example, 'xyz'
4) Notice that both 'Create xyz' and 'No records' are displayed

Cause:
-The issue arises when using the timesheet grid view, as the default_project_id
is passed through the context. However, when a project is initially selected,
the props do not update, resulting in the 'canCreate' value being set to false.

Fix:
-This change will allow canCreate value to be set as true when the project
is selected.
-In the timesheet grid view 'no_create_edit=True' is passed, indicating that the
user should not create and edit new tasks. Modifying this value is not
appropriate as it goes against the functionality of preventing the user from
editing the tasks.

task-3318851

closes odoo/odoo#122485

Related: odoo/enterprise#41500
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-23 13:26:55 +02:00
Yash Vaishnav b75ef2e965 [FIX] project: fix groupby and sortby issue in portal view of the project
Before this commit,
When you use the 'group by' feature in the portal view of a project, selecting
any value will group the items by stages.

However, when you choose to 'sort by' any option other than 'Title' or 'Newest',
and then navigate back to the project table using the breadcrumb, it may result
in a traceback. The reason why this error occurs is that the query string
remains in the URL even when you switch back to the 'Project' view using the
breadcrumb.

In this commit, keep_query is keeping query in URL so removing it solve
the issue. By default, the 'Stage' is used as the groupby for each project.

task-3318851

Part-of: odoo/odoo#122485
2023-06-23 13:26:55 +02:00
Victor Feyens 67568f13a6 [FIX] website_sale: portal reordering with advanced attributes
If a cart has multiple lines with the same product (custom/no_variant attributes),
opening the reordering wizard on the portal would fail, because the key used in
foreach would be the same for multiple iterations.

closes odoo/odoo#126151

X-original-commit: 80bce88e73770debe64fb401003dac35cb4f6785
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-06-23 12:07:57 +02:00
Victor FeyensandFlorent de Labarre 0fa7b77ad8 [FIX] website_sale: correctly handle no_variant attributes on reorder
New "Re-order from portal" feature for e-commerce orders was not
considering specified no_variant & custom information on the order at all.

This commit makes sure the information is correctly forwarded to the cart,
ensuring the reordered products are the same as the ones previously ordered.

opw-3380312

X-original-commit: 9e774cf88398b7ffc701c4adf44451e39963db08
Part-of: odoo/odoo#126151
Co-authored-by: Florent de Labarre <florent.mirieu@gmail.com>
2023-06-23 12:07:57 +02:00
Victor Feyens bdc6e3e3aa [FIX] website_sale: do not offer reordering for delivery lines
X-original-commit: 79014398c0655ed0c10b85ed3eaa498a5c63bef4
Part-of: odoo/odoo#126151
2023-06-23 12:07:57 +02:00
Arnold Moyaux 7ef8e358b3 [FIX] stock: wrong variable reference
product variable used in the rounding precision come from the upper
loop and won't work for all the quantites.

opw-3229080

closes odoo/odoo#126144

X-original-commit: cf68853573f70f8dfa84a15ef515479142705a38
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-06-23 10:27:58 +02:00
Tiffany Chang (tic) 15e0661151 [FIX] web: correctly parse python field domain
PR odoo/odoo#115197 refactored how a field's domain is read.
Unfortunately it removed the ability to use a domain with python code in
it which can lead to a "Invalid domain AST" client error since it is no
longer parsed correctly.

Steps to reproduce:
- Install mrp_workorder and quality_control
- Open Quality app
- Quality Control > Control Points > New
- Click on `product_ids` field

=> Error is thrown. Issue is due to `product_ids` domain being python
dependent (i.e. if specific record value is set => use one domain,
otherwise use other domain):
https://github.com/odoo/enterprise/blob/d2b0eacd68d6558aa9376985a72a350e20d7619d/mrp_workorder/models/quality.py#L101

which isn't correctly parsed into an AST and which results in this call
throwing the "Invalid domain AST" error
https://github.com/odoo/odoo/blob/75c71ccfa8b5daa79f82af1e492831c565ee54f3/addons/web/static/src/views/fields/many2many_tags/many2many_tags_field.js#L153-L154C13

Note that the type check is needed because sometimes the domain is
passed as an array and other times as a string and we should only
evalExpr on strings. Also for safety we ensure that we do not pass an
domain of "undefined" as well.

closes odoo/odoo#126089

X-original-commit: ffd4ee838cfddb366aa9aafa2f2d92d9a434569e
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-06-23 10:27:53 +02:00
Xavier Luyckx (xlu) ed9fdcf64f [FIX] web: btn-group, allow gap control
Before this commit, due to the milk design, there was a gap between the
buttons in btn-group. However, in certain modules, it was necessary to
have a negative margin-left to achieve an edge-to-edge appearance.

To address this issue, I introduced a CSS variable called
--btn-group-gap to control the margin-left property for the elements.
This change allows for customization of the margin-left value, with a
fallback value of $btn-border-width by default, when needed.

task-3336458
part of task-3326263

closes odoo/odoo#126068

X-original-commit: 1a82e8e80745d26b8c96cd5bf0c10f14b793d440
Related: odoo/enterprise#43001
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-06-23 10:27:45 +02:00
Vincent Larcin 674567fb73 [IMP] project: change order of tasks
This commit increases the priority of the sequence in the ordering of tasks
so that reordering by drag & dropping is more useful.

Task-3371921

closes odoo/odoo#125073

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-23 10:27:40 +02:00
niyasraphy 58fbd38d0a [IMP] stock_landed_costs: order for landed cost model
before this commit, when creating new record in landed
cost, the newly added record is coming in the last
position in the tree view.

after this commit, the records shown in the tree view
will be sorted based on the desc order of recorded date
in the landed cost.

closes odoo/odoo#124101

Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2023-06-23 10:27:38 +02:00
thsh-odoo 05a584806d [IMP] web: adapt the kanban "Remove" button label
Remove button is shown when the view of our field is in kanban mode.

When our field is one2many it will delete the record and when our field is
many2one it will remove the record.

So many times user get confuse that they are deleting the record or removing
the record.

So to clear out the confusion this commit changes the label of remove to
to delete if the field is one2many.

A test was added to ensure this ux change.

Task-3185967

closes odoo/odoo#126112

X-original-commit: 008f3e792bd377499fdac5b16de356f9e03b230f
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-06-23 09:21:02 +02:00
Jeremy Kersten ee5c0666f3 [IMP] sale_service: allow to filter the match of previous PO
Before this commit, to refine the choose of the best existing purchase
order on which we could add the commission, we need to recopy the
query and add new constraint on it.
Now the method return all purchase orders valid, and a simple override
of this method will allow to refine adding filter on current result.

Use the company from the PO and not the company of the current env.
It should be 'more' correct to compute taxes with real used company and
it will also allow to force another company on the po and respect it.

closes odoo/odoo#125572

X-original-commit: 082938d254e9d7fc4ae442412077b9019b2394d0
Signed-off-by: Paul Morelle (pmo) <pmo@odoo.com>
2023-06-23 09:20:57 +02:00
Jeremy Kersten e54b57ee74 [REF] sale_purchase: reorganize with hooks
Add a lot of hook to allow a custom module to reuse the standard
sale_purchase module.

X-original-commit: 89a761bdf84f3a9b06f3504f7ee66540ec0e9f0e
Part-of: odoo/odoo#125572
2023-06-23 09:20:57 +02:00
amdi-odoo 71823f54f5 [FIX] website_slides: fix sidebar overlay
In the course fullscreen view, a black overlay is
hovering the content on medium screen size and lower
when the sidebar is active.

Fix the black overlay which is still showing after
closing the sidebar. When the sidebar is close the
overlay shouldn't be displayed.

As the content is translated to the right and still
fully visible on medium screen size, a black overlay
isn't needed. Only show the black overlay for small
screen size and lower.

Task-3371743

closes odoo/odoo#126118

X-original-commit: f8c45330605837c61f20bed962532b339afc4460
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-06-23 08:10:51 +02:00
Panagiotis Kyriakou 92442878b7 [FIX] project: fix different subtask button problems
Context: the subtask button should not be clickable
when all the subtasks are in a closed stage.

The change in this commit fix a problem of the subtask
button, where it would not be clickable even when it
should have been (it had open subtasks).

Also it fixes a tooltip "e" that appeared on hover when
the button was not clickable.

Task-3283488

closes odoo/odoo#126090

X-original-commit: 831d48f1ef301d6f64d53a247515a41cc250f678
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-22 22:22:26 +02:00
Hugo Carlier (Huca) 1e57df85ad [FIX] project: avoid warning when selecting tags of a task
Currently, when selecting tags for a task with no project (private
task) on mobile, a warning is displayed. On top of that, the amount
available tags is way more limited than in classical view and the
selection of some exesting tags is impossible.

Steps
=====
1. Warning when selecting tags
- Install module project
- In mobile view, go to the view "Tasks -> My Tasks"
- Open or create a private task (task with no project)
- Click on the tags field

A warning is displayed (on the server logs) stating:
"The domain term '('project_ids', 'in', False)' should use the '=' or
'!=' operator."

2. Limited tag choice
- Install module project
- In mobile view, go to the view "Tasks -> My Tasks"
- Open or create a private task (task with no project)
- Click on the tags field
- The tags that are only related to project(s) are not displayed in this
  view
- Try to create a tag with the same name than an existing tag that does
  not appear.
- A traceback is displayed because this tag already exists.

Cause
=====
As noted from the test of expression.py, M2M fields in the domain should
be compared to list of elements. It is not the case here. When a
project_id exits in the context, nothing happens, but there exists a
check in the ORM to ensure that '=' or '!=' operator is used if the
second element of the domain leaf is a boolean. In this case, there is
not project_id set in the context for private task, resulting in
the previous warning (False used instead of project_id).

Fix
===
We use the improved implementation of _name_search to get the ordered
list of id of records project.tags to display. This list has the
advantage to not be restricted to the current project, while still
presenting the tags of the current project at the top of the list. The
mobile view uses the method search_read to get the list of project.tags
record values, therefore we call the _name_search in this method and use
an optimized sorting function to sort the resulting records accordingly.

task-3302370

closes odoo/odoo#126091

X-original-commit: a03a93aa8cf5567f79dd66ced5911721b82a3802
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-22 21:07:39 +02:00
Arthur Detroux (ard) 4d7da09779 [FIX] web: mitigate navigation error on iOS/iPadOS devices
Ever since iOS 16.4, going back and forth through a website with the
cache enabled, creates an error in the console which Odoo tries to
handle but fails to do so. Therefor a generic CORS error message
appears.

There is unfortunately no proper way to fix this bug on our end so
instead, this commit tries to mitigate the error by returning early and
not showing the traceback dialog.

I (ARD) have submitted a feedback through Apple's Feedback Assistant app
and will subsequently remove this commit when Apple releases an update
that fixes this.

opw-3281727

closes odoo/odoo#126094

X-original-commit: ff78ee498fe858e2564262df13600c64a4e2f418
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2023-06-22 19:37:26 +02:00
Bastien (bvdn) a32a7d2957 [FIX] project: avoid traceback on stat button click
- steps to reproduce bug:
  In project.task sharing form view, When clicking on any of the stat buttons (subtasks or parent task)
  when you arrive on the actual task formview a MissingError saying 'missing record' appears
- Issue:
  The record loads accordingly but the Missing Error shouldn't appear

- Cause:
  It is coming from the project_sharing_form_compiler which gave the projectSharingId props to the ChatterContainer element
  but the projectSharingId is equal to the "props.record.context.active_id" of the action, and in the context of the
  chatter we want the active_id to be equal to the project_id, which was the case when we are coming from the KanbanView and
  sub-list views but when coming from the task stat button the active_id is equal to the task_id and the env can't find
  the document 'project.project' with the id of the task. (in portal.py _document_check_access())
- Fix:
  We simply change the projectSharingId to take the "props.record.contect.active_id_chatter" the give an
  active_id_chatter= active_id in the Project Sharing task_action which will always equal the Id of the project

Task-3284755

closes odoo/odoo#126092

X-original-commit: 22c0825b70bbe8234dee57060bdd5640001f74d7
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-22 19:37:23 +02:00
Claire Bretton (clbr) da1d9a09f5 [IMP] account: update taxes - add tests regarding taxes with children
Adds more tests to the chart_template update of taxes with children_tax_ids.

closes odoo/odoo#126083

X-original-commit: 747b6498ca86c65ad63fd934e4f57f0c85e56461
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Claire Bretton (clbr) <clbr@odoo.com>
2023-06-22 19:37:20 +02:00
Didier (did) 8766ce3e02 [FIX] mail: avoid error when clicking on jumpToPresent
Before this PR, the mouse event click was automatically passed has behavior to
the jumpToPresent function. This cause a TypeError.
This PR use an arrow function in the template to avoid passing the event.

closes odoo/odoo#126073

X-original-commit: bfc6be4b9129e8fa103efd6de57eb1cc9903b780
Signed-off-by: Matthieu Stockbauer (tsm) <tsm@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-06-22 19:37:18 +02:00
Louis Wicket (wil) e9f6c94aa6 [FIX] mail: show same unpin message everywhere
Before this commit, the unpin message was different depending on whether
the message was unpinned from the “pinned messages panel“ or from the
message action.

This commit unifies both flows by introducing a common method to pin and
unpin messages.

closes odoo/odoo#126072

X-original-commit: 9cf7ec443dce3a3d40a3e67533de60491bc9e7b6
Signed-off-by: Didier Debondt (did) <did@odoo.com>
Signed-off-by: Louis Wicket (wil) <wil@odoo.com>
2023-06-22 19:37:15 +02:00
momegahed 0785c6982d [FIX] UserError.name still used although it was removed
Bug:
the property name was removed in
https://github.com/odoo/odoo/commit/d200dcfb2c912353d404312b9d9484846868cf96

similar to:

https://github.com/odoo/enterprise/pull/42033
https://github.com/odoo/enterprise/pull/40754

opw-3368194

closes odoo/odoo#126070

X-original-commit: 6e6b067b5109327489dccdcc1f5e5405994f98d0
Related: odoo/enterprise#43002
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Mohamed Megahed Abbas Megahed SALLAM (mome) <mome@odoo.com>
2023-06-22 19:37:10 +02:00
Kartik Chavda 499a0506fd [FIX] sale_timesheet: fix activity 'upsell' when threshold is not exceed
Description of the issue/feature this PR addresses:
In sale, when threshold value of product is not exceed than upsell activity is
created while creating invoice. upsell activity is only create when threshold
value exceed otherwise not.

Current behavior before PR:
When creating an invoice, an 'upsell' activity is created on the sales order and
assigned to the salesperson even if the threshold has not been exceeded.

Desired behavior after PR is merged:
Do not create a 'upsell' activity unless threshold is exceeded.

Fix:
super class is invoke before checking the upsell and create activity. so
now, we prevent super method from creating upsell activity via passing
`mail_activity_automation_skip` context.

task- 3330815

closes odoo/odoo#126067

X-original-commit: 9232093da48cbffe2c3a9d85106292082fdbdcce
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-06-22 19:37:07 +02:00
Pierre Rousseau 9c954de941 [FIX] web: correctly handle errors in action service
Before this commit, an error triggered in an action (with target=new)
was caught twice: the promise is rejected, and in the case of an
action with target=new, the error is re-thrown.

This caused the error to be caught twice, and the error message to be
displayed twice.

The issue is not visible when the view in the action is a form view
and the error is an RPC error because the error handler decide to do
nothing with an error which is already handled. It's because the form
view uses legacy rpc, which uses a custom error handler.

This commit fixes the issue by not re-throwing the error in the case
of an action with target=new, but only closing the dialog, which was
the reason why the rethrow was done (0cec54b92c).

closes odoo/odoo#126013

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-06-22 19:36:52 +02:00
pedrambiria e30e0df8d4 [FIX] point_of_sale: cash rounding combination of cash and bank
There were two cases that caused the issue:
Consider a cash rounding with Precision 5 and only cash.

If you have an order that the total amount is 40 and pay 38 by
bank and 0 with cash (cash rounding), it will raise an error.

If you have an order that the total amount is 41 and pay 38 by
the bank and 5 with cash, it will raise another error.

opw-3302114

closes odoo/odoo#125980

X-original-commit: c06b55a69667fc311427d688191c403609eb2f6f
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-06-22 18:30:08 +02:00
Pierrot (prro) 92e1267037 [ADD] l10n_nl_reports_sbr: Send Tax Report to the Dutch gov
Add a new section in the settings dedicated for Dutch company settings.
Used in the new Dutch SBR module (l10n_nl_reports_sbr).

closes odoo/odoo#125965

X-original-commit: 049bf22be2edc62f0f85d895423b7d404716ba80
Related: odoo/enterprise#42942
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Pierre-Rodéric Roose (prro) <prro@odoo.com>
2023-06-22 18:29:58 +02:00
Valentin Vallaeys (vava) c8863332d8 [REM] website_sale(_stock)_product_configurator: unused handle_stock
closes odoo/odoo#125960

Related: odoo/upgrade#4818
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-06-22 18:29:55 +02:00
tsm-odoo 99b4b861e8 [IMP] im_livechat: improve livechat session history search
This PR improves the search on livechat session's history:
- Rename "Name" into "Attendee"
- Add quick filters:
  - My sessions
  - My Team
  - Session Date
  - Ratings: Good / Bad / Unrated
  - Rename "Creation Date" into "Session Date"

At the same time, this PR fixes the livechat channel demo
data since they were not realistic:
- Older messages should have lower ids
- Operators should be members of the channel
- Rating must be the last message of the channel
- Missing `email_from` for visitor messages

part of task-3332872

closes odoo/odoo#125891

Signed-off-by: Didier Debondt (did) <did@odoo.com>
2023-06-22 18:29:50 +02:00