Step to reproduce:
- Create a time off type T with approval 'time off officer'
- As user U create a time off request of type T
- Login as the manager of U (which should not be a time off
officer)
- Approve the time off of U
Current Behaviour:
- Time off is approved
Behaviour after PR:
- Time off is not approved and an error is raised
opw-2753845
closesodoo/odoo#85622
X-original-commit: 8a0564369baf9de7797a58ab0cd5cae870b910cf
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Damhaut Florian (flda) <flda@odoo.com>
Current behavior:
When adding a coupon with a code in a PoS (restaurant/bar) if you switch table and come back to the first table the coupon code is disappearing
Steps to reproduce:
- Activate promo code for a PoS (restaurant/bar)
- Go on table A, add some product and enter a code for the order
- Leave table, and come back to table A
- The promo code has dissapeared
note: A better fix could be done on master adding bookedCouponCode on order field to save it between the table switching.
opw-2733081
closesodoo/odoo#85524
X-original-commit: bdc4895226374932a92a543ff25ea1a41d5a4ce8
Signed-off-by: Grazioso Andrea (agr) <agr@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
Changes made in #78199 would remove the Purchase Security Lead Time from
any orderpoint as long as the 'purchase_stock' module was installed,
whether the orderpoint was related to purchase or not.
Task-2721378
closesodoo/odoo#85594
X-original-commit: 3bd9b7a77a1e0e05ea479945d5cd8085f6981feb
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Quentin Wolfs (quwo) <quwo@odoo.com>
Makes it possible to filter on My Team or My Department and search on
manager.
TaskId-2780061
closesodoo/odoo#85418
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Currently when user starts using the app and tries to 'import records' from
'Mailing List Contacts', there is no templates available to assist the user.
This commit adds import template for mailing contacts to assist the users
in importing records.
taskID-2763984
closesodoo/odoo#84804
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Waiting the complete migration, some classes needs to be available to already
migrates xml files.
This file will be deleted once we're done.
closesodoo/odoo#85586
Task-id: 2704984
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
When unpacking a package, the quants are not merged
To reproduce the issue:
1. In Settings, enable "Delivery Packages"
2. Create a storable product P
3. Update its quantity: 5
4. Create a planned receipt R with 10 x P
5. Mark R as Todo
6. Put the 10 x P in pack (PK)
7. Validate R
8. Unpack PK
9. Consult the on-hand quantity of P
The use case is already fixed thanks to:
5e08aa3def
This commit only adds the associated test
OPW-2713407
closesodoo/odoo#85575
X-original-commit: 76400ba0f6c2c15d9478b762a0a393129cd20f5e
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
Just before deleting records, we mark fields on dependent records as "to
compute", and their actual computation should happen after the records
have been deleted. The problem is that checking security rules may
trigger the computations that have been prepared. So we should check
security rules before marking dependent records.
closesodoo/odoo#85574
X-original-commit: 79908bc757a239c97bd2b4cda505b7b8df769325
Signed-off-by: Raphael Collet <rco@odoo.com>
This commit replaces Component by LegacyComponent when the component
uses removed features from owl 1 like getting its `el` or `trigger` an event.
It also adds `useService("rpc")` when component needs it.
closesodoo/odoo#85389
Related: odoo/enterprise#24745
Signed-off-by: Géry Debongnie <ged@odoo.com>
This commit replaces Component by LegacyComponent when the component
uses removed features from owl 1 like getting its `el` or `trigger` an event.
Part-of: odoo/odoo#85389
This commit replaces Component by LegacyComponent when the component
uses removed features from owl 1 like getting its `el` or `trigger` an event.
Some tests are updated to have less LegacyComponent.
Part-of: odoo/odoo#85389
This commit introduces LegacyComponent and removes patches on Component.
LegacyComponent is used instead of Component when the component
uses features from owl 1 like getting its `el` or `trigger` an event.
Part-of: odoo/odoo#85389
Steps :
Archive your employee, go to your timesheets and add time on a task T line
Go to task T and note that a line have been added without any employe
Cause :
By default, views do not show archived values.
Fix :
Show archived employees with context key 'test_active=False'.
opw-2740228
closesodoo/odoo#85563
X-original-commit: 071d58fe01debf9f5c0e86e5f42eada2061fe40f
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
This commit fixes the webhook base url to use the override defined in
the payment acquirer model.
It ensures the base url follows the same logic as the success and cancel
urls defined in the `checkout/sessions` request payload.
closesodoo/odoo#85558
X-original-commit: d3f4619b731d71ccd2af26b9fa148d2957773680
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Thibault Libioulle (tle) <tle@odoo.com>
Bug
===
When sending a mailing (with a valid outgoing mail server), during the
"sending" stage, the blue alert div is visible but empty.
The reason for that the scheduled count is only visible when the
mailing is in "in queue" state (and in this state the alert should
always be visible to display "Mailing scheduled for ...".
Task-2746886
closesodoo/odoo#85545
X-original-commit: 02285dbde93ac8e710a569aa0018acbae4728d9e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Steps :
Create a recurrent task.
Delete it.
Run the cron "Create Recurring Tasks".
Issue :
IndexError: tuple index out of range.
Cause :
The cron calls a method which takes the last task of the recurrence
as a model. As there is no such task, an python error is thrown.
Fix :
Do not display the "Continue Recurrence" button when deleting the last
task of it.
opw-2743788
closesodoo/odoo#85176
X-original-commit: 4f143131a1722e87b7dbb6b54a76b81ce2ba40cd
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Step to reproduce:
- create a unit of measurement (UoM) and set it's rounding to 1.000
- create a product that uses this UoM
- create two packaging for this product
- create a sales order and in the sales order line set the created product
- you can already see the packaging is set, but anyways set a quantity to near the defined in the package
- the quantity will be updated
Current behaviour:
- Packaging always update to bigger package even if it doesn't fit
Behaviour after PR:
- Packaging update to the biggest package which is a full divider of the qty
- If no package fit, then no package are applied
opw-2718146
closesodoo/odoo#85351
X-original-commit: ad047434a802abfc9f4203897aec9cda149dd43b
Signed-off-by: Tiffany Chang <tic@odoo.com>
Signed-off-by: Damhaut Florian (flda) <flda@odoo.com>
As the proxy client user can only be accessed by base.group_system,
we need a sudo() to make it possible for a regular user to send
invoices.
closesodoo/odoo#85566
X-original-commit: 79a076b832a785b78ed6d73d539d3eae6eb2fd02
Signed-off-by: William André (wan) <wan@odoo.com>
Before this commit, In the product form, when the selected uom is Hours and as Hours is the default uom, we display this conversion (1.0 Hours = 1.0 Hours) which is useless
Before this commit, Kanban is the only view available for projects. With this view, we can't select a batch of projects and display optional fields
Before this commit, Some wordings didn't have a significant meaning.
This commit hides uom conversion when selected and default uom are the same.
This commit adds the projects tree view.
This commit improves some wordings according to what was mentionned in the task.
task-2724965
closesodoo/odoo#82135
Related: odoo/enterprise#23206
Related: odoo/upgrade#3207
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
Currently, when user enter the timsheet in editable tree from the
task form view the description is not required and if keep empty then
it will add the '/' as default description but in the mobile form view
of the timesheet description is still required.
so in this commit, make description non required in timesheet form
view of mobile.
task-2740041
closesodoo/odoo#85460
X-original-commit: 1c82a66cf975203b6a44f23c6a866c1d7b4637ed
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
mode
Purpose:
Include the name of the partners so that:
- it can easily be updated
- it is easier for users to recognize who is who
To generalize this modification, a new attribute has been added to the model
field descriptor (odoo/fields.py): default_export_compatible.
Setting this value to True on a field of a model will force that field to be
included by default in the exportation when "import-compatible export" is
selected.
Specification:
If the user goes:
Contacts > List view > Select Records > Action Export
> I want to update data
The field name is selected by default
The fields selected by default for export are the columns of the list so that
what is exported by default is what the user sees on the screen.
The display name is one of the column but is not importable.
When the option "I want to update data" is selected, only field that are
compatible for importation are selected and then display name is no longer
selected.
With this modification, the name is selected instead.
Technical:
- a new attribute "default_export_compatible" has been added in odoo/fields
- the controller /web/export/get_fields that lists the fields available
for exportation has been modified to add a default_export attribute on each
returned field. This new attribute is set to True when import_compat is True
and default_export_compatible is True on a given field.
The client uses that information to force by default the field for exportation.
Task 2734222
closesodoo/odoo#83697
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, the numbering system used by luxon to parse and
format dates was the one set by the current locale. This means that
any date sent to and received from the server would also be expected
to use the current locale and numbering system. The consequence of
this behavior is that any domain generated by arbitrary dates would
trigger a server error.
This commit forces the numbering system to 'latn' (browser default) for
dates used by the server.
closesodoo/odoo#85487
X-original-commit: c8ef1fcb2277993f90a8e237dbd415de7d1b88bc
Related: odoo/enterprise#24822
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
* Remove old unused parameters
* Move `backend_url` logic from qweb to python
* add comments, clean and simplify some code/logic related to portal
page of sale orders
Part-of: odoo/odoo#84644
* Rename decline route to make sure there won't be any conflict with
another controller method
* Use new translation API (pass string format params to the translation
method)
* always pass token param to _message_post_helper, it should correctly
manage any falsy value as parameter
* code cleanup
Part-of: odoo/odoo#84644
Purpose
=======
for example: in Europe/Brussels timezone, the presence
hour of an employee using this timezone is up with one hour.
The issue is that we give a localized time to format_time pretending
it's not (removing the tzinfo), so it's converted twice.
Specification
=============
To solve the issue, just give the time in UTC to format_time.
opw-2741634
closesodoo/odoo#85510
X-original-commit: 8953eb2e387bd046c586e815c10c1e30b00db13d
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Steps to reproduce the bug:
- Go to inventory > configuration > Operation types > Manufacturing
- Set "Reservation Method" to "Manually”
- Create a storable product “A”:
- Update on-hand quantity to 10
- Create a storable product “B”:
- Create a bill of materials and add the product B as component
- Create and confirm a MO with 2 * product B
- Product A is not reserved for this MO (works as expected)
- Validate the production of 1 unit and create a backorder
Problem:
product A is reserved for the backorder because there is no verification of the reservation method before assigning it.
Solution:
No need to assign here, because when an MO is confirmed, move_raw/move_finished are confirmed too: https://github.com/odoo/odoo/blob/89ddaa49b901787f58a3fa9efb4115d5f2038611/addons/mrp/models/mrp_production.py#L1172
And when a stock_move is confirmed, it is assigned or not by checking the reservation_method:
https://github.com/odoo/odoo/blob/dda9700d8236091626cbd78efc0ca4116e1e1acd/addons/stock/models/stock_move.py#L1239-L1245
opw-2744513
closesodoo/odoo#85508
X-original-commit: 5926bb178236a74999a7868f0acf4ee86b61d7b8
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
Prior to this commit the price in the product dynamic filter was not
correctly computed since the pricelist was not available in the context.
This commit provides a fallback on request website pricelist in order to
display a non-zero price if it exists.
task-2765828
closesodoo/odoo#85507
X-original-commit: 88bfd8a60cefac45e73cd032204c9b90a862ee6c
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Recently, onchanges have been converted to computed fields
in sale scope (See #79093).
But we noticed the conversion of the logic allowing users to update
the prices of existing lines if the pricelist was modified didn't behave
correctly as a precomputed computed field.
This commit reverts this change and brings back the behavior of
show_update_pricelist as a field update through onchange.
Fixes two problem:
* Show_update_pricelist value on new sales orders was not saved
* SO created programmatically (not through the interface) always
had show_update_pricelist set as True, even if the pricelist wasn't
modified.
This meant that orders created by a connector (ebay, amazon, ...) showed
the "Update Prices" button even when it made no sence because the prices
were specified by the connector.
closesodoo/odoo#85506
X-original-commit: 99313bcff9f99215fda176f3e92516b1da16e579
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
* http.py:docstring of odoo.http.route:19: WARNING: Unexpected
indentation.
* http.py:docstring of odoo.http.route:20: WARNING: Block quote ends
without a blank line; unexpected unindent.
* http.py:docstring of odoo.http.route:30: WARNING: undefined label:
csrf
-> No section in the doc exists with reference csrf
* Add docstring for the default_lang method.
closesodoo/odoo#85505
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
When serving a page, fetch the requested page and the menu's pages in
one go.
This will only impact pages that do not have a menu entry, which is the
most common form of pages.
So, instead of:
- read page
- read page's view
and later:
- read menu pages
- read menu pages' views
Fetch everything together:
- read served page + menu pages
- read served page's menu + menu pages' views
task-2774979
closesodoo/odoo#85456
X-original-commit: 16bf7cca8e8d452ce9131d9d86ff5b23789da4e1
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Getting the `res.company` record by browsing the `company_id` cached
value from `website` instead of reading it directly on the website
record will avoid a read on the website table.
While this might seems unusual and not elegant, since this is a very
low level method used to render every view, it seems fine.
task-2774979
X-original-commit: bc643a573a7339c82661cbcff2cc59bdd0eec3e3
Part-of: odoo/odoo#85456
We can easily avoid a read on the website table when serving the
homepage by simply caching the website.homepage_id value and then
browsing the record (no query needed) instead of reading it on the
website record.
While this code is not really elegant, it seems like a good tradeoff to
gain a query on this particular homepage serve controller, which is the
main entry point of a website and generally the page the more often
served.
task-2774979
X-original-commit: 69b443b85656c895c66a1f83b235f5d1e53727d4
Part-of: odoo/odoo#85456
* website, website_blog (perf)
If the source values is only composed of empty elements (list of `None`
values), don't try to translate it, as there is nothing to translate
anyway.
While the translation method being called (xml_translate,
html_translate) won't be costly as they will return instantly if the
provided value is falsy, there is still an SQL Query made to get the
callable translation method, which we won't actually use.
This commit avoids that query if we already know we won't do anything
with the translation method.
task-2774979
X-original-commit: e1eb5a6e1610a9550a59ba229a83b9e70e10aa88
Part-of: odoo/odoo#85456