Commit Graph
134821 Commits
Author SHA1 Message Date
Benjamin Vray efe8ea2676 [IMP] website: review progress bar snippet
Add an input field to define the value of the progress bar instead of
the previous system by mousedown. Disable animated by default.

Part of https://github.com/odoo/odoo/pull/46503
task-2194309
2020-03-24 16:07:14 +00:00
Benjamin Vray c87f61d26b [IMP] web_editor, website: copy absolute path for anchor links
Copy the absolute path in the clipboard instead of the relative for
anchor links. So the link still works if it is pasted on another page.

Part of https://github.com/odoo/odoo/pull/46503
task-2194309
2020-03-24 16:07:10 +00:00
Benjamin Vray a522e08273 [IMP] website: review timeline snippet
Removes option to move card to the right/left from the left panel
and add this option on the element overlay.
Makes the snippet responsive and other improvements.

Part of https://github.com/odoo/odoo/pull/46503
task-2194309
2020-03-24 16:07:06 +00:00
Benjamin Vray 2e846f1e0a [REF] web_editor: add a wrap div around overlay options
Add a wrap div around overlay options so we are able too add more
specific options that are separate from the move options.

Part of https://github.com/odoo/odoo/pull/46503
task-2194309
2020-03-24 16:07:03 +00:00
Benjamin Vray 85a604635c [IMP] web_editor, website: preview container width on hover
Preview the boundaries of container elements when hovering over the 3
width options.

Part of https://github.com/odoo/odoo/pull/46503
task-2194309
2020-03-24 16:06:59 +00:00
Benjamin Frantzen (bfr) a4cce228cf [ADD] odoo_referral: Link to odoo referral platform
closes odoo/odoo#48268

Taskid: 2153800
X-original-commit: 24b57a377fec77178aad2b433da8f743be9db747
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-24 13:52:22 +00:00
william 6bf343a172 [IMP] l10n_lu: add account groups
Task 2220128

closes odoo/odoo#48263

X-original-commit: 2fe4b8049ce90bb513000b58f56c364b0d8dbcbe
Signed-off-by: Josse Colpaert <jco@openerp.com>
Signed-off-by: wan <william-andre@users.noreply.github.com>
2020-03-24 13:36:15 +00:00
william 9eba957e0d [IMP] l10n_multilang: allow the translation of the account groups
Before, only accounts, fiscal position, tags and taxes were
translatable, now account groups are too.

X-original-commit: da571b354293e852c1c4828f758eace8e6ededa4
2020-03-24 13:36:15 +00:00
Cocographique 22d0ca2905 [REF] website: remove useless option code in s_color_blocks_2 snippet
Part of https://github.com/odoo/odoo/pull/46809
task-2182909

closes odoo/odoo#46809

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-03-24 13:34:01 +00:00
Cocographique 50bce1da43 [FIX] website: adapt paragraphs styles of s_color_blocks_2 snippet
Part of https://github.com/odoo/odoo/pull/46809
task-2182909
2020-03-24 13:32:47 +00:00
Cocographique a5ca5d11ff [IMP] website: review bold style in Text Block snippet
Otherwise, when the user starts typing, this makes the text bold by
default.

Part of https://github.com/odoo/odoo/pull/46809
task-2182909
2020-03-24 13:20:01 +00:00
Cocographique b1048cb5ba [IMP] website: improve Alignment option wording and position
Part of https://github.com/odoo/odoo/pull/46809
task-2182909
2020-03-24 13:19:03 +00:00
Cocographique a91c6c8c4c [IMP] website: improve "Numbers of columns" option wording
Part of https://github.com/odoo/odoo/pull/46809
task-2182909
2020-03-24 13:16:19 +00:00
Cocographique 5dc2af38c3 [IMP] website: reduce space between icons in Rating snippet
Part of https://github.com/odoo/odoo/pull/46809
task-2182909
2020-03-24 13:14:14 +00:00
Odoo's Mergebot 3eb7314870 [MERGE] mail, sms: move rendering tool on mail.render.mixin
PURPOSE

Merge rendering tools used in mail and sms templates and move them
directly in mail.render.mixin

SPECIFICATIONS

Clean rendering methods API and calls. Ensure they are private. Improve
naming and docstrings to ease understanding.

Move rendering methods on mail.render.mixin. It makes no senss to have to
create a void mail.template recordset just to invoke jinjna rendering engine.
Now rendering will be available

  * either directly through inherit;
  * either by calling env['mail.render.mixin']._render_template();

Move local to global links convertion as well as links shortening tool methods
on mail.render.mixin . That way this mixin holds tools related to rendering
and its post-processing.

This impacts mail.template, sms.template and mailing.mailing as side effect
without any functional change.

LINKS

Task ID 1963529
Community PR odoo/odoo#32397
Enterprise PR odoo/enterprise#8634
Upgrade PR odoo/upgrade#911

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-24 15:21:43 +01:00
Xavier Morel 0b4cf7de5c [REM] hr_expense: leftover print in test
closes odoo/odoo#48252

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-03-24 11:46:44 +00:00
Hiral Bhavsar c7d40de3a7 [IMP] l10n_xx: auto apply fiscal positions
Canada(l10n_ca): Apply fiscal positions automatically based on partner's state.
EU nations: Apply fiscal positions automatically for national or EU/Non EU partners.

closes odoo/odoo#48250

Task: 1952975
Closes: #32126
X-original-commit: 15e0026bdeaefd7a915718781bf3f6ee0389365e
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-03-24 11:39:39 +00:00
Jigar Vaghela 2bacc39276 [IMP] l10n_in_sale: support null product_id in tax line
we add product_id in tax line from saas-12.1 from this commit https://github.com/odoo/odoo/commit/451fd6cc90aaa14816376a0285334678df9ce484?diff=unified#diff-cc1fa4f0d598f9e02993620519146532R68
so when user is migrated from old version then product_id is null in tax line so in this commit we support null in product_id

closes odoo/odoo#48241

X-original-commit: f7da145a9a453dcf9057c3dbe719ae6c02804c04
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-03-24 10:51:55 +00:00
Thibault Delavallée efa161e25c [IMP] sms: make template required on preview template
It makes no sense to make it not required.

Task ID 1963529
Community PR odoo/odoo#32397
2020-03-24 10:25:07 +00:00
Thibault Delavallée aaefa35e29 [MOV] link_tracker, various: more link shortening tools to mail.render.mixin
PURPOSE

Move links shortening tools on mail.render.mixin to have rendering and
post procesing tools available on that mixin.

SPECIFICATIONS

Move html and text links shortening methods on mail.render.mixin class.
That way rendering and post processing is done in that mixin instead of
being specific to link.tracker model. Indeed those methods are tools and
not really business related methods.

Future commits will improve the way mail and sms composer use the render
mixin. This commit is therefore both a cleaning and preparing commit.

LINKS

Task ID 1963529
Community PR odoo/odoo#32397
2020-03-24 10:25:04 +00:00
Thibault Delavallée 3d86a29aeb [MOV] mail, various: move replace_local_links to render mixin
PURPOSE

Move links shortening tools on mail.render.mixin to have rendering and
post procesing tools available on that mixin.

LINKS

Task ID 1963529
Community PR odoo/odoo#32397
2020-03-24 10:24:44 +00:00
Thibault Delavallée 2835e0ba38 [MOV] mail, sms: move language computation in render mixin directly
PURPOSE

Merge rendering tools used in mail and sms templates as well as partially
in mailings and move them directly in mail.render.mixin.

SPECIFICATIONS

Move tools related to language computation from mail.template model to the
mail.render.mixin. It allows to update both

  * mail.template: simply update calls accordingly;
  * sms.template: remove code doing what is now available through mail.render
    .mixin inherit;

Lang field is moved to mail.render.mixin as it is used notably for the language
computation. It therefore adds the field on mailing.mailing model although
not used currently.

LINKS

Task ID 1963529
Community PR odoo/odoo#32397
2020-03-24 10:24:42 +00:00
Thibault Delavallée 822f468059 [MOV] mail: move rendering code to mail render mixin
We also have to update code calling directly the rendering itself. Indeed
some code bits does some rendering directly on jinja-enabled input and not
through templates. Those calls have to be updated accordingly.

LINKS

Task ID 1963529
Community PR odoo/odoo#32397
2020-03-24 10:24:19 +00:00
Thibault Delavallée a03f6483d6 [REF] mail: clean code about rendering in mail_template
PURPOSE

Clean and rename code about language management and template rendering in mail
template model.

SPECIFICATIONS

Clean method naming and try to make code easier to understand and call. Also
add and/or clean docstrings of rendering methods.

Notably

  * ``_classify_per_lang``: for each lang-contextualized template, give the list
    of record ids;
  * ``_render_template``: now working only on a valid list of IDs instead of
    allowing both int / list and having a return type depending on the input
    type. It allows to simplify code and delegate some processing to callers;

Introduce new API method

  * ``_render_lang``: for each record id return the lang matching it;
  * ``_render_field``: render a field of mail.template, on given set of record
    ids. Usage: template._render_field('body_html', records.ids). Language
    computation is available for this method;

Remove the "multi mode" support of rendering that either returned a rendered
value, either a dict based on given ids. Now all methods always work in batch
and caller have to fetch the correct result if necessary.

LINKS

Task ID 1963529
Community PR odoo/odoo#32397
2020-03-24 10:24:18 +00:00
Thibault Delavallée aa31e67716 [REF] mail, sms: reorganize {mail.sms}.template and mail.render.mixin fields and add docstrings
PURPOSE

Clarify mail.template, mail.render.mixin and sms.template code organization.

SPECIFICATIONS

Reorganize fields according to their main use.

Remove an unnecessary onchange in mail template model. As "model" field on mail
template is a computed field its computation is sufficient.

Add some docstrings and code separations.

Prepare future code change.

LINKS

Task ID 1963529
Community PR odoo/odoo#32397
2020-03-24 10:24:16 +00:00
Thibault Delavallée 6e25a510b3 [REF] base, mail: improve partner creation from name / email
Rewrite code parsing name (_parse_partner_name) to make it easier to
understand. Tweak find_or_create to return directly a recordset with the
found partner / new partner instead of a name_get result.

Also inherit Partner.find_or_create() in mail in order to benefits from
email_normalized field, allowing to improve the search on matching emails
and avoid duplicates.

LINKS

Task ID 1963529
Community PR odoo/odoo#32397
2020-03-24 10:24:14 +00:00
Thibault Delavallée aa74a975d7 [IMP] base: add tests for partner find_or_create / name_create / _parse_partner_name
As find_or_create API and code will be slightly improved soon let us add some
tests to ensure behavior and avoid (too much) regressions. Notably about the
fallback on faulty emails support aka "name email@domain)" which in parsing
is considered as valid. This may happen when people copy-paste emails.

LINKS

Task ID 1963529
Community PR odoo/odoo#32397
2020-03-24 10:24:12 +00:00
jbm-odoo b446a1e958 [IMP] hr: Add user slash if no employee set
If employee is not set, the default picture will be user-slash
instead of camera.

Task ID 2221250

closes odoo/odoo#48114

Related: odoo/enterprise#9398
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-20 13:17:31 +00:00
Julien Mougenot 70d426b948 [FIX] web: fix dataManager loading caches
Before this commit, coming back on a view when in 'debug=assets' would erase the
previously loaded favorites with an 'undefined' value. This was due to an incorrect
cache invalidation mechanism in the DataManager's load_views' method.

Now the views and filters caches are properly loaded if any of them has been invalidated.

closes odoo/odoo#48085

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-03-24 09:57:00 +00:00
Hardik Prajapati 0ebbd1848f [IMP] lunch: Add kanban view for alert, location and product category
Purpose of the task is to add Kanban views on the Configuration menu
of the Lunch Application for a better interface on smaller devices.

So in this commit added for kanban for alert, location and product
category but keep the current list view by default for all this menu.

closes odoo/odoo#47905

Taskid: 2210929
Closes: #47905
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-19 09:52:39 +00:00
Thanh Dodeur 900dad016d [IMP] website, web_editor: add options to fully control shadows
task-2182909

closes odoo/odoo#46816

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-03-24 10:47:05 +00:00
Pratima Gupta ab97763884 [IMP] repair: added test cases.
closes odoo/odoo#45888

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-03-24 10:00:08 +00:00
Ankita Raval 8d52edb2fa [IMP] repair: Prevent to Unlink Repair Orders if not draft
Before Commit:
-Current Functionality doesn't Restrict Unlink of Order Based on States.
-if we delete the invoice linked to repair order the state button of invoice
 still visible in reapir order and when we click on state button it open
 new draft invoice.

After Commit:
-Add Validation on Unlink the order based on State,link unlink order only
 on draft and cancel state.
-Always show the "cancel" button on repair orders.When the orders have been
 cancelled, only allow to delete them if there is no invoice linked, or if
 the invoice which is linked can be deleted (is still draft and has never
 been posted). If we are not in one of those conditions, raise the following
 error "You cannot delete a repair order which is linked to an invoice which
 has been posted once."
-Add wizard when cancelling a repair order which has a draft invoice linked.

task-id: 2198997
2020-03-24 10:00:08 +00:00
Martin Trigaux 81a5cc2e10 [FIX] *: correct English terms
Some bad phrasing
Courtesy of Cecile Collart

closes odoo/odoo#48233

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-03-24 09:26:24 +00:00
Dhruv Patel 2d5dd1448f [FIX] web: restrict to open sidebar forcefully in pdf viewer initially
Before this commit, when PDF viewer opens, it opens the sidebar forcefully.

Now with this commit, we have restricted to open the sidebar on initial load
by passing the false value to the forceOpen flag, we did this changes directly
in the library file itself as the file loads in iframe so we can not change the
file from outside by overriding the existing function or parameter.

task-2209742

closes odoo/odoo#47458

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-03-16 13:17:00 +00:00
fw-bot e00ce93a77 [FIX] sale: fix uneditable "Confirmation Email" template body
Website sale order confirmation email is broken by design. Indeed it has
jinja markers between html elements that do not allow them, like between
table and tr, between tr, ...

In this commit we completely rewrite the structure to correctly include
jinja markers where they are not moved or stripped by standard browsers
and editors.

Translations are updated accordingly as changing a mail template content
imply updating the whole body translation.

Followup of 74c5c00

website_sale: add website on some demo orders

Purpose is to showcase orders using website field, used notably for some
template rendering.

Forward port of afd173652214000ed and f74c86d448246b796d

closes odoo/odoo#48228

X-original-commit: d3bdb0a42eb052281b4652bf78e82b1c6c1c1d24
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-24 08:25:21 +00:00
Benjamin Vray 27b46767b2 [FIX] website: hide theme tab in left panel if the user has no rights
Hide theme tab in the left panel if the user does not have the rights.
Hide also header and footer options.

task-2199214

closes odoo/odoo#46627

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-03-23 15:41:47 +00:00
Ravi Gohil b4f0e758eb [IMP] l10n_xx: hide country specific fields from company/settings view
There are few fields added on settings and on company form view
by various l10n modules which are meant for particular country's
user and are of no use to others. Such fields should be hidden
from unrelated users. With this commit, it will be the case.

closes odoo/odoo#35755

Task: 2049977
Closes: #35755
Related: odoo/enterprise#5158
Related: odoo/enterprise#5158
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-03-24 06:59:35 +00:00
Ravi Gohil d2bd6d69d6 [IMP] account{_check_printing}: Added 'Country Code' field
Many localization modules adds field 'l10n_xx_country_code' on
Company/Settings views with the purpose of using it to hide that
particular localization's fields from other country's users.
So, it is better to add a common field in account module so that
other localization can use that field instead of adding a new one
where ever it is required.

Also, one such field was already added from account_check_printing
module, so we removed it from there as it is not needed anymore.

Task: 2049977
Closes: #35755
Related: odoo/enterprise#5158
2020-03-24 06:51:22 +00:00
Thibault Delavallée fd9b259026 [REF] mail: merge blacklist and address mixins
PURPOSE

Perform some code cleaning in mail module

SPECIFICATIONS

mail.address.mixin is used only for mail.thread.blacklist mixin. Let us
merge those two and simplify class organization.

LINKS

Task ID 2222033

closes odoo/odoo#48115

Related: odoo/upgrade#967
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-20 14:58:44 +00:00
Mohammed Shekha 5353fb2496 [IMP] web: trim FieldEmail widget value
before this commit, email widget was not trimming value and due to which
space aroung email value remain as it is added by user.

after this commit, email widget will trim the value and remove leading/trailing
space.

task-2197432

closes odoo/odoo#47470

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-03-24 08:02:13 +00:00
Thibault Delavallée efd5401ee1 [REF] event: allow to use UTMs directly in event
PURPOSE

Allow to use UTMs directly in event, notably to be able to sort or make
statistics on registrations.

SPECIFICATIONS

Move all UTMs fields definition to event. In base event module they are
set by hand or through links (when using mass mailing for example).Shared
links with utm bits defined in it allows to track marketing statistics
on registrations.

In event_sale registrations can be linked to a sale order. UTM information
are copied from the sale order to the registration itself. Order defined utm
always erase default one coming from event.

LINKS

Task ID 2212297
Community PR odoo/odoo#47229

Related: odoo/upgrade#913
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-23 10:07:46 +00:00
Thibault Delavallée 286427d3c4 [IMP] event, website_event_track: make create of registration and track multi
Purpose is to allow the batch create on those models that may be created
in batch, notably through import.

LINKS

Task ID 2212297
Community PR odoo/odoo#47229
2020-03-23 10:07:42 +00:00
Thibault Delavallée 30af656e1a [REF] event: remove origin field of registration
Origin is a char field holding the registration "source name". Its only use
is to copy the sale order name when registration is linked to a sale order
in event_sale. As we can filter / group / search on sale order or sale order
line directly instead of the origin there is no need to keep this char field.
If necessary to some internal reasons it can simply be added through studio.

LINKS

Task ID 2212297
Community PR odoo/odoo#47229
2020-03-23 10:07:32 +00:00
Odoo's Mergebot baab530737 [MERGE] crm(_*): move from onchange to editable stored fields
PURPOSE

Try to move from onchange / default_get to stored editable computed fields.
Behavior should be the same (computed or set by user), with support of
create / write / onchange field update without additional code.

USE EDITABLE STORED FIELDS

Update classic fields updated in some cases by onchange and/or default methods
by fields with store=True, readonly=False. It means their value comes either
from manual user input, either from trigger based computation.

Remove onchange and default_get when possible, leading to an unique computation
method and clearing fields definition.

Also clean some fields definition inconsistencies, notably required fields
that should instead be correctly computed or default that have no real meaning.

CLEAN CRM CONVERT WIZARDS CODE AND FIELDS USE

In this merge we also rewrite code located and/or used in convert or merge
wizards. Indeed it holds unnecessary variables, dictionaries manipulation
that hides the real business flow, badly named variables, unclear methods, ...
Logic of those wizards seem quite simple but is hidden behind a wall of
bloated code.

CLEAN CRM.TEAM MODEL

Clean statistics fields definition on crm.team. Future tasks will improve
the use of sales team in crm and first steps is to clean a bit models linked
to sales team.

LINKS
Task ID 2088565 (crm: from onchange to compute)
Community PR odoo/odoo#41955
Enterprise PR odoo/enterprise#7322
Upgrade PR odoo/upgrade#781

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-24 09:34:22 +01:00
Julien Castiaux a5df755284 [FIX] base: apply changes on inherited view
Commit 60106cf2 (task 2082503) introduced some changes on server
actions and automated actions, some changes were applied on server
actions but via the base_automation inherited view.

This commit move those change so they are directly applied on the server
action form view.

closes odoo/odoo#40964

Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2020-03-24 06:43:44 +00:00
jerome hanke (jhk) 3ea6180f18 [FIX] web: export of id from grouped elements does not fail
Steps to reproduce:
- install sales
- go to sales > go to any list view (SO for example) and group by
anything (customer for example)
- click on action > export > add ID to the exported columns
- click export

Previous behavior:
you get a traceback: "Invalid field specification '.id'."

Current behavior:
ids are exported as intended

opw-2194233

closes odoo/odoo#48222

X-original-commit: c8217080d960ec3f8436111ce60a17754fe64f2d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
2020-03-23 17:40:01 +00:00
Thibault Delavallée 8304bc01ba [REF] crm, website_crm_score: update team statistics fields
PURPOSE

Purpose of this commit is to clean statistics fields definition on crm.team.
Future tasks will improve the use of sales team in crm and first steps is to
clean a bit models linked to sales team.

SPECIFICATIONS

New statistic fields

  * ``lead_all_assigned_month_count``: all assigned lead and opportunities
    in the last 30 days; used notably for scoring mechanism;

Renaming performed on some statistic fields

  * ``unassigned_leads_count`` -> ``lead_unassigned_count``;
  * ``overdue_opportunities_count`` -> ``opportunities_overdue_count``;
  * ``overdue_opportunities_amount`` -> ``opportunities_overdue_amount``;

All those fields are used for display and management purpose, and are
computed not stored fields. No migration is therefore required.

LINKS

Task ID 2088565 (crm: from onchange to compute)
Enterprise PR odoo/enterprise#7322
Upgrade PR odoo/upgrade#781
2020-03-23 11:42:12 +00:00
Thibault Delavallée fc7bff8afb [REF] website_crm_partner_assign : use stored editable r+w fields
PURPOSE

Try to move from onchange / default_get to stored editable computed fields.
Behavior should be the same (computed or set by user), with support of
create / write / onchange field update without additional code.

SPECIFICATIONS

Update classic fields updated in some cases by onchange and/or default methods
by fields with store=True, readonly=False. It means their value comes either
from manual user input, either from trigger based coputation.

Remove onchange and default_get when possible, leading to an unique computation
method and clearing fields definition.

Also clean some fields definition inconsistencies, notably required fields
that should instead be correctly computed or default that have no real meaning.

SPECIFICATIONS: FIELDS RENAMING

In this commit we also rename ``date_assign`` to ``date_partner_assign``. There
are already ``date_open`` (crm_lead) and ``assign_date`` (website scoring)
fields available. It may be confusing. The field is therefore renamed to better
indicate it is linked to partner assignment.

LINKS

Task ID 2088565 (crm: from onchange to compute)
Upgrade PR odoo/upgrade#781
2020-03-23 11:42:12 +00:00
Florent LejolyandThibault Delavallée d13dba106c [REF] crm : use stored editable r+w fields
PURPOSE

Try to move from onchange / default_get to stored editable computed fields.
Behavior should be the same (computed or set by user), with support of
create / write / onchange field update without additional code.

SPECIFICATIONS

Update classic fields updated in some cases by onchange and/or default methods
by fields with store=True, readonly=False. It means their value comes either
from manual user input, either from trigger based computation.

Remove onchange and default_get when possible, leading to an unique computation
method and clearing fields definition.

Also clean some fields definition inconsistencies, notably required fields
that should instead be correctly computed or default that have no real meaning.

SPECIFIATIONS: CONSTRAINT USER_ID / TEAM_ID

In this commit we also remove all the better implementations of "not really a
constraint" constraint about user_id and team_id. Indeed as this is a computed
field normally we should not have to call the onchange manually, even through
a hackish call to a falsy constraint (see fdc8749, 222cca2, 4e8ebc7 ). You are
all inferior to SM team.

SPECIFIATIONS: DATE_OPEN

Assignment field, namely ``date_open``, has a random definition as it seems
linked to assignation, with several behaviors intended

  * ce39ca8a97 : reset only when going from
    no salesman to a salesman (aka, keep assignation when changing)
  * 8e540558ee: reset when changing salesman

We choose to keep first implementation as it seems a bugfix broken again
by second commit. It will also replace the ``assign_date`` defined in
``website_crm_score`` module.

SIDE EFFECTS

Several side effects occur with this commit. Indeed behavior is not always
exactly the same, notably as code rewriting allowed to fix some issues,
incoherent behavior or was simply not able to achieve exactly the same
result. Notably

  * at lead creation: default probability is the one coming from PLS and not
    0.0 anymore, since field is already computed. Synchronization with PLS
    still works the same way (change probability, you are out of syn);
  * various user_id / team_id combinations notably in convert / merge wizards
    may change, notably we do not reset team_id if user_id is reset. We
    consider we could keep a team_id set without user_id;

LINKS

Task ID 2088565 (crm: from onchange to compute)
Upgrade PR odoo/upgrade#781

Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Co-Authored-By: Florent Lejoly <fle@odoo.com>
2020-03-23 11:42:12 +00:00