Commit Graph
147686 Commits
Author SHA1 Message Date
Arnold Moyaux 6cf6131ab0 [FIX] delivery: missing field rename in forward port
In saas-15.1 move_lines on `stock.picking` has been rename in
move_ids.

It was miss during #81595 and it's fixed now

closes odoo/odoo#82397

X-original-commit: fd531c7b0baa742cefb7a09c557617806d8a563a
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-01-07 19:54:40 +00:00
Julien Giannone 2e5606b135 [FIX] mail: fix to add reaction on a message
closes odoo/odoo#82388

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-01-07 19:06:46 +00:00
Didier (did) 5a958cb3ff [IMP] mail: move fileUploader methods in the model view
task-2579306

closes odoo/odoo#81848

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-01-07 17:35:03 +00:00
Xavier BOL (xbo) f50ad369ac [FIX] project: show 'View Task' in subtask when same project than parent
Before this commit, when the a subtask is in the same project than the
parent one and the internal user has manually set the project to see
this task in the main kanban view of tasks of the project. In project
sharing view, the collaborator cannot see the 'View Task' button in the
sub list view of subtasks shown in the form view of the parent one.

This commit fixes it to shown the button when the subtask is in the same
project than the parent one.

Steps to reproduce:
==================
1) Create a Project A
2) Create a Task T in the Project A
3) Add a subtask in T and set the project A in the subtask
4) Share in edit mode the project A to a portal user
5) Log out and log in as the portal user
6) Go to the Project A to see the kanban view of tasks in project
sharing feature.
7) Go to the task T and see the subtasks list view.

Expected Behaviour:
==================
The 'View Task' should be shown for this subtask because the subtask is
in the same project than the parent one.

Actual Behaviour:
================
This button is not shown.

Bug found during the testing of the task-2648955

closes odoo/odoo#82383

X-original-commit: ddafb7fa5aff30e2cb16dcdcb5cdbd44397de126
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-01-07 14:35:40 +00:00
Achraf (abz) 6c70448de0 [FIX] web: Add word-break to kanban_content
When we create a record with a very long continuous title (without spaces) the string comes out of the kanban block.
Reproducible on several applications such as Notes, CRM, etc.

opw-2680915

closes odoo/odoo#82348

X-original-commit: efe1312535b3af20c81cfd6cb10cbf3e7e5f8f90
Signed-off-by: Samuel Degueldre <sad@odoo.com>
2022-01-07 09:51:16 +00:00
Rob Coekaerts e4ac144ace [IMP] hr_holidays: 'My Department' filter now includes child departments.
The "My department" filter in the "Time Off" overview menu is changed to also include the leaves of employees from child departments (all the way to the bottom of the hierarchy).

task-2699541

closes odoo/odoo#81597

Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-01-07 07:26:53 +00:00
Josse Colpaert efce84f3d3 [FIX] l10n_it_edi_sdicoop: avoid tracebacks when no file, batching
When we ack a file for having correctly received the response e.g.,
the file is deleted on the server and will not have a file key in the reponse,
at least before the server itself will have a new response to share.

Before, it would traceback, while now, we do nothing.  (as we are still waiting)

Also, when we get the notice that the term of 2 weeks is passed, it means
it is successfull.

Also, for the batching we had a traceback, because it was possible to have
a batching mixing step 1 and step 2, which fails doing invoices.l10n_it_edi_transaction

So we added whether there is a tranaction or not in the batch key.

opw-2703669

closes odoo/odoo#82358

X-original-commit: c20e3b95a82fd35c1dcefd159525f59e2c255e9d
Signed-off-by: William André (wan) <wan@odoo.com>
2022-01-06 19:31:05 +00:00
Touati Djamel (otd) bc6a92d0c9 [FIX] stock_account: fix user group check
Steps to reproduce the bug:
- Connect as Admin
- install stock_account
- Go to inventory > Product Variants > choose any product > click on the FORECAST button
- Traceback

Problem:
docs['product_templates'] can be False, so we can't use it to check the user's group: https://github.com/odoo/odoo/blob/15.0/addons/stock/report/report_stock_forecasted.py#L98

Opw-2728473

closes odoo/odoo#82352

X-original-commit: 227a639b34fc5121d135346a158ab17486a53d40
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2022-01-06 19:31:00 +00:00
Hardik Prajapati 435730da10 [FIX] stock: traceability report traceback with productions
use case to reproduce:

    receipt a product tracked by lot
    produce a lot with a component tracked*
    open the traceability report for the lot's component

you have a traceback.

it's due to last_delivery_partner_id field present in the tree view of lots.
it triggers _compute_delivery_ids that call _find_delivery_ids_by_lot in multi.
the call in the recursion(trigger by *) redefine delivery_by_lot and erase the previous result.
so the cache is not correctly update and traceback

closes odoo/odoo#82351

X-original-commit: e6bcc77c58d39adbd782e776eb2f6d5c470eb0e2
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-01-06 19:30:57 +00:00
roen-odoo fef39f82ac [FIX] mail : Remove double signature on invoice email
Current behavior :
When sending an invoice by email there was 2 signature in the mail

Steps to reproduce :
Create an invoice
Send it by email
Check the mail, there are 2 signatures

opw-2703272

closes odoo/odoo#82347

X-original-commit: 00965df4be591b952b339038c324d7e92596e3d5
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-01-06 19:30:53 +00:00
Adrien Widart 38a3f7fea4 [FIX] {purchase_}stock, product: base product name on supplier
Suppose a product with several suppliers, all with the same partner. On
the purchase order, the product description will always be based on the
last supplier

To reproduce the issue:
1. Create a vendor V
2. Create a product P:
    - Type: Storable
    - In Purchase, add a line L01:
        - Vendor: V
        - Vendor Product Name: Name01
        - Vendor Product Code: C01
        - Quantity: 1
        - Price: 10
    - In Purchase, add a second line L02:
        - Vendor: V
        - Vendor Product Name: Name02
        - Vendor Product Code: C02
        - Quantity: 20
        - Price: 2
    - Once P is saved, ensure the lines order in the purchase tab:
        - L01
        - L02
3. Add a reordering rule on P:
    - Min: 1
4. Run the scheduler
5. Open the generated PO

Error: The description is incorrect ("[C02] Name02" instead of "[C01]
Name01")

When computing the display name of the product,
https://github.com/odoo/odoo/blob/7691567286869ca65e63fc79c2cee11e1f415fcb/odoo/models.py#L1728-L1730
`name_get` returns a tuples list: `[(37, '[C01] Name01'), (37, '[C02]
Name02')]` where `37` is the product identifier. This list is then
converted into a dictionary and here is the issue: it will use the last
tuple to define the value for key `37`, i.e. "[C02] Name02". Therefore,
`name_get` should return the correct name, and only this one.

Another issue could be highlighted: when the user changes the quantity
of the purchase order line, if another supplier info is selected, the
description won't be updated (for the same reason as above)

OPW-2702616

closes odoo/odoo#82321

X-original-commit: a42608214f2e9ef3f5e59b4b54cd7f72a6019e06
Signed-off-by: Tiffany Chang <tic@odoo.com>
Signed-off-by: Adrien Widart <awt@odoo.com>
2022-01-06 19:30:49 +00:00
thcl-odoo fcabebf687 [FIX] website_sale: Only internal users can be picked as salesperson
Current behavior :
Any users (not only internal users, but portal users too) can be selected
from the `Salesperson` field in the Settings. 

Exepected behavior :
Only internal users can be selected.

Steps to reproduce :
- Install eCommerce
- Go to Settings, Website category 
- Find Orders Followup category
- Try to pick a salesperson

OPW-2709759

closes odoo/odoo#81368

Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-01-06 18:44:05 +00:00
Kevin Baptiste c0205b3431 [IMP] website_forum: adapt tours
The enterprise module website_helpdesk_forum changes the demo data
karma_answer value to 0 for the default Help forum thus breaks the tour.

odoo/enterprise#19870
odoo/upgrade#2681

closes odoo/odoo#74353

Taskid: 2499623
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-01-06 16:21:08 +00:00
Brice bib Bartoletti 475719b101 [FIX] account: soften duplicate ref constrains
The aim of this commit is to allow EDIs to create and save account move
even if a supplier reference is duplicated.
This is achieved by delaying the moment to which the constrains is
triggered.

Before this commit:
A user can only upload a bill once. (xml ubl format for instance)
If he needs to upload it a second time, he will be forced to find a
workaround.

After this commit:
User will be able to upload as many bill as he wants but will receive a
ValidationError when trying to post the invoice if the reference is
duplicated.
The user will be able to post the bill very easily by changing the
reference a bit if he wants to pursue.

closes odoo/odoo#82303

Community-pr: https://github.com/odoo/odoo/pull/81748
Enterprise-pr: https://github.com/odoo/enterprise/pull/23255
Task: 2612299
X-original-commit: 200614876e62192e1a5ce2f30ec7aa8a1de77672
Related: odoo/enterprise#23281
Signed-off-by: William André (wan) <wan@odoo.com>
2022-01-06 14:46:48 +00:00
alt-odooandrafaelbn d34dd8cac9 [CLA] Add Corporate Moduon CLA
closes odoo/odoo#82324

X-original-commit: aa9dcb285d201f9b2cdb68a1bb3f2571fd29ba22
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Co-authored-by: rafaelbn <rblasco@moduon.team>
2022-01-06 11:45:31 +00:00
Audric Onockx (auon) c64656266f [FIX] hr_holidays : allow user to submit past sick days
Steps:
- Users > Admin > Acces Rights > Human Resources
	-  Time Off : empty
- Time Off > a past day > Time Off Request wizard :
	- Time Off Type :  Sick Time Off
- Confirm

Issue:
- User Error : 'You must have manager rights to modify/validate a time off that already begun'

Cause:
- When creating the request, attachments are writen onto the record.
- Yet the user do not have rights to write in hr_holidays.

Fix:
- sudo in the compute and inverse methods that write the attachments.

opw-2714597

closes odoo/odoo#82311

X-original-commit: 9bc197fcf6c87678c82863706344e449b1cd69c1
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Onockx Audric (auon) <auon@odoo.com>
2022-01-06 11:45:27 +00:00
thcl-odoo f27ce3c797 [FIX] mass_mailing_sale: ensure mailing demo has body_arch field
Current behavior :
Mail body is missing on mailing demo

Steps to reproduce :
- Install Email Marketing & Sales
- Go to Email Marketing
- Select "Our last promotions, just for you !"

Reason :
mass_mail used to  the body_html but since this commit (de56e1919d11cc497341f59ef38fb2d756ede7a3) it now shows the body_arch field (and body_html in debug mode).

OPW-2702534

closes odoo/odoo#82279

X-original-commit: a4a6f786c5f8deb424132ef4edff62e2662d5d58
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Claude Thibault (thcl) <thcl@odoo.com>
2022-01-06 11:45:23 +00:00
Thanh Dodeur 1ab3d53588 [IMP] mail: make the mute and deafen button behavior more intuitive
* When a user is already muted when setting their state as deafened
the mute state should remain after the deafen state is removed.
* When a user clicks the microphone (mute/unmute) button while being in
the deaf state, the user should end up undeafen and unmute.

task-2720026

closes odoo/odoo#82197

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-01-06 11:45:20 +00:00
Demesmaeker f9a460d814 [FIX] payment_adyen: discard refund notifications for unknown source txs
Before this commit, a ValueError would be raised upon receiving a refund
notification for a source transaction whose reference was not found in
the database. As only ValidationError's are caught by the webhook
controller, the acknowledgment string was never returned to Adyen and
the endpoint was automatically disabled.

This commits adds a check on the existence of the source transaction to
allow discarding refund notifications if it is not found.

task-2704522

closes odoo/odoo#82291

X-original-commit: 06d79dc3d01079db27f16dc56212cf68635e8c5d
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-01-06 08:35:07 +00:00
Akim Juillerat 2aa5d2a666 account: Fix journal dashboard graph query order
As the query results are set in a list of dicts relying on the
position of the dicts inside the list, the SQL query must ensure
the results returned by postgres are ordered properly so that it
will match the order in which the dicts are defined inside the list.

closes odoo/odoo#81978

X-original-commit: bac93bf56ff67a89f9381137b0c67642a302e6bb
Signed-off-by: Laurent Smet <las@odoo.com>
2022-01-06 08:34:57 +00:00
Habib (ayh) 1906dbfe4e [IMP] stock: include UOM object in aggregated product quantities
with l10n_mx_edi_stock being introduced in enterprise - we require the unit of measure object in the aggregated lines so that it can be used on the delivery report.

odoo/enterprise#21591
Task-2585661

closes odoo/odoo#82224

X-original-commit: 4d074686c1eb716020b950ea86650ecf2bda08aa
Related: odoo/enterprise#23244
Signed-off-by: Josse Colpaert <jco@odoo.com>
Signed-off-by: Ayob Habib (ayh) <ayh@odoo.com>
2022-01-06 07:42:54 +00:00
Josse Colpaert f810f2d120 [FIX] l10n_sa_invoice: amounts in the QR code should be in Saudi Riyal
closes odoo/odoo#82304

X-original-commit: 3b50fb042617246d3ba2db378f6d08ffb42afdb3
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-01-05 23:05:43 +00:00
Achraf (abz) 39e11b34d3 [FIX] wesbite_sale: Prevent traceback on website/shop without headers
When you disable the headers through the website editor and try to add
a product to the wishlist, a traceback occurs because there is an animation
that uses the dom element of the wishlist that doesn't exist.
We can avoid the animation in the case where the wish is not defined

reproducible in 14.0 with the wishlist (must be activated in settings)
and in 15.0 with the cart and the wishlist

opw-2722163

closes odoo/odoo#82294

X-original-commit: 2a9768f6a09751af82ccabee3d565f622ea418f3
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-01-05 18:02:42 +00:00
Xavier BOL (xbo) c023a4f065 [FIX] sale_project: display the SO related of the project
Before this commit, when the project has no SO set in its model and it
has a task with a SO set. When the user clicks on the Sales Order stat
button shown in project form or the project update. He sees a form view
of `sale.order` to create a new record because the action does not give
the id of the Sales Order related. Indeed, we give the id of the SO set
on the project if we found only one SO related to the project.

This commit fixes the issue by given the id of the SO related to allow
the user to see the SO related to the project.

Steps to reproduce:
==================
1) Create a project A with allow_billable set to `True`.
2) Create a Quotation for a customer C with a SOL containing service
product and confirm it to create a SO.
3) Create a task in the project A and set the customer C to this task
and set the SOL of the SO created in the step 2.
4) Go to the project update of the project A
5) Click on the 'x Sales Orders' stat button.

Expected Behaviour:
==================
The user should see the SO related to the project, that is the one
selected in the related task.

Actual Behaviour:
================
The user sees an empty form view of `sale.order` to create a SO because
no SO is found.

Part of task-2710808

Closes #81940

closes odoo/odoo#82284

X-original-commit: de702d921a321a8b783af020538ceaf4ef3af10f
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-01-05 17:12:05 +00:00
Xavier BOL (xbo) 2acd0903a1 [FIX] sale_{project,timesheet}: hide SO stat button in project update
Before this commit, when the project has a SO related, the 'Sales Order'
stat button is shown in right side panel in project update even if the
allow_billable=False in this project. If `allow_billable=False` then the
project should be non billable and thus this stat button should not be
visible.

This commit hides the stat button when the project is
non billable.

Steps to reproduce:
==================
1) Install sale_timesheet module
2) Create a billable Project
3) Edit the project to set a SOL (Set a customer and a SOL) and save.
4) Edit the project and set `allow_billable` to `False`.
5) Go to the kanban view of the Project Update.

Expected Behaviour:
==================
The 'x Sales Orders' stat button should not be visible.

Actual Behaviour:
================
The 'x Sales Orders' stat button is visible.

Part of task-2710808

Closes #81940

X-original-commit: bc0226583a48f9eefc79c3e2a8e7069d6181f8ea
Part-of: odoo/odoo#82284
2022-01-05 17:12:05 +00:00
Alvaro Fuentes 17bb0af7a8 [FIX] mail: check res_id!=0 when checking access rules
Although 0 is a valid value (integer), this has been (ab)used to signal
that a mail activity is not linked to any other record via res_id.

The issue is that when we have `0` as res_id value we get an error here
https://github.com/odoo/odoo/blob/158c0ae425b3be446d81c3a6f4387b2d9426d10e/addons/mail/models/mail_activity.py#L377
more specifically on
https://github.com/odoo/odoo/blob/158c0ae425b3be446d81c3a6f4387b2d9426d10e/odoo/models.py#L3603
with `AttributeError: 'int' object has no attribute 'origin'`

To avoid the issue, here we discard id `0` when checking the linked
records access rules.

On #81292 (targeting master, >15.1 at the moment of writing) a
constraint will be added to avoid `0` on `res_id`.

closes odoo/odoo#82281

X-original-commit: f96cec284a0714ae8eaa264d7adee503a96618d7
Signed-off-by: Christophe Simonis <chs@odoo.com>
2022-01-05 16:21:59 +00:00
Kevin Baptiste 7bde79a367 [IMP] hr: add populate script
Add a populate script to automatically create lots of
employees/jobs/tags/work locations/departments.

closes odoo/odoo#82259

Taskid: 2728608
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-01-05 16:21:55 +00:00
Thanh Dodeur 55ab14e933 [FIX] mail: ensures that the audio track has the right enabled state
This commit fixes a case where the track could be left enabled when
transitioning from voice activation to push-to-talk (the track would
still properly be disabled on the next release of the push-to-talk key).

part of task-2720026

closes odoo/odoo#82273

X-original-commit: 96804f4eba76ce3c016ae34a9829f88ab8c7e0f3
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-01-05 15:30:45 +00:00
Didier (did) 1ec153ecbf [IMP] mail: improve the notifications on mail_channel/add_member
Before this PR, the mail_channel/add_member function use multiple _sendone. We
can compile the notifications inside a single sendmany.

Task-2726415

closes odoo/odoo#82198

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-01-05 14:36:03 +00:00
Odoo's Mergebot b79146de14 [MERGE] rating,project: use rating average instead of last rating in project
Before this changes, we only use the last value to determine the customer satisfaction of a task. The problem is if the customer was happy during all the process of a task and at the end of the task, he is unhappy. The customer satisfaction for this task will be bad because the last rating made for it is negative.
Moreover, the customer satisfaction shown in `project.project` model computes the percentage of Happy ratings divided by the total of ratings in its tasks. For instance, if we have a project A with 3 tasks T1, T2 and T3 and we have a rating for each task as follow:
- R1 for T1 has 3/5 as rating value.
- R2 for T2 has 5/5 as rating value.
- R3 for T3 has 1/5 as rating value.

So the percentage of Happy Rating will be equal to 33% but globally, we could see the customers were globally okay for this project because the rating average is equal to 3/5. Indeed only one customer was happy but all the others have not given 1/5 as rating score. So the project could globally be acceptable for the customers.

The goal of this changes is to only use the rating average instead of using the last rating value (for the tasks) or the percentage of happy rating for the projects. With the rating average we could have a global idea of the customer satisfaction for a task or an entire project.

task-2671848

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#81027

Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-01-05 15:35:58 +01:00
Robin Heinz e34e8c36d7 [FIX] pos_restaurant: avoid double order in backend.
This fix removed the duplicates of an empty order when using the floor management. Before, when syncing order without order lines, it was creating an empty order in the backend.
When reloading the table, it was creating a new empty order, ignoring the previous one. That problem lead to empty unpaid draft order.

closes odoo/odoo#57952

Task-id: 2308862
Signed-off-by: Masereel Pierre <pim@odoo.com>
2022-01-05 13:44:55 +00:00
Xavier BOL (xbo) b08dea5aad [IMP] rating,project: display rating text based on the average rating
This commit adds a rating text field called `rating_avg_text` to display
a text based on the value of `rating_avg` field in `rating.mixin` model.
Here is the text displayed based on the value of `rating_avg`:

1. 'Satisfied' if the `rating_avg >= 3.66`
2. 'Okay' if the `2.33 <= rating_avg < 3.66`
3. 'Dissatisfied' if the `1 <= rating_avg < 2.33`
4. 'No Rating' if the `rating_avg < 1`
2022-01-05 13:58:01 +01:00
Xavier BOL (xbo) 1ae732c21f [IMP] project: use the rating average instead of customer satisfaction
Before this commit, we use the `rating_percentage_satisfaction` field to display
the customer satisfaction of the project. The problem is this field is
not really a rating average. This field returns the percentage of
satisfied ratings over the total number of ratings.

This commit changes the using of `rating_percentage_satisfaction` field
by the `rating_avg` to only use the rating average to really know if
globally the customers are happy of a project or not.

task-2671848

Closes #81027
2022-01-05 13:58:01 +01:00
Xavier BOL (xbo) 89f4370043 [IMP] rating,project: add average ratings field in parent rating mixin
Before this commit, we don't have any filters to the models using the
parent.rating.mixin to know if the customers are globally satisfied or
not to the projects for instance.

This commit adds the `rating_avg` field to compute the average of all
ratings linked to the parent model (in our example, `project.project`
model). This field is also used in the project search view to add 3
filters.

1. satisfied: projects with an average customer satisfaction between 66%
and 100%.
2. okay: projects with an average customer satisfaction between 33% and
65%.
3. dissatisfied: projects with an average customer satisfaction between
0% and 32%.

Another filter is added to find all projects without any ratings linked,
called `No Rating`.

task-2671848

Closes #81027
2022-01-05 13:58:01 +01:00
Xavier BOL (xbo) 790cc8698a [IMP] rating,project: use the average of rating value for satisfaction
Beforer this commit, we display a emoji to show if the customer is
satisfied, okay or not for the task via the last rating value. The
problem is we use only the value for the last rating for each task.

This commit uses all ratings for each by using the average of rating
value for each task to know if all the customers that done a rating are
satisfied or not.
Moreover, we add 4 filters in the project.task model using the average
of rating values.

1. Satisfied => rating_avg >= 3.66
2. Okay => 2.33 >= rating_avg < 3.66
3. Dissatisfied => rating_avg < 2.33
4. No rating => show the tasks without any ratings.

task-2671848

Closes #81027
2022-01-05 13:58:01 +01:00
anhe-odoo 9255d3d7d9 [FIX] purchase: corrects the order date on validated RFQ/PO pdf report
Expected behaviour

The order date on the Purchase Order report (printable pdf) should be the
confirmation date if available and the order deadline else.

Observed Behaviour

The order date on the PO pdf is the order deadline of the RFQ, no matter
if the oder has been confirmed or not.

Reproducibility

This issue can be reproduced following these steps:
1. Create a new RFQ
2. Set an order deadline different from the current day
3. Confirm the RFQ
4. Download the printable PDF (as pdf) and check the Order date

Related ticket
- opw-2696794

closes odoo/odoo#82267

X-original-commit: 91d0354
Signed-off-by: Arnold Moyaux <arm@odoo.com>
2022-01-05 12:50:20 +00:00
Sébastien Theys 671e5b885e [IMP] mail, *: add view model for notification list items
* = im_livechat, sms, snailmail

Part of task-2728107

closes odoo/odoo#82239

X-original-commit: fadb57564209e1b9c4ee6ee993b117b288ac614d
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2022-01-05 12:50:16 +00:00
Josse Colpaert 76efa26896 [FIX] account_edi: also lock account_move for sending
Fix in cc67b5ac95 was done in v14
originally and would lock both the edi document and the
account move instead of just the edi document
(and the move while cancelling)

However in the fw-port in 5319b71b66,
some kind of mix happened.

We have some tickets in v15 however where the
invoice is sent to the government, but it was not changed in Odoo because
of the concurrent access on the account_move, so we need to lock the
account_move as well.

opw-2714559, opw-2663502

closes odoo/odoo#82254

X-original-commit: 8d896b19007a788d88f2ffb45385f0d10cb476b5
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Josse Colpaert <jco@odoo.com>
2022-01-05 11:36:06 +00:00
roen-odoo 7965efe75f [FIX] stock: Owner filter crash
Current behavior:
Filter "Owner is not set" on Package in inventory app was causing a traceback

Steps to reproduce:
- Go in inventory app
- Go in package
- Apply a filter "Owner is not set"
- You get a traceback

opw-2714726

closes odoo/odoo#82237

X-original-commit: e4b350907f01253a96ddc763d6fdbdd307874e23
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-01-05 10:42:41 +00:00
Merlin (megu) 3b98b8d89e [FIX] hr_holidays: translate field names of form dialogs
'New Time Off' and 'Allocation Request' dialogs were not translated to the user's language

Steps to reproduce:
1. Install the Time Off app
2. Go to General Settings, add a language and switch to it
3. Open the Time Off app and click on the button 'New Time Off' (which is now translated to the language you chose)
4. The field names of the dialog that opens are not translated

Solution:
Add the user's language to the context of the dialogs

OPW-2715396

closes odoo/odoo#82246

X-original-commit: bb4c568fe6cc32e7a0a26960276999113b858144
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
2022-01-05 09:52:22 +00:00
Barad Mahendra 7474f57219 [IMP] hr_timesheet: remove the unused code from hr_timesheet
Currently the timer does not exist in hr_timesheet so project.task.create.timesheet
wizard is useless in hr_timesheet and not used anywhere in hr_timesheet.

so in this commit removed project.task.create.timesheet wizard
from hr_timesheet.

task-2710154

closes odoo/odoo#81197

Related: odoo/enterprise#22819
Related: odoo/upgrade#3101
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-01-05 09:52:13 +00:00
Noe Antoine a8b5a53e60 [REF][ADD] hr: split appointment module according to hr dependancy
When setting users on the appointment type as staff, we want to consider
their resource_calendar_id (work schedules) only if they correspond to the
current company and are linked to employees, not the ones linked to the users
directly. In order to display those work hours correctly, we use a new related
field on the employee_id in res_users model as it will return the employee of
the user in the current company, if any.

Therefore, we add the new field employee_resource_calendar_id directly in
hr module (in res.users model) to reduce diff and centralize the fields as
close as possible to the employee_id definition.

--- Links ---
Task-2499566

closes odoo/odoo#82234

Related: odoo/enterprise#17934
Related: odoo/upgrade#2578
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2022-01-05 09:52:07 +00:00
William Braeckman 2b78d430b8 [IMP] hr: add a new field to query members of department
Adds a new non stored field to make it easier to query all employees
from the active user's department and it's children department(s).
The result is guaranteed to always contain the active user's employee.

task-2700231

closes odoo/odoo#81472

Related: odoo/enterprise#22724
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-01-05 08:57:44 +00:00
wan a77dee7b98 [FIX] core: typo in field type check
closes odoo/odoo#82238

X-original-commit: 5164739b835445fa11b2efc53e2ff839a4bad10a
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2022-01-04 20:16:47 +00:00
Touati Djamel (otd) 2a41d64b9b [FIX] stock: add address info in the delivery slip and picking operation report
Steps to reproduce the bug:
- Install inventory and sales
- Create a SO > Confirm
- Click on the delivery > print > delivery slip or picking operation

Problem:
Only the name and phone number are in the report

opw-2697221

closes odoo/odoo#82235

X-original-commit: 35e6abce0e662cae6a55293f31620114ad5ecd8a
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2022-01-04 17:53:19 +00:00
roen-odoo 8f118f23bf [FIX] sale_management: Access error mail confirmation
Current behavior:
You had a traceback when trying to pay with Stripe and a specific modified Quotation template

Steps to reproduce:
1. Set stripe as the payment acquier (with default test values )
2. Modify the Quotation Template "4 person Desk"
- Uncheck "Online signature"
- Put "Confirmation Mail" as "Sales Order: Confirmation Email"
3. Create a SO
4. Set it's quotation template as "4 person Desk"
5. Action > Generate Payment link
6. Use the link as the public user (in incognito for instance)
7. Pay with Stripe
=> Traceback

opw-2721526

closes odoo/odoo#82227

X-original-commit: f0bf3a55dde5f2863e40efe341edae6990c8ed35
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Engels Robin (roen) <roen@odoo.com>
2022-01-04 17:03:14 +00:00
Vincent Larcin 0f0ff26375 [IMP] project,{hr,sale}_timesheet: reorder and rename demo tasks
This commit reorder and renames the tasks in demo data by project.
This is done in order to make it easier to parse, modify or add data in those files.

Closes #80102
Task 2669762

Related: odoo/enterprise#22399
Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
2022-01-04 17:03:11 +00:00
Vincent Larcin 6ec64c6307 [IMP] project: add and rework demo data
This commit adds plenty of new demo data showcasing some features that weren't before, and also reworks existing demo data to make is more consistent.

Closes #80102
Task 2669762
2022-01-04 17:03:10 +00:00
Vincent Larcin 522cd83f69 [IMP] {hr,sale}_timesheet: reorder and rename demo timesheet lines
This commit reorders the timesheet lines in demo data to sort them first by project, then chronologically.
It also renames them according to the task they are linked to.
This is done in order to make it easier to parse, modify or add data in those files.

Closes #80102
Task 2669762
2022-01-04 17:03:10 +00:00
Romain Derie 5387a51ca6 [FIX] website: fix race condition on snippet drag and drop tour
A mega-tour was introduced with [1] to test every single snippet.
This tour, despite being very useful as it tests the core behavior of the
website builder, is creating a lot of race conditions.

This commit should prevent one of those race condition:
When the step was removing the snippet, it was then clicking on the "Blocks"
tab to get ready to drag and drop the next snippet.
The issue was that in some cases, it would click on the "Blocks" tab before the
snippet removal process was fully done.

Basically, when the race condition happened, it was the same as doing:
```
$('we-button.oe_snippet_remove:first').click();
$('.o_we_add_snippet_btn').click();
```
which, when done in the browser console, will result in the same visual than
the screenshots on the failing runbot builds.

[1]: https://github.com/odoo/odoo/commit/460d5ecb926c13a79ba363f8f86442433d91bf6f

task-2726529

closes odoo/odoo#82214

X-original-commit: 49c7bd39826b428430c08c5faedca51dde9e2359
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
2022-01-04 16:17:40 +00:00