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.
closesodoo/odoo#80482
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
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.
closesodoo/odoo#81031
Related: odoo/enterprise#22799
Signed-off-by: Géry Debongnie <ged@odoo.com>
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
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
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").
closesodoo/odoo#81289
Ticket-id: 2710892
X-original-commit: d477be7cd5f7820ea6925dcfb42a26e67977b052
Signed-off-by: Masereel Pierre <pim@odoo.com>
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
closesodoo/odoo#81262
X-original-commit: 89419b593ed163a8b174945e80f1c36c9cf78257
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
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
closesodoo/odoo#81277
X-original-commit: 8b468e1f7a3dfeb2bcfa83bff55c4b5adf6b2212
Signed-off-by: Olivier Dony <odo@odoo.com>
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
closesodoo/odoo#81210
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Define "Default Terms & Condition" in settings
Create invoice
No default terms will show
opw-2701811
closesodoo/odoo#81160
X-original-commit: 323534c89963f466ac7c53894fed62691bd2321f
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
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
closesodoo/odoo#81238
X-original-commit: ef26467e288a12571c37d4c133b44f08d99cc702
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
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.
closesodoo/odoo#80431
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
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.
closesodoo/odoo#81165
X-original-commit: c5ccccc24ca0a746c30bc2ffba1a7e48229925bb
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Avoid iterating over all channels every time a new channel is added.
Part of task-2702450
closesodoo/odoo#81264
X-original-commit: 7686be710ba919079f6ea97293ac99dde79f843b
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
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/79737closesodoo/odoo#81236
X-original-commit: 89d8c0a1ea03919e9f3085ea0d05aa80ad443ff7
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: Laurent Smet <las@odoo.com>
- 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/80266closesodoo/odoo#81237
X-original-commit: 598bfedb540aa81676b957340255aafef85d2823
Signed-off-by: Olivier Colson <oco@odoo.com>
Signed-off-by: Laurent Smet <las@odoo.com>
Avoid iterating over all channels every time a new channel is added.
Part of task-2702450
closesodoo/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>
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
closesodoo/odoo#81219
X-original-commit: cb3e34db1b2ce6ffe82ee15cc21ded9bbac91062
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Some decently costly operations (especially when repeated many times) where done
inside a loop for no reason.
task-2702450
closesodoo/odoo#81187
X-original-commit: c6e4ddf531d29ca1693cc6139b81cea3f5b78fdf
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
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.
closesodoo/odoo#81172
X-original-commit: fb4d6ee4ba8bcb5cd8030105ac57e9e02850bfc4
Signed-off-by: Raphael Collet <rco@odoo.com>
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
closesodoo/odoo#81182
X-original-commit: c56ae82bffb933090a8df33bc38ab979d5318df7
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
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
closesodoo/odoo#81179
X-original-commit: fdddac4f9c19515f5631ee7e9a05f9ad798b07a1
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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
closesodoo/odoo#81176
X-original-commit: 372f1c5ebac4b9b542994ea5aaad59abe7290918
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
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
closesodoo/odoo#81175
X-original-commit: 7c77775a84474ccdfe32bdd783291728fbfbdc42
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
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
closesodoo/odoo#81151
X-original-commit: 556168efd20727e044a9825435cdc887821a4f80
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
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
* = 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
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
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
closesodoo/odoo#81130
X-original-commit: 1ad0e4580814bc5ef76f352ed3ed366654ce69bd
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
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
closesodoo/odoo#80376
Signed-off-by: Masereel Pierre <pim@odoo.com>
Avoid iterating over all channels every time a new channel is added.
Part of task-2702450
closesodoo/odoo#81157
X-original-commit: 6c64781f60599571ef92b011eca7d299e76bf5eb
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
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.
closesodoo/odoo#81156
Taskid: 2499623
X-original-commit: 2e7cb0e19a81598f3e52660753b925b3f2216a6d
Signed-off-by: Kevin Baptiste <kba@odoo.com>
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
closesodoo/odoo#81153
X-original-commit: 3ec9dcc59b133bd1f5e100bd4d950e9ba87a3890
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: William Braeckman (wbr) <wbr@odoo.com>
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
closesodoo/odoo#81146
X-original-commit: a215050f797bde0feba3c3874666e443054f8567
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
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
closesodoo/odoo#81143
X-original-commit: d985b96ba77f45edee8001d1063f644c99a15ffc
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
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
closesodoo/odoo#81139
X-original-commit: f2557455ed164fc52e38a45ba14ae15f4125c202
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
* 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
closesodoo/odoo#74604
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Due to floating point representation, some floats may have some
insignificant decimals. Therefore, `float_compare` should be used when
comparing such numbers
OPW-2699576
closesodoo/odoo#81138
X-original-commit: 7f30ef42717b009ee569db58b885ce863d969a06
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
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
closesodoo/odoo#81114
X-original-commit: 33782020906988322598c4a3e61b8a6b16970aa0
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
Whenever there was a tag inside a link
(e.g.`<a href="..."><b>link</b></a>`), it was impossible to unlink.
closesodoo/odoo#81112
X-original-commit: a7f2027c6131309b239026b4e1299a6f396171dd
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
A designer may not have access to ir.model.fields, use the fields_get
helper instead
Fixesodoo/odoo#80948closesodoo/odoo#81123
X-original-commit: 826100a5b5ecaf62dfe6870bf5ad48a37cd2d7f7
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
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.
closesodoo/odoo#81119
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
- 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
closesodoo/odoo#81110
X-original-commit: 8f14fef9232609b0a6fe3d71606f3d2b016100bb
Signed-off-by: Masereel Pierre <pim@odoo.com>
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
closesodoo/odoo#81096
X-original-commit: 72d6431eb26654b697fc0379f4b6d7e305bb79fc
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
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
closesodoo/odoo#81089
X-original-commit: e860a346ba6d7831674685817eed006dac86b264
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Brice Bartoletti <bib@odoo.com>
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)
closesodoo/odoo#81098
X-original-commit: 10732e077d4bfc296ca59a9c3df613b9fd1cb275
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
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.
closesodoo/odoo#81085
X-original-commit: 992a0130ea802814279c62f28880ab2120d1ad3c
Signed-off-by: Trinh Jacky (trj) <trj@odoo.com>
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>