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
before this commit, on writing user_id to hr.employee
on multiple record in raisng single ton error.
after this commit, no error wont be raised on the
same.
closesodoo/odoo#130650
X-original-commit: ebc686b8abc84538f224ff4db205ce1231b747c3
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
This commit restores the sheet layout in mass_mailing for consistency
reasons.
The chatter was extracted from the tab it was in and moved back on
the right side.
This commit also fixes an alignment problem when an alert is displayed
and the alert was vertically bigger that the buttons of the status bar
task-3355071
closesodoo/odoo#130616
Forward-port-of: https://github.com/odoo/odoo/pull/126646
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
* Impose the use of the dedicated tour utils to factorize and harmonize
the way tours behave on the ecommerce.
* Introduce new utils when it seems adequate and useful.
This will reduce incoherences and non determinism in e-commerce tours,
and ease future tasks refactoring the e-commerce design and process
(since we'll be able to restrict most changes to the utils instead of adapting
all the tours one by one).
closesodoo/odoo#130378
Related: odoo/enterprise#44938
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Implemented domain exclusion to remove Off Balance Accounts from Account
Mapping in Belgian CoA. This decision was motivated by the rarity of use
of these accounts by our target audience, and their potentially
confusing placement at the top of the list due to their prefix '0'. Now,
the Account on Product and Account to use instead fields will not
display these seldom-used accounts, improving usability and efficiency.
closesodoo/odoo#129576
Task-id: 3431420
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Unless necessary, super should be called first, delegeting ensure_one()
and base logic to the base method.
closesodoo/odoo#129572
Related: odoo/upgrade#4987
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
There is no need to have two bridges linking delivery & loyalty.
The two modules held the two parts of the same logic, making no
sense to keep the two modules separate.
Task-3420579
Part-of: odoo/odoo#129572
before this commit, in the sale.report tree
view, the product field was not added.
* sales -> reporting -> switch to pivot
* click on any row to open the tree
after this commit, the product field will
be added in the sale.report tree view.
closesodoo/odoo#129303
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
before this commit, if there is multiple sale order for a
customer, and if we try to create new invoices for this
orders from the tree view, it creates one invoices for
all the orders.
there will be cases, where we have to create separate
invoices for each orders.
after this commit, a boolean will be introduced in the
wizard, by which user can decide one invoice or multiple
invoice by grouping sale order.
closesodoo/odoo#128351
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
create a recursion
Problem
---------
When you have an analytics plans which is the parent of another one, you
should not be able to choose the child plan as parent of this one.
A user has the possibility to do it; when he saves, we he gets the
error: Recursion Detected.
Objective
---------
Don't show the child plans of an analytics plan to avoid the user to
choose something that raises the error.
Solution
---------
Update the domain of the field `parent_id` to exclude the analytic plans
that are the children of the current plan.
task-3414188
closesodoo/odoo#128302
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
Commit [1] added a margin-bottom on buttons within snippets to make some
breathing space when several buttons follow each other and appear on
multiple lines on mobile.
However, buttons added by the customer do not have a margin, which
causes misalignment when they add it next to a prebuilt button.
This commit checks that whenever a user adds a new button, if any of its
direct siblings is a button, the newly added button and its button
siblings get an appropriate margin-bottom.
It also reverts commit [1] and removes the `mb-2` class on the button in
`s_text_cover.xml` from commit [2], as it is not needed anymore with
this new behavior.
task-3369604
[1]: https://github.com/odoo/odoo/commit/075e915
[2]: https://github.com/odoo/odoo/commit/5ac340bclosesodoo/odoo#125824
Related: odoo/design-themes#680
Signed-off-by: Benjamin Vray (bvr) <bvr@odoo.com>
Summary
-------
Currently, the credit limit feature does not correctly take currencies
into account.
Steps to reproduce
------------------
* install `sale_managment`
* enable 'Sales Credit Limit' in the settings
* on a partner's form view, in the accounting tab, enable
`Partner Limit` and set a limit of 50
* have a currency `C` that's weaker than your company currency (we'll
call it `Q`). Let's say that here, `1 Q = 10 C`.
* have a price list in currency `C`
* create a quotation using the partner and price list mentioned above
* add a product with a price of 5, and no tax.
You should be met with a warning indicating that the customer has
reached his credit limit.
opw-3441361
closesodoo/odoo#130652
X-original-commit: f57653a6dcea04f0bca4e5ca73df3e1075e0fe98
Signed-off-by: Séna Serge Nshimiyimana (sesn) <sesn@odoo.com>
Signed-off-by: John Laterre (jol) <jol@odoo.com>
This commit removes the legacy implementations of Domain, Context
and the pyjs library. All of them exist in the new codebase, and
the few pieces of code that were still using the legacy ones have
been adapted.
Part of task~3439226
closesodoo/odoo#130647
Related: odoo/enterprise#45129
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Prior to this, when searching for a currency in an invoice or journal entry,
"create" and "create and edit" options would show up to propose the creation
of the currency to the user although the currency already exists but is
inactive by default. This could lead to currency duplicates.
This implementation makes it now impossible to create a currency when
searching in a currency field and forces the user to go through the
settings to activate the currency he wants. In addition, we show the
inactive currencies as well in all journal entries that aren't
a miscellaneous operation.
task-3383375
closesodoo/odoo#127707
Signed-off-by: Quentin De Paoli <qdp@odoo.com>