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>
It seems the `.scss` weren't recognized when loaded via the bundle
`report_assets_pdf` when rendering certifications
p/feedback report
closesodoo/odoo#81081
X-original-commit: 925ee95b02b51e156b0848161f7716b982e47235
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Steps to reproduce the error:
- Create a new company, set Netherlands as country and fill in the required info (street, zip, city, vat, kvk-number).
- Set a bank account on the company contact.
- Install NL chart of account on this company (Netherlands Accounting package).
- Create a test customer, and don't set any address or set a country not listed in EAS (https://docs.peppol.eu/poacc/billing/3.0/codelist/eas/).
- Create an invoice for this test customer and try to post it.
Before this commit, if a Dutch company had tried to create an invoice for a customer from a country not listed in the Electronic Address Scheme (EAS) codes, Odoo would have given them a traceback error.
Now the code checks if the customer is from an EAS country: if they are, the code renders the bis3 invoice template, if not a UserError is thrown explaining the problem.
closesodoo/odoo#81080
X-original-commit: b637a333450911002af3b755cd1450e9efdef9e4
Signed-off-by: Laurent Smet <las@odoo.com>
Signed-off-by: John Laterre <jol@odoo.com>
These errors should not happen in production, it is only helpful for debugging.
The opportunity is taken to limit our debug code to a messaging specific debug,
as debug '1' is used in production to see extra features, and debug 'assets' is
necessary to get decent stack trace.
The easiest way to enable this debug mode at the time of this commit is to
either manually set the value to true in the code, or to type the following line
in the browser console if editing the code is not an option:
`odoo.__DEBUG__.messaging.modelManager.isDebug = true;`
Part of task-2702450
closesodoo/odoo#81075
X-original-commit: f9ae7510c8adaa83379b90f798ee535ede99be25
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
On event model, seats_limited and date_tz are required but are editable stored
fields. An override of create has been added to ensure they have a value as
compute are called after creation which leads to required not being satisfied.
Now that precompute [1] is available this code can be safely replaced.
Performance tests (not yet merged [2]) indicate this has no impact on queries.
What was done manually before this commit is now done directly by the ORM.
[1] odoo/odoo@d04a5b5c8c
[2] odoo/odoo#81068
Task-2702872 (Event precompute)
closesodoo/odoo#80672
Signed-off-by: Warnon Aurélien (awa) <awa@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-2702872 (Event precompute)
Part-of: odoo/odoo#80672
When consulting the Purchase Analysis, the measure "Days to Confirm" may
not be easily understandable
To reproduce the issue:
1. Create a purchase order PO:
- Order Deadline: <today + 10 days>
- Add 2 products
2. Confirm PO
3. Purchase > Reporting:
- Measures: Days to Confirm
- Group By: Order
Error: For PO, the value of "Days to Confirm" is -20, it should be -10
The report computes the sum of the delay (i.e., "Days to Confirm") of
each purchase order line. Computing an average seems more relevant
A similar flow could be reproduce with the measure "Days to Receive"
(i.e., the difference between the Order Deadline and the Receipt Date)
OPW-2678673
closesodoo/odoo#81053
X-original-commit: da3fa1f8887e06e7a86e761ef844f79cc0d06e6f
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
How to reproduce the problem:
- Install the website_sale module and the German language (and
activate it for the website).
- Go to the website, and choose the German language.
- Add a product to your cart and checkout.
=> on the checkout page, the button "Pay Now" is not translated (
"Confirm Order", if the total amount = 0)
These terms are now added for translation.
The terms were incorreclty formatted in the xml and were not
picked up for translation export. Introduced by this commit:
https://github.com/odoo/odoo/commit/573ed74c121c1572b3fab6f9553ed7f93f7b3f99
opw-2686463
closesodoo/odoo#81056
X-original-commit: 166c19d5e9018332a63c1c82dd4268fd1224332b
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Roose Pierre-Rodéric ( prro) <prro@odoo.com>
Avoid iterating over all channels every time a new channel is added.
Part of task-2702450
closesodoo/odoo#81051
X-original-commit: 5359a8c354b0a6106d462fe8f047de946614b7b1
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Before this commit, the context coming from the action was
merged with the context of the search items to generate the
context of the filter to save, when the user clicked on "Save
current search", whereas it should not.
There is an ActionService test attesting it, but it currently
uses a ListView, which is still legacy, so the new faulty code
wasn't tested.
closesodoo/odoo#81049
X-original-commit: 2d76b33142cf2bf451d4730c035af75c3243da6f
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Steps to follow
- Click on a product from a sale.order.line
- The form is switched to edit mode
-> We can't go to the product page
Cause of the issue
The quick edit feature was introduced in saas-14.4
Solution
- remove the 'no_open' attribute from the product
opw-2688863
closesodoo/odoo#81047
X-original-commit: 57d662c4817b83a8f166d11bf35b4b73206704b0
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
How to reproduce:
- Switch to an Indian-based company
- Create a non-Indian customer and set gst treatment
- Create a subscription for the new customer
- Generate an invoice for the subscription
- The gst-treatment field will be empty
Bug:
When creating a new account.move object, the gst treatment is not copied.
closesodoo/odoo#80966
Opw: 2662308
X-original-commit: a1f0ae25f8b96a5ff5691aa0b9ffeb62033932bf
Signed-off-by: Laurent Smet <las@odoo.com>
*: base_address_city, base_address_extended, bus, crm, im_livechat,
l10n_ae_pos, lunch, pos_restaurant_adyen, test_assetsbundle,
test_converter, test_lint.
It is spelled `auto_install`, the `complexity` key is long gone, `qweb`
has been moved to `assets: {'web.assets_qweb': []}`. `js` and `css` are
long gone too, `maintainer` is redundant with `author` which is
"Odoo S.A." by default already, the `certificate` key is long gone.
closesodoo/odoo#80988
Related: odoo/enterprise#22766
Signed-off-by: Julien Castiaux <juc@odoo.com>