Commit Graph
143902 Commits
Author SHA1 Message Date
Younn Olivier fac52593fe [IMP] website_form: make adding a field to the form clearer
This commit adds a label next to the + icon and uses a primary button to
make adding a field clearer.

Part of https://github.com/odoo/odoo/pull/72180
task-2566338
2021-06-25 07:39:53 +00:00
Cedric Prieels (cpr) 3bcb88f410 [IMP] {hr_,sale_}timesheet,{sale_}project: improve the tasks portal
Generic UX improvements for the task portal.
Added new sort by, group by and searches options in the tasks portal.
Some options have been renamed as well, while the style has been slightly revised.
The timesheet details of each sub-task from the parent form view has also been removed.

task-2508883

closes odoo/odoo#70305

Related: odoo/upgrade#2580
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-06-24 15:39:40 +00:00
prro-odoo 2956233255 [FIX] web: expand import-compatible fields
- Install the eCommerce (for the ribbon, in 14.0) and the Sales app
- Go to the Sales app -> Products -> Products
- (View List ->) select (a) Product(s) -> Action -> Export
- check "I want to update data (import-compatible export)" -> click on the "Ribbon" field (in 14.0, or another many2x field for wich the model has no _rec_name defined) to expand

Cause: the export page controller tries to access an undefined field (_rec_name)

Solution: the controller now uses a fallback method to retrieve the wanted field

opw-2566403

closes odoo/odoo#72748

X-original-commit: e31cb5be22de7db223318b4876bf725e15654fea
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: prro-odoo <proose@users.noreply.github.com>
2021-06-24 17:30:20 +00:00
Valentin Chevalier 24fa119533 [FIX] payment: restore the delay before post-processing a transaction
Since the payment post-processing cron runs every ten minutes, it is
important that it ignores the transactions that were updated in the same
last ten minutes. This is necessary because customers can only see the
payment confirmation message for transactions that were not already
post-processed.

Commit 573ed74 mistakenly changed the post-processing delay from ten
minutes to one minute. This commit changes it back to 10 minutes.

task-2494916

closes odoo/odoo#72742

X-original-commit: 502a13b87971b0bf36493770dd3bcb4f9d9b7c2a
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
Signed-off-by: Valentin Chevalier <chevalierv@users.noreply.github.com>
2021-06-24 16:14:10 +00:00
Younn Olivier 5d7f883a2c [FIX] website: fix scrollButton option on events
On events, or in every part of the website that was built without
sections, the scroll button of a dropped snippet was not effective.

This was because we were targeting the next section, which was not there
in the previous case. Yet, we want it to scroll to the next element,
even if it is not a section.

task-2566338

closes odoo/odoo#72733

X-original-commit: 439381aa98c3b1e03513edb45cda284f4627d2a8
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-06-24 15:14:23 +00:00
Fabien Pinckaers a65f6a5872 [IMP] various: clean most urls to odoo's website
Pages changed on odoo.com so let's update links.

closes odoo/odoo#72707

Related: odoo/enterprise#19239
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-06-24 15:14:29 +00:00
root 9796d58271 [FIX] hr_timesheet: never update timesheet rounding params
Before this fix if a user updated the module hr_timesheet the ir.config_parameters would be reset.
By wrapping them in a no-update they're no longer updated with a module update and thus kept as set by the user.

closes odoo/odoo#72732

X-original-commit: 369529cb15ec01cde1538c189535ce6d41685268
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-06-24 15:02:56 +00:00
Touati Djamel (otd) 2f098b2583 [FIX] stock_landed_cost: added a missing return on the overridden write function
commit where the bug was introduced : https://github.com/odoo/odoo/pull/71810/commits/7b87ab31ee64d56c6e7f9eab7a51d81cf4e66747

opw-2572132

closes odoo/odoo#72751

X-original-commit: 94d1e807379ca7d92d5a4df267857cb00f979710
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Djamel Touati <DjamelTouati@users.noreply.github.com>
2021-06-24 18:19:31 +00:00
alt-odooandJulien Castiaux 603e13fa00 [FIX] lunch: access rights error on ir.cron for lunch manager
When a lunch manager tries to archive a vendor, we automatically update its
related cron. This is triggering an access rights error if the user does not
have access to ir.cron model. We should allow him to archive the vendor
without error.

closes odoo/odoo#72750

X-original-commit: 5b8eff9d771a9071327473d2185624f69e1057c1
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
Co-authored-by: Julien Castiaux <juc@odoo.com>
2021-06-24 18:07:25 +00:00
Didier (did) e30e315ece [IMP] mail: replace hard-coded values by SCSS variables
Clean up pass towards using bootstrap in template, not all hard-coded values are
converted yet but those have been done:

 - `width/height: 100%` by `map-get($sizes, 100)`
 - `margin/padding` with hard coded value with `map-get($spacers, X)`
 - `border: 1px` by `$border-width`
 - hard-coded black and white by `$black`/`$white`
 - hard-coded `border-radius: 50%` by `@extend .rounded-circle;`

task-2223232

closes odoo/odoo#72321

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-06-24 17:19:59 +00:00
Anh Thao Pham (pta) fed1acee10 [FIX] web: fix error when getting image URL with default id
Linked to commit: https://github.com/odoo/odoo/commit/7eac23573c77415c84cb9c234c8063d4c68be425

Using false as default value instead of null will lead to the following
error if we try to get image URL of a record that is not the current one
and if no placeholder is available:
ValueError: invalid literal for int() with base 10: 'false'

opw-2516188

closes odoo/odoo#72729

X-original-commit: d32c0ddbcb99385407a5030e8d3ea4df44509377
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Anh Thao PHAM <kitan191@users.noreply.github.com>
2021-06-24 15:01:47 +00:00
Goffin Simon 34e66bd2c4 [FIX] mrp: Delivered quantity with kit
Steps to reproduce the bug:
Create 2 product (Finish product , RM product)
Create 1 Kit BOM for Finish product with 1 Component(RM Product) and quantity : 0.0860
Create SO for 10 Finish product and confirm SO
Deliver RM product : Quantity : 0.86 ( as per define ratio in BOM) -> validate

Bug:

Delivery quantity on SO line shows : 9 instead of 10

opw:2540671

closes odoo/odoo#72724

X-original-commit: 89aa85f32e0a87d537f4d9ed9c22955d3269ddd1
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2021-06-24 14:06:08 +00:00
Thibault Libioulle caa58cdc46 [FIX] sale_timesheet: fix wrong join condition
Prior to this commit, the account move line was not correctly joined,
and put in relation with SOL. Furthermore, this table isn't use.

In this commit we correctly join the subquery, in this subquery,
we just try to avoid to take into account amounts that are related
to invoiced sale order lines.

closes odoo/odoo#72710

X-original-commit: b04465d3514fe5cd52b7994962fe4069933ae6fd
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-06-24 13:05:41 +00:00
Jacky (trj) bdd0491fb2 [REF] l10n_de: move l10n_de_stnr and l10n_de_widnr from l10n_de_pos_cert module
These fields are more relevant in the German localization rather than the German POS localization

closes odoo/odoo#72590

Related: odoo/enterprise#19183
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2021-06-24 07:46:54 +00:00
Arnold Moyaux 6ef20b309f [FIX] stock: take ongoing move line for putaway
Usecase to reproduce:
- Setup a maximal of 100units in a storage category
- Set the storage category on shelf1 and shelf2
- Create two putaway rule from wh/stock to wh/stock/shelf1 and
wh/stock/shelf2
- Create an immediate receipt
- Set 100 units of product on stock move line (should suggest shelf1)
- Put in pack
- Create a new stock.move.line in the receipt.

It will suggest the same location than in the first line despite the
location is the same. It happens because the check look only at quantity
reserved in the location but the user could have create new line without
quantity reserved.

This commit, take the maximum between the quantity reserved and the
quantity done to give an estimation of what could happens.

closes odoo/odoo#72689

X-original-commit: d9d98d4264295532f2248c6072aabbd72f32f054
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-06-24 11:11:27 +00:00
Sébastien Mottet (oms) ccbab34878 [FIX] website: handle disabled and preselected modules
- The selection of cards corresponding to already installed modules
is disabled. A disabled style has been applied to these cards and an
info icon added. On hover on this icon the user is informed that the
module is already installed on its DB.

- Modules that were preselected based on website type can now be
unselected by the user.

- Correct typo in description of feature_module_career.

task-2518565

closes odoo/odoo#72688

X-original-commit: ab364b06dbb20cce90c7caa8ca15d034e2dcb25e
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Sébastien Mottet <smottet@users.noreply.github.com>
2021-06-24 11:09:13 +00:00
Lucas Perais (lpe) ac0224319e [FIX] web: utils/strings: sprintf support lazy translated strings
Have something like:
```js

sprintf("my string %s", _lt("lazy translated"));

```
Before this commit, the lazy translated term was not formatted into the string.
This was because _lt returns an object containing a custom toString function, which was not handled by sprintf

After this commit, sprintf is able to handle lazy translated strings

closes odoo/odoo#72598

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-06-24 09:59:05 +00:00
Géry Debongnie d4bbadd699 [REF] web: slightly improve translation system
Before this commit, "lazy translated" strings were implemented as
objects with a toString function. This is simple, but does not emulate
very well the real behaviour of a string.

In this commit, we create a LazyTranslatedSTring class which subclass
the String class, so all string methods will work as expected.

We also expose the _t function here, to make it more convenient for some
code to access the translations instead of depending on the presence of
an environment.
2021-06-24 09:40:10 +00:00
Barad Mahendra 27538bca03 [IMP] project,hr(_timesheet)_holidays: usability improvement for project
Purpose of the commit is to improve the usability and onboarding
of the project app.

So in this commit, done the below changes:
 - Rename column "Kanban state" in list view screens
 - Hide column "analytic account" when not needed
 - Do not show "Internal" project

PS: Moved leave_timesheet_project_id into hr_timesheet and rename
it as internal_project_id and we used it in the domain in the
kanban/action to the kanban in order not to have it in the result.

closes odoo/odoo#68857

Taskid: 2451722
Related: odoo/upgrade#2479
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
2021-06-24 05:18:14 +00:00
f6ab481ad9 [FIX] project: improve performance of burndown chart report
Before this commit, for the db with old active tasks and many
projects and tasks. The report takes several hours to execute the sql view.
Because we take the create date of the oldest task as the begin date
of each generate_series to calculate the different group bys (day, week,
month, quarter and year) until CURRENT_DATE.

This commit hugely improves the performance of the sql view execution
for the burndown chart report.

closes odoo/odoo#72664

X-original-commit: 89726a22862cf14f7b88e130fb79ddc74bffff5e
Signed-off-by: LTU-Odoo <IT-Ideas@users.noreply.github.com>
Co-authored-by: Nicolas Seinlet (NSE) <nse@openerp.com>
Co-authored-by: Thibault Libioulle (TLE) <tle@odoo.com>
Co-authored-by: Laurent Stukkens (LTU) <ltu@odoo.com>
2021-06-24 07:22:52 +00:00
Mohammed Shekha 49d311e725 [IMP] stock: add is_signed boolean computed field
signaature field was used in listview and it was displaying size of the
signature file, it has been done in commit: 4bdbb9b761
but as discussed on PR: https://github.com/odoo/odoo/pull/72276\#issuecomment-863262072
we added is_signed computed boolean field to display it like boolean as boolean
widget is supported only on boolean type field.

task-2580117

closes odoo/odoo#72592

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-06-23 08:15:14 +00:00
Adrien Widart 45441f6fbb [FIX] point_of_sale: always post bank statement of cash
The amount of cash present in the POS may be incorrect

To reproduce the error:
1. In POS settings, enable "Advanced Cash Control"
2. Start a POS session
3. Make an order of 70$, payment in cash
4. Close the POS session (correctly set the closing cash)
5. Start a POS session, close it (correctly set the closing cash)

Error: Back to kanban view, the information about the POS are incorrect:
the cash balance is equal to zero, it should be $70

The value of the cash balance is computed in `_compute_last_session`:
https://github.com/odoo/odoo/blob/5ea1d31df9041ca7b25fbea6178e798e62bebca0/addons/point_of_sale/models/pos_config.py#L276-L291
This method gets the last session and extracts the information. However,
in the above case, there were no sales during the last session (step 5).
In such situation, the bank statement of cash is deleted. As a result,
in `_compute_last_session`, `last_session_closing_cashbox` will be
defined to `False`. This is the reason why the cash balance will be
equal to 0

The deletion of `cash_register` has been introduced in case the user
closes a session that does not contain any SO. This fix suggests keeping
such a bank statement and automatically posting it.

Linked to OPW-2507394

closes odoo/odoo#72663

X-original-commit: dae9ba62d98d4238600ccd637dd5e879f1cac903
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-06-23 17:48:19 +00:00
Bruno BoiandStefano Rigano 5c5924af88 [FIX] web: change pivot dropdown submenu
Since odoo/odoo@1971bf3 the customised dropdown in the pivot view (the one that opens its submenus horizontally) cannot open at all its submenus.

As the correct behaviour cannot be restored without reintroducing the +300 scss lines that has been removed, this commit applies a temporary fix that *changes* the design of this dropdown. Now, its submenus will open vertically, like for the groupby menu near the search bar.

The final dropdowns design is currently ongoing within the taskid: 2578926

closes odoo/odoo#72640

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Stefano Rigano <sri@odoo.com>
2021-06-24 07:14:49 +00:00
Ivan Yelizariev 0f91970020 [FIX] uom: avoid unneeded qty conversion and fields fetching
This could save some time when `_compute_quantity` is used thousands times in
request and there are thousands UOMs in the system

* if qty is zero, then result is zero
* if to_unit is the same, then result is `round((qty / factor) * factor) = round(qty)`

---

opw-2549026

closes odoo/odoo#72582

X-original-commit: a122db226cdf801675daaee5a69bcb47a47ab174
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
2021-06-22 19:00:33 +00:00
Adrien Widart cffcee6147 [FIX] stock: display lot on delivery slip
When consulting a delivery slip, a portal user won't see the lots/serial
numbers used.

To reproduce the error:
(Need demo data)
1. Create a product P
    - Product Type: Storable
    - Tracking: By Lots
2. Update its quantity
3. In Settings, enable "Display Lots & Serial Numbers on Delivery Slips"
4. Create + Validate a SO:
    - Customer: Joel Willis
    - Lines: 1 x P
5. Validate the delivery
6. Log in DB with 'portal' (Joel Willis)
7. On SO, open the Delivery Slip

Error: The product's lot is not mentioned

Here is the condition to display the lot:
https://github.com/odoo/odoo/blob/c61db20204700a375f7005f50f95b44a60c3bb70/addons/stock/report/report_deliveryslip.xml#L77-L79

Problem is that portal users are not part of
`group_lot_on_delivery_slip`

When enabling the option, the groups are updated here
https://github.com/odoo/odoo/blob/adccb562209c2431a49438d36794f0765f1bc86d/odoo/addons/base/models/res_config.py#L570-L576
`implied_group` (which is `stock.group_lot_on_delivery_slip` in our
case) is added to `groups.implied_group`
The variable `groups` comes from `classified`, which is defined thanks
to method `_get_classified_fields` (see L553 in above code block)
And here is an extract of how this method works:
https://github.com/odoo/odoo/blob/adccb562209c2431a49438d36794f0765f1bc86d/odoo/addons/base/models/res_config.py#L460-L462
At some point, it checks if the field `group_lot_on_delivery_slip` has
an attribute `group`. In case `group` is not defined, the group
`base.group_user` is used. This is the reason why, by default, the
option is enabled for internal users only instead of all users.
Therefore, we just need to define the attribute `group` to the field
`group_lot_on_delivery_slip`

OPW-2558761

closes odoo/odoo#72656

X-original-commit: 475b35397b7254012a082a1206c478084c069857
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
2021-06-23 15:56:47 +00:00
Lucas Perais (lpe) c00fb3cede [FIX] web: register template of dynamic classes once
Before this commit, the template of some dynamic classes (usually as WOWL to legacyAdapters)
were registered at each definition of the class which is potentially at every doAction/switchView

After this commit, they are all registered only once, as early as possible.

closes odoo/odoo#72476

Related: odoo/enterprise#19199
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-06-23 15:47:56 +00:00
Lucas Perais (lpe) 4e37b0bab0 [FIX] web: navbar: do not change url hash on item clicked
Before this commit, when clicking on menus or debug items or use menu items
the URL briefly changed pushing an unwanted history entry.

We do want those to be links (tag `a`) with an href to be able to open in a new tab.
But we don't want the current url hash to change because of it.

This commit fixes this.
2021-06-23 15:47:56 +00:00
Lucas Perais (lpe) 0cec54b92c [FIX] web: action_service: better error handling
on a legacy form view, do an action in target new
The view in target new should, during its onchange, trigger a ValidationError

Before this commit, the dialog_container was stuck in an error loop.
This was because the received error was never an instance of Error, rather it was
a legacy error event. So it was never transmitted upstream were the ErrorHandler could remove
the dialog in error from is dialog array.

After this commit, the ValidationError mesage is displayed.

This commit additionally fixes another issue:
An action in target main that failed to render erased the whole DOM. This is not what we want,
at least for now. Imagine a list view, open a record, this record fails to load. We still want to be
on the list view, not in a blank state.
2021-06-23 15:47:56 +00:00
Lucas Perais (lpe) a2d49d3003 [FIX] web: error_service: bind the event handlers on browser
Before this commit, the error service bound its listeners onto window.
This may create pollution when executing more than one test instanciating an error_service

After this commit, we bind the handlers onto browser, which is fully in our control in tests.
2021-06-23 15:47:55 +00:00
Lucas Perais (lpe) 77a59f8d6a [FIX] web: action_service: do not commit a dialog that has failed
Open a action in target new that you'll know will fail to open.
Make sure you put an onClose callback when executing doAction.

Open another action in target new, that will succeed.

Before this commit, the onClose of the first dialog is executed, while it should not.
Indeed, if the dialog fails, the whole business flow is invalid altogether
and no more business operation (in the onClose) should be executed

After this commit, the onClose callback of the failing dialog is not executed.
2021-06-23 15:47:55 +00:00
Goffin Simon 261782d82e [FIX] hr_holidays: Rounding allocation_used_count and allocation_count
Steps to reproduce the bug:

- Let's consider an employee E with 8.00 hours as Average Hour per Day
- Create an Allocation for E with a Time-off Type in Hours
(be sure the number of hours is different from the average hour per Day)
- Open the form view of E

Bug:

The smart button Time Off(remaining leaves) was completely unreadable

opw:2441019

closes odoo/odoo#67849

X-original-commit: af8ce1d8891a4dcdeb80b069a114299d84e021f1
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2021-03-15 12:32:17 +00:00
nounoubensebia 017ecb37f2 [IMP] mail_plugin: enable enrichment and update of an existing company
Add an enrich and update endpoint allowing the user to update an existing
company if the company has no insights, as this can bring valuable information
for the user especially if the company has no infos.

Task-2563180

closes odoo/odoo#73658

X-original-commit: 72c35667d3e6f99cb4cfdbd1c93b877cc9fef750
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-13 16:42:10 +00:00
Sébastien Theys 0a452c528d [IMP] mail: use thread displayName instead of name
More often than not these 2 fields have the same value, but when they are
different it is `displayName` that holds the expected value (eg. for a DM,
`displayName` would be the custom name or the name of the correspondent).

This commit updates them to avoid confusion and having bad examples in the code.

closes odoo/odoo#73659

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-07-13 16:42:26 +00:00
Sébastien Theys 4b6fe8f000 [IMP] mail: clean up unused o-message-not-discussion
closes odoo/odoo#73657

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-07-13 16:38:28 +00:00
Sébastien Theys 86efd0aa86 [IMP] mail: remove heading color from message author name
Following design update with new web client, the heading color is too strong
to be kept on author. The default color now does just fine actually.

closes odoo/odoo#73656

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-07-13 16:35:10 +00:00
William Braeckman fb0e74d5e1 [FIX] hr_recruitment: fix calendar_events
When using the Add button on the calendar view introduced with
odoo/odoo#64948 the event would not be linked with the applicant.

After further investigation the method used to get the applicant id in
default_get was not flexible enough, the one from crm calendar has been
'copied'

Task ID: 2578165

closes odoo/odoo#73635

X-original-commit: f23e07dcb0606dbc4bf835b8266323d5a515662d
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: William Braeckman (wbr) <Williambraecky@users.noreply.github.com>
2021-07-13 13:14:15 +00:00
Nicolas Lempereur c900e40868 [FIX] hr_holidays: request date tz whole company
When setting the request_date_from and request_date_to when creating a
leave that will be used to show the range of days of the leaves, we are
using the current user timezone to determine it.

eg. in UTC+2 if the leave begins at midnight on the 6th, we will see 6
and not 5 which is the day in UTC.

When creating a leave in a mode different than employee, when it is
confirmed and a leave is created for each employee, we would use the UTC
day instead which is a little unexpected.

Without the fix, the added test fails with:

    AssertionError: datetime.date(2019, 5, 5) !=
    datetime.date(2019, 5, 6) : Timezone should be kept between company
    and employee leave

opw-2573730

closes odoo/odoo#73633

X-original-commit: eb5c4e9b8d32a10e460ac089794bf1ceb9b7b71a
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-07-13 12:46:38 +00:00
qsm-odoo f34e944c2a [FIX] web_editor: use linter on snippets.editor.js file
Sorry but not sorry, I have to fix this file's "codestyle" (unread
variable, missing or extra ";" characters, etc) post-editor merge...
hard to work inside of it in the current state.

closes odoo/odoo#73629

X-original-commit: dbf245891099b506f21a66ea8e7a9146f6c9e28b
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-07-13 12:13:33 +00:00
nounoubensebia 035afeb94e [ADD] project_mail_plugin: add support for project's tasks in mail plugin
Add support for tasks for the mail plugins via the new project_mail_plugin
module.

The new module provides the following new features:

- Enables the user to see tasks related to the selected contact, tasks where the
  contact is the customer

- Enables the user to log an email directly to a task as this can be useful when
  the user finds important information in the email

- Enable the user to create a task with the email message being directly set
  in the description field, as the user would probable want the email
  message to be included in the created task, this is done through the
  "create_task" method, which the plugins will use in order to
  create the task and send the related information, the plugin would then
  directly redirect the user to the task form view realted to the created
  record in edit mode.

Purpose is to allow users to connect their tasks to their mailbox.

Which allows for example to create a task from an email received,centralize data
regarding a customer on its task, check ongoing tasks for a customer, ...etc

UPG-PR: https://github.com/odoo/upgrade/pull/2488
Task-2518640

closes odoo/odoo#70943

Related: odoo/upgrade#2488
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-07-13 11:02:51 +00:00
jbw fd471c7096 [FIX] account: fix partner mapping with notes on reconcile models
On reconcile models, a rule can be set to map a partner to a bstline if
the bstline "Notes" matches a regex. This "Notes" field is actually
the "narration" field inherited from move. In commit 0f3c7f153e8bd20f83b7d1df031634996d36935b
this field is converted from Text to Html. This breaks the regex match.
The fix converts back the field value to text for the regex check.

closes odoo/odoo#73618

Task: 2427089
X-original-commit: 8e9616034678a627f92740487f20cf66e60c0f30
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: jbw-odoo <jbw-odoo@users.noreply.github.com>
2021-07-13 10:16:02 +00:00
jbw 4aa41f54a4 [FIX] account: Prevent editing bst line values when bst not new
One could edit bank statement line values with new from a bstline modal. This
is due to new quick edit behaviour. This prevent the editiing of bst lin values
if bst is not new.

closes odoo/odoo#73617

Task: 2427089
X-original-commit: c9e220d0276f59834baeae3196560a7f893ff337
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: jbw-odoo <jbw-odoo@users.noreply.github.com>
2021-07-13 10:15:29 +00:00
Hardik Prajapati c3e12ee644 [FIX] web: centered event name while dragging in month mode
before this commit, the name of the event and hour is not
correctly centered while dragging the pill in month mode.

This commit fixes the issue by adding the CSS property.
after this commit, the name of the event and hour should be
correctly centered while dragging the pill in month mode.

TaskID-2506060

closes odoo/odoo#73553

X-original-commit: 59156daa150bf285626600f0a999dfe9838e1344
Signed-off-by: Simon Genin (ges@odoo) <ges@odoo.com>
2021-07-12 13:08:45 +00:00
Jeremy Kersten 9240ac8eb5 [REV] website_sale_blog: add related products/blog posts carousel
You can do same (with matching on name, instead of rel) with dynamic snippet

Else you can create one Ecommerce category by blog, and hide this category on
shop page, and have a lot a useless record, and have a 'bordel' in your categs
and from this way use a product snippet linked to this category.

Or install a module from the community that do the same that this one: a simple
way to link your product to blog, and show them without string matching or fake
categ.

closes odoo/odoo#73403

Related: odoo/upgrade#2632
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-07-13 09:25:10 +00:00
Francois (fge) 9d120653e3 [FIX] web: issue on firefox with the overlay
When hotkey overlays are removed, we now prevent default on keyup,
as this may cause some browsers to display their menu bar
(as the overlay key we use is ALT). e.g. Firefox.

closes odoo/odoo#73343

Related: odoo/enterprise#19627
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-07-13 07:32:10 +00:00
Francois (fge) e95080792a [IMP] web, mail: Command palette
The purpose of this commit is to:
- Improve the design of the command palette
- Add few data-command-category and data-hotkey
- Scrolling through the command palette dropdown with the up/down arrows
should loop
- Moving the mouse over the palette command no longer causes scrolling

Task-2590390
2021-07-13 07:32:09 +00:00
Rémy Voet (ryv)andnouraellm ae7e5960f1 [IMP] mrp: update workorder readiness behavior
- The work order state changes based on the availability of the components
- So if all BOM components are available the state of the first WO is set to ready
- The color of ready in the WO tree editable view will stay blue as long as done reserves the green color
- If one or multiple components are not available, the state of the first WO is set to waiting
- The color of waiting in the WO tree editable view is set to orange
By default to launch takes workorder_ready_count so it counts only ready WOs
- The user can always process the WO without restrictions even if the WO state is waiting

Task-2426773

closes odoo/odoo#71250

Related: odoo/enterprise#18523
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Co-authored-by: nouraellm <nea@odoo.com>
2021-07-13 11:53:12 +00:00
Rémy Voet (ryv) 37e49780e2 [FIX] mrp: self instead of production 2021-07-13 11:40:58 +00:00
Rémy Voet (ryv) 0e08cb6630 [FIX] mrp: allow to cancel a 'to_close' empty MO
Issue: we can't canceled a MO without component to consume when the MO
is in the state 'to_close'. It is due to
bf5e1debf9 which now allows to confirm a
MO without component to consume.

Like for the 'done' state. the state 'cancel' can't be modify after to
be set.

task-2426773
2021-07-13 11:40:58 +00:00
william-andre 934b8b09ba [FIX] account: allow to change currency when posted before
There is no reason to forbid changing the currency when a move has been
posted before.
Was introduced in [1] without reason.

[1] https://github.com/odoo/odoo/commit/d1bbf11af27e4ce12b025ef22e397302ee6336c2

closes odoo/odoo#73623

X-original-commit: 9b0578766709b27c91d85bf6246b4bc5e43ca27d
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2021-07-13 11:18:26 +00:00
jbw 6adaec714a [IMP] account: Reversal on same journal type as original AccountMove
For data quality purposes and bug prevention, when I reverse an entry,
the reversal should always be postable on a journal having the same type
as the initial Journal Entry's journal.

closes odoo/odoo#72431

Task: 2497529
Related: odoo/enterprise#19543
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2021-07-13 10:00:38 +00:00