Commit Graph
165180 Commits
Author SHA1 Message Date
Loukas Wets (lowe) 8ee8010cf6 [IMP] pos_self_order: install kitchen display for pay after each
Previously, when ordering with the Self app and paying after each order,
since paid orders aren't displayed on tables in floor plan, and orders
aren't send to kitchen directly. The flow is stuck.

This PR makes sure that the kitchen display is installed if the pay
each order is set. If not it will install it.

Because the kitchen display is only available in Enterprise, the
paying after each order mode is not available in community. When selecting
the mode in community the upgrade to Enterprise popup will be displayed.

task-3429195

closes odoo/odoo#135534

X-original-commit: 6c2dd0a53cb4dd33af01fdc3553ba2b379188265
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Loukas Wets (lowe) <lowe@odoo.com>
2023-09-15 12:15:16 +00:00
Mathias Mathy (MAMA) 167c51b1f9 [IMP] stock{_dropshipping},mrp,repair: remove onchange('code') from stock_picking_type
Legacy code still use 'onchange' on the 'stock.picking.type' field code
to compute the different xxx_location_id.
As it is no more viable, this commit replace all these onchange by
compute methods.
These changes also has a side effect as some already existing compute
methods now get a set of 'stock.picking.type' in input, such that these
methods are also updated to handle this case.

closes odoo/odoo#134650

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-09-15 12:15:14 +00:00
sofiagvaladze 597c9fd854 [IMP] hr_recruitment: sanitize applicant's phone/mobile and normalize email
In order to have faster and more reliable search for similar applicants,
1 - we add normalized email and sanitized phone and mobile fields on hr.applicant.
2 - we use those fields for a search of similar applicants.

task - 3282883

closes odoo/odoo#120521

Related: odoo/upgrade#4977
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2023-09-15 12:15:12 +00:00
Sébastien Theys c6df607104 [FIX] mail: fix warning in user_modify_own_profile_tour
Follow up of https://github.com/odoo/odoo/pull/129239

Fixes runbot issue https://runbot.odoo.com/web#id=24581&view_type=form&model=runbot.build.error&menu_id=405&cids=1

closes odoo/odoo#135617

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2023-09-15 10:48:32 +00:00
Louis (loco) 597b519c4d [FIX] *: enable to use the backslash character in a field label of form
*website

Steps to reproduce the bug:
- Drop the "Form" snippet on the website.
- Add a new field.
- Replace the field label by "test\".
- Save.
=> Traceback of type "Cannot read properties of null (reading
'dataset')" appears.

In the `start()` function of the `s_website_form` public widget, the
field names of the form are extracted thanks to the `serializeArray()`
function. The field elements are then found by doing a `querySelector()`
on the field names. In our case, the field name of the new field
extracted by `serializeArray()` is `test\\` (there are two backslashes
because the field name is a string so the first backslash has to be
escaped by a second backslash). The problem is that this string has to
be escaped one more time in order to be used in a `querySelector()`. As
it is not the case, the result of the `querySelector()` is `null`
leading to a traceback when the code tries to access its dataset. To
solve the problem, the character `\` is encoded before being stored in
the `name`, `data-name` or `data-visibility-dependency` attribute of the
field element. Thanks to the encoding, the `querySelector()` operation
can perform correctly on those attributes.

opw-3470291

closes odoo/odoo#135587

X-original-commit: 03f230a77c0d38b46944d45b4991f48e45b275dd
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-09-15 10:48:31 +00:00
duongnguyen b69200ac46 [IMP] hr_holiday: archived employees not display in time off
closes odoo/odoo#135581

X-original-commit: ba4d3de6673bcc149a813cc40c4e088d8f0367fc
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
2023-09-15 10:48:30 +00:00
Loukas Wets (lowe) 7a37975cfa [FIX] pos_restaurant: concurrent update error
Previously when a table was deleted 2 write calls were sent. This was a
problem because it causes a concurrent update error. One of the write calls
is undesirable and comes from the unWillUnmount from EditableTable component.
This commit removes the unwanted write call.

closes odoo/odoo#135512

X-original-commit: b1c5267845f82e8444d8548cb317d23721c31592
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Loukas Wets (lowe) <lowe@odoo.com>
2023-09-15 10:48:29 +00:00
Pierre Paridans 25d0783b59 [IMP] web: reduce jquery-ui lib (remove useless modules)
Includes: widget.js, position.js, data.js, keycode.js, scroll-parent.js,
unique-id.js, widgets/draggable.js, widgets/droppable.js,
widgets/sortable.js, widgets/autocomplete.js, widgets/menu.js,
widgets/mouse.js

task-3439226

closes odoo/odoo#135491

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2023-09-15 10:48:28 +00:00
Pierre Paridans 68e78881bf [IMP] website_sale: remove dependency on jQuery UI Effects
This commit replaces the usage of jQuery UI Effects "Expo" by the
default jQuery effect (aka. "swing"), but shorter to keep a similar
"punchy" feeling when adding a product to the shopping cart.

Note: this will allow to remove jQuery UI Effects in a follow-up commit.

task-3439226

Part-of: odoo/odoo#135491
2023-09-15 10:48:28 +00:00
Maruan Aguerdouh (magm) 59b2c10cbf [FIX] website_sale: add to cart modal properly displayed on list view
Made the modal for add to cart to be the same when in Grid view and list
view. We achieve this by modifying the css inside
`#products_grid.o_wsale_layout_list`.

opw-3235969

closes odoo/odoo#134699

X-original-commit: 643141dd284f1da869f540dd7aabbe9753eec3a5
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Maruan Aguerdouh Mohtar (magm) <magm@odoo.com>
2023-09-15 10:48:27 +00:00
Mathieu Duckerts-Antoine 4aa5f00dc9 [IMP] web: sample server: support of array_agg
In SampleServer, we make _mockReadGroup support array_agg (at least for
the field id).

closes odoo/odoo#135020

Related: odoo/enterprise#37757
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-09-15 10:48:25 +00:00
Quentin 413c5a878c [FIX] account_edi_ubl_cii: handle 0 basis_qty and None attachement_name
When parsed, if the attachment has a basis quantity of zero,
it creates an error, because it is used in a division.
The condition that checks whether is computed
should be done only if this variable is none.

The code does not handle if `attachement_name.text` is None,
which can be caused by an orphan ID tag (e.i. "<cbc:ID />") ,
in the xml of the pdf.

opw-3470969

closes odoo/odoo#135566

X-original-commit: bfc83df736596a32f6009ad673194db20f18dec8
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Laurent Smet (las) <las@odoo.com>
2023-09-15 09:22:09 +00:00
Florent de LabarreandMiquel Raïch eee455e799 [FIX] account: fpo map account is not used
Before this commit, the fiscal position is not used to determine account.

closes odoo/odoo#135559

X-original-commit: 57f71fa2666af591a8d3d28af65fcfab8a7d3785
Signed-off-by: Cedric Snauwaert <csn@odoo.com>
Co-authored-by: Miquel Raïch <miquel.raich@forgeflow.com>
2023-09-15 09:22:08 +00:00
Benjamin Vray b9c0d9f780 [FIX] web_editor: fix oi icons css for editor panel
Since the commit [1], some Font Awesome icons have been replaced by 'oi'
icons in the editor panel. This has resulted in a situation where both
'fa' and 'oi' icons coexist.

These changes have caused two issues in the editor panel:

- The icons in the two buttons used to flip a background shape are no
longer centered within their buttons.

- When a row of buttons contains a mix of 'oi' and 'fa' icons, all these
buttons no longer have the same width. This issue was identified in
Master when new options for flipping/rotating an image shape were
introduced (see this commit [2]). Even though this bug may not be
visible in version 16.3, it is still necessary to address it here since
any potential changes could reveal this bug.

This commit resolves these issues by adjusting certain parts of the CSS
code of the the editor panel to handle 'oi' icons in the same way as
'fa' icons for these two specific cases.

[1]: https://github.com/odoo/odoo/commit/418413e4997a6b65eb7ad9e9ef8aba42805f1c0c
[2]: https://github.com/odoo/odoo/commit/fbb395021da5e8ba115d36dfd683f8576a74bf80

task-3493051

closes odoo/odoo#135330

X-original-commit: 3729cf6ab4261a29431ef05fcb7cc33ba5e3ad5a
Signed-off-by: Outagant Mehdi (mou) <mou@odoo.com>
2023-09-15 09:22:07 +00:00
Ivan Rasputin 1711e91257 [IMP] core: test exporting of translation files
Static qweb files are not tested for syntax errors.
This commits adds a hacky way to do this job: we test exporting of translation files.

Inspired by the following PRs, that were made as a response for errors caught by sentry

* https://github.com/odoo/enterprise/pull/43975
* https://github.com/odoo/odoo/pull/128221

closes odoo/odoo#128445

Related: odoo/enterprise#44074
Signed-off-by: Raphael Collet <rco@odoo.com>
2023-09-15 09:22:04 +00:00
oco-odoo 80b4c4c623 [FIX] account: reports: translate line codes properly in copied aggregation formulas
Example: Copy the Belgian P&L, try to open the copied report => error message saying some aggregation terms cannot be expanded. If you open the its form view, you can see that line BE_PL_14's balance formula has been translated from this

BE_9906.balance + BE_791.balance - BE_691_2.balance + BE_794.balance - BE_694_6.balance

to this on the copy:

BE_9906_COPY.balance + BE_791_COPY.balance - BE_691_2_COPY.balance + BE_794.balance - BE_694_6.balance

This is buggy ; BE_794.balance and BE_694_6.balance should be BE_794_COPY.balance - BE_694_6_COPY.balance, in order for them to match the other lines of the copied report properly.

This bug touches other reports more generally. It was due to the fact we replaced the codes in aggregations while we were copying the lines, and not after copying all the lines. Because of that, lines that were referrenced by an aggregation expression belonging to a line coming before them in sequence were not taken into account, as they were not part of the code_mapping dict yet.

OPW-3505592

closes odoo/odoo#135585

X-original-commit: 43ed3e69291833ca82cd1257ade021862997828c
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-09-15 08:08:36 +00:00
Julien Alardot (jual) 87a0b760db [FIX] hr_expense: recompute expense currency
Fix a corner case when the expense currency doesn't update when a cost is added to the product

Steps to reproduce:
- Create an expense in a foreign currency
- Add a cost to the expense product

Before fix:
Unit amount currency stays in foreign currency

After fix:
Forces expense currency to
 company currency

task-3455446

closes odoo/odoo#135570

X-original-commit: 67901a4429c69fbba96c32af5d8f58aff54f0be5
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Julien Alardot (jual) <jual@odoo.com>
2023-09-15 08:08:35 +00:00
roen-odoo bea0116aec [FIX] point_of_sale: use correct partner_id for invoiced orders
Current behavior:
When invoicing an order that was made in a closed PoS session, the wrong
partner was used for the invoice. And so the total due was assigned to
the wrong partner if you used the "Customer Account" payment method.

Steps to reproduce:
- Open PoS and make an order for a customer using the Customer Account
  payment method.
- Close the PoS session.
- Open the PoS session again, and invoice the order you made in the
  previous session.

Fix:
Use the commercial_partner_id of the order's partner instead of the
partner_id directly.

opw-3478670

closes odoo/odoo#135558

X-original-commit: a7ebb5151060f9435941b9da50182e4ec5b58db7
Signed-off-by: Vlad Stroia (vlst) <vlst@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-09-15 08:08:34 +00:00
roen-odoo 6cc1c435fd [FIX] point_of_sale: remove 0€ payment line of orders
Current behavior:
When an order contains a payment line with 0€, and a customer account
payment line. Then you close the PoS and invoice the order from an other
PoS session, you get an error.

Steps to reproduce:
- Open PoS, make a new order with a payment line of 0€ and a customer
  account payment line.
- Close the session and open a new one.
- Go in the paid order, and try to invoice it.
- You get an error.

Fix:
To fix the issue we just remove the useless 0€ payment line.

opw-3477486

closes odoo/odoo#135284

X-original-commit: 24c311670164d5f06dc50d829bb653b06cf86f07
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-09-15 08:08:32 +00:00
roen-odoo d461fcef5c [FIX] pos_coupon: Make sure loyalty rewards are considered as rewards
Current behavior:
When a loyalty reward was applied with a promotion program, a promotion
reward was added with a -Infinity value.

Steps to reproduce:
- Create a loyalty program with a reward of 5€ fixed amount for 50
  points
- Create a promotion program with a reward of 10% discount
- Open a pos session, select a customer (and add points to the loyalty
  program if needed).
- Add a product to the order, the 10% discount should be applied
- Now click on the reward button to apply the loyalty reward
- The loyalty reward is correctly applied, but a new promotion reward
  is added with a -Infinity value.

opw-3297817

closes odoo/odoo#133550

X-original-commit: ee60da301209c84264d706b9d16e45af541a3bbf
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Robin Engels (roen) <roen@odoo.com>
2023-09-15 08:08:31 +00:00
Florian Charlier c983f8a534 [IMP] survey: ensure scored can be passed
Before this commit, it was possible to have users fill-in
a scored survey with no way possible to pass it because no
answer had any positive score obtainable.

We keep here the check on sharing of the survey to avoid
errors while configuring the survey, the same way it is
already done when trying to share a survey without any
question at all.

Note that we are also adding this warning and the "This is a
test survey" notice for survey_user and not only managers
because users can also test their surveys...

Task-3374592

closes odoo/odoo#130553

Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2023-09-15 08:08:30 +00:00
amdi-odoo fbf7df5e4b [IMP] survey: improve multiple choice checkboxes
Purpose
=======
Make it easy for users to differenciate bewteen
simple choice and multiple choice question types.

Specification
=============
Change the multiple choice question type checkboxes
icon from a circle to a square in the survey result page
and the survey template.

In the question form view, tick 2 checkboxes instead of
one for the multiple choice question type.

Task-3252870

closes odoo/odoo#129882

Signed-off-by: Stéphane Debauche (std) <std@odoo.com>
2023-09-15 07:05:29 +00:00
Arthur Detroux (ard) 26218171a8 [FIX] web_editor: fix images getting absolute URLs in grid mode
[1] introduced the grid mode and with it a util that reloads lazy
images in order to prevent a bug in Chrome which make images disappear.

This util read the .src property of the image element. That property is
the absolute URL.
In order to keep the exact URL that was on the img attribute, one needs
to use "getAttribute".

This commit does exactly that.

Steps to reproduce:
- Drop a Image - Text snippet
- Drag the image to enter grid mode
=> At the same time the image is reloaded with the wrong src

[1]: https://github.com/odoo/odoo/commit/cc406afcea7bf5846233a9f97a4a8ac5f618f3ec

closes odoo/odoo#135392

X-original-commit: 3528f2c3f9d3b30266f3421672986d202c724a76
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2023-09-14 20:34:54 +00:00
Pedram (PEBR) c10eae31ae [FIX] pos_loyalty: prevent loading a product twice
Before this commit, if a product was set to be available in the PoS,
and also existed in a reward, it was loaded to the PoS twice. This
caused issues in _loadProductProduct during the assigning of pricelist
items, and could result in missing pricelist information for a product.

opw-3487702

closes odoo/odoo#135494

X-original-commit: b64f9bfeb7782e9665ea60e57f09031b6588f883
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-09-14 19:20:06 +00:00
Walid HANNICHE (waha) ad9c8e31e1 [FIX] mrp: update MO qty reserves components
Steps to reproduce:
- Create and confirm an MO with extra components in stock
- Update the quantity to produce

Bug:
the reserved qty is not updated (it actually is but to the previous
value if you update MO quantity multiple times)
since this commit[1] moves are now assigned during the write
before the new product_uom_qty is written on them

opw-3489226
[1]:https://github.com/odoo/odoo/pull/93712

closes odoo/odoo#135548

X-original-commit: cc23ebefb4a15d163ec508cd535bf757cf626fa5
Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
2023-09-14 18:09:52 +00:00
Aaron Bohy 3d9aebdcac [FIX] web: fix randomly failing form tests
We must wait for an additional tick to be sure that the error
dialog is displayed, because the "unhandledrejection" event is
triggered asynchronously.

Runbot issue-24690
Runbot issue-24691
Runbot issue-24744
Runbot issue-24733
Runbot issue-24742

closes odoo/odoo#135500

X-original-commit: e341f592e2a8ebc3c2e479566425df89a29bf2c7
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2023-09-14 18:09:51 +00:00
Ali Alfie (alal) 1d25e75241 [IMP] hr_expense: add attachments from expense to journal entries
This commit adds a copy of the attachments from the expense report to the created journal entry.

task-3443042

closes odoo/odoo#132955

Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-09-14 18:09:50 +00:00
priyanshi patel(prpa) f712299fe4 [IMP] mrp: display Ready to Produce qty in MO Overview Report
Before this commit
==================
Currently, There is no way to know how many qty users can produce with the current stock.

After this commit
=================
With this commit, In the MO Overview report, the following stages are added:
'Ready', 'Not Ready', and '{X} Ready'. the Ready to Produce qty is based on
the component reserved quantity + component free quantity. Furthermore, the
table header in the MO status overview report has been slightly highlighted for
improved visibility.

task-3356499

closes odoo/odoo#124474

Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
2023-09-14 18:09:49 +00:00
Odoo's Mergebot 824fc94bbc [MERGE][REF] sale,website_sale*: combination info logic
Clean, factorize and optimize the code related to product variants display and price computation, especially the whole `combination_info` logic, which can now be moved to `website_sale` since the new product configurator used for backend doesn't rely on it anymore.

Enterprise PR: https://github.com/odoo/enterprise/pull/41308

closes odoo/odoo#121986

Related: odoo/enterprise#41308
Related: odoo/upgrade#5134
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-09-14 18:09:48 +00:00
Victor Feyens a8366a67da [IMP] website_sale: rely on line info instead of combination
Part-of: odoo/odoo#121986
2023-09-14 18:09:48 +00:00
Victor Feyens 63f0d1cb5a [IMP] sale: harmonize fpos & pricelist request cache
Cache the fiscal position by request the same way it was
done for the pricelist, on the current website record.

Also clean and clarify the pricelist cache at the same time,
making sure invalidations are correctly handled, and that the
whole code relies on the unique logic (& field).

Part-of: odoo/odoo#121986
2023-09-14 18:09:48 +00:00
Victor Feyens 07517d79fa [CLN] website_sale: split product_attribute.py
Part-of: odoo/odoo#121986
2023-09-14 18:09:48 +00:00
Victor Feyens f71cd64567 [FIX] website_sale: correctly update prices according to fiscal position
The prices displayed on the /shop page were not refreshed if the fiscal
position computed for the current partner was modified.

Part-of: odoo/odoo#121986
2023-09-14 18:09:48 +00:00
Victor Feyens ab16589d6c [CLN] sale: product_template.py
Remove unused field
Clean code

Part-of: odoo/odoo#121986
2023-09-14 18:09:48 +00:00
Victor Feyens 6c940679c9 [REM] product: unused company fallback logic
This method & logic is not used nor necessary anymore with
the multi-company fixes and improvements done in the recent years.
* All requests coming from website are automatically done in the website
company.
* check_company restrictions forbid the use of records from different companies
* multi-company security rules restrict the access to records from the current
company.

Part-of: odoo/odoo#121986
2023-09-14 18:09:48 +00:00
Victor Feyens ae7d23ef2e [CLN] website_sale,*: unnecessary pricelist context
There is no need to manually add the pricelist context for ecommerce
flows anymore, it is automatically managed in `_get_contextual_pricelist`
override of website_sale.

Part-of: odoo/odoo#121986
2023-09-14 18:09:48 +00:00
Victor Feyens 4069158c96 [REF] sale,*: combination_info logic
Clean all code related to _get_combination_info:

* Move logic to website_sale now that backend configurator doesn't
rely on it anymore. Only frontend configurator uses that logic.
* Make sure the returned information is correct and consistent:
  * request must be given the right context (multi-company)
  * behavior is coherent between modules and overrides (date, company, currency, rounding)
* Performance:
  * Avoid loading unnecessary information
  * Avoid calling _get_combination_info when only part of the data is necessary.
  * Clean/simplify uses and overrides by keeping useful information in the combination_info dict (taxes, currency, ...)
* Code cleanup
  * clean imports
  * clean architecture
  * clean templates
  * move old configurator code to website_sale

Now that the product configurator backend side has been redone
completely, the remaining parts previously shared between backend
and frontend configurators can be moved to website_sale because only
used by the frontend configurator.

Part-of: odoo/odoo#121986
2023-09-14 18:09:48 +00:00
Bastien Fafchamps (bafa) e1cf7e93c9 [FIX] base_import: unable to select name, external id or db id separatly
Before this commit, when selecting the field to import, the name, external
id and database id could not be selected separatly while they should.

This commit fixes that by comparing the full field path instead of the id
of the fields.

closes odoo/odoo#135482

X-original-commit: 587ee0797bd0075dc7d3a0393ec95360c8ab0770
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
2023-09-14 17:08:02 +00:00
Andrea Grazioso (agr-odoo) e6b353d6df [FIX] sale[_expense]: delivered quantity amplification
Activate analytic accounting
Configure a [TEST] product to create a project on order
Create a SO with [TEST]
Have an expense product [EXP] with reinvoice policy set
Create an expense with [EXP] and set as analytic account the one created
for the SO and another one
Complete the expense flow
Check the SO

Issue: the expense line was added correctly but the quantity delivered
is set to 2

opw-3410712

closes odoo/odoo#135479

X-original-commit: 39f573eebd7af7f026ffdcb4957a47a0f699939f
Signed-off-by: Andrea Grazioso (agr) <agr@odoo.com>
2023-09-14 17:07:59 +00:00
Martin Trigaux fac931cb0c [I18N] l10n_din5008_repair: correct the translation
closes odoo/odoo#135443

Source: Larissa (lman)
X-original-commit: 9b8fb3e0eeb7b3b8411f32984b8626d15529724c
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-09-14 17:07:58 +00:00
Loukas Wets (lowe) 2df6f93882 [FIX] point_of_sale: switch product view
After the bootstrap refactoring introduced in this commit cc349515a4923874067705267bbaa383276556e6.
The switch product view wasn't working anymore. This commit reintroduce
the logic behind the switch product view option.

Task-3500621

closes odoo/odoo#135431

Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-09-14 15:50:18 +00:00
Theo VINCENT (thvi) 41b14f4294 [FIX] pos_self_order, *: pay button visibility
*: pos_online_payment_self_order

Since 605943b5ea, the pay button is not always displayed in the self-order UI after clicking on the "Order" button.

The issue is due to the selected_attributes value received from the server, that can be "false", while the JS code of self-order UI is designed with "{}" as the empty/null value.
When the local order of the self-order UI is updated with the data from the server, the false value was saved instead of the {}, resulting in the line being considered as "modified" according to the isChange method which uses JSON.stringify for comparing changes.

The fix consists in correctly updating the local order selected_attributes value when receiving data from the server.
This commits adds some tests for the pay after meal self-order mode, to check that the pay button is visible.

closes odoo/odoo#133913

Task-id: 3489173
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2023-09-14 15:50:17 +00:00
Maximilien (malb) 49d6bdb675 [IMP] hr_expense: expense report
This pr aim to improve the pdf of the expense report. we have changed the design
 of the header of the report, the table and also added an annex with the
 different attachments.

 For the attachments, when it's a pdf it's simply merge to the actual pdf but
 when it's an image we use a new template to display the name of the expense
 link to that image.

closes odoo/odoo#133611

Task: 3443413
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-09-14 15:50:16 +00:00
Antoine Boonen d415d252ad [IMP] account: Add quick search on an amount in the journal items.
Problem
---------
User want to search on journal items based on the amount. This is doable
through custom searches but that is not user-firendly.

Objective
---------
Add a search based on the amount of an journal item (in credit or in
debit) to make it more user-friendly.

*Secondary objective*: Add a similar search for journal entry amounts.

Solution
---------
Declare a computed field for journal entries that the search will be
based on and add this field in the search view of the journal items.

*Secondary solution*: Add amount_total in the search view of the journal
entries.

task-3439520

closes odoo/odoo#129990

Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-09-14 15:50:15 +00:00
vlst 3a2371333a [IMP] point_of_sale: improve loading of customer display image
The customer display loads very slowly in the RemoteDisplay mode.
This is in big part because of the large size of the bg image.
This image is loaded on every single update of the customer display.

This PR makes it so the bg image is loaded directly from the server,
in order for it to be cached on the customer display, thus improving
considerately the response time.

closes odoo/odoo#124998

Signed-off-by: Robin Heinz (rhe) <rhe@odoo.com>
2023-09-14 15:50:14 +00:00
snd a387e9591e [IMP] stock: rework properties button and kanban view
The properties button has been moved to the contextual action menu.
The kanban view now shows partner locations and internal location directly under a view location

task 3444583

closes odoo/odoo#130509

Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2023-09-14 12:42:30 +00:00
Florian Charlier 707cb82117 [IMP] survey, mail: notify on participation completed
Allow users to subscribe to being notified when a new participation is
completed on a survey.
As surveys expecting hundreds of participants will not be followed in
such a way, we will only post these messages if there are any followers
on the survey.
We add a check on any subscriber belonging to group_survey_user
to further limit creating messages of which no one can make use.

A test of this feature is included.

Adding a `_sudo` for good measure while we're here, it does
not change anything.

Minor docstring change in `mail.followers` _get_recipient_data`.

Task-3389133

closes odoo/odoo#128922

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-09-14 12:42:29 +00:00
Alexandre Kühn 7d5442eef1 [FIX] website_livechat:tests: fix chatbot ui tour nightly build fail
Follow-up of https://github.com/odoo/odoo/pull/135378

Commit above fixed a potential issue where guests may eventually have
many livechats, so finding the livechat thread just by
`type: livechat` is not enough. To be more specific, it relies on
livechat session stored in cookie.

However, when there's no livechat session, there's no id stored in
cookie. The livechat thread uses a `TEMPORARY_ID`. Fix above forgot
to handle this part, thus the getter was failing when there's no
persistent livechat session.

closes odoo/odoo#135442

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-09-14 11:22:58 +00:00
Pedram (PEBR) ced656be06 [FIX] point_of_sale: fix weighing scale
Before this commit, the weighing scale was not working properly. This
was caused by commit 60f41b1f83, which modified the getAddProductOptions
function to return both the quantity and weight, instead of just the
quantity.

The "weight" value returned was not handled in the subsequent
"add_product" call stack, causing the weighing functionality to fail.

This commit fixes the issue by using the quantity value instead of
weight in the relevant code paths. In the point of sale context,
quantity and weight are interchangeable depending on the use case.

This commit fixes the associated tests to check the weight of added
order line.

Related to PR https://github.com/odoo/enterprise/pull/47211

opw-3487707

closes odoo/odoo#135432

X-original-commit: ab88f96de580250d1e8cad7e49833c51bd6749e7
Related: odoo/enterprise#47379
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
2023-09-14 11:22:56 +00:00
Pierre Paridans 49f649b991 [FIX] web: default DateTimePicker has wrong number of column
Following the introduction of the `showWeekNumbers` prop on
DateTimePicker component (see commit 7552284e78),
the number of column (CSS custom property) wasn't properly defined in
the template.

This commit fixes it and adds related asserts in QUnit tests.

closes odoo/odoo#135427

Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2023-09-14 11:22:55 +00:00