Previously when going to a contract from the contract history, studio
was disabled, because it could not find a action xml id attached.
TaskId-
closesodoo/odoo#85690
Signed-off-by: Kevin Baptiste <kba@odoo.com>
When using the odoo app,
`request.httprequest.user_agent.browser` is `False`,
instead of a string expected.
Therefore, `capitalize` cannot be called
```
2022-03-02 09:44:01,267 1321846 ERROR dle-test1 odoo.addons.saas_trial.models.res_users: 2fa by email failed
Traceback (most recent call last):
File "/home/odoo/src/custom/trial/saas_trial/models/res_users.py", line 267, in _send_totp_mail_code
return super()._send_totp_mail_code()
File "/home/odoo/src/odoo/saas-15.1/addons/auth_totp_mail_enforce/models/res_users.py", line 95, in _send_totp_mail_code
'browser': request.httprequest.user_agent.browser.capitalize(),
AttributeError: 'NoneType' object has no attribute 'capitalize'
```
closesodoo/odoo#85684
X-original-commit: 5a87db453fcfd750934d1a1d62c00d93ad01c0e1
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
To reproduce the issue:
1. Storable product with MTO and manufacture route
2. On your warehouse set 3 steps manufacture
3. Create and Confirm a SO for this product
Error: The smart button linking the Manufacturing order does not appear
on the MO.
Problem was introduced by [1] and fixed by [2,3]. Moreover, [1] wasn't
deployed on versions >14.0 so there was no need for [2] on these
versions ([3] has been merged on all versions). However, [1] have
recently been deployed on next versions ([4]) so we need to FW [2] too
without disturbing the improvements from [3].
[1] 7ab0ac3e56949e5015bb2dcfd2af34b56dee92c8
[2] 96b56ea350c283d824468c591d42e4aeeada0d69
[3] 475e6b3cb027b3127b8e46fd8c9f90abc35162d7
[4] 7d7976a61d0af41ebb4df2e24ba222f6570f689c
OPW-2778883
closesodoo/odoo#85676
X-original-commit: 8ce61133af600ffec4c43033e64c2460366856ce
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Co-authored-by: Arnold Moyaux <arm@odoo.com>
Co-authored-by: Grazioso Andrea (agr) <agr@odoo.com>
Co-authored-by: Adrien Widart <awt@odoo.com>
ISSUE 01
When adding a product to a sale delivery, another picking is generated
to return the additional product
To reproduce the issue:
1. Create two consumable products P01 and P02
2. Create and confirm a SO with 1 x P01
3. Add 1 x P02 to the delivery and validate it
4. Go back to the SO
Error: Another picking has been generated, it's a return for P02. This
picking should not exist.
When validating the picking, because of the new line, a sale order line
is created with a quantity equal to 0. During the SOL creation,
`_action_launch_stock_rule` is called and checks if a procurement must
be created and processed. To do so, it checks if the SOL quantity (0 in
our case) is the same than the procurement quantity (1 in our case):
https://github.com/odoo/odoo/blob/6a0cbff92141961655a5f3e33abc23a2c5b1045d/addons/sale_stock/models/sale_order.py#L543-L549
Since the values are not the same, a procurement is created and
processed.
The feature that updates the SO when adding some products to the picking
has been introduced by 1f0835a9d01b46b5cc617756f854c25541b644a7 and is
correctly working in 14.0 because the condition (in
`_action_launch_stock_rule`) is not the same:
https://github.com/odoo/odoo/blob/ec5475ee881c5ca2bcc992592bfa4edf12f492df/addons/sale_stock/models/sale_order.py#L572-L574
In 14.0, we check if the SOL quantity is greater than the procurement
quantity. The condition has changed in 15.0 due to a new feature
(bda3225c6cc27bb2c2933eda3cc68c6f9708daf3).
ISSUE 02
When delivering more than sold, a useless SM is generated.
To reproduce the issue:
1. Create a consumable product P
2. Create and Confirm a SO with 3 x P
3. Deliver 5 x P
Error: A new line appears (Demand: 2, Done: 0)
Because the delivered quantity is more than expected, an extra move is
created. Then, the extra_move is merged into the initial one a condition
is respected:
https://github.com/odoo/odoo/blob/6f2ba1e1b40a458e23c8ed712927c44d75d86614/addons/stock/models/stock_move.py#L1603-L1610
Here is the issue: the field `date_dealine` is not copied anymore (see
[1]). Therefore, the condition will never be respected
[1] fb781dcf57
OPW-2716309
closesodoo/odoo#85649
X-original-commit: fabc32c4733bb404e74dc111d80aa1fe1edd4bfb
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
Changes made in the commit 27bd6a681037d2794dac2453d7064be3a8d5bb36
apply a white background in every tables and create visual issues
(e.g. the `o_inspector_table` on the right in `documents`).
This commit removes this global rule and applies a `bg-white` only to
the pivot view.
task-2731553
closesodoo/odoo#85642
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
Reorder smart buttons on the hr_employee to have them in the following order:
1. Documents
2. Holiday status
3. Time Off
4. Planning
5. Timesheets
6. Equipments
7. Cars
8. Contracts
9. Appraisal
10. Work Entries
11. Payroll
12. Attendance
13. Extra Hours
- Log in the chatter the name of the plan that has been started via the button "Launch Plan"
- When on mobile, open the Time Off Calendar in month view
- When sending a sms without any message, only display Message once in the invalid fields
- Avoid the sms-help info disappearing when clicking on it and there are characters in the body of the message
- Update the tooltip of phone number in the send sms wizard
- Avoid the employee name to be displayed on two lines on mobile if the name is too long. Reduce the font size instead
task-2735679
closesodoo/odoo#83745
Related: odoo/enterprise#23886
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Part of the overall v16 SCSS optimization/restyle (task-2704984).
Additionally, this commit will fix the border-radius of modals that
should be rounded in community.
task-2734531
closesodoo/odoo#83128
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
This commit modifies most of the usages of read_group and uses
_read_group instead. _read_group doesn't join automatically on the
many2one fields when no order_by is specified, making it more performant
when the "name" of the many2one is not relevant, which is the case for
most back-end cases
closesodoo/odoo#84908
Task-id: 2479334
Related: odoo/enterprise#24877
Signed-off-by: Raphael Collet <rco@odoo.com>
The public read_group method is used by back-end code as well as RPC calls to receive grouped data.
Most of the time, if the data isn't shown to the user, it doesn't need to be sorted on the names of
the many2one, and can just be sorted on their ID instead, avoiding extra joins in the resulting queries
This is a first commit that will reduce the features of _read_group to the strict minimum necessary
to obtain correct grouped data that is never shown to a user
Task-id: 2479334
Part-of: odoo/odoo#84908
Adds a test that verifies that the grouping with a date aggregate
specifier (the only group specifier supported until now) is working correctly
Part-of: odoo/odoo#84908
reshape a bit the read_group tests by ensuring that:
- creation of user is made in batch
- assertions are always assert(actual, expected)
Part-of: odoo/odoo#84908
If a landed cost is validated for an invoice where items either have 1)
a zero value, or 2) have been partially reconciled multiple times until
it is fully reconciled, validation will fail with a cannot reconcile
error because they are already reconciled.
The fix is to use the `reconcilled` attribute rather than checking for
existence of `full_reconcile_id`.
X-original-commit: 608ed487b61c81e38a5d0b856732a8b94c6df64a
Part-of: odoo/odoo#85621
The FieldWrapper and the owl compatibility layer aren't bullet
proof. They allowed us to write new fields in Owl and use them
below legacy views, but in some tricky situations they can produce
undesirable race conditions. In particular, the FieldBooleanOwl
sometimes produces a crash in tours, making runbot builds fail
randomly.
This commit makes a special case for "boolean" when determining
which field widget/component to use: we always take the legacy
FieldBoolean, s.t. the FieldBooleanOwl is no longer used in
views. This is obviously not the perfect solution, but those
issues are really hard to reproduce in practice (it's rather
a concern for tour tests). Moreover, that FieldWrapper/compatibiliy
layer architecture is about to be removed anyway, as we are
rewritting everything with a top-down approach, including views
and fields.
Runbot build errors: 2158 3232
closesodoo/odoo#85573
X-original-commit: f74f81543c1d899dbb0dc201d26a460fb8ae61ac
Related: odoo/enterprise#24869
Signed-off-by: Géry Debongnie <ged@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
According to [1], the update function can be called before the tip
is rendered (i.e. when this.$el is null). [1] aimed at preventing
that function to crash when called in that situation. However, if
the function _delegateEvents is called and this.$el is null, it
crashes as well. This was a cause of non deterministic runbot
failure.
[1] a34cd7c662
Runbot build error: 3382
X-original-commit: 66dd147eb6d0aab10bf4d8883fa4965b76f55de8
Part-of: odoo/odoo#85573
Before this commit, it could happen that the trigger element of a
step was in the DOM at time t0, but was no longer in the DOM at
time t1, when we tried to actually execute the step, because of a
non zero running_step_delay. This commit checks again the presence
of the trigger in the DOM at t1, and if it isn't resets the step.
The same reasonning applies to the ui blocked check: we never want
to run a step if the ui is blocked.
X-original-commit: 119d509feb2cb93c648160af2848146e9c623e21
Part-of: odoo/odoo#85573
All named arguments on the catch block must be used. If for some motive
the named argument on the catch block is not used, its name must begin
with '_'.
closesodoo/odoo#85569
Related: odoo/enterprise#24867
Related: odoo/design-themes#552
Signed-off-by: Géry Debongnie <ged@odoo.com>
Before this commit the industries were only matched on starting with or
containing the searched term and the autocompletion results were shown
alphabetically.
After this commit the industries are also matched if they contain all
individual search terms.
All terms are matched against the label and each synonym (if any exists),
but the industry is only displayed once, with its label.
If there are 7 results or less, the results are alphabetically sorted on
the label, otherwise the IAP result order is kept (which is expected to
be by descending cross-theme total hit count).
The truncation of the matching list to 15 results gives higher priority
to labels with the least words (so that "restaurant" still appears even
if there are 15 more common sub-types).
task-2688878
closesodoo/odoo#82018
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Co-authored-by: Romain Derie <rde@odoo.com>
Usecase to reproduce:
- 2 product A in stock
- Deliver 1 the 1/1/2022
- Deliver 1 the 4/1/2022
- Deliver 1 the 2/1/2022
Current behavior:
Check Availability the 3 pickings at once. The 2 first are reserve
Expected behavior:
The picking for 1/1/2022 and 2/1/2022 are reserve
It happens because the sorted is only done on date deadline
opw-2762223
closesodoo/odoo#85584
X-original-commit: fb3b261ef56a62e2c753191313682287aa3a12fb
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Purpose:
Allow users to make sure they will get an answer to the questions they ask
attendees while they register.
e.g.:
- You organize activities for kids and want to make sure you have a second
phone number available in case of emergencies
- You organize B2B events and need to know in which industry your attendees
work
- You use the Event/CRM bridge and plan to filter attendees based on those
answers
...
Specifications:
In the question form view, a boolean "Mandatory Answer" has been added.
In the list view, that field has been added as column.
In the registration form:
- "*", next to each mandatory question has been added
- "*" has been added next to name and email which were already mandatory
- the mandatory question have been actually made mandatory by preventing
user to submit empty answer
Remark: once_per_order was missing in the list view of the event template
questions. We have added it as well as "mandatory answer" field. The
question list view of the template and the event are now almost identical
(the button to the stat is obviously not present in the template).
Technical remarks:
- To ensures that multiple choice answer are filled by the users, we have
added an empty choice selected by default which forces the user to choose
one option.
- Empty answer were already filtered by the server and not inserted in the
database (in controller method _process_attendees_form, value evaluated
to false are not inserted)
Task-2745835
closesodoo/odoo#83586
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
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>