Commit Graph
141473 Commits
Author SHA1 Message Date
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
dht-odoo 66b0fede39 [IMP] crm: improve update of probabilities from settings
Right now there is a button in the CRM settings called 'Update Probabilities'.
When clicking on it probabilities of leads created after certain date
are updated. Problem with this flow is that user can click on the button by
mistake and there is no going back.

Moreover this does not trigger a save on settings and changes done by user
are not saved. This is standard behavior of config settings.

This commit improves the behavior by opening a wizard on click of the button
instead of directmy updating the probabilities. It allows users to change
fields used in PLS, change start date, or even cancel the update process.

Task ID-2355562

closes odoo/odoo#60733

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-02-02 16:19:41 +00:00
xO-Tx d4984b81e6 [FIX] website_mass_mailing: fix newsletter popup
When we "Install Newsletter Popup" from website editor
(which installs the 'mass_mailing' app), the snippet popup
doesn't open after setting a Newsletter.

This is because the code at 'website_mass_mailing' module
which has the following config:
    'depends': ['website', 'mass_mailing'],
    'auto_install': True,
Requires 'google_recaptcha.ReCaptchaV3' while 'google_recaptcha'
module is not installed.

The goal of this commit is to fix this issue by setting
'google_recaptcha' as a dependency for the 'website_mass_mailing'
module.

task-2312878

closes odoo/odoo#62715

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-02-01 16:06:07 +00:00
Mohammed Shekha d9492be108 [FIX] web: popover opened in rtl takes full space
before this commit: smiley box popover in rtl langauge takes full space it is
because of left:0 given on o_popover class by default, which will be converted
to right:0 when in rtl language and popover position will computed by popper
will set left:'some pixels' due to which it takes full space.

after this commit: smiley box will be displayed with expected width,
unnecessary will not be added, as we have removed left:0 css, hence it will not
be converted to right:0 when in RTL mode.

task-2418264

closes odoo/odoo#65419

X-original-commit: 0bd842ad62901499abb703c92b15496cdfa05cc0
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-02-02 14:15:10 +00:00
Laurent Smet 66a98f8ed8 [FIX] account: Use only partner bank accounts of the payment company
closes odoo/odoo#65418

X-original-commit: 8ff165025e18a8d49a5666caac1747046ce87b6e
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-02-02 14:05:10 +00:00
Andrea Grazioso (agr-odoo) 69aae687fc [FIX] website_sale: send confirmation email when no amount
As user access the ecommerce and add to cart a free product (0$ total)
Checkout and Confirm
No email will be sent for confirmation

This occur because the confirmation email is normally sent in the
transaction callback, which is not created when the amount is 0

opw-2440335

closes odoo/odoo#65235

X-original-commit: ed3e69df1564eca3becdc57181608bc0211ca4c5
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2021-01-28 17:33:23 +00:00
Julien Castiaux 193fee519c [FIX] calendar: missing cron compat fom sms_calendar
Fine tunning of c8f031ad77, this commit has the missing code
compatibility for sms_calendar.

closes odoo/odoo#65064

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-01-29 15:38:24 +00:00
Odoo's Mergebot 6b701552a2 [MERGE] *: add Quick Edit and Auto Save
This PR adds two main features: quick edit and auto save

Quick Edit
---

The quick edit allows to click on fields in readonly form view to switch
into edit mode. After switching mode, the clicked field is automatically
focused.
A few fields have a custom quick edit behaviour after mode switched:
  - checkboxes automatically toggle.
  - radio buttons are set to the selected value.
  - one2many list's cell are focused.

One2many list fields now show the "add a line" in readonly mode.

In order to minify the differences between edit and readonly modes
multiple things have been done done:
- a lot of `o_edit_only`,`o_read_only` labels have been removed and
  `placeholder` have been set on fields in a lot of xml templates.
- the render function of many2one and x2many radio
   fields have been changed to render them the same in edit mode and read mode.
- margins in inner form groups have been removed.
- a minimum height on rows has been set to align them.
- empty fields are now visible. (as a blank line)

Auto Save
---

Auto save is self explanatory.
With auto save, changing the pager, going back in the breadcrumb,
going to another action or clicking on a menu item doesn't ask to
confirm changes if any but automatically saves them.

In settings, the confirm dialog has been revamped.
We can now decide to "Save" or "Discard" the changes or "Stay Here" to
do nothing.

closes odoo/odoo#60693

Related: odoo/enterprise#14931
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-02-02 16:54:13 +01:00
nie ebd85820b8 [FIX] l10n_ch: use commercial company name in invoice PDF
Steps:
- Edit the current company (1):
  - Country: Switzerland
  - Currency: CHF
- Install l10n_ch
- Go to Invoicing > Configuration > Bank Accounts
- Edit Bank:
  - Bank Account: create a new one:
    - Account Holder: (1)
- Go to Configuration > Journal
- Edit Customer Invoices:
  - Advanced Settings tab:
    - Communication Standards: Switzerland
- Go to Customers > Customers
- Create a new customer (2):
  - Fill in street, city, zip code and country
- Edit (2):
  - Contacts & Addresses tab:
    - Add:
      - Select Invoice Address
      - Contact Name: Keep this field blank
- Go to Customers > Invoices
- Create a new one:
  - Customer: "(2), Invoice Address"
  - Add a product
- Validate it
- Click Print QR-Bill

Bug:
Traceback here:
https://github.com/odoo/odoo/blob/b76e9ef658bde0178fa1660b6ad27b880e91632a/addons/l10n_ch/models/res_bank.py#L129
TypeError: 'bool' object is not subscriptable

Explanation:
The contact name of an address is optional. When nothing is filled in
that field, it returns `False`, hence the error.
Using the commercial company name ensures a name is put in the invoice,
even if the contact doesn't belong to a company.

opw:2447158

closes odoo/odoo#65417

X-original-commit: 2537bb01675279f08edf65077e6d41a5bd968ec4
Signed-off-by: backspac <backspac@users.noreply.github.com>
2021-02-02 13:56:41 +00:00
Michael Mattiello (mcm) b89e6245ec [IMP] web_editor: make field html quick editable
This commit makes the field html quick editable.
We can click on a field html to switch the form view to edit mode but
if we click on a link in the field, the link will have the priority.

task 2330101
2021-02-02 13:43:59 +00:00
Michael Mattiello (mcm) 2c3ac6b254 [IMP] web: add quick edit behaviour
This commit adds the quick edit behaviour.
The quick edit allows to click on fields in readonly form view to switch
into edit mode. After switching mode, the clicked field is automatically
focused.
A few fields have a custom quick edit behaviour after mode switched:
  - checkboxes automatically toggle.
  - radio buttons are set to the selected value.
  - one2many list's cell are focused.
One2many list fields now show the "add a line" in readonly mode.

task 2330101
2021-02-02 12:40:23 +00:00
Michael Mattiello (mcm) d1c56ec7c4 [IMP] web, base: auto save
This commit adds the auto save for editable list and form views
but not for settings.

Now with auto save, changing the pager, going back in the breadcrumb,
going to an other action or clicking on a menu item won't ask to
confirm changes if any but will automatically save them.

In settings, the confirm dialog has been revamped.
We can now decide to "Save" or "Discard" the changes or "Stay Here" to
do nothing.

task 2330101
2021-02-02 12:40:22 +00:00
Michael Mattiello (mcm) 70d047aa33 [FIX] *: fix tours broke by new many2one render
*: sale_product_configurator, test_main_flows

This commit fixes tours broken by many2one rendering changes

task 2330101
2021-02-02 12:40:22 +00:00
Michael Mattiello (mcm) 288b24cbdf [IMP] web: reduce shift when switching form mode
This commit does 4 things in order to reduce the shift when switching
mode in form view:

1. modifies the render function of many2one and x2many radio
   fields to render them the same in edit mode and read mode.
2. removes margins in inner form groups.
3. sets a minimum height on rows to align them.
4. empty fields are now visible. (as a blank line)

task 2330101
2021-02-02 12:40:22 +00:00