Commit Graph
147102 Commits
Author SHA1 Message Date
Sébastien Theys 71076550de [IMP] mail: add systray item containers
To simplify messaging components in the future, they all need to have a similar
shape. It is done for messaging menu and activity notice in this commit, which
requires to move the waiting on "messaging becoming created" to a parent
non-messaging component.

closes odoo/odoo#80482

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-13 13:17:46 +00:00
Aaron Bohy f3e71d01ee [REF] web: rework env.config
The motivation of this commit comes from breadcrumbs.

Breadcrumbs work as follows: for each controller in the stack of
the ActionService, there is an entry in the breadcrumbs. Except
for the last entry (which corresponds to the currently displayed
controller), the value to display is computed by the ActionService
and stored in this.env.config.breadcrumbs. For the last entry,
we use the displayName set in this.env.config.

When a view wants to update its displayName (e.g. the form view
when we switch to another record), it updates the displayName in
the config, which thus correctly updates the breadcrumbs. However,
this doesn't change the internal values in the ActionService, so if
another controller is stacked over the current one, the penultimate
entry is wrong. To update the internal state of the ActionService,
the event 'controller-title-updated' must be triggered as well,
which is cumbersome. Note that we don't really face the issue yet
because among already converted views, none of them need to update
its displayName in the breadcrumbs.

This commit aims at uniformizing the way the (n-1) first entries
and the last one behave, by making the "breadcrumbs" key encode
all breadcrumbs entries (the n-1 first ones, and the last, current
one). We also replace the "displayName" key by "getDisplayName"
such that it uses a single source of truth, located in the
ActionService, and we provide a function "setDisplayName" to update
it. Finally, this commit introduces the notion of "default config"
which ensures that standalone views, or views in tests, have a
valid config with expected keys.

closes odoo/odoo#81031

Related: odoo/enterprise#22799
Signed-off-by: Géry Debongnie <ged@odoo.com>
2021-12-13 12:24:50 +00:00
Aaron Bohy 2cdd30d61a [FIX] web: breadcrumbs of stacked, legacy client actions
Let's suppose a legacy client action that can be opened from
another action, s.t. it is stacked on it. Before this commit,
the breadcrumbs was incorrect in that client action, as it only
displayed the part of the client action itself, but not the
history. This commit fixes the issue.

Part-of: odoo/odoo#81031
2021-12-13 12:24:49 +00:00
Aaron Bohy 3fa70eed13 [FIX] web: correctly set window title in wowl views
The name of the action is supposed to be displayed in the second
part of the window title (e.g. "Odoo - Partners"). Before this
commit, this wasn't the case for views that were converted to
wowl (only legacy views correctly updated the window title).

Part-of: odoo/odoo#81031
2021-12-13 12:24:49 +00:00
Joseph Caburnay d5390deba9 [FIX] l10n_fr_pos_cert: should only prevent on explicit order deletion
It's not allowed to delete order for french certification which was
supposed to be fixed here: 46ffe6d3fba3baf1d84af732feaac71dabaaf35f
However, it introduced another problem of not being able to delete
the finalized/validated orders. It's because the check of preventing
the deletion, we are not discriminating the validated order. This
commit fixes the issue by only applying the rule on orders that are
being explicitly deleted (reason of deletion is "abandon").

closes odoo/odoo#81289

Ticket-id: 2710892
X-original-commit: d477be7cd5f7820ea6925dcfb42a26e67977b052
Signed-off-by: Masereel Pierre <pim@odoo.com>
2021-12-13 11:32:57 +00:00
Sébastien Theys 8d3a421457 [FIX] mail: manually prefetch needed channel partner in channel info
Before this commit, it would fetch all channels partners of all channels, even
for big channels and for members that were not useful to known anything about.

This commit reduces the number of fetched members to a more reasonable level,
and ensure the formatting of those members is done only once, instead of once
per channel.

Time goes from 90ms to 1ms for 1000s of members in 100s of channels.

Part of task-2702450

closes odoo/odoo#81262

X-original-commit: 89419b593ed163a8b174945e80f1c36c9cf78257
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-13 10:40:43 +00:00
std-odoo 84a63205f8 [FIX] base: allow setting default from-filter per database
Purpose
=======
When there are multiple databases on a single server, it is necessary
to be able to set the "from_filter" for the implicit SMTP server
on a per-database basis, to allow 'opt-in' to the automatic wrapping
of email notifications.
When set to e.g. `notifications@example.com`, and a default SMTP
server is defined in the server-wide config or CLI, outgoing emails
will be automatically rewritten to come from this email, unless the
From/Return-Path domains match the `mail.catchall.domain` parameter.

Task-2710632

closes odoo/odoo#81277

X-original-commit: 8b468e1f7a3dfeb2bcfa83bff55c4b5adf6b2212
Signed-off-by: Olivier Dony <odo@odoo.com>
2021-12-13 09:49:12 +00:00
Julien Banken 0040a7b609 [REF] sms,mail: remove no_edit attribute from fields
It turns out that the 'no_edit' attribute of the fields is deprecated
and doesn't do anything (there is no JavaScript or Python code using it).
We will hence remove that attribute from the views to clean them.

task-2686290

closes odoo/odoo#81210

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-12-13 09:49:04 +00:00
Andrea Grazioso (agr-odoo) 93b6033a25 [FIX] l10n_gcc_invoice: correct narration definition
Define "Default Terms & Condition" in settings
Create invoice

No default terms will show

opw-2701811

closes odoo/odoo#81160

X-original-commit: 323534c89963f466ac7c53894fed62691bd2321f
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2021-12-13 08:57:47 +00:00
roen-odoo 017a572143 [FIX] account : Average price fix invoice report
Current behavior:
Invoices report had a wrong average price when invoice had credit note

Steps to reproduce:
Create a db with accounting
Create a customer C and a Product P
Create an Invoice for C for 10 pieces of P
Create a Credit note for C for 1 P
Go to Reporting > Invoice Analysis
Open the pivot view, in the Measures, display the Average Price, the Product quantity and the Untaxed Total
The Total multiplied by the quantity is not equals to the average.

opw-2557420

closes odoo/odoo#81238

X-original-commit: ef26467e288a12571c37d4c133b44f08d99cc702
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2021-12-13 08:09:46 +00:00
Florent de Labarre 9136c564e6 [REM] core: remove unused file and prevent spam
Was used at the beginin of the migration to github with commands such
as "git log --use-mailmap" but now, everybody use a proper email
address.

closes odoo/odoo#80431

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-12-13 07:22:58 +00:00
Eleftherios Kritsotakis 3e9926e78d [FIX] point_of_sale: name is not properly renamed into partner_id
In this commit (f3fe2d50d9),
the field 'name' is renamed into 'partner_id'. However,
this renaming was not applied properly in point_of_sale.
We fix this in the current commit.

closes odoo/odoo#81165

X-original-commit: c5ccccc24ca0a746c30bc2ffba1a7e48229925bb
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
2021-12-13 06:25:46 +00:00
Sébastien Theys 80232c52db [FIX] mail, im_livechat: improve performance of sidebar item counter
Avoid iterating over all channels every time a new channel is added.

Part of task-2702450

closes odoo/odoo#81264

X-original-commit: 7686be710ba919079f6ea97293ac99dde79f843b
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-11 10:54:05 +00:00
Laurent Smet 26a5d7d299 [FIX] account: Fix available_partner_bank_ids in payment & register payment wizard
When paying an expense, we should take the bank accounts from partner instead of the ones set on the company.
Also, the computation of the partner bank account is different on the wizard and the payment.
To unify both models, the 'available_partner_bank_ids' should also be put on account.payment.

see https://github.com/odoo/odoo/pull/79737

closes odoo/odoo#81236

X-original-commit: 89d8c0a1ea03919e9f3085ea0d05aa80ad443ff7
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: Laurent Smet <las@odoo.com>
2021-12-10 16:24:45 +00:00
Laurent Smet ed75307baf [FIX] account_edi: Add missing 'extra_domain' + Fix tests l10n_be_edi
- allow to match a partner having 'BE0477472701' as vat but '477472701' inside the xml.
- code cleanup as suggested in the original PR

Introduced by https://github.com/odoo/odoo/pull/80266

closes odoo/odoo#81237

X-original-commit: 598bfedb540aa81676b957340255aafef85d2823
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: Laurent Smet <las@odoo.com>
2021-12-10 15:28:57 +00:00
Sébastien Theys e80af1ce11 [FIX] mail, im_livechat: improve performance of discuss sidebar item
Avoid iterating over all channels every time a new channel is added.

Part of task-2702450

closes odoo/odoo#81235

X-original-commit: f5958f7ae15acff6a1ab6fc1bdf795b4c1f1e071
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-10 14:33:43 +00:00
Martin Trigaux bf460685fc [FIX] mail_group: display the date of the message
This will avoid spending half hour hunting why an inactive employee
was sendig a spam before realising it was from 2 years ago (true
story)

Modify the tree view to be coherent

closes odoo/odoo#81219

X-original-commit: cb3e34db1b2ce6ffe82ee15cc21ded9bbac91062
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-12-10 12:49:55 +00:00
Leo Tran 4715229fdc [CLA] Viindoo updates Odoo's CLA
closes odoo/odoo#81218

X-original-commit: ad12b85462cdcb1d74cb02d34299ed759c5441ac
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-12-10 12:49:51 +00:00
Sébastien Theys 19996306ec [FIX] mail: move field listener code outside of loop when possible
Some decently costly operations (especially when repeated many times) where done
inside a loop for no reason.

task-2702450

closes odoo/odoo#81187

X-original-commit: c6e4ddf531d29ca1693cc6139b81cea3f5b78fdf
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-10 09:39:46 +00:00
romaric-oci 97e027f9ff [CLA] signature for rpinset-oci
closes odoo/odoo#81191

X-original-commit: 469c947e183944320582e225bf6449d10856636d
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-12-10 08:36:50 +00:00
Raphael Collet 1616d47efa [FIX] core: computed inversed fields partly assigned
This fixes inconsistencies when dealing with fields that are computed
and inversed by the same methods.

Consider two fields F1, F2 with the same compute and inverse methods.
Consider a record where we wrote on a dependency of the common compute
method.  At this point, both fields F1 and F2 are marked to be computed.

Now let us write on F1 only.  Here is what happens:
 - the write discards the computation of F1, but not F2
 - the inverse method of F1 is called:
    - the method accesses F2
       -> this calls the compute method, which assigns both F1 and F2
    - the method accesses F1
       -> the value of F1 has been replaced by the computation above

The issue comes from a combination of factors:
 - the value of F2 must be determined by the computation;
 - the computation assigns both F1 and F2;
 - the computation is done while inversing F1 (and F2).

The solution is to force the computation before actually writing on the
fields and calling their inverse methods.  Note that this is necessary
only when part of the fields computed by a common method are updated.
When all fields computed by a common method are updated, the computation
will automatically be cancelled.

closes odoo/odoo#81172

X-original-commit: fb4d6ee4ba8bcb5cd8030105ac57e9e02850bfc4
Signed-off-by: Raphael Collet <rco@odoo.com>
2021-12-09 20:26:52 +00:00
Hubert Van de Walle (huvw) e2624c719c [FIX] mail: Refresh activities after calling mark as done from an editable form
Steps to follow

  - Go to contacts
  - Schedule an activity
  - Click on edit next to the activity
  - Click on the Mark as done button
  -> The activity isn't refreshed

Cause of the issue

  - The record is deleted when clicking on the mark as done button
  - The fetchAndUpdate is called after the form is closed
  - An exception is thrown
  -> the method exists early

Solution

  Handle odoo.exceptions.MissingError and delete the record client side

opw-2702492

closes odoo/odoo#81182

X-original-commit: c56ae82bffb933090a8df33bc38ab979d5318df7
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-09 19:39:39 +00:00
xO-Tx ce5685500c [FIX] web_editor: fix illustration crop issue
when we crop illustrations using the editor crop tool,
the resulted image will disappear as soon as we save the update.

we have this issue because we cannot get the right svg string using
toDataURL on the new cropped canvas with mimetype = 'image/svg+xml'
(see 'web_editor.image_processing' > 'applyModifications')

To solve this issue we set svg illustrations as uncroppable (for now).

task-2312878

closes odoo/odoo#81179

X-original-commit: fdddac4f9c19515f5631ee7e9a05f9ad798b07a1
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-12-09 18:40:56 +00:00
Sébastien Theys 303cf54a76 [FIX] base: add index for partner on user
Without this index, finding the user(s) of a partner makes a seq scan, which
could take up to 100ms on my machine with only few thousand users. By adding the
index, the time is reduced to around 5ms.

Part of task-2702450

closes odoo/odoo#81176

X-original-commit: 372f1c5ebac4b9b542994ea5aaad59abe7290918
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-09 18:40:52 +00:00
Sébastien Theys 9c7e18030e [FIX] mail: improve performance of channel member_count
Forcing a fetch of all channel partners for all channels is not efficient
because there are too many of them.

Replace by a count done in SQL through `read_group`.

Time goes from 100ms to 3ms for 1000s of members in 100s of channels.

Part of task-2702450

closes odoo/odoo#81175

X-original-commit: 7c77775a84474ccdfe32bdd783291728fbfbdc42
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-09 18:40:49 +00:00
Benjamin Vray 606c96e753 [FIX] website_livechat: fix chat button popover on touchscreen device
Before this commit, on touchscreen device, when we clicked on the
livechat button, the popover remained visible over the chat window.

After this commit, the popover is never displayed on touchscreen devices
to avoid this bug but also because it makes no sense to have a popover
on touchscreen devices in this case.

task-2677132

closes odoo/odoo#81151

X-original-commit: 556168efd20727e044a9825435cdc887821a4f80
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-12-09 18:40:45 +00:00
Benjamin Vray ea650d80b8 [FIX] web: fix scrollbar width compensation when a modal is open
Before this commit, when we calculated the width of the scrollbar
to compensate when a modal is open. We did not take into account the
wrapwrap borders applied with some headers. (e.g. the sidebar header)

task-2677132

X-original-commit: 990d0f6a53047db4238c7d6a15be12e58ed1fe86
Part-of: odoo/odoo#81151
2021-12-09 18:40:45 +00:00
Benjamin Vray 18b0477006 [FIX] website, *: fix elements position in fullscreen or/and edit mode
* = website_livechat

Before this commit, some elements (e.g. sidebar, livechat button) were
not correctly positioned in edit mode or/and full screen mode.

task-2677132

X-original-commit: 42db4d432d39a8db87c66cd682064ab76fd0aa27
Part-of: odoo/odoo#81151
2021-12-09 18:40:45 +00:00
Benjamin Vray 2977ba8c38 [FIX] website: fix the magazine header template
Before this commit, the magazine header template was broken in several
cases. The menu links were not aligned correctly according to the
options chosen and the "off canva" menu was not correctly positioned in
edit mode.

task-2677132

X-original-commit: 8f15f96826c783a99e4021ca2a0b55f01f7a343f
Part-of: odoo/odoo#81151
2021-12-09 18:40:44 +00:00
Andrea Grazioso (agr-odoo) 4719adbd21 [FIX] delivery: sale price for serial products
Have a [TEST] product tracked by serial number
Create a SO with [TEST], quantity N (at least 2)
Add FEDEX int. delivery to the order
Validate and confirm delivery

On the shipping invoice the product is reported on N lines, one for each
serial number, but the price is not splitted accordingly so the total of
the invoice will be the original price multiplied by N

This commit revert f3488749eed3c4e96f1cc50a2bb2cf87b423c890
not needed anymore after
e13f048a78b41d81602e868a3b0c7ded24ce992b

opw-2703581

closes odoo/odoo#81130

X-original-commit: 1ad0e4580814bc5ef76f352ed3ed366654ce69bd
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
2021-12-09 17:52:58 +00:00
Eleftherios Kritsotakis 78c8965ef6 [IMP] point_of_sale: more activated settings by default
We provide a better experience when more settings are activated by default.

For this reason, we activated by default the following settings:
1. POS Settings
- Inventory Management is set to "In real time"

2. POS Shop Settings
- Product Prices is set to "Tax-Included Price"
- Product Configurator is activated

task-2616749

closes odoo/odoo#80376

Signed-off-by: Masereel Pierre <pim@odoo.com>
2021-12-09 17:06:09 +00:00
Sébastien Theys 9dca2aa499 [FIX] mail: improve performance of messaging menu counter
Avoid iterating over all channels every time a new channel is added.

Part of task-2702450

closes odoo/odoo#81157

X-original-commit: 6c64781f60599571ef92b011eca7d299e76bf5eb
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-09 16:14:51 +00:00
Kevin Baptiste 7dc796f8d6 [FIX] website_forum: make link buttons work again
Since #45352, the dropdown actions "Edit" / "Close" / "Delete" were no
longer working; clicking on them was not submitting the form like it was
supposed to.

closes odoo/odoo#81156

Taskid: 2499623
X-original-commit: 2e7cb0e19a81598f3e52660753b925b3f2216a6d
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-12-09 16:14:47 +00:00
William Braeckman fa036650c2 [FIX] hr_org_chart: fix employee deletion
How to reproduce:
1: create two employees (A B)  and two departments (C D)
2: Assign A as manager of C and B as manager of D
3: Assign C as A's department and A as A's manager
4: Change A's department to D -> A is deleted

This is due to `parent_id` being both a computed field and the source
field for a One2many. By changing the `department_id` the `parent_id`
also changed which results in it being report in the `onchange` method.
For some reason however the command sent by the orm is not `UNLINK` but
`DELETE` which results in the `active_id` being deleted.

TaskId-2711428

closes odoo/odoo#81153

X-original-commit: 3ec9dcc59b133bd1f5e100bd4d950e9ba87a3890
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
2021-12-09 16:14:43 +00:00
roen-odoo ac95efe466 [FIX] point_of_sale : Wrong price when using SO
Current behavior:
When changing unit price in the SO of a product tracked by SN
the price reset to the normal price when entering the SN in the PoS.

Expected behavior:
The modified price from the SO shouldn't be modified in the PoS when entering
the SN

Steps to reproduce:
Create a SO with a product tracked by SN and change the price of the product in the SO
Go to the PoS app and add this SO
Click on the product to add the SN
The price change

opw-2687001

closes odoo/odoo#81146

X-original-commit: a215050f797bde0feba3c3874666e443054f8567
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2021-12-09 14:37:10 +00:00
Merlin (megu) ede7ae8e55 [FIX] hr_holidays: confirm allocation request with no validation needed
An employee could not confirm an allocation request of a type that doesn't need validation

Steps to reproduce:
1. Connect as admin
2. Install and open the Time Off app
3. Create a time off type in Configuration->Time Off Types with
	- Requires allocation: Yes
	- Approval: No validation needed
4. Connect as demo
5. Open the Time Off app and create an allocation request of the type created just before

Solution:
Add a condition before raising the error that checks the allocation validation type

OPW-2683477

closes odoo/odoo#81143

X-original-commit: d985b96ba77f45edee8001d1063f644c99a15ffc
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2021-12-09 14:37:06 +00:00
Nicolas Bayet 40c9571b82 [FIX] web_editor: wait for the editor to be loaded in tests
In a undeterministic circumstance, the editor element is not
in the page at the moment of checking it. There is probably
some promises somewhere that remains unresolved and
prevent the element to be inserted in time.

Task-2682104

closes odoo/odoo#81139

X-original-commit: f2557455ed164fc52e38a45ba14ae15f4125c202
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-12-09 14:37:02 +00:00
Xavier Morel bdc9d9d369 [FIX] core; base: lots of docstrings
* add configuration for `flake8[flake8-rst-docstring]`
* enable docstring-related checks
* fix invalid docstrings in odoo's core & `base`
* fix a few more bits (mostly missing or incorrect `:param:` info
  fields) are out of scope for the lint but my editor catches

closes odoo/odoo#74604

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2021-12-09 14:36:58 +00:00
Adrien Widart bf35fd86d0 [FIX] stock: correctly compare float
Due to floating point representation, some floats may have some
insignificant decimals. Therefore, `float_compare` should be used when
comparing such numbers

OPW-2699576

closes odoo/odoo#81138

X-original-commit: 7f30ef42717b009ee569db58b885ce863d969a06
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2021-12-09 13:47:49 +00:00
Nicolas Bayet 0076f4b491 [FIX] web_editor: prevent focus when editor is not loaded
It is possible that the wysiwyg focus method is called before the
odooEditor being loaded. This commit insure that the odooEditor
properly being loaded.

Task-2704538

closes odoo/odoo#81114

X-original-commit: 33782020906988322598c4a3e61b8a6b16970aa0
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-12-09 12:55:50 +00:00
Nicolas Bayet ea5fc6933d [FIX] web_editor: fix unlink when nested tag
Whenever there was a tag inside a link
(e.g.`<a href="..."><b>link</b></a>`), it was impossible to unlink.

closes odoo/odoo#81112

X-original-commit: a7f2027c6131309b239026b4e1299a6f396171dd
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
2021-12-09 12:55:46 +00:00
Sébastien Theys 67ea2463bc [FIX] mail: remove obsolete _computeRingingThreads
Oversight of https://github.com/odoo/odoo/pull/81017

closes odoo/odoo#81125

X-original-commit: f1fe1724e70301b5bca62f3ae355760c2c3fbf41
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-12-09 12:05:09 +00:00
Martin Trigaux 4226b3b4d0 [FIX] web_editor: use helper
A designer may not have access to ir.model.fields, use the fields_get
helper instead

Fixes odoo/odoo#80948

closes odoo/odoo#81123

X-original-commit: 826100a5b5ecaf62dfe6870bf5ad48a37cd2d7f7
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-12-09 12:05:03 +00:00
FrancoisGe 930a36a56b [REF] web: remove noFields in makeView
The purpose of this commit is to simplify the makeView api by removing
the noFields option.

Only two tests used it:
For the test "'resModel' must be passed as prop", the noFields option
was useless. So we can remove it.

For the test "'arch' cannot be passed as prop alone", it is not
necessary to use makeView. So we will replace it.

closes odoo/odoo#81119

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-12-09 12:04:59 +00:00
Anh Thao Pham (pta) a1508eddc9 [FIX] point_of_sale, l10n_fr_pos_cert: allow to close session after 24h
- Use a company located in France
- Install point_of_sale and l10n_fr_pos_cert
- Open a POS session
- Make some orders
- Quit session without closing it (Keep session open)
- Come back more than 24 hours later
- Try to open the session (Continue selling)
An UserError is triggered with the following message:
"This session has been opened another day. To comply with the French law,
you should close sessions on a daily basis.
Please close session POS/00007 and open a new one."

However, it is not possible to close the session as the closing control
is managed in the fontend inside the session.
Therefore the POS is stuck as we cannot close the last session, neither open
a new one.

This fix allows an user with the rights to close a session to connect to
the stuck session to close it.
He will only have access to the closing control popup, without the possibility
to continue selling.

opw-2696823

closes odoo/odoo#81110

X-original-commit: 8f14fef9232609b0a6fe3d71606f3d2b016100bb
Signed-off-by: Masereel Pierre <pim@odoo.com>
2021-12-09 11:16:56 +00:00
roen-odoo 944e442b68 [FIX] pos_coupon, pos_restaurant : Promotion program
Current behavior :
When you add a promotion campagn to a PoS the promotion is applied
on every line of every order everytime you load the order. This cause situations
where you have multiple discount for a single product.

Steps to reproduce:
- create a standrard promotion program (automatically applied, 10%)
- set that promotion on the PoS (bar)
- open a session, chooses a table and make an order --> promotion correctly applied
- get out of the table and go back to the same table --> 2 additional lines are created because of the promotion

opw-2699544

closes odoo/odoo#81096

X-original-commit: 72d6431eb26654b697fc0379f4b6d7e305bb79fc
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2021-12-09 10:27:02 +00:00
Brice bib Bartoletti 986b11c21f [FIX]account:reverse move condtnly hide btn and radio button
Aim of this commit:
- Hide the disabled radio button on reversal wizard when it's disabled.
(invoice residual_amount is 0)

before this commit:
- The radio buttons in the reversal wizard are visible even when it's
disabled.

after this commit:
- Radio buttons are hidden when it's disabled.

task/ticket:#2603144

closes odoo/odoo#81089

X-original-commit: e860a346ba6d7831674685817eed006dac86b264
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Brice Bartoletti <bib@odoo.com>
2021-12-09 10:26:58 +00:00
Laurent Smet 0cd014e1e9 [FIX] account: Add tax_repartition_line_id in tax details
closes odoo/odoo#81103

X-original-commit: 8dcfdf0f860246970ef375dfff755cbd2efcf697
Related: odoo/enterprise#22789
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: Laurent Smet <las@odoo.com>
2021-12-09 08:09:35 +00:00
Thibault Delavallée 48e92ac956 [FIX] website_event_questions: fix propagation from template
A wrong field is used to control propagation of questions from event template
to child events. Currently an event template must use automated emails to
propagate its questions, instead of correctly checking the question enabled
field ``use_questions``.

As most templates use automated email this was not seen before.

Task-2703285 (event performance)
Task-2703289 (event testing)

closes odoo/odoo#81098

X-original-commit: 10732e077d4bfc296ca59a9c3df613b9fd1cb275
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-12-09 07:23:20 +00:00
Joseph Caburnay b157c99d4a [FIX] pos_hr: cash opening is not triggered when logged in by scan
When logging in as employee using barcode scanner, the event to
show the opening cash control is not triggered, therefore, only the
first user to login using the selection popup that the cash opening
will be initiated. We fix this issue by lifting the event trigger
at the `back` method.

closes odoo/odoo#81085

X-original-commit: 992a0130ea802814279c62f28880ab2120d1ad3c
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
2021-12-08 17:21:56 +00:00