If the `_toRollback` property of the editor is assigned on its own line, it is
easier to identify which assignation caused/prevented a rollback when
debugging.
closesodoo/odoo#130894
X-original-commit: 263dcbaf9aa0c48bd61bf85b091c746d7850cfe1
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
As introduced here:
https://github.com/odoo/odoo/pull/112611/commits/dce4ec8380aad1a1d1b40c33a50ab5914838ba18,
PdfReadError should be imported conditionally as it is now possible to have dev
environments with different versions of PyPDF2.
We are employing the same strategy done in the mentioned commit to avoid import
error when the environment has python > 3.10 and PyPDF2 v2.12.1
closesodoo/odoo#130892
X-original-commit: 0163edfb16c849eac61fb33b400faedda33f667f
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
We now split the export of the FEC files per batch of move lines. This was necessary, as the fetchall() ran on the cursor to get the results could return a huge amount of data on big databases, saturating the RAM.
This fix is not exhaustive, and memory consumption could be lowered by removing the need to convert the whole file to base 64 and write it in attachment. Those changes are not doable in stable ; further improvements will come to master.
OPW 3442579
closesodoo/odoo#130884
X-original-commit: 86a221fa3773b5b23ae8f1ad653c1aaac607482e
Signed-off-by: de Wouters de Bouchout Jean-Benoît (jbw) <jbw@odoo.com>
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Since 69f911d994 it was no longer possible to post an HTML
message via a script. Allow to do it but log a warning to discourage
doing so. Markup object should still be the propoer way to do it.
closesodoo/odoo#130883
X-original-commit: a890db49935813d0794765492c057404592e5977
Related: odoo/documentation#5273
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
There's a single usecase left for this helper, which is in website.
This commit directly moves the function definition in the file
using it.
Part of task~3439226
closesodoo/odoo#130843
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Before this commit, when the first element of a template is a non
fulfilled condition :
'<t t-if="false"/>'
The function renderToElement returns an empty text. This occurs because
it returns the first child, which in this case is an empty text.
Now, the function returns the first element.
closesodoo/odoo#130858
X-original-commit: 8dabc4e1d5ebd94f6a315ce56b9bf60240dd7fdd
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
In 16.0 and up, when toggling full-screen mode on the mailing editor
the iframe content is not properly made scrollable.
This is due to the toggle method being triggered 4 times
which effectively cancels the effect.
The reason for it being triggered 4 times is that the check that would
prevent multiple event listeners from being set on the button compares
an existing jquery object to a new one on the same element.
As these are two different references to the same element
they are still different objects and thus the listener will be added
even if they reference the same iframe.
The fix is simply to compare the html elements directly, if they exist.
We also add the expected state of 'full screen' to the class toggle
as it may avoid other inconsistencies from blindly toggling.
task-3446768
closesodoo/odoo#130853
X-original-commit: 30f27563868af4b247c96c24135c1003aa191cef
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
Since [1], marking the activity as done from the activity popover
was not automatically closing it.
Steps to reproduce:
- Open Contact kanban view
- Schedule an activity on a contact
- Click on activity widget on kanban card
- Edit activity and mark it as done
=> The activity popover was not automatically closed
Also fixes a bug where marking activity as done in activity view
was crashing.
[1] https://github.com/odoo/odoo/pull/114024closesodoo/odoo#130828
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
None of the main methods provided by this plugin were stil used; only
the internal method `enable()`.
This commit replaces these calls by toggling the `disabled` HTML
attribute.
closesodoo/odoo#130817
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Before this PR, RPC made by input inside the discuss sidebar could
resolve in the wrong order, witch display outdated results.
This PR ensure that only the most recent RPC is sent to the server,
cancelling irrelevant RPC.
Note: This PR also remove the support for Promise inside the
NavigableList component since it's not compatible with useSequential.
closesodoo/odoo#130767
X-original-commit: ba2d029d876f9acd7c869cc3d345cc4ed7cab00a
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
When the cache is filled with binary field, it can fill the logs with
unreadable and (probably) non compressible data
closesodoo/odoo#130741
X-original-commit: 6afba8fafe79dcf9bc28710a7edbd33b6a5b459f
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
Note: the "event_tour" stil has step targetting the .daterangepicker
selector... but as this tour is broken since (at least) 14.0, its fix
will be tackled in another PR.
closesodoo/odoo#129993
Related: odoo/enterprise#44742
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Before this commit, when a product's tax was included in its price and
the Point of Sale setting was set to "Tax-Excluded Price",
the following issues were encountered:
1. The product screen displayed the orderline's price tax included.
2. If the pricelist's discount policy was set to without_discount,
and a discount was applied to a line, the old/new price would
not be displayed.
3. The receipt showed the discount based on the price inclusive of
tax, rather than the tax-excluded price.
Additionally, when the product's tax wasn't included in its price and
the Point of Sale setting was set to "Tax-Included Price", the
discount displayed on the receipt was incorrect.
This commit resolves these issues, ensuring the correct tax-exclusive
and tax-inclusive prices are displayed in all scenarios, providing
accurate discount calculations on the receipt.
opw-3324090
closesodoo/odoo#130820
X-original-commit: f2569a6583ac799b1b01c023cb8ccb65d294f867
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
This commit moves the smooth scroll on drag helper from web to
web_editor, which allows us to move it from frontend and common
assets to web_editor.assets_legacy_wysiwyg which is only loaded
in the website editor, the only place where it is used.
Note that it uses legacy Class and mixins, so it still needs to be
converted to the modern codebase, alongside editor snippets.
Part of task~3439226
closesodoo/odoo#130813
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Before this commit, if you update the quantity of a line that it's
`disallowLineQuantityChange` it will call `_showDecreaseQuantityPopup`
to update the quantity and it will call the `set_quantity` to modify
the quantity. Calling 'set_quantity' won't call the `_updateRewards`
and it causes us to not update the rewards.
Steps to reproduce:
- In a French company, install the module "France - VAT Anti-Fraud
Certification for Point of Sale"
- Create a Loyalty program that gives you 1 point for each euro spent.
- Add items to the cart, and the points sum up.
- Remove items from the cart, the points don't subtract.
+ If points reward is added to the cart and then removed, the points
are still considered as used.
The solution is to override the `_showDecreaseQuantityPopup` function
in the pos_loyalty to call the `_updateRewards`.
opw-3430349
closesodoo/odoo#130794
X-original-commit: 1bbeaefe0f750fceba19cc9199cd7a0681fd1f7a
Signed-off-by: Joseph Caburnay (jcb) <jcb@odoo.com>
Signed-off-by: Pedram Bi Ria (pebr) <pebr@odoo.com>
'field_groups' computation is missing their triggers. As field is not stored
it is not that annoying, but better be explicit.
Task-3345979 (Mail: Simplify tracking model)
closesodoo/odoo#130791
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Mainly used for Internet Explorer support (cf. placeholder attribute is
supported since IE 10).
We are in 2023...
closesodoo/odoo#130692
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
This commit enhances the o_searchview_facet design with hover
interactions, focusing on providing a clearer visual representation when
facets are selected:
- Implemented an overlay to indicate when a facet is selected, similar
to https://github.com/odoo/odoo/pull/129991.
- Replaced the facet's icon with a cog icon, serving as a visual cue
that the domain is now editable, improving user understanding.
- Overall appearance improvements, resulting in a more polished and
user-friendly design.
task-3444675
closesodoo/odoo#130017
Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
In this commit, we show a helper message in case there
are no records to show under those section (milestone, profitability,
sales section) in project right side panel.
task-3293012
closesodoo/odoo#128220
Related: odoo/enterprise#43972
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
before this commit, even it the user profile is not public,
or if the user karma is less than karma_profile_min set
in the website, on hovering the move on the user image
in the post, the user details is shown in the pop over
after this commit, the pop over information is shown only
if the user's profile is public profile and user karma is
greater than karma_profile_min in website
closesodoo/odoo#126628
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Problem
---------
During the conversion from XML to CSV, some python taxes were broken.
Objective
---------
The task consist in checking all python taxes and ensures it's working.
Solution
---------
Problem appears to be that the migration script from XML to CSV, removed
the '\n' in the python compute code, making things like
`result=base_amount * 0.21tax=quantity * 4.17` appear.
The solution consists in separating the operations using semi-colons and
a ternary operator to execute the if statement. The goal was to keep the
operations in a single line to avoid added escape caracters.
task-3319164
closesodoo/odoo#130792
X-original-commit: 2beea5f14a3886c5da9e81ccb8797141e7d7a186
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Signed-off-by: Antoine Boonen (aboo) <aboo@odoo.com>
- Create Journal Entries with analytic distribution
- Go in Journal Items list view
- Filter with 'Analyic is set'
=> The wrong entries are filtered
The problem is that the replacement of the domain for the search
has changed with a factoring of the function, which causes the
search replacement to occur with booleans, which is not needed.
closesodoo/odoo#130760
X-original-commit: 5d2accdf56ccd86c8797743f151ad80b614f0f77
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Signed-off-by: Wala Gauthier (gawa) <gawa@odoo.com>
Before this commit:
When a user attempted to copy a list from a table, it would result in a
traceback.
After this commit:
Now, when a user copies a list from inside a table, the traceback error
will no longer occur.
Task-3384289
closesodoo/odoo#130759
X-original-commit: 53f5b98b350f6d7db80d2d1921c91c28ed7c3148
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit removes the legacy implementation of the MockServer
and test utils making it available in the test environment (e.g.
addMockEnvironment).
Part of task~3439226
closesodoo/odoo#130671
Related: odoo/enterprise#45141
Signed-off-by: Francois Georis (fge) <fge@odoo.com>
Before this commit, in a kanban view, if you resequence records or
groups by dragging and dropping, there is a flicker.
How to reproduce:
- Go to a kanban view
- Drag and drop a kanban card
Before this commit:
The moved kanban card returns to its previous position during a render.
After this commit:
The kanban card keeps its new position.
closesodoo/odoo#130561
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Currently, when the creation of an user access is set to `invitation
only` in the website settings, a project shared to a partner with no
user account will not be accessible to that partner. The link sent to
this partner will instead redirect him to the homepage of the website.
This commit address this situation by allowing the partner that receive
the link to create a portal access. The user that share the project is
warned that partners will be able to create user accounts and offered
the option to proceed or not.
task-3356419
closesodoo/odoo#129790
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
When having a multiple website filters appear on both website.
event_tag_category determines what the filter should be. The problem is if I assign one event_tag_category
one website it also appears as filter on other website.
task-3254058
closesodoo/odoo#118136
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
[1] introduces an issue when a response is sent to an aliased email.
In that case, it is intended that the message should be created by the owner of the alias by [2]
Which breaks the assumption of made in the first commit, as the message is being passively processed by fetchmail.
This causes the owner of the alias to never be notified on reponses in cases where the message could be an alias update. i.e. on any model where the alias applies.
Because the responses are assumed to have been authored by the owner.
To avoid this issue while keeping the behaviors intact we check that we did not come from fetchmail.
If that is the case we consider the author is the stated author for notification purposes.
[1]: c676ed3ea906e99d27a6116cd77218c5ec95b416
[2]: af80c68ae5
task-3383275
closesodoo/odoo#130798
Forward-port-of: odoo/odoo#126189
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Renaud Thiry (reth) <reth@odoo.com>
[1] introduces an issue when a response is sent to an aliased email.
In that case, it is intended that the message should be created
by the owner of the alias by [2]
Which breaks the assumption of made in the first commit, as the message
is being passively processed by fetchmail.
This causes the owner of the alias to never be notified on reponses
in cases where the message could be an alias update.
i.e. on any model where the alias applies.
Because the responses are assumed to have been authored by the owner.
As we do not actually care who creates the message records
and deciding the alias owner 'created the message' does not
actually make sense.
We make sure messages are created by odoobot even
if the message was sent to an alias address.
[1]: c676ed3ea906e99d27a6116cd77218c5ec95b416
[2]: af80c68ae5
task-3383275
X-original-commit: 96fe37d37c94c3d6f4642bd6c28d13fcd87075b7
Part-of: odoo/odoo#130798
Before this change aliases were assigned to the user creating them
The purpose was originally to reduce the number of records created by
odoobot however this leads to unexpected
behavior for the users who just wanted to create an alias without fuss
We make remove the default user such that any automated record
modification/creation will be applied by root instead of some
arbitrary user.
task-3383275
X-original-commit: 3edf18168b92545fc29e078a155494f2781adff6
Part-of: odoo/odoo#130798
To Reproduce
=============
- enable multi step routes
- edit Receipts operation and uncheck the two options under Traceability
- create storable product with Traceability using lot/serial number
- make purchase of this product and receive it in your inventory
- under inventory/reports/Locations click on line of this product
you will be stuck at that page even if you click discard
Problem
=======
There is an inconsistency between the view and backend, as we allow
receiving traceable product without setting `lot_id`, but in view
require `lot_id` if tracking is enabled on product.
Solution
========
following this [comment](https://github.com/odoo/odoo/blob/16.0/addons/stock/models/stock_move_line.py#L558-L560), `lot_id` shouldn't be required on view.
opw-3422259
closesodoo/odoo#130793
X-original-commit: 768b1755909fa10c39a51c68675b7aa99c91b462
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Abdelouahab Laaroussi (abla) <abla@odoo.com>
Steps to reproduce:
-------------------
- create a time off type;
- create two 5 days allocations for an employee;
- validate them;
- create a leave of 8 days for the same employee;
- be in debug mode;
- go to employee form view;
- in action menu, click on "Time off Analysis by Employee and Time Off Type".
Issue:
------
The number of days remaining ("left") for the employee and leave type is -6 instead of 2.
Cause:
------
The query that generates the report is in two parts
```
Find the number of remaining leaves by subtracting leave taken from allocations
(model: hr_leave_allocation and hr_leave) ==> will generate the "left" column
UNION ALL
Find the number of leaves already taken
(model: hr_leave) ==> will generate the "taken" and "planned" columns
```
In the part that generates the "left" column, we relate leaves to allocations.
As there is no "unique" link between allocations and leaves,
we can only link them via employee and type.
We are therefore obliged to use aggregation methods.
The measure that returns negative numbers is:
```sql
CASE
WHEN request.number_of_days > 0 THEN allocation.number_of_days - request.number_of_days
ELSE allocation.number_of_days
END as number_of_days
```
It should be read as follows:
If there are validated or planned leaves, the number of days remaining
for an allocation is the number of days of this allocation minus
the SUM of the days of leaves (validated or planned) for this allocations
(same employee and type).
For example:
2 allocations of 5 days and a leave of 8 days,
we will have (5 - 8) + (5 - 8) = (-3) + (-3) = -6 days remaining ==> this is wrong
In this example, we want: (5 + 5) - 8 = 2 days remaining
Solution:
---------
As it is not possible to link a leave to a specific allocation,
we have to make difference between sums like this:
days left = [SUM(days of allocations) - SUM(days of leaves)]_(for one employee AND one type)
The frontend will sum these days left.
This difference must therefore be calculated only once.
By default, we use allocation with the smallest id.
The result is:
days left frontend = [day left_(for min id) + 0 * (nbr allocation - 1)]_(for one employee AND one type)
opw-3366530
closesodoo/odoo#130781
X-original-commit: a273148cf931f220cc4252c638ae14890f889c9e
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
During the refactor of the module the override
of base.document.layout was removed by mistake,
This is needed to add the PST number to the template
related commit: fd2c6dce8e5bee5ac526e7f3edeb398a992f84b1
runbot build errors: 23816, 23817, 23800, 23801,
23802, 23803, 23804, 23829
closesodoo/odoo#130790
X-original-commit: 32ab5d9b2591a288606f77779d479384bb3b2599
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
RATIONALE
We plan to move from a single alias-domain configuration to a multi
company enabled support for alias domains and aliases. First step to
prepare this change is to cleanup some tests: prepare multi-company
environment, make tests clearer, lessen future diff when updating
alias and alias domain usage.
This merge is mainly about test move and internal content renaming.
Task-3453577 (TestMail: Update Alias/Gateway tests for MC)
Next planned steps
Prepares Task-3453343 (Mail: Cleanup Alias Usage)
Prepares Task-3453347 (Mail: Move Alias Domain Support)
Prepares Task-36879 (Mail: Support MultiCompany Aliases)
closesodoo/odoo#130768
Related: odoo/enterprise#45204
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Have all ir.mail.server tests as well as their configuration-related tests
moved into 'test_ir_mail_server' file. That way all tests are contained in the
same file, easing their update.
Task-3453577 (TestMail: Update Alias/Gateway tests for MC)
Prepares Task-36879 (Mail: Support MultiCompany Aliases)
Part-of: odoo/odoo#130768
Rename alias domain and aliases used a test data. This allows to make
them easier to read, follow, grep and understand.
Activate multi-company on alias and gateway tests, ensuring it currently
has few impact on tests.
Task-3453577 (TestMail: Update Alias/Gateway tests for MC)
Prepares Task-36879 (Mail: Support MultiCompany Aliases)
Part-of: odoo/odoo#130768
Move alias-specific tests in their own file. This model deserves its own
test file containing unit tests for both alias model and alias mixin. This
helps improving and debugging the model, instead of having them mixed with
gateway-specific tests.
Activate multi-company in setup, preparing multi-company support for aliases
and alias domains.
Task-3453577 (TestMail: Update Alias/Gateway tests for MC)
Prepares Task-36879 (Mail: Support MultiCompany Aliases)
Part-of: odoo/odoo#130768
If no partner is found for a given email after calling '_mail_search_on_user'
and '_mail_find_partner_from_emails' the returned result is a void recordset
for the email.
When rebrowsing partners afterwards, browsing p.id for each partner leads
to potentially browsing False, which gives a different recordset from a
void recordset. This further causes a crash in '_write_from_google' as
he considers [False] as not being void.
This commit fixes that by correctly filtering out void partners. This is
globally a followup of odoo/odoo#99330.
Task-3453577 (TestMail: Update Alias/Gateway tests for MC)
Prepares Task-36879 (Mail: Support MultiCompany Aliases)
Part-of: odoo/odoo#130768
Cause by #105848
opw-3427995
closesodoo/odoo#130732
X-original-commit: af1f23c956f7ccbf11d8d5d512f656901c92ad00
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Before this commit, when selecting a dynamic attribute on the
configurator, an RPC call is made to the server, and the id of the
variant was returned if it existed. If it didn't exist, the server
didn't return the id, and the previous id, if any, was kept in the
client, causing the dynamic creation to fail believing that the product
was already created.
Now, the server will return `False` as `id` if the variant is not yet
created. This value will override any value previously saved as `id` in
the client, allowing the creation of new variants when needed.
opw-3423821
closesodoo/odoo#130720
X-original-commit: 4540f971db2d65bc3453e9579c39109775cd5794
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Steps to reproduce:
- Make any list binary field with filename attribute
Current behaviour:
- The binary file does not use the filename field
Expected behaviour:
- The binary file should use the filename field
Explanation:
After the updates of list-specific binary field [1], the list
binary cannot get the attributes field name of the record anymore.
[1] odoo/odoo#129631closesodoo/odoo#130719
X-original-commit: ddfa65782a8ff59c07adcb8c56797c57a06789a0
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
If we use a long enough sequence of field in a custom search filter, the
sequence of fields will overlap the operator or value
Steps to reproduce:
1. Open any view with a search
2. Add a custom filter
3. Use enough related fields in the filter so that it creates a long
sequence of fields, it will overlap the operator at one point
Solution:
Limit the width of the `o_model_field_selector_value` class and break
its content
opw-3450099
closesodoo/odoo#130675
X-original-commit: 472923933e145b39f995051ebe8b45a75669a707
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
This commit's purpose is to allow the user to remove the planned date
end, or the planned date start of a project from the list view, or the form
view of the project. If the user removes either the planned date end, or
the planned date start, both dates will be removed. If the user tries to
add only a date end or a date start while keeping the other date empty
on a project with no planned date, these changes will be discarded.
The goal of this fix is for the projects to always have either both dates
set, or both dates set to False.
closesodoo/odoo#130651
X-original-commit: 250a0d233c8c2e074b967d59d53b1d4aac5feba2
Related: odoo/enterprise#45131
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Before this commit, when the user defines a planned date for a project
in the form view, he has to click on `Add end date` button to be able
to select the start and end dates directly in the date picker.
This commit allows to directly select the both dates in the date picker
instead of having the planned date end optional in the form and list
views of project.
X-original-commit: e4f11e7a694c26e23ecf1437f3a98b2d3dd3bd7d
Part-of: odoo/odoo#130651