Commit Graph
121612 Commits
Author SHA1 Message Date
Fabio Barbero 2d65d022d9 [IMP] website_slides: change confirmation messages for email
Purpose
=======
Clean up messages related to email verification.

Specification
=============
Rephrase messages, add confirmation of email sent and let user change
email.
Do not show "Validation Email sent" if the current user changed their
email address.

PR: https://github.com/odoo/odoo/pull/77617
Task-2647065

closes odoo/odoo#77617

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-10-12 11:44:40 +00:00
Mohammed Shekha c81b46d5e6 [FIX] web: custom filter on selection field shows DB value
before this commit: custom filter on selection field shows database value while
it should display user freidnly value.

after this commit: custom filter on selection field will display UI value of
selection attribute instead of database value.

task-2363112

closes odoo/odoo#78181

X-original-commit: 0f268ba36b302df9f247c746db64987a966c1dec
Signed-off-by: FrancoisGe <fge@odoo.com>
2021-10-11 16:21:52 +00:00
Francois (fge) 6c12a56eed [IMP] web: command Activate debug mode (with assets)
This commit adds a command to activate the debug mode with assets from
another debug mode.

closes odoo/odoo#78159

Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-10-11 13:52:38 +00:00
François (FRC) 377f18013a [FIX] partner_autocomplete, *: fix partner autocomplete dropdown menu hidden
base: The two elements were not distinguishable by an xpath.

partner_autocomplete: Use new ids in xpath

The class `o_text_overflow` set on the fields was also
preventing the dropdown menu from appearing. This class is
now moved to the `input` tag instead of the while `div`.

closes odoo/odoo#78141

Task: 2638570
X-original-commit: fd7bfbccd45f874d5a826e695858bc75c8467700
Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
2021-10-11 13:52:31 +00:00
Mathieu Duckerts-Antoine 85b8a95116 [REF] *: clean some useless %% in xml files
The commit https://github.com/odoo/odoo/commit/1b40e9265f88f57aaaf311bb8fae3d1fd1966d7d
allows to get rid of most escapings %% in xmls but there were still occurences
of useless %% in some of them. We remove them.

closes odoo/odoo#78069

Related: odoo/enterprise#21553
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-10-11 12:34:47 +00:00
Francois (fge) 9802d34a9e [FIX] web: add profiling_qweb_view in the bundle
In commit b4b5e8da3ee361cbdac6d5ebad29e67e24da8e81, we forgot to add
the moved files to the manifest.
We fix that in this commit.

closes odoo/odoo#78066

X-original-commit: 91e0f4a109dfdf6554c1cd2bb5c9d40b3a7fcbbc
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-10-11 12:34:42 +00:00
Jacky (trj) 2fbc5cce75 [FIX]: point_of_sale: load products in the background
The limited products loading and the loading in the background did not follow the rule's order because the right method was never called. Also, the SQL query has been corrected to properly follow the rule of the loading order.

closes odoo/odoo#78142

X-original-commit: 8989811e5d61dac56d8c2b5433afa513eac88fb2
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-10-11 11:27:42 +00:00
kir-odoo d4fb97e655 [IMP] account: align the label of fields narration in both
Purpose of the task is to:
1) Label becomes "Notes" rather than "Terms & Conditions".
2) Fields reorganization from left to right.

So in this commit, Updated Label "Terms & Conditions" to "Notes", Fields
reorganization from left to right in 'account.bank.statement' and
'accont.bank.statement.line' model and make group_by bank statement.

Links
Task - 2613132

closes odoo/odoo#77454

X-original-commit: ce4234c98a701c0071228827187471db167a3bdb
Related: odoo/enterprise#21287
Signed-off-by: Florian Gilbert <FlorianGilbert@users.noreply.github.com>
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-10-11 11:27:37 +00:00
Lucas Perais (lpe) 5db9518ee9 [FIX] web: control_panel view switcher wrap
Before this commit, when the view switcher contained too many elements
(e.g.: CRM), in desktop mode but with a relatively small screen size
(i.e.: width ~< 1300px), the buttons of the view switcher went outside of the screen.

After this commit, the whole view switcher block is rejected on a new line.

closes odoo/odoo#78135

X-original-commit: dabc7b903340922557645c69df5858ca3360cc59
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-10-11 10:16:08 +00:00
Benjamin Vray b2325c1b7e [FIX] website_payment: use span instead of button for donation snippet
This commit replaces the <button> elements used in the custom button of
the donation snippet by <span> elements because putting inputs inside
buttons is not valid HTML.

task-2637492

closes odoo/odoo#78089

X-original-commit: 38447f80f462ebf9d0877b5e170bb5dc1bf13725
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-11 10:15:57 +00:00
Benjamin Vray fe1c1f35f7 [FIX] website_payment: update input minimum value in donation snippet
Before this commit, the minimum value of the custom button was not
updated when removing descriptions.

task-2637492

X-original-commit: 60266bf72abeac5689c8ae1cbc8d61d57a966fb0
Part-of: odoo/odoo#78089
2021-10-11 10:15:57 +00:00
Benjamin Vray 8196bb0359 [FIX] website_payment: fix visibility of the donation snippet options
In the donation snippet, do not allow user to select the option
"slider" if "display options" is disable because the slider is not
used on the pay/donation page.

task-2637492

X-original-commit: e5bc1dcd2dfdecc20d9e13f109ca206343b43069
Part-of: odoo/odoo#78089
2021-10-11 10:15:57 +00:00
wan 9b0baa3aa4 [FIX] *: product back2basics post-freeze fixes
This should have been a fixup of 37eb0dfbb54db1c062276cd8c172bf8dac9e557b but we needed
to freeze 🤷‍♂️

closes odoo/odoo#77344

closes odoo/odoo#77876

Related: odoo/enterprise#21425
Related: odoo/enterprise#21467
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2021-10-11 10:15:49 +00:00
Laurent Smet e4926a24da [FW][IMP] account: partner_id not required in payment form view
Create a payment without a partner for a receipt
Go to the form view
Click on the stats button.
=> Error, 'partner_id' is required

In some cases, having the partner not required on the view is needed.

closes odoo/odoo#78124

Task: 2610780
Forward-port-of: https://github.com/odoo/odoo/pull/77727
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-10-11 09:02:37 +00:00
Romain DerieandAdrien Widart e5a77f2cc1 [FIX] website_sale_stock: use correct qty to show warning/error
Without this commit, if you had:
- 3 Qty for product P in WH1
- 10 Qty for product P in WH2
- no warehouse set on website
- set show stock and prevent sales if not enough stock enabled

And then:
- Add 3 P in your cart
- In cart, add more P, it would let you do it, while it shouldn't

You would then be stuck on payment step as it would tell you only 3 are
available.

This commit improves 6b05fb2b21a3 by ensuring the warehouse_id used is the
correct one (the one that will be used on the SO (required field)).
That commit was fixing a case that was not supposed to happen[1], it is that
case that should have been fixed (which is fixed by previous commit of this PR)

[1]: it would fix the 'issue' when you add a product which has no stock
     available for the warehouse that will be used when creating the SO, by
     letting you through the warning, but you would then be stuck on the
     payment step as the qty check would be correctly done.
     The fix should have been to display the correct qty and prevent the add to
     cart in that case.

closes odoo/odoo#78045

X-original-commit: 5f74b84f67222147b2eb7caadb2d831a059aae4e
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
Co-authored-by: Romain Derie <rde@odoo.com>
Co-authored-by: Adrien Widart <awt@odoo.com>
2021-10-11 09:02:32 +00:00
Romain DerieandAdrien Widart 4680f66586 [FIX] website_sale_stock: always select a warehouse
In multi-warehouses, the available quantities shown on product page is not the
same one used to compute the max quantity that can be bought in the checkout.

Indeed, a sale order has a required `warehouse_id` field, and the quantity that
can be bought is computed based on that warehouse.
But if the website has no warehouse set to it (in settings), the shown quantity
on product page will be computed based on all available warehouses.

It will then show an error on payment step, if the user has selected more
quantities than there is available on the warehouse used for his order.

Considering the structure of `sale.order`, displaying the quantities in
several warehouses does not make sense.

To reproduce the issue:
1. In Settings:
    - Enable 'Multi-Warehouses'
    - Make sure the option Website > Inventory > Warehouse in undefined
2. Create a second warehouse WH02
3. Update the quantity of "Storage Box":
    - 18 in first WH (should already be present)
    - 12 in WH02
4. Edit "Storage Box":
    - eCommerce > Availability: "Show inventory on website and prevent
sales if not enough stock"
5. On the eShop, go on "Storage Box"
    - Note that there are 30 units available
6. Add 22 "Storage Box" to the cart
7. Process checkout

Error: When trying to pay, a Server Error is raised: "We are not able to
redirect you to the payment form. You ask for 22.0 products but only
18.0 is available." This is confusing since the available quantity on
the product page is 30

opw-2630804

X-original-commit: ee2d1c31bb0f6ee7c52b84b6c9ee5ca2d8e70e03
Part-of: odoo/odoo#78045
Co-authored-by: Adrien Widart <awt@odoo.com>
Co-authored-by: Romain Derie <rde@odoo.com>
2021-10-11 09:02:32 +00:00
baa b6896dae77 [IMP] l10n_sa: adding COA + Tax reports + Tax grids + Closing entry for Saudi Arabia
Adding Chart of accounts, taxes and some translation for Saudi arabia accounting

closes odoo/odoo#77960

X-original-commit: db667f486083ae7a934fd18f9023cdc2bbfb0de0
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-10-11 09:02:25 +00:00
Florian Damhaut b10eb19327 [FIX] hr_expense: Expense is refused when account move is cancelled
Description of the issue/feature this PR addresses:

When an expense was accepted and then the account move related to the expense was reset to draft/cancelled, the expense's state stayed as payed.

Current behavior before PR:
The expense's state stayed as payed.

Desired behavior after PR is merged:

Change the expense's state to refused with the reason 'Payment Cancelled'.

opw-2559225

closes odoo/odoo#77729

X-original-commit: cfe95a0e3781a23be73541cdae4393b8507cf9c1
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2021-10-11 09:02:14 +00:00
Audric Onockx (auon) c8a4e51b3d [FIX] lunch: Fixed e-mail sent at wrong time
Steps:
- Set a supplier's 'Timezone' at a different timezone from utc.
- Set 'Send Order By: Email' and set any 'Order Time'.

Result:
  E-mail will be sent at wrong time.

Explanation:
  According to pytz, using tzinfo arg in the standard datetime constructor "does not work" in combination with pytz. Yet lunch_supplier.float_to_time() calls time.replace() which calls this constructor.

Solution:
  Don't allow lunch_supplier.float_to_time() to modify tzinfo and use pytz.localize() in _auto_email_send() to specify the right tzinfo.

opw-2541132

closes odoo/odoo#78091

X-original-commit: 6b92fd80c4fc3471a4419369f0c6843fe18bad51
Signed-off-by: Audric Onockx <auon-odoo@users.noreply.github.com>
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-10-11 06:40:42 +00:00
Goffin Simon bddb892817 [FIX] account: es_BO missing translations
es_BO is not available in Transifex and some translations are different from es.

opw:2571715

closes odoo/odoo#77978

X-original-commit: 2f33bb580c5445b0fd77bd0ed8c55d5d4b298ff9
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-10-11 05:35:57 +00:00
Florent de Labarre a6eb536430 [IMP] stock: add index on the serial name
In large database with unique serial number. The index add performance.

closes odoo/odoo#78087

X-original-commit: ccefa18bb2873412e6b0ac9e0f5e61ac82ccc51e
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-10-08 17:16:15 +00:00
Touati Djamel (otd)andfmdl 0832b02f76 [FIX] mrp_account: correct KIT cost even if bom line in different UOM
Steps to reproduce the bug:
- Create a Product A with Costing Method = FIFO
- Create a Product B with Costing Method = FIFO and cost of 10
- Create a BOM of product A > type = Kit
- Add product B in bom line, with qty = 1 and UoM = dozen
- Add product A in `sale.order`
- Confirm order

Problem:
The cost is 10 rather than 120 (10 * 12 = 120)

Solution:
The kit cost must be the total cost of the components multiplied by their unit of measure

opw-2631487

closes odoo/odoo#78086

X-original-commit: 6c48262c8656821aa51669bd77cdf0f35634512f
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
Co-authored-by: fmdl <florent.mirieu@gmail.com>
2021-10-08 17:16:10 +00:00
Rémy Voet (ryv) f054af31b0 [REM] stock: remove deadcode
- Remove unused method get_theoretical_quantity
- Remove unused args of _get_domain_locations_new and simplify it

closes odoo/odoo#78078

Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-10-08 16:09:49 +00:00
Swapnesh Shah 96720339d5 [FIX] account: disable group create from AML Kanban
This commit removes `Add a column` from Grouped
Kanban view of Journal Items.

Creating new Records from `Add a column` should not be supported
from Journal Items and also it is not working for Journal/Account
as required fields are not set. (and also gives Traceback)

closes odoo/odoo#78074

X-original-commit: 21fe5c65fd3170ebfa01ea9a6b530d158f6c0c8e
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2021-10-08 16:09:41 +00:00
clesgow c15cc0c215 [FIX] sale_stock: reservation not updating in picking when increasing SO
When increasing the quantity of a validated Sale Order, the reserved
quantity in the related pickings aren't updated to match the new
quantity set in the Sale Order. It requires to either let the scheduler
run or clicking the 'Check Availability' button to update the reserved
quantity in those pickings.

If the reservation_method for this picking_type is set to 'at_confirm',
this is not the intended behavior as this picking is already confirmed,
so it should be updated without user input.

The reason is that when the new moves (which adds to the quantity) is
merged to the old one, its status is changed to 'partially_available'
because at that moment, the product_qty is bigger than the
reserved_quantity, which needs to be updated to match the new needs.

closes odoo/odoo#76752

closes odoo/odoo#78070

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-10-08 16:09:37 +00:00
clesgow a315ed4268 [IMP] mrp,{purchase_,sale_}stock,stock: decrease qty cascade on MTO
Allow the quantity decrease of Sale Order line of a MTO product.
When increasing de quantities, the related pickings, RFQ / PO are
increased as well, but it wasn't the case if decreasing the quantity.

It should allow the cascade of the decrease in the related pickings as
it would work for the increase. Also modifies a related Purchase Order
if it wasn't yet validated (and thus still a RFQ).

merge_moves was modified so it would allow the merge of negative moves
with positive ones, while trying to "deplete" as much quantity as
possible for each mergeable move.

But negative moves don't always have all required properties to be
compared to the positive ones (some keys might be missing, such as
'created_production_id'). That means we will merge strictly the positive
moves at first as it was done before. But then we try to merge them "less
strictly", using less keys to compare.

Let's say we have those moves (and all other relevant keys matches) :
- move_1 : {qty : 5, created_production_id: 1}
- move_2 : {qty : 3, created_production_id: 2}
- move_3 : {qty : -6, created_production_id: False}

move_1 and move_2 cannot be merged as they don't share the same
created_production_id. But to merge move_3, we'll need to merge it into
move_1 and move_2. It will then deplete move_1 and decrease move_2.
Which will leave us with :
- move_1 : {qty : 0, created_production_id: 1}
- move_2 : {qty : 2, created_production_id: 2}
move_3 will be unliked as its purpose is done.

Task-2513592

Part-of: odoo/odoo#78070
2021-10-08 16:09:37 +00:00
Romain Derie 3b0ac62a75 [IMP] website: add missing depends on is_mega_menu compute
closes odoo/odoo#78065

X-original-commit: 278a6e6c68675ad1ae820ef0a5e38407d5594e8f
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2021-10-08 16:09:27 +00:00
Romain Derie 1490557016 [FIX] http_routing: hide the traceback by default on error 500 page
Before this commit, the error 500 page would always shows the full traceback
even if it is supposed to only show it in debug mode (or if editable).

That behavior was probably broken by the debug refactoring [1], which
introduced side effect with [2] (see template `http_error` which was moved with
[3]).

[1]: https://github.com/odoo/odoo/commit/d7cd97a9be63ae0a8643400b56d6f9a03285fba6
[2]: https://github.com/odoo/odoo/commit/24a20cd3fb00657da44d10a7a7d89cf94bdbdd83
[3]: https://github.com/odoo/odoo/commit/423402f1e50000186924186beba0cbe87e02e774

X-original-commit: 0d4e3001de81cc04cc6cc805edd75de19ce0255d
Part-of: odoo/odoo#78065
2021-10-08 16:09:27 +00:00
Thanh Dodeur 08a60701ac [FIX] mail: remove behaviours dependent on connectionState
Before this commit, there were some usages of
RTCPeerConnection.connectionState which is not available on some
browsers, including Firefox.

This commit fixes this issue and make it so that we only use
RTCPeerConnection.iceConnectionState instead.

closes odoo/odoo#78064

X-original-commit: 297442f72e23bc1a03ea857699fcae20b5cd0bbc
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-10-08 16:09:21 +00:00
yograj tandel 07670d41a8 [FIX] hr_timesheet: fix traceback after unistalling timesheet
Currently when unistall the hr_timesheet and try to open the project
menu it generates an traceback due to invalid field in domain of the
action.

so in this commit fix the traceback by adding the unistallation hook
so domain will be replaced on unistallation of the hr_timesheet.
also archive the internal project when unistalling the hr_timesheet.

Task-2629395

closes odoo/odoo#78063

X-original-commit: 8fe71cd7ff412a01b6f7dbaf569f7b85fbffd631
Related: odoo/enterprise#21551
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-10-08 16:09:14 +00:00
Mohammed Shekha 159e58286e [FIX] web: render buttons after list selection box
With this commit we display list selection box after all list header buttons,
previously buttons were displayed before header buttons.

task-2628038

closes odoo/odoo#78057

X-original-commit: 09c5e178c61feb69d6fd27e4bb9df979fa480f41
Signed-off-by: FrancoisGe <fge@odoo.com>
2021-10-08 16:09:10 +00:00
std-odoo 2c198020f5 [FIX] crm: fix the rule based assignment
Bug
===
Since fe8c5b9b01 , if you have a team
with set to `assignment_max` and you try to automatically assign the
leads an error is raised.

Technical: in `_allocate_leads` we skip a team if `assignment_max` is
Falsy. So when we prepare the values for the notifications, the key
might not be present in the dict an error is raised.

Task-2658696

closes odoo/odoo#78054

X-original-commit: 7c46b441266ff0336bf86d10ac2ee45d2a2c2959
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-10-08 16:09:06 +00:00
Louis Wicket (wil) 0b34db239c [IMP] mail: clean up of the guest rename code
Minor changes:
- properly discard the rename when exiting an empty input
- uniformize case: TopBar -> Topbar
- update documentation
- move avatarUrl from component to model

closes odoo/odoo#78029

X-original-commit: 8d6199ac64472505ef378b94a84dc1045916557a
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-10-08 16:09:01 +00:00
Thanh Dodeur c24f476538 [FIX] mail: prevent the server from sending outdated session state
Before this commit, the server could return outdated information to the
client about the state of their own rtc session.

The server should not return information about the client's own rtc
session as the source of truth is the client-side state.

A case in which this was causing an issue was when a user toggled their
mute state right before their client pinged the server and received
outdated session information before their most recent state could be
sent to the server.

This commit fixes this issue.

closes odoo/odoo#78028

X-original-commit: fe991edd2bca98b58fc5a49494871475c79bc22f
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-10-08 16:08:57 +00:00
Tom De Caluwé 6b89bf62be [IMP] website: finish a text edit step in a tour when clicked
The idea of a text edit step is considered clearly communicated to the
end user from the moment the trigger is clicked ( as opposed to the
step waiting for actual input from the end user). This way an end user
can finish the tour faster without actually having prepared custom text
content yet.

task-2580338

closes odoo/odoo#77720

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2021-10-08 16:08:48 +00:00
Joseph Caburnay 7eb742f6b8 [FIX] point_of_sale: post diff on bank payment methods when closing the session
1. When the diff amount is for "combine" bank payment method, the
account.move record used to represent the combine amount is modified
to contain the diff amount. The journal entry is modified:

FROM:
```
                Debit                           Credit
Outstanding     combine_amount
Receivable                                      combine_amount
```

TO:
```
		Debit				Credit
Outstanding 	combine_amount - diff_amount
Receivable					combine_amount
Diff account	diff_amount
```

2. When the diff amount is for "split" bank payment method, an
account.move moving the diff amount from Outstanding to Diff account
is created. The journal entry is like:

```
                Debit                           Credit
Outstanding     diff_amount
Diff account    				diff_amount
```

closes odoo/odoo#77859

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-10-08 11:46:44 +00:00
Jacky (trj) e98ddc8ce6 [FIX] point_of_sale: expose diff fields for bank payment methods in the closing popup
There are two changes in this commit:
1. Show input fields for bank payment methods.
2. Move the logic that checks allowed diff amount from backend
to pos ui.

Part-of: odoo/odoo#77859
2021-10-08 11:46:44 +00:00
Mohammed Shekha de765111cc [FIX] web: increase pager hitbox area
Since wowl framework is merged pager hitbox area is reduced and harder
to hit, with this commit we increase pager hitbox area.

task-2610578

closes odoo/odoo#78006

X-original-commit: ff788c20e9582adfb387d7111218a26b29519a70
Signed-off-by: FrancoisGe <fge@odoo.com>
2021-10-08 10:38:04 +00:00
Samuel Degueldre cd4fc7786e [FIX] mail: fix crash when clicking a reply that is not yet loaded
closes odoo/odoo#78030

X-original-commit: 913c33c3938600353b2f607dd4142e86592890ce
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Samuel Degueldre <sdegueldre@users.noreply.github.com>
2021-10-08 07:20:06 +00:00
Nathan Marotte (nama) 07adca3c69 [FW][FIX] event : Changing seats_max could desync seates_reserved
Issue: Sometimes, when changing the Maximum (seats_max) on one of
the tickets of an event, it triggered a recompute for the other tickets

Steps to reproduce :

Install Events
Settings > Event > Enable "Tickets"
Create an event template (or use Sell Online default one) with
Check "Ticketing" and set the line price to 0
Create an event :
with that template
and Autoconfirm checked
Add a line for the Tickets:
name: VIP
price: 10
Save the event

Create two attendees for the event, one for each
Event Ticket (event_ticket_id) and confirm them (on the form, not
Confirm Attendee)

Change the Maximum (seats_max) of one ticket and save
-> the Confirmed (seats_reserved) will be recomputed but the
confirmed for the other ticket will increase as well

Side-Note:
I haven't been able to find a deterministic way to reproduce the bug
but it seems that the bug appear the most when doing all the steps at
once, and trying to not log out or refresh the page.
Also it works best on a runbot or at least with runbot data.

Without my modification, the new test passes on my local odoo server,
but fails on a dump of a runbot on my computer, adding my modification
makes it work on either case

Why is that a bug:
The recomputation seems to fail for some reason, we are setting all
the event/ticket in self to 0, but only update the value of those by
fetching a SQL query so there might be a desync there

opw-2642555

closes odoo/odoo#78023

Forward-port-of: #76492
X-original-commit: f4c936c9dc141de27a77006fb87dd2b63d88ec97
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Nathan Marotte <nmarotte@users.noreply.github.com>
2021-10-08 07:20:01 +00:00
Brieuc-brd b20aeb3a4f [FIX] web_editor: fix visual issues in bg shapes
This commit fixes visual issues (pixel gap between shapes and bugs in
colors) in some background shapes.

task-2547435

closes odoo/odoo#78013

X-original-commit: 861dba13657f1ca41c40304abd212c521a6615de
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-10-08 07:19:58 +00:00
Mohammed Shekha 49b35e85ca [FIX] web: do not clearUncommittedChanges for function actions
Before this commit: In res.config.settings form view when user change something
in form and click on button in form then it will display to save the unsaved
changes, when we click 'Save' button from dialog still dialog remain there
it is not closed(while record is saved in background, just dialog is not closed)

This is because we called 'clearUncommittedChanges' method before executing
client action, 'Save' button on dialog returns client action for reload page
but as we calling 'clearUncommittedChanges' so it will call 'canBeDiscarded'
method of 'BaseSettingController' which again show dialog for unsaved changes.

After this commit: unsaved changes dialog is closed on clicking 'Save' button
from dialog, we called 'clearUncommittedChanges' method only if clientAction is
instance of Component, i.e. if client action is type of function which is our
case, reload is client action which type of function so in that case we do not
need to call 'clearUncommittedChanges'.

task-2662302

closes odoo/odoo#78035

X-original-commit: 5d8376a8f9a8957112afb35854bdb8b050bd6903
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-10-08 06:09:41 +00:00
Simon Genin (ges) c0e354eeec [FIX] web: company_menu always shown by default (in community)
Before: the company menu would disapear when the screen was smaller than
some threshold. It is expected in enterprise, but not in community as
it doesn't have the burger menu.

After: The menu is set to always be displayed. To remove it becomes
an enterprise reponsability.

closes odoo/odoo#78034

X-original-commit: 039e24eabf258da6bfad45a839c51116f6d86e0c
Related: odoo/enterprise#21535
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2021-10-07 22:44:59 +00:00
Simon Genin (ges) 2dce16e81e [FIX] web: user menu always shown by default (in community)
Before: the user menu would disapear when the screen was smaller than
some threshold. It is expected in enterprise, but not in community as
it doesn't have the burger menu.

After: The menu is set to always be displayed. To remove it becomes
an enterprise reponsability.

closes odoo/odoo#78033

X-original-commit: 3b18f1cf8cfdbc497c8acba67970e835dabc2eb2
Related: odoo/enterprise#21534
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2021-10-07 22:44:54 +00:00
Aaron Bohy 4009d98288 [FIX] web: set "data-tooltip" as translatable attr in owl
With this, tooltips specified with the "data-tooltip" attribute in
owl templates will be translated.

closes odoo/odoo#78031

X-original-commit: 238f275e6d7e536764b7dbc3e7573dbc082804a9
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-10-07 20:16:47 +00:00
dht-odoo 10490139f1 [IMP] {mass_mailing}_sms: allow internal users to access UTM campaigns
Before this commit:
- UTM campaigns are accessible for all internal users, but with email
  marketing related modules installed, if user who does not have rights
  for email marketing tries to access the campaign, an AccessError is
  raised. It's because few fields related to email marketing are added
  in model `utm.campaign` which are accesible only to the marketing
  users.
- When the user is having `mass_mailing.group_mass_mailing_campaign`
  group enabled but no rights for email marketing, the root menu of
  for the 'Email Marketing' app is visible to that user, which is
  not correct.

With this commit:
- While adding marketing related fields to the campaign, we provide the
  group("mass_mailing.group_mass_mailing_user") at field level whenever
  neccessary so it doesn't raise AcessError. Also, we show those fields
  on the campaign views only when `mass_mailing.group_mass_mailing_campaign`
  group is enabled for the user. To do this, a compute field has been
  introduced to make sure that user has rights to access email marketing
  as well as the feature to manage mass mailing from campaigns is enabled.
  The reason behind introducing a new compute field is, at view level,
  it is not possible to check that user is having multiple groups.
- We've applied the group "mass_mailing.group_mass_mailing_user" on the
  root menu of Email Marketing app, so if the user has UI only group
  "mass_mailing.group_mass_mailing_campaign" and but no rights for
  email marketing, the root menu won't won't appear.

TaskID-2417993

closes odoo/odoo#74113

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-10-07 19:07:04 +00:00
Louis Wicket (wil) 1a1c4e3547 [IMP] mail: keep url params in discuss public view
This commit will change the way URLs are edited in discuss public view
to preserve URL params in the resulting URL.

Context:
In order to avoid leaking invitation links, URLs are modified in discuss
public view, but this can sometimes hide precious information such as
the debug mode from the URL.

closes odoo/odoo#78019

X-original-commit: 0a3b31c615bb319b4e0d9304e034df3520e8f33c
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-10-07 18:00:00 +00:00
Victor Feyens ab022ec12d [FIX] *: target v15.0 documentation with doc links
X-original-commit: acc95ec204baa1dddbe292c379a1768fe1deccbf
Part-of: odoo/odoo#77923
2021-10-07 17:59:52 +00:00
Paolo (pgi) ce8156d00d [IMP] account_edi_proxy_client: Making the EDI Iap server configurable
There is a test_mode to allow experimentation on the IAP server.
To be able to switch between the two, we need to make the
SERVER_URL configurable.

closes odoo/odoo#77977

X-original-commit: 11be1b25c60ae27a5e8078802883a1db867a6452
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: Paolo Gatti <lordkrandel@users.noreply.github.com>
2021-10-07 14:17:34 +00:00
Paolo (pgi) 7e05dbbad0 [FIX] account_edi_proxy_client, l10n_it_edi, l10n_it_edi_sdicoop: Fixing Base64 issues
When encoding a string or bytes with base64,
the resulting byte string must be decoded
to get the string back.

* `addons/account_edi_proxy_client/models/account_edi_proxy_user.py`
  AccountEdiProxyUser._register_proxy_user()

* `addons/l10n_it_edi/models/account_invoice.py`
  AccountMove._prepare_fatturapa_export_values()

* `addons/l10n_it_edi_sdicoop/models/account_edi_format.py`
  AccountEdiFormat._l10n_it_post_invoices_step_1()

X-original-commit: 3a705d93543e910b6af4b3b4aa53c523f367782a
Part-of: odoo/odoo#77977
2021-10-07 14:17:33 +00:00