Commit Graph
160910 Commits
Author SHA1 Message Date
FrancoisGe 4cd313306b [FIX] web: remove useless checkValidity
In this commit, we will remove unnecessary uses of the checkValidity
function. In the ListRenderer, during a keydown, we do if checkValidity
but it is an async function so the condition is always true.

We have checked the calls and they are probably unnecessary because
the add(...) function will perform a checkValidity.

closes odoo/odoo#120619

Signed-off-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2023-05-09 11:57:17 +02:00
Adrien Widart (awt) 28075c915b [FIX] core: translate SQL constraints
To reproduce the issue:
1. Install `mrp`
2. Send a RPC to create a new BoM:
   - `{"product_tmpl_id": 1, "product_qty": -1}`

Error: It will generate a traceback

Because of the negative product qty, the RPC triggers a SQL constraint
that we try to return. However, the context does not have any `lang`,
hence the traceback

sentry-4088426130

closes odoo/odoo#120614

X-original-commit: badc554b9dd7a299aac8ebca24bec6b90bef779a
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
Signed-off-by: Rémy Voet <ryv@odoo.com>
2023-05-09 11:57:14 +02:00
dasz ac07e4a497 [IMP] survey: send recruitment interview directly
send interview mail directly, instead of putting in the cron queue

closes odoo/odoo#115800

Task: 3216342
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-05-09 11:57:09 +02:00
Jurgen (jugj) 6c65c1de6e [IMP] hr_work_entry : Make status bar of work entries readonly
task - 3293181

closes odoo/odoo#120853

X-original-commit: 4424e9015c76a15d02a1cd0e9d6cb296aa093abe
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-05-09 09:54:02 +02:00
Hubert Van de Walle (huvw) 72646e00e9 [FIX] web: restore orderBy from state when using default order
Steps to reproduce
==================

- Enter debug mode
- Go to "Settings / Technical / User Interface / Views"
- Click on the "View Type" column header
- Click on any record
- Use the breadcrumbs to go back

Issue: the list is not sorted anymore by "View Type"

Cause of the issue
==================

When there is an `orderBy` param passed to `DynamicList`, it takes
precedence over the previous exported state.

We should only use the params.orderBy if it is not the initial one.

Solution
========

In order to know if we are using the initial order by, we need to export
it. With that, we can check if the `params.orderBy` is the initial one.
If it is the same, use the `state.orderBy`
If not, use the `params.orderBy`

opw-3202088

closes odoo/odoo#120839

X-original-commit: 81dba0c1746ba579a01dead8e4712cf83cbaad28
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2023-05-09 07:08:56 +02:00
Hubert Van de Walle (huvw) 7d26f9e4b9 [FIX] web: allow to use the hour:minute on mobile for FloatTimeField
Steps to reproduce
==================

- Use an android phone
- Go to Timesheets
- Click on Add a line
- Click on the Hours Spent input

The keyboard is missing the colon `:` symbol

It is then only possible the enter a time in the float format.

Cause of the issue
==================

The inputmode=decimal attribute prevents a user from entering a `:`
symbol

Note that this doesn't happen on IOS, since the inputmode is ignored for
other reasons.

opw-3278089

closes odoo/odoo#120824

X-original-commit: 8b919ae51d7deb34169b7c6970964056ef2eb632
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2023-05-09 07:08:51 +02:00
Valentin Chevalier 0bcd364def [FIX] sale: check the right partner in the access token
When using a different invoicing address for a partner on a sale order,
an error is thrown up. This is caused by checking the wrong partner in
the access token.

opw-3298228

closes odoo/odoo#120822

X-original-commit: bd76e9d6174d2154f8685dbaa2c8dcf1678ac175
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Valentin Chevalier <vcr@odoo.com>
2023-05-09 07:08:48 +02:00
eLBati 17ceb5790f [CLA] Add email address to eLBati's CLA
closes odoo/odoo#120808

X-original-commit: 94247ed07de7d3a7c8e5b325151e208c8bf499b5
Signed-off-by: William André (wan) <wan@odoo.com>
2023-05-09 06:07:58 +02:00
Kevin Baptiste 58b77d5b8a [FIX] hr: open correct employee view from settings
Clicking on the 'Employee' smartbutton on a res.users form view would
lead to a traceback if the user was not part of HR Officer.

task-3279347

closes odoo/odoo#120804

X-original-commit: b5fc8a4bacdf2964f71f2ad5c7d0c6ac30a4a9b5
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2023-05-09 06:07:53 +02:00
Alexandre Kühn cae9820add [FIX] test_mail: use patched date in activity view test
Before this commit, tests were using current date to make assertion.
It's best to avoid making tests that use current date, as it might
fail when run at specific time (e.g. at midnight or during holidays).

closes odoo/odoo#120800

X-original-commit: 5bcef0f1d6ab48e408bc5058ea90d85f96da8928
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-05-09 06:07:51 +02:00
Andrea Grazioso (agr-odoo) 360b95e8eb [FIX] account: search for deprecated account
Duplicate the default Account Payable (211000)
Set the default Account Payable to Deprecated
Create a Vendor Bill with a line
Save

Error will raise
The account Account Payable (211000) is deprecated.

opw-3199157
opw-3229350

closes odoo/odoo#120799

X-original-commit: 0dc11ed2e4e530ddefe4310fa6bef7001f20ecc1
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2023-05-09 06:07:49 +02:00
LeDungViindoo fe21f63c5f [FIX] mrp: enforce constrains check for cost share of byproducts in MO
Steps to reproduce:

Step 1: Create new MO
Step 2: In page by-products click three dots to show column cost_share
in tree by-products
Step 3: Create new Byproduct and input cost share >100% or <0% or input
two byproducts
        where their cost share adds up to more than 100%

Expected result:
Validation error: total byproduct cost_share cannot exceed 100
or Validation error: cost_share values must be positive

Actual result:
Values saves without issue

Issue is due to `move_byproduct_ids` being removed in the mrp_production
overrides of
`write()` or `create()` and having the `_compute_move_byproduct_ids`
populate its values.
This removal is causing the constrains to not be enforced, therefore we
set the constrains
field to `move_finished_ids` since changing of this value will ensure
that the values are
correctly checked.
Note: There will be a decrease in performance since this means the
constrains will be
called whenever the MO's product to produce is changed, but hopefully it
will be
minimal since there is no simple fix for this issue.

closes odoo/odoo#120797

X-original-commit: 9d6ff93d0f5b39e939f632486a97093b59d335ef
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-05-09 06:07:46 +02:00
roen-odoo 6b014dd0d6 [REV] pos_loyalty: revert gift card specifid point computation
The correct behavior for the gift cards should be that the value of the
gift card is equal to the value of the order line.
For example :
-50$ giftcard -> Apply discount 50% on the order line -> 25$ gift card

If we want to apply a discount on a gift card we need to use the global
discount

The commit we are reverting was forcing the value of the gift card to be
the base value of the order line.

This reverts commit 83ceeecde76a859749d0659d6c387d95155c8425.

OPW-3264945

closes odoo/odoo#120794

X-original-commit: 023e2f2571ab7c814ed3cad45871fc221562fb67
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2023-05-09 06:07:44 +02:00
Rahul Reddiar ed3e064d52 [FIX] mrp: set duration per unit when immediate production
Previously WO duration per unit was not getting updated in WO report, since
there was no code for updating WO duration per unit while triggering immediate
production.

With this commit, WO duration per unit is updated in WO report when immediate
production is triggered.

TaskID - 3251232

closes odoo/odoo#120782

X-original-commit: 1c34d2875741da820212d5d781603fc9b270464a
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-05-09 06:07:41 +02:00
tsm-odoo cba9291370 [FIX] mail: wrong type for thread state
closes odoo/odoo#120781

Signed-off-by: Debondt Didier (did) <did@odoo.com>
2023-05-09 06:07:38 +02:00
Andrea Grazioso (agr-odoo) c2182ae4d0 [FIX] account: payment reconciliation line order
Create 3 invoices for customer (A: $100, B: $300, C: $200)
Have a customer payment of $500
Reconcile the payment, in the widget add the line in the order:
- Payment line
- Invoice A
- Invoice B
- Invoice C (partial payment)
Reconcile
Check invoices

Issue:
C will be fully paid, the partial payment will be applied to B
After 5b2c1d243c0dd5b049ceae280dd270fc8a59f955
We order the lines by amount currency but the user provided order is
lost. Moving the original fix to point of sale

opw-3240586

closes odoo/odoo#120779

X-original-commit: 89f9028901a8b43aab605c12e3c7bcc2a7dd8d44
Related: odoo/enterprise#40805
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2023-05-09 06:07:33 +02:00
tsm-odoo 8f399a270c [FIX] mail: indeterministic discuss test
This PR fixes the `Posting message should transform relevant data to emoji`
test that sometimes failed due to a race condition.

The assertion was too strict, this test just needs to check that the
emoji are properly parsed when posting a message.

Fixes runbot error: 20934.

closes odoo/odoo#120769

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2023-05-09 06:07:30 +02:00
Xavier-Do a61c6de00b [IMP] web: add assets generation time tests
Add a test_logs_assets_check_time test to make stats on the time needed
to validate all asset bundle (will be added to runbot stats)

Add a test_logs_pregenerate_time, mainly to profile this part during
devlopment. This test is -standard and will only run if requested.

closes odoo/odoo#120767

Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2023-05-09 06:07:28 +02:00
Hubert Van de Walle (huvw) 67606c7571 [FIX] web: disable limit for grouped kanban views
Steps to reproduce
==================

- Go to a kanban view with lots of records, for example products
- Remove any filter and group by name

There is only 80 groups, and there is no way to get the next ones

Cause of the issue
==================

The `web_read_group` uses a limit, by default of 80

Solution
========

For kanban grouped views, we don't want to set a limit on the groups

opw-3283004

closes odoo/odoo#120758

X-original-commit: bf772181933ce5334da35c8368455963b2478399
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2023-05-09 06:07:25 +02:00
Didier (did) 25f7da6c0b [IMP] mail: remove discard on external click
Before this PR, when you reply to a message or edit a message, the action would
be cancelled when you click somewhere else than in the composer or emoji picker.
This PR remove this behavior.

closes odoo/odoo#120753

Signed-off-by: Stockbauer Matthieu (tsm) <tsm@odoo.com>
2023-05-09 06:07:23 +02:00
hupo-odoo 8823e01040 [IMP] account: Express VAT in local currency on invoices
Display the totals and taxes on pdf invoices in the company currency when the invoice is in foreign currency. This is a requirement from some countries where local authorities need the VAT to be expressed on the invoice in the national currency even if the invoice has been issued in another currency. The tax groups details are also required. The new information is expressed using a rectangle at the bottom right of an invoice. It includes the same information as the detail of totals and taxes above, with the difference that it is in company currency. If cash rounding is activated, the total rounded must not be displayed in company currency.

task : 3256515

closes odoo/odoo#118234

Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2023-05-09 04:44:28 +02:00
luve-odoo 6525d5fba4 [IMP] website_sale_loyalty: show available coupons to partner
For every loyalty program that needs a code to be activated by customers,
it is interesting to display the available codes directly on the checkout page.
It is then easier for a customer to just click on "claim" and use their promotion,
without having to go back to their mail to retrieve the code.

The loyalty programs concerned are : coupons, gift cards, next order coupons.

task-2957014

closes odoo/odoo#109545

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-05-09 02:49:51 +02:00
Thomas Lefebvre (thle) 2f0b503dc2 [FIX] sale_loyalty_delivery: default sequence if no reward line
The commit: https://github.com/odoo/odoo/commit/58a88b7731ace08ca106f3df47dd455520136248
prevents the deletion of a 'free shipping' line
if it is not the last one in the cart.

The fix: https://github.com/odoo/odoo/commit/7004b17ee5433e3b14561358348b42326f549261
calculates the sequence of the 'free shipping' line
so that it is the last one in the cart.

Issue:
In case we have enough points to get the 'free shipping' reward
without the actual products in the cart,
if we want to delete the product, we raise an error.

Cause:
It is no longer possible to calculate the free shipping sequence
as this is based on the non-reward lines (and we have just deleted this line).

Solution:
We have to add a default value for the sequence
in case the 'free shipping' is the last item in the cart.

opw-3269594

closes odoo/odoo#120749

X-original-commit: 67b3f6dee2e108c32ec561ed32734a147299d8d8
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
2023-05-09 00:41:08 +02:00
Kartik Chavda e4fe9c60a4 [FIX] hr_timesheet: fix company field issue in kanban view
Steps:
- Install timesheet app.
- Go to kanban view.
- Enable timer on kanban view.
- Click on task field.

Issue:
- Traceback.

Cause:
- Company field is used in timer but forgot to add in
kanban view.

Fix:
- Add company field kanban view.

task-3266724

closes odoo/odoo#120747

X-original-commit: 92b0881a3644d0128c3c505810a6b6f6fb648386
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-05-09 00:41:05 +02:00
Thomas Lefebvre (thle)andFeyensv a251b0d15d [FIX] website_sale, website_sale_loyalty: update all total prices
Steps to reproduce:
- install website_sale;
- install a delivery mode (or create it);
- add a cost to it;
- publish the shipping method;
- make the purchase flow and modify the shipping method.

Issue:
The total price is not updated.

Cause:
`querySelector` returns the first element
that matches one or more selectors.
In this case, it is not the one that is expected.

Solution:
Use `querySelectorAll` to update the price
of all items designated by the selector.

Remark:
An other problem appears with the fix of the first problem
when using a gift card to pay (for example).
Indeed, the latter did not appear as we did not update
the prices correctly.

By updating the programs and rewards, the amounts
have been recalculated on the sale order.
It is necessary to transmit this information to the frontend.

opw-3277204

closes odoo/odoo#120744

X-original-commit: 460f90a59218202c1f77405609fadfc2640b2f9c
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
Co-authored-by: Feyensv <vfe@odoo.com>
2023-05-09 00:41:02 +02:00
Lucas Lefèvre 2fde5b47d1 [FIX] spreadsheet_dashboard_sale: display number of quotations
Database: Runbot 16

Exact steps (or video) to reproduce the issue (on runbot):
Dashboard
Sales
Select Last seven days
The figures do not include today
Remove the filter
The Order now shows but the Quotations is at zero. In the Top Quotations and Top Sales Orders sections we can see there is one of each, but the quotation
doesn't show

opw-3251869

closes odoo/odoo#120740

X-original-commit: 6ca41c4266f63ae629307330241aad810bbc950f
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2023-05-09 00:40:59 +02:00
Julien Carion (juca) ffe9e6d9b1 [FIX] mail: Fix activity progress bar filter
This commit simply fixes how the activity renderer propagates the
group.progressValue prop to the ColumnProgress component so that
the active value is only set for the filtered column and not for every
column.

opw-3272571

closes odoo/odoo#120733

X-original-commit: 3bd539913e9ca6f9db9bb55caaa4a85b69a912e0
Signed-off-by: Luca Vitali <luvi@odoo.com>
2023-05-08 23:39:49 +02:00
Khushi Vakil 4382fe77d3 [FIX] mrp_subcontracting: change resupply subcontractor source location
In this commit the resupply subcontractor source location is changed from
virtual production to WH/stock

Task id: 3263796

closes odoo/odoo#120727

X-original-commit: 13f078e4c27767b43740a80bf405e71e91348017
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-05-08 23:39:47 +02:00
Loan (LSE) ad7bdc94c0 [FIX] pos_restaurant: refunded_orderline_id array type instead of int
To reproduce (16.1 and >):

 1. install pos_restaurant
 2. open the bar PoS (NOT a shop)
 3. choose a table
 4. sell a product & make the payment & new order
 5. choose a table (can be the same as before, it does not matter)
 6. refund
 7. select the previous order > refund
 (already a bug, it is not proposed it is empty. But we can force
 its selection by going again in the refund tab. Will create a
 dedicated task for this issue)
 8. go back to the main floor (to force sync the order)
 9. go back to the table with the hanging refund order
 10. try to pay it

=> server error:
```
bad query: INSERT INTO "pos_order_line" (..., "refunded_orderline_id", ...) VALUES (..., ARRAY[1,'Coca-Cola'], ...) RETURNING "id"
ERROR: invalid input syntax for type integer: "Coca-Cola"
LINE 1: ..., ARRAY[1,'Coca-Cola'],...
```

This happens due to this recent fix:
https://github.com/odoo/odoo/pull/116271
Adding this field in the `search_read` yield the product ID and the name
 (ORM default behavior on Many2one fields). As the PoS needs only the ID
  we take it from the tuple.
Note: the fix does target originally version 15, but the forward port
code was changed only on version 16.1 and > creating this issue.

After this commit:
Able to refund order without an errors

opw-3292121

closes odoo/odoo#120722

X-original-commit: a2ad09c0fb50a299afa29e01b457ff1699f6d811
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Sens Loan (lse) <lse@odoo.com>
2023-05-08 23:39:44 +02:00
Hubert Van de Walle (huvw) 071ec7f8c4 [FIX] auth_password_policy: prevent crash when emptying password input
Steps to reproduce
==================

- Go to /web/signup
- In the password field, type something
- Clear the input

Cause of the issue
==================

A bunch of conditions evaluates to NaN inside
`ConcretePolicy.score(password)` when passing en empty string as a
parameter.

Solution
========

An empty password should always have a score of 0 anyway, so we can
do an early return. (The lengthscore would be 0, and we multiply by it
at the end)

opw-3269555

closes odoo/odoo#120711

X-original-commit: 6aa16bb740af14fcebd8f05bdc19c9e8879d77ed
Signed-off-by: Vranckx Florian (flvr) <flvr@odoo.com>
2023-05-08 23:39:42 +02:00
Ahmed Khalaf adc03ed054 [FIX] purchase_mrp: traceback merging 2 step MO
A traceback occurs when merging two MOs when 2 step manufacturing is
enabled.
The issue was introduced in odoo/odoo#106411

closes odoo/odoo#120707

Taskid: 3299549
X-original-commit: 242f0f224d8941bca689e20e37c5bca3bba51afe
Signed-off-by: Tiffany Chang <tic@odoo.com>
2023-05-08 22:40:00 +02:00
Julien Alardot (jual) 8f9ca3e29e [IMP] hr_expense: Split outstanding lines per expense
When an expense sheet move is created, there is only one
outstanding line, but it is usual to pay separately.
That makes the reconciliation step harder.

This makes sure one outstanding line is created per
 invoice_line and then if only one payment is made
 it can go through the same process as a batch payment

Task-3292188

closes odoo/odoo#120450

Related: odoo/upgrade#4625
Signed-off-by: Laurent Smet <las@odoo.com>
2023-05-08 22:39:52 +02:00
FatmaSayed22 6c99d0ec92 [CLA] Fatma
closes odoo/odoo#120265

X-original-commit: a4b1eb9c51b701829428965aa3fbedfc98a2bcf7
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-05-08 22:39:49 +02:00
FrancoisGe dc1191f693 [IMP] web: use customized closing function in dialog
This commit allows a child component of a dialog to change the behaviour
when you want to close that dialog.

To change the behaviour of a dialog, the component must overwrite
env.dialogData.close.

closes odoo/odoo#120520

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2023-05-08 19:21:44 +02:00
Kamlesh Pathekar 2656ad936f [FIX] website_sale: fix the disappearing attribute filter
Steps:
- In eCommerce activate Filter by prices and Attributes & variants filters
- select one attribute with >1 item (e.g. aluminum legs)
- put a price limit.
- the attribute filter is removed.

The commit will prevent the removal of the 'variants attribute filter'
when an attempt is made to apply a price range.

task-3101343

closes odoo/odoo#120692

X-original-commit: a295faafd059b9aa38b759f7ce4ef7f3108464c4
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-05-08 17:10:53 +02:00
Florent de Labarre c5d583ca35 [FIX] website_livechat: prevent DB usage after migration
In V16 visitor are unlinked after 60 days https://github.com/odoo/odoo/blob/16.0/addons/website/models/website_visitor.py#L351 (in V14 it is archived). After a migration a large database should unlink lot of visitor.
Before this commit the time to unlink are very long (some days).
After some hours.

closes odoo/odoo#120666

X-original-commit: e860db01341a3f4447b5c4cd61fe771e3a224ade
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2023-05-08 17:10:50 +02:00
Ayushi Gorai f43eadd28a [FIX] sale: prevent singleton error while creating invoices with sale credit
When the user set some sale credit, while creation of invoice of multiple sale
order which exceed the sale credit of a partner the user will get singleton
error.

steps to produce:-
- Install 'sale'
- Go to 'Setting' and enable the Sale Credit
- Create two sale order with same customer and product which has
  ordered quantities
- 'Conform' both the sale orders
- Select both the sale orders
- Go to actions and click 'Create Invoice'
- Traceback is generated

Applying this commit will fix this issue.

sentry-4109773100

closes odoo/odoo#120600

X-original-commit: 565d1ad4c679d47e391cea7badf60d85ac2aa9ca
Signed-off-by: John Laterre (jol) <jol@odoo.com>
2023-05-08 17:10:45 +02:00
Joseph Caburnay 17882e3262 [REF] point_of_sale: define formatProductQty in the contextual_utils_service
closes odoo/odoo#120317

Related: odoo/enterprise#40608
Signed-off-by: Samuel Degueldre <sad@odoo.com>
2023-05-08 15:18:31 +02:00
Joseph Caburnay 0589e3e734 [REF] point_of_sale,pos_loyalty: replace format_pr with formatFloat
Part-of: odoo/odoo#120317
2023-05-08 15:18:31 +02:00
Joseph Caburnay b77c886320 [REF] point_of_sale: replace round_decimals_currency with roundCurrency
We also introduce in this commit the `compareCurrencies` util function that
compares two monetary values.

Part-of: odoo/odoo#120317
2023-05-08 15:18:31 +02:00
Joseph Caburnay 06166d7b5a [REF] point_of_sale: replace formatFixed with formatCurrency no symbol
Part-of: odoo/odoo#120317
2023-05-08 15:18:30 +02:00
Joseph Caburnay 5d951d91bb [REF] point_of_sale,*: redefine format_currency{_no_symbol} using web's formatMonetary
*: l10n_ae_pos,l10n_fr_pos_cert,l10n_gcc_pos,pos_loyalty,pos_restaurant,
   pos_sale,pos_sale_product_configurator

This commit is the start of a series of changes in the definitions of formatters
and rounders used in pos. We are introducing a new service called
`contextual_utils_service` that loads when the `pos` service is ready making
sure the currency is loaded. In this service, we define `formatCurrency`
(potentially others) which is the replacement to `format_currency{_no_symbol}`.
Also, instead of defining our own formatter, we are depending on web's
`formatMonetary`.

In this commit, we are replacing all uses of `format_currency{_no_symbol}` with
`formatCurrency` that's based on web's `formatMonetary`.

Part-of: odoo/odoo#120317
2023-05-08 15:18:30 +02:00
Maruan Aguerdouh (magm) 02dad87ba6 [FIX] web: documents can download html documents withouth error
Steps to reproduce:

- Install Documents App.
- Inside Documents, upload a html file.
- Download the file.

Issue:

We won't be able to download the file because an error is raised. This
is because we are blocking every document that has a mimetype of
"text/html" as it is the same mimetype as i.e JSON errors.

Solution:

We can get the headers and try to get the filename of the file without
error even if they are not available, so normally the errors won't have
a filename, so we check that the mimetype is "text/html" and that we
have a proper filename for the file.

opw-3231102

closes odoo/odoo#118990

X-original-commit: bb6ae580dbcc6c46ffa8f89f95c372d8fb9e3a07
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Maruan Aguerdouh Mohtar (magm) <magm@odoo.com>
2023-05-08 15:18:23 +02:00
Pierre-Yves Dufays a0a78f807a [IMP] survey: simplify survey form
In order to ease the creation of survey, we simplify the option form in survey
by adding a new field survey_type in survey_survey. Thanks to it, we only
display relevant options in the form depending on the survey type chosen.

We also adapt the "no content helper" which help the user to create his first
survey with an example for each survey type (mostly a renaming).

Technical note: in hr_appraisal, the added survey type is used instead of the
field is_appraisal, which is removed as we don't need it anymore. The value of
the field is_appraisal is used during the upgrade to set the survey type to
appraisal when that field is true.

When changing the survey_type, some fields are updated to guide the users. For
some fields, we also set them in readonly. But in that case, the updated value
is not saved. That's why we have added the force_save="1" attribute for those
field in the form.

Task-3061869

closes odoo/odoo#115297

Related: odoo/enterprise#38268
Related: odoo/upgrade#4464
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
2023-05-08 15:18:10 +02:00
Mathieu Duckerts-AntoineandMichaël Mattiello c1436ba8ca [IMP] *: advanced search
We allow edition/creation of domains with a domain selector via the
search bar facets or the menu "Add Custom Filter".
The domain selector has also been improved and now support expressions
and a new operator "between" for some field types (those for which <=
and >= are valid operators). We also improve the support of the connector
not.

Task ID: 3063564

closes odoo/odoo#112326

Related: odoo/enterprise#37715
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Michaël Mattiello <mcm@odoo.com>
2023-05-08 15:18:03 +02:00
aliya 381da748c3 [IMP] account: add text, bool as possible values for manual expressions
Some reports require editable expressions to accept other inputs than just a float.
This commit adds support for a string or a boolean.
For string input, we need to specify that formula='text', figure_type='string'.
Boolean input: figure_type='bool'.

task-3098957

closes odoo/odoo#110692

Related: odoo/enterprise#36150
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
2023-05-08 15:17:57 +02:00
Yolann Sabaux b9a0109525 [FIX] sale: refund of bill re-invoiced
Steps to reproduce:
- create an expense product, re-invoice: "at cost"
- create a sale order with the product and set an analytic account
- create a purchase order with the expense product and the same analytic account
- create the bill
-> a new line on the SO is created with the same "Quantity Delivered" as the "Quantity Invoiced" for the purchase order
- for the bill, create a Credit Note of x unit
-> the purchase order has the Quantity Invoiced diminished of x

Issue:
- the Sale Order has not taken into account the new quantity after refund
- Since the line is an "analytic" one, the quantity delivered cannot be changed even if we wreate a credit note for the invoice

Solution:
During the processus of creation of new analytic lines, instead of creating new so lines we adapt the analytic line

closes odoo/odoo#120660

X-original-commit: 5258e2ce7d2df915eff02218636aa3272a7d9faf
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Yolann Sabaux (yosa) <yosa@odoo.com>
2023-05-08 11:43:18 +02:00
xO-Tx cc4811ef01 [FIX] web: fix autoMoreMenu with no-hamburger option
On small viewports, and with the "Same as desktop" option enabled on
header, The "autohide menu" adaptation is disabled and overflowing
menu items are visible.

The goal of this commit is to fix this behaviour by keeping the
"autohide" feature enabled on expanded navbar.

task-3261909

closes odoo/odoo#120430

X-original-commit: 4703ae9446a1e36b70aac13e38e8c57de38fb781
Signed-off-by: loco-odoo <loco@odoo.com>
2023-05-08 11:43:15 +02:00
Pratik Awasthi 918a6a524b [FIX] project: fix project tour tip on schedule activity
Steps:
- install project
- run project tour

Issue:
- tip on schedule activity was not visible

Cause:
- position for tip not given

Fix:
- position bottom given

task-3266724

closes odoo/odoo#118575

Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
2023-05-08 10:39:56 +02:00
paso-odoo 7f15ee5965 [FIX] spreadsheet_dashboard: fix external id not found issue in spreadsheet
If applied, this commit will solve the 'external id not found' issue while
the user had deleted the 'Logistics' dashboard and then install or upgrade the
spreadsheet modules.

Steps to produce:
- Open the 'Logistics' dashboard from Spreadsheet > Configuration > Dashboards.
- Delete all 'Spreadsheet' from Logistics.
- Now delete the 'Logistics' dashboard from the action.
- Install or Upgrade modules that are using that dashboard like
spreadsheet_dashboard_stock, spreadsheet_dashboard_purchase, etc.

sentry - 4083977216
see - https://tinyurl.com/2az3tqtv

closes odoo/odoo#120528

X-original-commit: 9b295f5e478fc7b9a888ca07de267f0537fb02ae
Signed-off-by: Lucas Lefèvre (lul) <lul@odoo.com>
Signed-off-by: Parth Solanki (paso) <paso@odoo.com>
2023-05-08 08:04:43 +02:00