Commit Graph
141694 Commits
Author SHA1 Message Date
Debauche Stéphane 69df7d3d8a [IMP] event: improve event mail state display
Purpose
=======

Show an icon representing the state of the event mail and number of contacted
registrations instead of the simple checkbox "sent".

Specifications
==============

Instead of the checkbox "sent", an event mail can have 3 values

  1. Sent, if all the mails has been sent;
  2. Scheduled, if scheduled but no attendee have been contacted;
  3. Running, if not all attendees have been contacted;

Note that communication targeting "after registration" are always considered
as being "running" as any new registration triggers a new communication.

A new widget is added that displays an icon depending on the state.

A new field holding contact count is added. When scheduler send emails it is
updated to keep a count of sent communications.

LINKS

Task ID-2414658
COM PR odoo/odoo#63093
UPG PR odoo/upgrade#2014
2021-03-24 11:18:42 +00:00
Thibault Delavallée e47725abd8 [FIX] event: fix missing trigger for scheduled mails based on event end date
Scheduled date is not correctly triggered if event date_end changes. It should
update its scheduled communications.

Task ID-2414658
COM PR odoo/odoo#63093
2021-03-24 11:18:14 +00:00
Stéphane Debauche 214d8fe589 [FIX] event: fix done field definition
Add missing trigger for done

Do not copy done field on event.mail model.

Task ID-2414658
COM PR odoo/odoo#63093
2021-03-24 11:18:11 +00:00
Thibault Delavallée db8f68f683 [MOV] event: cleanup registration code location
Purpose is to ease understanding of code. Ranging chaussettes in the correct
tiroir is important.

Task ID-2414658
COM PR odoo/odoo#63093
2021-03-24 11:18:09 +00:00
Thibault Delavallée df52fedee6 [IMP] base: add missing views for ir.cron.trigger model
Purpose of this commit is to help debugging processes involving cron triggers
by adding views and a menu in Odoo. It allows to see triggers having been
created. Menu has been added under Scheduled Actions (aka Crons), in Technical
menu.

Task ID-2414658
COM PR odoo/odoo#63093
2021-03-24 11:18:06 +00:00
Nicolas Galler dfd0dbb303 [REV] purchase_stock: don't hide replenishment origin
This reverts commit 170729ee58b199041d7545e7789ac9474e86f998, per
discussion with @thomasdeleval on linked ticket.

opw-2422438

closes odoo/odoo#68293

X-original-commit: 5c2db20a14701f165adfecb391073c3d957081e9
Signed-off-by: Steve Van Essche <svs-odoo@users.noreply.github.com>
Signed-off-by: Nicolas Galler <ngaller@users.noreply.github.com>
2021-03-24 11:04:29 +00:00
Josse Colpaert b3743556ab [FIX] account: avoid rounding error by not doing anything with empty fiscal positions
opw-2447155

closes odoo/odoo#68281

X-original-commit: fc0a2c515022cc6c200dd916462e44b1b79f8ea8
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-03-24 09:32:11 +00:00
svs-odoo 86318e7ff7 [FIX] stock: don't display assign SN for returns
Before this commit, when delivered qty. for a product tracked by serial
numbers and then create a returns for this product, as the move is
linked to its original returned move, when the detailed operations will
be displayed, it will hide `lot_name` field and display the `lot_id`.
The issue is it will still show the "Assign Serial Numbers" feature.
As this feature is for the creation of new SN only (not for assign
existing ones), it should be hidden in this case because it will lead to
attempt to create already existing.

How to reproduce:
  - Create a product tracked by serial numbers;
  - Add at least two qty. on hand for this product and create as many
    serial numbers, following by numbers (ex.: sn01, sn02, sn03, ...);
  - Make a delivery for at least two of this product and proceed it;
  - When it's done, make a return for this delivery;
  - Open the delivery's return and display the detailed operations, then
    use the "Assign Serial Numbers" to try to reassign the delivery SN.
  --> First, we will not see the SN on the move line (as `lot_id` is
      visible but `lot_name` is invisible).
  --> Second, you can't mark as done the return as it will try to create
      the SN but they already exist.

To fix the issue, we can simply hide this feature when we hide the
`lot_name` field.

task-2474919
opw-2455971

closes odoo/odoo#68249

X-original-commit: fab1f31f70376d5477e67d153e2fa3c0f6477397
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Signed-off-by: Steve Van Essche <svs-odoo@users.noreply.github.com>
2021-03-23 15:01:01 +00:00
Fanny He 0728db061b [FIX] stock: disable auto-trigger scheduler with ir.config_parameter
Currently we automatically check reordering rules when a product cannot be
completely reserved, which allows to have a replenishment document for the
product without needing to run scheduler. This is unwanted for some users.
In this commit, we allow to disable this by adding a parameter to
ir.config_parameter. To disable it, set a parameter with name
"stock.no_auto_scheduler".

opw 2458507

closes odoo/odoo#68283

X-original-commit: 7ec5bae11ad89514a33db35810f4763e7631125f
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2021-03-24 09:37:06 +00:00
Julien CastiauxandRaphaël Collet 9a8cf18ddb [IMP] core: New 'capture_trigger' test helper
When testing cron triggers, it is common to get the newly created
triggers in order to validate they exist and are scheduled are the right
moment.

This new helper is a context manager that capture all triggers or
triggers created for a specific cron. The created triggers are
accessible via the context's object `records` attribute.

The various tests have been updated so they use that new helper.

closes odoo/odoo#68163

Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
Co-authored-by: Raphaël Collet <rco@odoo.com>
2021-03-24 09:29:38 +00:00
svs-odoo 02bd058800 [IMP] mrp: workcenters views
Some changes on the MRP workcenter model (`mrp.workcenter`):

  - Adds a stat button in the form view to display operations used by
    the workcenter;

  - Enables the multi-edit on the list view;

  - Adds multiple fields in the list view, often as optional;

task-2382256

closes odoo/odoo#62126

Related: odoo/enterprise#17250
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2021-03-24 08:21:34 +00:00
svs-odoo 38ac9ccbc1 [IMP] mrp: operations listview
On the MRP operation model (`mrp.routing.workcenter`):

  - Changes the order (ordered by workcenter and BOM in priority);

  - Adds computed field, `time_computed_on`, which is only used in list
    view (display on how many numbers of work orders the duration is
    computed);

  - Adds multiple fields in list view (often optional display);

  - Adds two groupby (by BOM and by workcenter).

task-2382256
2021-03-24 08:09:17 +00:00
Patrick Hoste 2bb1f33155 [IMP] survey: display no question message for live session
PURPOSE

Before this commit, the survey host had no indication that his survey
has no questions. After this commit, he will be displayed with that
indication.
Before this commit, someone who took the survey had a message implying
him to modify the survey to add questions. After this commit the message
will say 'No question yet, come back later'.

LINKS

Task ID : 2456372
PR : odoo/odoo#68231

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-03-24 08:32:27 +00:00
Michael Mattiello (mcm) 2089fd8619 [FIX] hr_skills, web: fix css rules leak
Before this commit, hr_skills module defined a few css rules
but weren't enclosed in a custom class to make them only
for hr skills so these rules leaked everywhere in odoo.

This commit encloses these css rules to not leak them and move
a rule which changes the color of list's remove button into web
module to keep the color.

closes odoo/odoo#67921

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-03-17 14:42:29 +00:00
Nicolas Lempereur 5be7af0494 [FIX] translate.py: import model from CSV correctly
When importing transtlation from CSV, we:

- cut at `:` character to get the model
- used a model for types other than model and model_terms

This caused error that do not happen in PO import because:

- the model is before the `,` character
- the imd_model column is constrained to 64 characters, and a name that
  is not a model could be over that size.

With this changeset, the CSV import match better current PO import.

opw-2439029

closes odoo/odoo#68266

X-original-commit: cff91c6acbb7ef6a884d4dc4170574b83ff6e4cb
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2021-03-23 18:18:21 +00:00
Petar Najman f73c7b72be [IMP] payment: allow overriding the redirect form HTTP method
closes odoo/odoo#68256

X-original-commit: 923eaae31b0993d8a7e653b334471f7b6289450f
Signed-off-by: Antoine Vandevenne (anv) <AntoineVDV@users.noreply.github.com>
2021-03-23 16:07:11 +00:00
Christophe Simonis 995d5dfe82 [FIX] tools.file_path: correctly handle the addons/ prefix
The tests passed because the path with the prefix is valid at root_path.

closes odoo/odoo#68257

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2021-03-23 16:32:10 +00:00
Oussama MESSAOUDI 0edb5e2985 [IMP] web_editor: trigger event oninput for input range type
Add an event listener triggered on current value change of input range.

task-2362091

closes odoo/odoo#66812

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-03-23 16:18:19 +00:00
Fabien PinckaersandRaphael Collet 085e972e4a [IMP] core: clean up and speed up XML/HTML translation
The former algorithm was recreating a full etree from scratch, while
parsing the content to translate.  Instead, we parse the etree and
update only the content that to be translated.

Before:
| In [2]: %timeit views.invalidate_cache(); views.mapped('arch_db')
| 578 ms ± 7.83 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

After:
| In [2]: %timeit views.invalidate_cache(); views.mapped('arch_db')
| 208 ms ± 2.79 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

Reading a view is 2.63x faster: from 504 ms, to 191 ms (sum of all the
1345 views, when installing website_sale).  Large views, like web pages
goes up to 3x-4x faster; small views are ~2x faster.

As views are cached, it only impact the loading to put in cache, but all
XML/HTML fields get the same performance gain.

closes odoo/odoo#68182

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
2021-03-23 15:35:47 +00:00
Ipsita Borisagar 7e5ee53035 [FIX] crm: avoid to display false in case of void subject
Before this commit:

If there is no subject for message, it effectively displays "False" in case of
void subject.

After this commit:

If there is no subject for message, it will not display "False" in case of void
subject.

Tasks-2156170

closes odoo/odoo#68243

X-original-commit: 4b2f0ddcbe859ec8453e537aec9d5b0685876eca
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-03-23 13:52:19 +00:00
Jeremy Kersten 86e3c1a5e0 [FIX] website: improve logo svg
Without this 'XML declaration', if you have magic installed, the mime type
is image/svg instead of image/svg+xml and browser don't render it.

This commit is related to #68211 meanwhile a more generic solution (if needed).

closes odoo/odoo#68239

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-03-23 13:13:23 +00:00
Francois (fge) 9c804aace3 [FIX] base: js_transpiler import legacy module
In a @odoo-module js file, importing a legacy module that did not have
a name respecting the "addon.name" format was not supported.

This commit will support all keys that do not start with a "." or "@".
This commit will also improve some regexes allowing to extract path.

Legacy module name supported:
    import X from "some/path"
    import X from "addon.name"

Legacy module name not supported:
(relative path and @module/path are only used to import @odoo-module js
files)
    import X from "@some/path"
    import X from "./some/path"
    import X from "../../some/path"

closes odoo/odoo#68152

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2021-03-23 14:15:02 +00:00
Djamel (otd) 1ca5cf07ff [FIX] website_sale : remove the default value from related fields
Problem :
In the website settings, there are related fields with a default value.
The ORM will therefore only take the default value ​​and ignore the value of "related".

Solution :
Remove default value from related fields

opw-2467959

closes odoo/odoo#68230

X-original-commit: a7110b616cb26641a546c22ff5ecf6aff073edfb
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2021-03-23 10:32:17 +00:00
Odoo's Mergebot 9ec88dc4a3 [MERGE] survey: fix certification layout
Generated PDF was shrunk down, not taking up the full width and size of the A4
format, leaving big margins on right and top. Setting `disable-smart-shrinking`
to `True` helps with this, but layout is slightly too big.  Setting `dpi` to
`96` and removing the `width` and `height` on the parent element fully fixes
the issue.

This merge also adds a boolean field `disable_shrinking` in model `report.paperformat`.
If set to True it adds one argument `--disable-smart-shrinking` in commands
that prevents the pdf shrinking. See issue[1] for more information.

This options is utilized for printing survey certificaiton.

Task ID-2483393
COM PR odoo/odoo#68188
UPGPR odoo/upgrade#2293

issue[1] - wkhtmltopdf/wkhtmltopdf#3226

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-03-23 15:33:09 +01:00
Elisabeth Dickinson 7321ec0deb [IMP] survey: fixes certification layout, adding dpi and removing width and height in css 2021-03-23 10:08:58 +00:00
Dharmraj Jhala 9e4c8d61ea [IMP] base, survey: add option to enable smart-shnking
This commit adds a boolean field `disable_shrinking` in model
`report.paperformat`, which, if set to True, will add one
argument `--disable-smart-shrinking` in commands that prevents
the pdf shrinking. See issue[1] for more information.

This options is utilized for printing survey certificaiton.

issue[1] - https://github.com/wkhtmltopdf/wkhtmltopdf/issues/3226

taskID-2483393
2021-03-23 10:08:58 +00:00
Andrea Grazioso (agr-odoo) 0d01561462 [FIX] web: hide filters not relevant to the current screen
Open Calendar weekly view
Scroll the weeks
The 'Responsible' filter will accumulate entries from the events and not
deleting them.
This create issue with the view in db with heavy calendar use and a lot
of responsibles

This reverts commit 64d0fe4118, coming from
task 2146842, addressing the following issue in calendar view (i.e. in planning
app) not reproducible anymore

"
In calendar view, when you unselect all filters of a category, all
events disappear (it's expected), but all filters also disappear.
So you can't selectd anything, you must reload the view to unlock
the situation.
"

opw-2479920

closes odoo/odoo#68118

X-original-commit: 0ae22aa773f9343fc79937cceb5bf60c5fb3ba3c
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2021-03-18 17:41:20 +00:00
Andrea Grazioso (agr-odoo) 6cb4a5dacf [FIX] product: avoid traceback when accessing a product.product record
This reverts commit ed17f560fa which
introduced a check not needed anymore as the field measure_type does not
exist any more since:
https://github.com/odoo/odoo/commit/52ed0be17e80aa6bcc24d59620dd3462b6d577c3

opw-2482554

closes odoo/odoo#68114

X-original-commit: 0c77a856c35558331f43ea8b2e0c391965d3a705
Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
2021-03-18 16:56:28 +00:00
Qiuyu (QHO) c3ae559bf7 [IMP] mail, *: replace [] commands by FieldCommands
closes odoo/odoo#67643

Task-id: 2453408
Related: odoo/enterprise#17036
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-03-23 12:51:24 +00:00
nounoubensebiaandThibault Delavallee e58379f769 [IMP] mass_mailing: create "add to mailing list" wizard
This commit introduces a new wizard that allows adding existing contacts of a
specific mailing list to another mailing.list.

It's typically used on the list view of a mailing.list where you tick a bunch
of contacts and add them all at once to another mailing.list (existing OR new
one that you create on the fly).

That tool will help users manage their mailing.list a bit easier and avoid some
tedious copy/pasting if mailing.lists need to share common contacts.

Wizard has two options: either simply create a new mailing list, either create
it and use it directly in a new mailing. It allows to cover the following
user flow
  * select contacts;
  * add them in a new list created on-the-fly;
  * jump on a new mailing targeting this mailing-list;
  * fill body, launch, enjoy !

Task-2453990

closes odoo/odoo#65965

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Noureddine Bensebia <neb@odoo.com>
Co-authored-by: Thibault Delavallee <tde@odoo.com>
2021-03-23 13:52:12 +00:00
Pratima Gupta acd67ab477 [IMP] uom: added mm uom for length of product package
Changed the uom of product package if product_length_in_feet_param
of ir config parameter for product is not 1. Previously its value
was meter.
For following fields updated the uom -
1) packaging_length
2) width
3) height

closes odoo/odoo#64735

Taskid: 2418421
Related: odoo/upgrade#2089
Related: odoo/enterprise#15848
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2021-03-22 05:00:01 +00:00
Goffin Simon dbeacee924 [FIX] website_event_track: Unpublish canceled event
A canceled event track must be unpublished.

opw:2485928

closes odoo/odoo#68236

X-original-commit: c0aaf2412e586e038cf81646567268607e789f71
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2021-03-23 12:28:35 +00:00
JF Aubert 5604e468d2 [IMP] stock: ease receipt/delivery encoding
When you want to validate a picking with a lot of products, the system notifies "You have not recorded done quantities yet, by clicking on apply Odoo will process all the quantities."
Nice and easy, except when you were not able to process all the quantities.
In that case you have to update all but the few lines manually.

Also added to batch pickings

task-2158092

closes odoo/odoo#58487

Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-03-22 14:00:20 +00:00
Oussama MESSAOUDI 91703b9ff5 [IMP] website, *: improve the UI of the mobile visibility option
*: web_editor

Adding the option to show/hide on mobile at snippet level + review the
UI (now a top action button).

task-2431659

closes odoo/odoo#65013

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2021-03-23 10:15:24 +00:00
Martin Trigaux 13dd40ea55 [IMP] doc: modernize NGINX SSL recommandations
TLS 1 and 1.1 are not recommended anymore
This configuration was generated with Mozilla SSL Configuration
Generator (https://ssl-config.mozilla.org) with a fairly conservative
approach:
- nginx 1.10.3, OpenSSL 1.1.0l (Debian Stretch)
- Supports Firefox 27, Android 4.4.2, Chrome 31, Edge, IE 11 on
  Windows 7, Java 8u31, OpenSSL 1.0.1, Opera 20, and Safari 9

Fixes odoo/odoo#68002

closes odoo/odoo#68227

X-original-commit: ece5778c205765e5e5b1a3fd86e6f031bf25c12d
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-03-23 10:14:16 +00:00
Christophe Monniez 1ba22f8aee [IMP] tests: add a test to avoid translations of template strings
When a template string that contains an expression is translated, the
resulting msgid is wrong.

e.g.:

    _t(`blah blah ${expression}`)

will generate a wrong msgid like this:

    msgid "blah blah ${expression}"

With this commit, a new test is added to find and forbid translations of
JS template-strings.

closes odoo/odoo#68165

X-original-commit: 9184ae45e0df179fc093c1fc48a7fa56d8fe9594
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2021-03-19 18:27:00 +00:00
Pratima Gupta 41f290ae11 [IMP] delivery, stock: allow to print labels in PICK+PACK+SHIP
In this commit -
1) Added new field propagate_carrier_id in stock.rule and propgate
carrier in PICK PACK and SHIP if it is ticked.
2) Allow to print Label at any stage of PICK PACK and SHIP after
validation of picking from chatter.

Task-2363484

closes odoo/odoo#62851

Related: odoo/enterprise#15148
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-01-21 12:24:37 +00:00
Denis Mudarisov a4cc5cef6e [CLA] add IT Projects Labs
closes odoo/odoo#68202

X-original-commit: 1335d16c8dddb0f89d90d2f71e50250dc0b395ff
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-03-22 13:28:27 +00:00
Denis Mudarisov b9a882817a [FIX] website: _handle_exception takes only two arguments
Before the commit, if an exception occurs there was an error saying:
`TypeError: _handle_exception() takes 2 positional arguments but 3 were given`

Impacted versions:

 - 12.0
 - 13.0
 - 14.0

X-original-commit: 47d6fa4ff6e78a33691c22b08504ce03e6796c9a
2021-03-22 13:28:26 +00:00
dominikkertys d8e558d4ad [ADD] l10n_sk: Slovak localization
This provides a standard CoA with basic taxes and
fiscal positions.

closes odoo/odoo#68156

X-original-commit: eb41f0de553906e09d199190544c878a9d1a7e85
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-03-22 12:18:53 +00:00
dominikkertys 2e5cfaafb8 [ADD] l10n_cz: Czech localization
This provides a standard CoA with basic taxes and
fiscal positions.

X-original-commit: e4f95688fe8786ae898c7180b263a4176a0537b4
2021-03-19 16:03:16 +00:00
dominikkertys 4577b10881 [CLA] add 26HOUSE
X-original-commit: 6e2e88c518e8efa30e848feed92a090c56ad4f61
2021-03-19 16:03:15 +00:00
yhu-odoo af9b926766 [FIX] purchase_stock: purchase product route can't be triggered
To reproduce:
1. set WH receipt in 3 steps
2. create a "receipt in 2 steps" route for product
3. create a PO with product "receipt in 2 steps"
In inventory, we will see this product still follow the "receipt in 3
steps" route.

This is caused when we create move for PO, we prepare the route_ids
according to warehouse's route_ids. After the move has it's own
route_ids, it will not search for route set on product or product
category (which should has higher priority over warehouse route).
To fix it, we remove the route_ids when create the move for PO. A route
will be found when the move being comfirmed.

Task 2448439
PR #65509

Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-02-04 08:31:54 +00:00
oco-odoo 5925001c19 [IMP] account: tests framework: add explicit label to invoice lines created with only amount, to avoid crashing in some tests
We also inject a context key to ignore prediction in case account_predictive_bills (enterprise) is installed. This way, having the same label on invoice lines generated by the helper will still behave in the same way, even if enterprise is installed.

closes odoo/odoo#67998

X-original-commit: b6c37754532ae6a7cc1f68a345fde6258abdc893
Related: odoo/enterprise#17125
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2021-03-17 09:30:39 +00:00
yhu-odoo a1200768d1 [IMP] l10n_cn: add print option "Voucher"
Add an additional report called "Voucher/记帐凭证" to print option in
account.move form view.

A library "cn2an" are required to conver a number to "amount in
words/大写金额" for Chinese financial usage.

Task 2179744

closes odoo/odoo#68121

X-original-commit: 0f6fdce76809af7e965f672970d74594a337f6fb
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-03-18 19:14:14 +00:00
Bohdan Lisnenko d2376c2b03 [IMP] l10n_ua: new vat rate 14%
closes odoo/odoo#68092

X-original-commit: 87fcdd8570fe05907c4aae6db3941f8b8747c72a
Signed-off-by: Josse Colpaert <jco@openerp.com>
2021-03-18 14:43:23 +00:00
Munaf Khan 8f88307c18 [FX][FIX] crm: prevent email_from propagation if only formatting differs
Before this commit when we update the email_from field on lead with only
formatting differing from partner a warning ribbon was displayed. It
considered email had changed and had to be propagated. Moreover unnecessary
update on partner was done to propagate the new email onto the customer.

In this commit we propagate email only if normalized versions are different.
It means that if lead email_from is "Hermes Conrad <email@example.com>" and
partner email is "Jonathan Conrad <email@example.com"> no update from lead
to partner is performed. Indeed normalized versions are the same.

Task ID-2461308
PR odoo/odoo#66890

X-Original-Commit odoo/odoo@3dd972c35b

closes odoo/odoo#67859

Related: odoo/enterprise#17191
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-03-22 07:52:19 +00:00
Thibault Delavallée 700929d1a4 [FW][IMP] crm: improve phone / email tests for lead / partner sync
Purpose of this commit is to improve phone, email and mobile synchronization
tests for lead / partner. Notably

  * mobile is not synchronized: only a void mobile is set to partner's mobile
    when changing partner. It is not synchronized back onto partner;
  * email / phone are correctly synchronized;
  * phone_sanitized is computed on both lead and partner based first on mobile
    then on phone. It means records having the same phone numbers could have
    different phone_sanitized values if mobile numbers differ;

Task ID-2461308
PR odoo/odoo#66890

X-Original-Commit odoo/odoo@0adecd9a6e
2021-03-22 07:44:05 +00:00
nie 6a020d7e3c [FIX] portal: translate email to partner's language
Steps:
- Install Projects
- Go to Settings / Translations / Languages
- Install Dutch
- Go to Settings / Users & Companies / Users
- Edit demo:
  - Language: Dutch
- Go to Projects
- Click the three dots on the first project in the dashboard
- Click Share
- Select demo as recipient
- Send
- Go to Settings / Technical / Email / Emails
- Click the email you just sent

Bug:
The email is not translated in the partner's language

Explanation:
The context of the template didn't take the current partner's language
into account since it was out of the partners loop.
The subject of the email wasn't aware of the partner's language as the
context hadn't been changed.

Wrapping the translations with the right `lang` context value fixes the
issue.

Also, the subject used the formatted string as the translation source.
This makes it impossible to find a matching translation since the source
is different every time.

opw:2475398

closes odoo/odoo#68162

X-original-commit: e446233a1b454ab1aa883609fd0b8a588fec9f00
Signed-off-by: backspac <backspac@users.noreply.github.com>
2021-03-19 17:40:13 +00:00
Goffin Simon 923588fe0b [FIX] sale_timesheet: all the employees in the project overview
Steps to reproduce the bug:

1/ Install these apps: Sales, Planning, Employees, Project, Timesheets
2/ Add some employees (stay below 20 employees)
3/ Create a project with Planning, Timesheets and Billable
4/ Click on the overview

Bug:

List of all employees

opw:2460616

closes odoo/odoo#67850

X-original-commit: 3cf66c4ed482bb14973b57cacbe4ca56b93650d2
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2021-03-15 12:33:42 +00:00