Commit Graph
143436 Commits
Author SHA1 Message Date
nie 9e6c60140e [FIX] l10n_ch: use commercial partner name instead of computed field
Follow-up of https://github.com/odoo/odoo/pull/65357

closes odoo/odoo#65523

X-original-commit: 38e78a59ace4fb590cc5c138e16acb1013fa193e
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: backspac <backspac@users.noreply.github.com>
2021-02-04 10:36:03 +00:00
Ivan Yelizariev b09b0f7991 [FIX] l10n_it_edit: use pec addresses to test mail server
WHY: PEC server rejects default addresses, so you cannot test connection

---

opw-2371431

closes odoo/odoo#65516

X-original-commit: 876d3b3b8cf9f91a3609871f69b3ce1186d71ac6
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2021-02-04 09:54:03 +00:00
Nicolas Pierre bc8a5dc394 [FIX] stock: create backorders from operations in new wh
When a new warehouse is created, the receipts of the purchase orders done in
this new warehouse have different behavior than the ones from the inital
warehouse. With the new warehouse the 'Detailed Operations' tab of the
receipt is visible but not the button next to 'Done' in the 'Operations' tab.
Since no elements are inside the 'Detailed Operations', it requires a manual
entry of all elements for every receipt with backorder.
This aligns the behavior of new warehouses with the inital one, not
showing the 'Detailed Operations' tab in the receipts but allowing to use
the button of the 'Operations' tab.

closes odoo/odoo#65501

X-original-commit: 126102b5b4cd9aa32fb3eb9a763d73e4056d3462
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
Signed-off-by: npi-odoo <npi-odoo@users.noreply.github.com>
2021-02-04 07:44:30 +00:00
Julien Castiaux a29bb54633 [IMP] ir.cron: trigger on multiple moments
Often the business want to trigger the cron several time at different
moments.  The typical use case is the business holds a recordset and
needs to trigger the cron for every record.  The current solution is to
loop on each record to call `_trigger` times.

We now allow to invoke `_trigger` with an iterable of `datetime`
objects, and isolate the implementation in method `_trigger_list`.

We also removed the `delay` argument as it was not used.

closes odoo/odoo#65459

Task: 2452697
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2021-02-04 08:55:23 +00:00
Goffin Simon c4b4eb699d [FIX] account: Printing journal entries
Steps to reproduce the bug:

- Accounting - Journal Entries - form view - Print - Invoices

Bug:

A UserError was raised 'Only invoices could be printed.' but in the attachment,
the PDF was generated.

opw:2452278

closes odoo/odoo#65508

X-original-commit: ba32244c10396ff8605e5533e08675a64fbf9d88
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2021-02-04 08:17:15 +00:00
Goffin Simon 1d995c1fe8 [FIX] payment_alipay, payment_paypal: Online payment with public user
Steps to reproduce the bug:

1) Enable Paypal on the Payment Acquirers and select "BE Company CoA" on the company
2) fill the email and enable the "Add Extra Fees"
3) create an invoice on the company "BE Company CoA"
4) preview it as a public user

Bug:
An access error was raised:

Due to security restrictions, you are not allowed to access 'Companies' (res.company) records.

opw:2439896

closes odoo/odoo#65507

X-original-commit: 6b23ff3bdd1d5a3f34a431e2301db5984e0f761a
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2021-02-04 07:53:12 +00:00
Anh Thao Pham (pta) c695b2a3d1 [FIX] account: fix unselectable Report Line in Tax Adjustments wizard
- Go to Accounting > Configuration > Tax Report
- Create a Tax Report (with Lines having Tag Name)
- Go to Accounting > Accounting > Tax Adjustments
In wizard, no Report Line can be selected for mandatory "Report Line" field.

Report lines are filtered on "report_id" field, which is a related field to the report line field.
Therefore there is no way to select a Report Line.

opw-2449295

closes odoo/odoo#65502

X-original-commit: 0311cffd89c375a6fc1babacaa19029776bfebfb
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
2021-02-04 07:47:03 +00:00
Christophe Monniez 55986ffa21 [IMP] core: bump master version to 14.3 alpha1
closes odoo/odoo#65472

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2021-02-03 18:16:51 +00:00
Benoit Socias 1044a76a19 [IMP] web_editor, test_website: allow renaming custom snippet blocks
When you save your custom snippet you probably won't give it a
specific name.

Before this commit several custom snippets name was specified on save
and there was no way to modify their name afterwards

After this commit custom snippets are assigned a generated name but they
can be renamed afterwards

task-2374802

closes odoo/odoo#61483

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-02-03 15:13:19 +00:00
Kamesh Patel 52b87b6948 [IMP] product: Improve pricelist item form view
Purpose of the task is to Improve the current pricelist line
form view for clarity.

SPECIFICATIONS:

 - Move the price computation on top and apply on at bottom.
 - Improve the formula view and calculate dynamic tips based
on formula value.

closes odoo/odoo#63733

Taskid: 2373068
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-02-03 15:41:27 +00:00
ijas ahammed 2689915e3f [IMP] web,sms: limit the clickable area for email/phone/url widgets
The 'o_text_overflow' class whlie provided on any field, is used to
have classic ellipsis (...) for very long string. However, it is
implemented the way that it occupies the available width for the field
tag it even if the the string is small.

The same class is also utilized in some field widgets like  email, phone,
URL etc. But it has a small side-effect due to full width occupancy.

Because the above widgets rendered an anchor tag, the clickable area is on
the whole available width instead of simply on the content provided in anchor
tag. So even if user clicks on the empty area of that field, the click
action is performed (for example, in email field widget, default mail client
pops-up) which should not happen. It should behave like clickable m2o fields
where the action is performed only when clicking the content and not on the
empty area.

With this commit, we wrap the anchor tag, within a container div tag. Here,
the overflow class will be on the container div which will do it's job to
prevent the long strings from breaking the UI, and the anchor tag being its
child, will not be the full width, thus limiting the clickable area. This
commit also makes the related test cases more robust by checking proper
classes for particular widgets.

TaskId - 2345974

closes odoo/odoo#63735

Related: odoo/enterprise#15777
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-01-15 13:05:54 +00:00
xO-Tx 6186d0e824 [FIX] web_editor: fix background layers buttons
Example to reproduce:

Drop the "Cover" snippet and try to remove the background
image. Clicking on image button has to be done 3 times to land on the
correct result:

- First click removes image, but not filter and leaves both buttons
  checked
- Second click removes the filter and unchecks its button.
- Third click unchecks the image button.

It should be one click to remove image, filter and uncheck both buttons.

The goal of this commit is to prevent _applyOptions() from setting
background-image values if image is not optimizable. This filter will
solve the issues since empty values (badly parsed by getBgImageURL())
won't be added as background urls.

task-2312878

closes odoo/odoo#65438

X-original-commit: aba9056e7baa58decf147313678ad9d1f4522dee
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-02-03 08:26:36 +00:00
Odoo's Mergebot d5aec6c2f1 [MERGE] sale_timesheet: add some unit tests + clean code
Purpose
======

The goal of this PR is to write some unit tests about the changes made in Task-2388500, Task-2409761 and Task-2424382 to keep the functional features.

## Determined Sales Order Items in task and timesheets
These tests check if the Sales Order Items (SOL) computed in task and timesheets are the ones expected based on the pricing type defined in the project.

- Check if the SOL in task is the same than the one in project when we create a task in project which has a pricing type to project rate or employee rate.
- When the pricing type is employee rate and we timesheet, check if the SOL on these timesheets are the one expected, that is:
  - If the pricing type is employee rate and there are some mapping for employees, normally when we timesheet for an employee in the mapping, we should have the SOL defined in the mapping for this employee in the timesheet.
    - If we timesheet for an employee who is not in the mapping then we should have the SOL of the current task.
  - When the pricing type is task rate and we defined a customer who has some SOs with services products in project, if we create a task in this project then we should have the customer defined in the project and the one of latest SOLs if it is prepaid service and remaining_hours > 0. Otherwise, the SOL is False.
  - When the pricing type is employee rate or project rate and the customer, SO, SOL is defined in the project, if we change the customer then the SO and SOL should be False if the customer in the project is different that the one in SO selected.
    - If the pricing type is employee rate then when the customer changed in the project, the SOL in each mapping should also be removed.

## Remaining hours for prepaid service products

This test checks if the remaining hours is correctly computed in project.task when the Sales Order Item in this task contains a prepaid service product.

## Tour JS to check features in the UI

A tour js has been created to check the process with the UI. The steps are the following:
- Go to the Sales App,
- Create a sales order for Brandon Freeman for instance,
  -  In this Sales Order, we take a prepaid service product (we created this one in a unit test in python as we must not use the demo data to realize the JS tour) and the quantity ordered is 10 hours,
  - Check the product_uom field is set on 'Hours',
  - Confirm the Quotation to create the Sales Order,
- Go to the Project App,
- Create billable project to timesheet for Brandon Freeman,
- Create task in this project and add a timesheet into it,
- Show in this task that we can see the Sales Order Item linked to the createed timesheet, because this field is hidden by default.
- Go to the Settings menu and then Projects submenu.
- Create a project, and show the three different configurations to invoice services in a project. That is:
  - Task rate
  - Project rate
  - Employee rate

## Miscellaneous

The `project.task.create.sale.order` model has been removed because the wizard is unused since these 3 tasks have been merged.

task-2439304

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

closes odoo/odoo#65146

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-02-03 10:38:51 +01:00
Odoo's Mergebot 985688c50c [MERGE] generic improvements from UserTesting in Project App
Generic improvements have been made to improve the Project App and its onboarding.

## Web module

- kankan examples modal: change the 'use this for my kanban' button into 'use this for my project'. To do this, a small change is made in the web module to use the options variable called `applyExamplesText` to change the label of the button in project app.
- A private method called `_getFavoriteIcon` is added in `FavoriteWidget` to easily change the icon based on the boolean value when we override this widget in another module.

## Project App

For project.task model:
  - the label of the priority label has been changed from "Priority" to "Starred".
  - the user_id field should not be clickable in form view.

For project.project model:
  - the fa-star icon has been replaced by the fa-bookmark and fa-bookmark-o icons in the kanban view.
  - When the user is the 'Project User', the 'share' button and 'project overview' stat button are hidden in the project form view.
  - the 'sales order' stat button is only visible to users who have at least the `sales > all documents access right level` in project form view.

task-2440564

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

closes odoo/odoo#65095

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-02-03 10:38:43 +01:00
Arnaud Joset 36efe37064 [FIX] payment_test: payment creation with multiple names defined
The payment token name was fixed in two parallel PR that were merged the same day without conflict:

https://github.com/odoo/odoo/pull/61844 and https://github.com/odoo/odoo/pull/61888

This commit cleans up the dict of token creation.

closes odoo/odoo#65416

Taskid: 2409461
X-original-commit: 291b656e702498fe46e63dbdad84442615298b51
Related: odoo/enterprise#16086
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
2021-02-02 13:51:19 +00:00
davidandsimongoffin 1843a1ae4d [FIX] hr_expense: wrong company account when creating from mail
In a multicompany environment, when a expense is created from the
expense email alias, the expense account is computed with SUPERUSER
context, so depending on the SUPERUSER set company, we could get
a mismatch of expense and employee's company and the account one, wich
causes a subsequent error when trying to post the expense.

closes odoo/odoo#65413

X-original-commit: da758c44b19a9339f0c0b1b6a74c11e3e5491a64
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Co-authored-by: simongoffin <sig@odoo.com>
2021-02-02 13:30:55 +00:00
Xavier Morel de58031589 [FIX] hr_holidays: possible overlaps between PTO and weekends
Followup to odoo/odoo#65314: turns out there's a bunch of other leave
requests in the file which will eventually fall on a weekend, and will
probably blow up due to the new validation in 14.0:

- hr_holidays_sl_al in March 2021 because April 17th, 2021 is a
  saturday
- hr_holidays_cl_mit_2 in June 2021 because June 5th, 2021 is a
  saturday
- hr_holidays_sl_vad in September 2021 because September 25th, 2021 is
  a saturday
- hr_holidays_sl_kim in April 2021 because May 1st, 2021 is a saturday
- hr_holidays_sl_kim_2 in March 2021 because July 3rd, 2021 is a
  saturday

Solution
========

Instead of hard-coding month-days, move to the first monday after the
original date e.g. if we were looking for the 20, now get the monday
after the 22. In relativedelta terms, `weekday=0` is "the next
monday". The date is then formatted inclusive of the month-day rather
than hard-coding one.

One nit is for the end date:"the next wednesday" may come before "the
next monday" if we're on TU or WE. So we need to first jump to the
next MO *then* to the WE after that, which makes the code a bit
longer (and more redundant). As a result the end date is now "the
wednesday after <the start date>" rather than being a literal 2 days
later or whatever.

The PR updates all the 1-day and 2-day intervals, it also updates the
3 days inclusive (those over 3 which include start and end dates
rather than without) including those updated by #65314 for clarity /
coherence of small intervals. Longer intervals are left untouched,
although we may eventually want to update them so `number_of_days`
computations are more reliable.

Redundancy issues
-----------------

There are a bunch of redundancies / verbosities which don't seem
easy or possible to remove:

* While lxml does resolve entities by default it doesn't load
  DTDs (let alone validate them), aliasing various datetimes
  & deltas as entities is not an option, not to mention for security
  reasons we'd rather stop resolving entities entirely than allow
  custom ones.
* While it's possible to define nested safe_eval'd `context` on nodes,
  the evaluation context for *those* contains neither datetime nor
  relativedelta, so storing a bunch of constants in the (environment's)
  context and using that in the expression is not an option either.
* Leaving `date_from`/`date_to` off of some records breaks, probably
  because some other field necessary to properly compute *them* is
  missing.

Other changes
=============

* Removed explicit settings to `number_of_days` and explicit calls to
  `_compute_number_of_days`, seems redundant and unnecessary as the
  compute works fine as long as we let it.
* While at it, updated the calls to `action_approve`: moved them next
  to the corresponding record (instead of being on the other side of
  the file) and used direct references to the subject records rather
  than complicated searches.
* Also updated two leave allocations to be created validated OOTB
  instead of manually calling action_validate as that's what's being
  done elsewhere in the file.

Notes
=====

* In relativedelta lingo, "the next X" is inclusive of the current
  date e.g. when looking for the next WE, if the date being offset is
  already WE there will be no movement, this can be unexpected.
* Normally relativedelta would be used with the MO/TU/WE/... constants
  for weekdays, but we're not exposing those to `@eval` so integer
  literals it is.

closes odoo/odoo#65430

X-original-commit: 7840b21483c0012174e6028a39b114ce56f06158
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2021-02-02 18:05:14 +00:00
Laurent Smet e9a62bcd8f [FIX] account: Fix computed fields when editing payment account
When changing the bank account by the outstanding account of a payment, invoice's payment_state should be recomputed by the orm.

So, when writing 'account_id' on the liquidity line, 'is_matched' must be recomputed on payment (_compute_reconciliation_status). Then, if reconciled to some invoices, 'payment_state' must be recomputed as well (_compute_amount).

closes odoo/odoo#65427

X-original-commit: 7caf5316407ab8950216592e38551f29207076de
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-02-02 17:16:10 +00:00
Nidhi Patel 892e3d7d25 [IMP] web: Clean the export file names
The purpose of this task is to clean up and provide clear export
file names.

Currently, When exporting data:
 - From a pivot view, the file name is 'table'
 - From a list view, the file name is technical name of model

so in this commit, Change the export file name as below:

 - For list view quick export and standard record export,
the filename will be 'model_description(model_technical_name)'

 - For pivot view quick export,
the file name will be 'Pivot(string set on view)(model_technical_name)'
and if string is not set then 'PivotUntitled(model_technical_name)'

In all the cases space and forward slash will be removed.

closes odoo/odoo#64123

Taskid: 2237840
Related: odoo/enterprise#15579
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2021-02-03 07:14:16 +00:00
Nasreddin (bon) 6595e770f0 [FIX] web: Not hide daterange if scrolling on mobile + unit test
Issue

	- Install "Field Service" app
	- Create new task
	- Try to select Planned start/end date and valid

	Daterange picker is hiding when trying to scroll down to valid selection.

Cause

	The daterange picker is closed when ev.target is not inside the picker,
	however ev.target always return the document element.

Solution

	Do not hide daterange picker on scrolling if on mobile.

	Note : It will only apply if scrolling on the daterange picker and
	       will still hide if scrolling outside this last one.

opw-2428099

closes odoo/odoo#65435

X-original-commit: 1d9b6f56e70faee13cda0ccb9893ed49904ab319
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2021-02-02 21:27:13 +00:00
Ivan Yelizariev 1e9a5081b8 [FIX] core: initialize new stored related field via SQL
Filling the new column in SQL is dramatically faster than doing it via
the ORM, which iterates over all the records in the table.

The test case is creating a related field for 100+ records with distinct
values.  Setting the field's value was taking more than 100 queries.  It
now takes 3 queries.

task-2449313
opw-2380445
opw-2389376
https://github.com/odoo/enterprise/pull/15910

closes odoo/odoo#65432

X-original-commit: d66652b4aa514546356306e3eb48eaecaba07c33
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2021-02-02 18:52:13 +00:00
Xavier BOL (xbo) e2a3a04ccf [IMP] sale_timesheet: add tour js to check the process in the UI
This tour js is used to check if the process is not broken. To do this,
we create an unit test to launch this tour js.

Before launching this test we create a prepaid service product in the
unit test.

Steps of this tour js:

1) Go to the Sales app,
2) Create a Sales Order with the prepaid service product and we order 10
hours for this product.
3) Go to the Project App,
4) Create a billable project to timesheet for the customer who orders
these hours,
5) Create task in this project and add a timesheet into it,
6) Show in this task, we can see the Sales Order Item linked to the
created timesheet, because this field is hidden by default.
7) Go to the Settings > Projects,
8) Create a new project and show the three different
configurations to invoice services in a project. That is, 'task rate',
'project rate' and 'employee rate'.

task-2439304
2021-02-01 16:20:53 +01:00
Xavier BOL (xbo) 1d6735e015 [IMP] sale_timesheet: update the existing unit tests
task-2439304
2021-02-01 16:20:53 +01:00
Xavier BOL (xbo) 5ff4557b98 [IMP] sale_timesheet: test when partner_id is changed in project
This commit add a test for project with pricing_type in ['fixed_rate',
'employee_rate']. This test checks when the user changes the partner_id
in the project, if the SO and SOL in project and also in mapping are
removed if the customer selected isn't the one in the SO.

task-2439304
2021-02-01 16:20:53 +01:00
Xavier BOL (xbo) 9f72d70c75 [IMP] sale_timesheet: remove project.task.create.sale.order model
This commit removes the project.task.create.sale.order model because
this wizard is no longer used. Before we use this wizard to create a SO
from ticket and task, but in reality this feature is no used.

The test using this wizard has been changed to keep the behaviour of it.
This test checks if the invoiced timesheet does not change the project
when the linked task changes the project.
Moreover, the both projects used in this test have been switched because
when we invoice the SO the timesheet is in the template project and this
one is not billable.
Thus, we create no invoice. To create an invoice as we expect, we must
have the timesheet in the global project.

task-2439304
2021-02-01 16:20:53 +01:00
Xavier BOL (xbo) dd86be3367 [IMP] sale_timesheet: test computation of remaining hours
This test check if the compute method for the remaining_hours field in
the SOL containing a prepaid service product is correct and also the one
for the remaining_hours_so field in the task which contains a SOL with
prepaid service product.

task-2439304
2021-02-01 16:20:53 +01:00
Xavier BOL (xbo) 1980c5ea7a [IMP] sale_timesheet: test compute SOL for tasks and timesheets
This commit adds tests to check the compute SOL for tasks and timesheets
based on the configuration of the linked project.

task-2439304
2021-02-01 16:20:53 +01:00
Xavier BOL (xbo) 267412206e [IMP] sale_timesheet: test the edition of SOL of timesheets
This commit adds a test to check if the user can manually edit a
SOL in timesheet model. If he do this, then we also check the SOL
doesn't change when the SOL in task changes. Also, we check the
qty_delivered changed for each SOL impacted.

task-2439304
2021-02-01 16:20:53 +01:00
Xavier BOL (xbo) ecbeecb06e [IMP] sale_timesheet: add data in setUpClass of TestSaleTimesheetCommon
task-2439304
2021-02-01 16:20:53 +01:00
Xavier BOL (xbo) 58162a68ac [IMP] sale_timesheet: retrict access to the Sales Order stat button
Before this commit the user who has the
sales_team.group_sale_salesman group can access to the Sales Order stat
button in project and task form view. The problem is if the Sales Order
is not own one, he cannot access to it.

This commit changes the visibility of this button to show it when the
user has sales_team.group_sale_salesman_all_leads group.

task-2440564
2021-02-01 13:48:00 +01:00
Xavier BOL (xbo) 1eec92546c [IMP] sale_project: hide the project overview if not manager
Before this commit, the user who is not a Project Manager can access to
the project overview.

This commit removes this access to give this access only for the Project
Manager.

task-2440564
2021-02-01 13:48:00 +01:00
Xavier BOL (xbo) b6c6105e59 [IMP] project: hide Share button in project form view if not manager
Before this commit, the user who is not a Project Manager can share the
project based on the visibility of the project.

This commit hides this button for this user, only the Project Manager
can use this button.

task-2440564
2021-02-01 13:48:00 +01:00
Xavier BOL (xbo) 8ba137edbc [IMP] project: rename the priority field to Starred in project.task
task-2440564
2021-02-01 13:48:00 +01:00
Xavier BOL (xbo) 5fb1d3a97e [IMP] project: no open the user form view in project.task
Before this commit, the user can click on the user_id field in
project.task form view to see the user form view of the user linked in
the current task.

This commit adds an option (no_open=True) in this field to prevent the
user to access the user form view.

task-2440564
2021-02-01 13:48:00 +01:00
Xavier BOL (xbo) 1361d0720e [FIX] web: customization of text in button for kanban example never used
Before this commit, the customization of text in button to apply kanban
example is never used because the variable which contains the text is
missspelled and thus is always undefined. That's why, we always have the
default text in this button.

This commit changes the `options.applyExampleText` to
`options.applyExamplesText` to get the text customization in project
module for instance and adds a test in order to check that the text
is well rendered.

Co-authored-by: Laurent Stukkens (LTU) <ltu@odoo.com>

task-2440564
Closes #65095
2021-02-01 13:48:00 +01:00
Martin Trigaux 0a50436e5a [FIX] hr_holidays: include time in demo data
All fields not provided default to 0, so the the exact values are
`%Y-%m-20 00:00:00` - `%Y-%m-22 00:00:00`.
Because this is only 2 days it can entirely overlap with a week-end
(e.g. 2021-02-20/21), leading to `number_of_days` computed to 0 and
triggering an error at confirmation (`"The following employees are not
supposed to work during that period"`).

Change familly trip as the same issue would occure in May 2021

closes odoo/odoo#65326

X-original-commit: ada1da9a0cea6aaa3f91ee34fd3b273be79e1e3d
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2021-02-01 11:17:27 +00:00
Goffin Simonandmart-e d2b711c1e6 [FIX] transifex: Wrong link on translations to go to transifex
Steps to reproduce the bug:

- Let's consider a user U with fr_BE as lang
- Log as U and active developper tool
- Go on any record, click on debug button
- Select Technical translation
- Choose a translation and click on the transifex url button

Bug:

The URL contained the iso code fr_BE but this iso code didn't match
any code in Transifex.

From: https://www.transifex.com/odoo/odoo-14/languages/

We can see that the only iso codes with a '_' are: 'zh_CN', 'zh_TW', 'pt_BR'

opw:2448533

closes odoo/odoo#65308

X-original-commit: d609a75ccbfaa62b6070de4769880a94d896ff73
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Co-authored-by: mart-e <mat@odoo.com>
2021-01-30 16:24:39 +00:00
Anna Janiszewska 224f8d9be7 [CLA] Add Anna Janiszewska to camptocamp CLA
closes odoo/odoo#65299

X-original-commit: 72c5d63eb13b0dcb4284a28962d76a147524f65a
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-01-29 17:52:06 +00:00
Laurent Smet 0a2d73e738 [FIX] account: Fix 'is_reconciled' flag for zero-amount statement line
When the suspense account is not reconcilable, 'suspense_lines.reconciled' always gives 'False' leading to a not reconciled statement line.

closes odoo/odoo#65290

X-original-commit: 73ddcfbcc58b7a6542ced4bd8b20dd67c9f446ee
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-01-29 16:13:12 +00:00
msteinfeld 8eb16c7f43 [CLA] Individual signature for Maik Steinfeld
closes odoo/odoo#65289

X-original-commit: d5e503f02f94ea4125010f09b1877040c8fc68b3
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-01-29 16:12:46 +00:00
Dario Bösch 389c8ecdef [CLA] simpit GmbH
closes odoo/odoo#65287

X-original-commit: b7467ce8fa0c497c4b7bf66345577d9846397293
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-01-29 16:11:19 +00:00
Laurent Smet 73d363866e [IMP] account,point_of_sale: Remove dead code
This code is no longer needed since:
https://github.com/odoo/odoo/commit/6576e1388e0a3d2a822a768c6c563769afb392a1

closes odoo/odoo#65272

Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-01-29 13:37:13 +00:00
std-odoo 8e7cfb642a [IMP] crm(_iap_lead_enrich): correctly enable / disable the enrich CRON
Purpose
=======
The parameter "lead_enrich_auto" enable or disable the enrich CRON.

This is done in an onchange and so, if we enable manually the CRON, the
change will not be reflected on the parameter.

Task 2443338

closes odoo/odoo#65007

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-01-29 08:11:46 +00:00
nie 2dd697fdf8 [FIX] stock_account: correct forecast report total amount and currency
Steps:
- Go to Settings > Companies > Manage Companies
- Create a company (1) with a different currency than the one you're in
- Go to inventory > Products > Products > Create a product (2)
  - Storable Product
  - Cost: 10
- Click Update Quantity
- Create a new quantity line with 1 in On Hand Quantity
- Switch to company (1)
- Go to Inventory > Products > Products > Edit product (2)
  - Storable Product
  - Cost: 15
- Click Update Quantity
- Create a new quantity line with 1 in On Hand Quantity
- Go back to the product
- Click the "Forecasted" smart button

Bug:
Traceback here:
https://github.com/odoo/odoo/blob/47bfdf0592a5dd93870ca1a9da326351d70087bb/addons/stock_account/report/report_stock_forecasted.py#L17
ValueError: Expected singleton: res.currency(2, 1)

Explanation:
The amount is the sum of the `stock.valuation.layer`s of a product
across all companies and these companies may have different currencies.

This commit scopes the computation of the amount inside the company of
the current warehouse.

Also the `stock.quant` values displayed in the "On Hand" report are not
correct for the other companies when displaying their data by selecting
all the checkboxes in the global company dropdown.
This commit also fixes the amounts in the On Hand view by using the
standard price per company and attributing the correct currency to the
`stock.quant`.

opw:2444593

closes odoo/odoo#65267

X-original-commit: 67d975be75963678d25ae54289b2f1de639c8bed
Signed-off-by: backspac <backspac@users.noreply.github.com>
2021-01-29 11:56:33 +00:00
Achraf (abz) d70e1263f2 [FIX] web: Show create button on multiEdit + unit test
What are the steps to reproduce your issue ?

    1. Install project
    2. Open any project
    3. Switch to list view and display by Stage
    4. Open categoryA and select some records
    5. Open CategoryB

What is currently happening ?

    The button create is not displayed

What are you expecting to happen ?

    Don't hide create button

opw-2423701

closes odoo/odoo#65266

X-original-commit: 813b9fc42f5d0cc4e35afb642291200b90d1f545
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-01-29 11:56:03 +00:00
Antoine Prieels 638291128c [FIX] point_of_sale: IoT Box modules list on a single line
By default, the `ls` command has a width limit. Everything after this
limit will be split on a second line.

This happened when listing the modules present on the Iot Box in v12.
The list of modules was split accross two lines, the modules on the
second line were then not loaded when starting the Odoo service.

closes odoo/odoo#65259

X-original-commit: 60b58322dc803dfbf734374b63f9556563a19b8f
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
2021-01-29 11:07:23 +00:00
Munaf Khan dd3b58e2f3 [FIX] crm: add filter for overdue opportunities
With commit[1], we introduced a feature that from the sales team, we can
see the overdue opportunities for a particual teams. However, the filter
that we use for related action which is supposed to show overdue opportunities
is not not added, and the filtration is not working as expected, showing us
all the opportunites for a team.

This commit fixes the issue by adding the invisible filter with proper
domain set within opportunities' search view and thus enables us to
filter overdue opportunites.

commit[1] - https://github.com/odoo/odoo/commit/1da63f0ab0fb4212bee46f960c6bbe8ca9251cac

TaskID : 2323612

closes odoo/odoo#65258

X-original-commit: 68577d32c7fe0cb18ba4fb788cee65ec8b54b65b
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-01-29 10:56:02 +00:00
Nicolas Lempereur f7364424f6 [FIX] mass_mailing: save error does not break inlining
Scenario:

- create mass mailing with icons and without title
- save and get error "The followign fields are invalid: Subject"
- fill subject and save
- edit

=> the icons have disappeared

This is because mass mailing widget is using:

- a "body_html" field that contains inlined html
- a wysiwyg editor to edit field "body_arch"
- a textarea containing "body_arch" value to be saved

When we save this happens:

1. we save the current value of wysiwyg into textarea
2. wysiwyg content is inlined (eg. transforming font in image)
3. inlined wysiwyg content is set to "body_html" field
4. if there:

   - is no error while saving => body_html and body_arch are saved and
     will be used on next edition

   - if there is an error the fields are not saved, and we now have an
     inlined content on wysiwyg, so next time we save the "body_arch" is
     going to be inlined:

     => this for example breaking the icons on edition

Issue discovered when fixing opw-2447756

closes #65208

closes odoo/odoo#65221

X-original-commit: 0f5f53837bc403960e307ab85e9fe68423c23f5f
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-01-28 14:15:48 +00:00
qsm-odoo 91c331014f [REF] website_mass_mailing: prepare test addition in stable
Prepare the merge of [1] which require a view to already be present
in master so the migration tests pass.

[1]: https://github.com/odoo/odoo/pull/65263

closes odoo/odoo#65425

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-02-02 16:17:22 +00:00
Lavish Chhatwani e145f737f5 [IMP] mail: display proper warning message if alias already exists
Currently, when new alias with an already used prefix is created, it shows the
warning stating "The e-mail alias is already used. Please enter another one."
It does not help much because the user do not know where the alias is used.

This commit improves the warning message by including the document name and
parent model name (if available) if the alias is linked to any model, or it
shows if alias is already used for handling bounce/catchall if that is the
case.

Task Id-2375552

closes odoo/odoo#62367

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-02-02 16:40:33 +00:00