Commit Graph
136440 Commits
Author SHA1 Message Date
Mathieu Duckerts-Antoine 8a2a25e7fc [REF] base: remove useless attribute in search panel arch
The attribute groupby is useless for select="one" search panel fields.
2020-06-12 13:34:04 +00:00
Mathieu Duckerts-AntoineandJulien Mougenot 46306b95d8 [IMP] web: expand domain != count domain
In the search panel, the domain used to compute the field image values
(when the attribute expand is false) was the same as the domain used
to compute counters (if enabled). The idea was that a value bringing an
empty domain is totally useless and should not displayed.
That being true, it turns out that if one does not allow them and
several fields are used, selecting a value in the search panel will very
often totally transform the search panel. From a UI perspective,
this turns out to be bad: the search panel 'moves'.
Let us give an example:
Let us start from a search panel that looks like to:

first_field
    A  1
    B  3
second_field
    C  1
    D  2 <--- mouse above D
    E  1

with first_field and second_field both with expand="0" and
enable_counters="1". Let us also assume that no record in the global
domain has both first_field=A and second_field=D.
Click on D would make the search panel look like to something like

first_field
    B  1
second_field
    C  1
    D  2
    E  1 <--- mouse here

(the selection of D does not impact the values for the second_field but
does for the other first_field values).

This has led us to use basically only the domain comming from
outside of the search panel to compute field image values.

This means that we might now have value with zero count even if expand
is false. In the above situation, a click on D would give us

first_field
    A
    B  1
second_field
    C  1
    D  2 <--- mouse still above D
    E  1

Task ID: 2154749

Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
2020-06-12 13:34:04 +00:00
Mathieu Duckerts-Antoine 3306a0f414 [IMP] *: limit in search panel
This commit introduces a new attribute 'limit' for search panel fields
that allows to avoid performance issues. That integer attribute (with
default 200) allows to fix a maximal number of values to display for the
fields. When the number of field values to display reaches the limit,
no values will be displayed. Instead, a warning message will be shown
in the corresponding search panel section.
Note it is possible to have no limit using limit="0" on a field.
This commit reintroduces in a better way the principle brought by the
fix 8d57153b34c04952a85f6642951cb2697016da84.

Task ID: 2154749
2020-06-12 13:34:04 +00:00
Mathieu Duckerts-AntoineandJulien Mougenot e5585c078e [IMP] *: expand and hierarchize in search panel
The commit introduces two new attributes for search panel fields:

    - hierarchize: boolean attribute (default True) available for
      many2one fields with select="one". It allows to choose whether
      to hierarchize the field values using the _parent_name (if set)
      on the field comodel.
      Note that a sanitization of the parent hierarchy takes place.
      Basically, it ensures that parent chains are
      completely in the domain (on comodel) accessible by the user.
      See _search_panel_sanitized_parent_hierarchy documentation for
      more information.

    - expand: boolean attribute (default False) available for many2one
      and many2many fields. If set to true, all field values are fetched
      and displayed in the search panel. If set to false, only the
      values that have at least one corresponding value in the field
      model (and in some domain) are fetched.
      An exception in the case of an hierarchized field
      (hierarchize=True and _parent_name set): more/less values can be
      displayed in order to have a good representation of the parent
      hierarchy. That means we complete and sanitize the set of initial
      field image values.

Note that the fix 8d57153b34c04952a85f6642951cb2697016da84 bringing the
notion of limit in search panel has been reverted in the present commit.
An upcomming commit will reintroduce the limit principle in a better way.

Task ID: 2154749

Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
2020-06-12 13:34:04 +00:00
Julien Mougenot f5f0ca843d [IMP] *: enable_counters with false as default
In the search panel, the attribute disable_counters with default False
has been changed to enable_counters with default False.
2020-06-12 13:34:04 +00:00
Simon Genin (ges) 84cc6fab9e [FIX] hr_expense: remove traceback when post entry
The `state` field of `account.payment` no longer exists and should not be set explicitely.
Set the `ref` field to the expense name instead of the `name`field.

Task ID 2266922

closes odoo/odoo#52823

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-06-12 13:21:13 +00:00
william 394e9fa4aa [IMP] account: small improvements before 13.4
Task 2274998

1/ In the accounting dashboard, maximum one primary button per box
2/ In all boxes : "Sample data" must be removed. (Too obvious)
3/ In the configuration of Accounting Periods
  * Opening date and fiscal year end must be on a same line.
  * Remove the button "Configure your tax accounts".
4/ "Configure your tax accounts" is still available in the settings.
  * But also make it available while doing the Tax Report Entry, if an
  error message pops up.
5/ Chart of Account (list view)
  * Captital D for opening Debit/Credit
  * Rename "Name" into "Account Name"
6/ While génerating an Invoice
  * Rename "Post" button into "Confirm"
  * Check that the incremental number is added as a suffix of the name
  of the bill ; not as a prefix
7/ Vendor Bill (list view)
  * Status must appear as a Tag ; like it is already done in "Payment
  State"
  * Rename "Payment State" into "Payment Status"
8/ Bank journals
  * On the bank journal level, if bank feed is set to synchronization,
  then while selecting that journal from the accounting dashboard, then
  directly go to the statement lines rather than the bank statement
  itself.
  * In the bank statement's account moves, remove the button duplicate.
  It is enough to have it in the actions.

closes odoo/odoo#52818

Related: odoo/enterprise#11081
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-06-12 13:28:40 +00:00
Andrea Grazioso (agr-odoo) 2d10bcb9b0 [FIX] pos_reprint: Avoid new order after reprint
Configure POS with automatic receipt printing, IOTBox with receipt
printer and possibility of reprinting on request
Go to POS session, create an order, pay.
Now on the new order add some items.
Reprint the old receipt.
Go back to the order.
Add products.

The order will be automatically cleaned as the user attempt to add new
products.
This occur because the add_product function will check if the
current order receipt has been printed, using a flag which was set
when reprinting the receipt.
Reset the flag after going back to the order fix the issue.

opw-2258992

closes odoo/odoo#52785

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-06-12 12:26:37 +00:00
std-odoo b16843230d [IMP] mass_mailing: send a statistics email to the mailing responsible
Purpose
=======
Provide a follow-up/overview of the Mailing 24 hours after its been sent.

Specifications
==============
Send an email to the responsible of the mailing 24 hours the last email
of the mass mailing.

During the link trackers creation, extract the button label if exists
(so we can display them in the statistics email).

Technical remarks
=================
The statistics email is sent to the responsible of each mailing in the
CRON of mass mailing.

Task-2227411

closes odoo/odoo#49836

Related: odoo/upgrade#1094
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-06-12 11:49:45 +00:00
Thibault Delavallée 5227f956da [FIX] website_slides: better reorder after category deletion
Currently deleting a category with slides is not supported as it should
be voided before being unlinked. This commit allows to unlink a category
by moving all its slides in uncategorized section.

This require a small reordering of sequences as category computation is
based on sequence of slides in a given channel.

Task ID 2276559
Prepares Task ID 2093671
PR #52917

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-06-12 11:20:57 +00:00
Katherine Zaoral b7421e5860 [FIX] l10n_ar: support multiple records inside constraint method
Before this change the constraint that check afip configurations has an ensure_one() that was throwing an error when we try to change journals in batch. Now the constraint support mutilple records at once and return the ValidationError message show information of the journal's which constraint aplies.

Also, we remove the print of the list of the invoices in the ValidationError message because this ones could be a really long list and it is not necessary, only knowing the journal is enough.

closes odoo/odoo#52914

X-original-commit: 710bb9f161da4718024c4454ce14a7dbc2d24c93
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-06-12 10:43:58 +00:00
Anh Thao Pham (pta) d2bd958765 [FIX] website_sale_digital: fix attachments download for free orders
- Install Sales (sale_management) and Digital Products (website_sale_digital)
- Go to Sales
- Create a product
- In product form, add a digital file via "Digital Files" smart button
- Create a quotation for current user
- Add created product
- Add a product with a negative price and make sure that the amount total ofthe order is 0.00
- Go to Website
- In portal, go to "My Account" and "Sales Orders" in Documents section
- Open created SO (with total=0.00)
- In the products list, there is a dropdown download button next to the created product
- Click on the download button and select an item in the list
You are just redirected to the list of SO in portal.

The button to download Digital Files appear for a product if one of these conditions is verified:
- The SO has been paid
- The product is free
- The SO is free (The amount total is 0.00)
But during the download action, a check is also performed allowing only to download Digital Files
from products verifying one of the 2 first conditions.

opw-2265402

closes odoo/odoo#52912

X-original-commit: 09a339f15b7550944569ee6c251e677d7032933d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-06-12 10:40:58 +00:00
std-odoo 0fe8ba7a42 [FIX] mass_mailing_sale: use singleton instead of self when getting the UTM domain
Purpose
=======
When computing some fields of the mailing, an error can occur if we
compute the fields in batch.

Task-2227411

closes odoo/odoo#52904

X-original-commit: 933a2f986a72ddb8610d7d93a078d2cb0cb10f16
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-06-12 09:21:02 +00:00
Odoo's Mergebot 8495f01034 [MERGE] web,*: properly set up Owl env in the frontend
This PR extracts the common basis of the env to use both in the
frontend and the backend. The public env now contains most of the
features that were previously (only) in the webclient env.

Moreover, the PublicRoot no longer uses the ServiceProviderMixin,
such that services are only deployed once, in the (public) env.

AbstractService now takes the env as argument in the constructor,
instead of the parent.

Finally, test helpers (and tests) are adapted accordingly.

Task 2274713

closes odoo/odoo#52097

Related: odoo/enterprise#10989
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2020-06-12 12:32:25 +02:00
Aaron Bohy b4ba0fc340 [FIX] *: adapt tests to env rework
This commit adapts tests following recent changes on the helpers.
The main change is that addMockEnvironment (and all functions using
it) are now async, as they need to wait for services to be started.
2020-06-12 09:47:48 +00:00
Aaron Bohy dc260c3241 [IMP] web: tests: rework mock helpers
This commit reworks the test helpers, following recent changes on
services deployed in the Owl env.
2020-06-12 09:47:48 +00:00
Julien Mougenot c4786fccfd [IMP] *: update notifications to optional title
closes odoo/odoo#52826

Related: odoo/enterprise#11084
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-06-12 09:01:50 +00:00
Julien Mougenot d093fd4236 [IMP] web: close button on non-sticky notifications 2020-06-12 09:01:50 +00:00
Julien Mougenot 7cadc21611 [IMP] web: review notification style 2020-06-12 09:01:50 +00:00
Lucas Perais (lpe) eaa37eaf84 [FIX] web: force webclient to finalize its loading
When the web client is completely ready, it triggers an event "web_client_ready" on the bus
Some Mail OWL components rely on that mechanism to be mounted
i.e. DialogManager and ChatWindowManager

When eveluating the action to display at startup, the webclient mechanism
implies that we push the location hash each time a relevant data is available
e.g. menu_id etc...

Now, before this commit, since the hashchange handler is bound before that evaluation
it is actually triggered each time the JQuery bbq pushed a url state (this is in the API)
doc: http://benalman.com/code/projects/jquery-bbq/docs/files/jquery-ba-bbq-js.html#jQuery.bbq.pushState

This undercuts the initial loading promise chain to finish and the event "web_client_ready" was never triggered
preventing everything that relied on it to be mounted

After this commit, the webclient is artificially finalized, with the help of a new custom event
"webclient_started". So the event web_client_ready is triggered,
signalling to everyone it is in the dom and usable

A lot of bug persist though: the start() of webClient sometimes returns a rejected promise

It is worth noting that the hashchange mechanism is largely outdated and will change
in a more reliable way in the near future with the conversion of the webClient to OWL
the drop of JQuery BBQ and the direct reliance on window.history.pushState
doc: https://developer.mozilla.org/en-US/docs/Web/API/History/pushState#:~:text=The%20state%20object%20is%20a,the%20history%20entry's%20state%20object.
and on the window's "popstate" event
doc: https://developer.mozilla.org/en-US/docs/Web/API/Window/popstate_event

This commit must be applied on the enterprise webclient too

closes odoo/odoo#52892

Related: odoo/enterprise#11114
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-06-12 08:26:40 +00:00
Aaron Bohy 26fe23201b [IMP] web,*: properly define env in the frontend
*bus,mail

This commit extracts the common basis of the env to use both in
the frontend and the backend. The public env now contains most of
the features that were previously (only) in the webclient env.

Moreover, the PublicRoot no longer uses the ServiceProviderMixin,
such that services are only deployed once, in the (public) env.

Owl components can now be defined in the website, and rely on a
properly built env. Legacy widgets still works as they access
services through the PublicRoot (via trigger_up) which redirects
those requests to the env.
2020-06-12 08:04:14 +00:00
Jorge Pinna Puissant 07a3d7f31e [FIX] mail: pdfjs viewer download name
Before this commit, when downloading a pdf from the pdfjs viewer, the
name of the pdf was always 'document.pdf'.

Now, the correct name of the pdf is used when downloading the file.

opw-2269841

closes odoo/odoo#52878

X-original-commit: b9cd32a7f19b8f73385dea534ad3cc5b126bc6dd
Related: odoo/enterprise#11109
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-06-12 06:48:05 +00:00
Florent de Labarre 0c67025c40 [FIX] hr_expense: default_expense_line_ids can be used multi time
Create an expense
Click "Create report"
Save the report A (you can also submit, post inventory, ...)
Now click on Create (a new report B)

The expense in A are copied in B because default_expense_line_ids
are not cleared

Closes #52457

opw-2271851

closes odoo/odoo#52852

X-original-commit: e8cee2d8249f6c0076253f37db040eef293bb275
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-06-11 13:25:34 +00:00
jvm-odoo 7910723d36 [FIX] mail: fix can't add follower
Issue

	- Install Contacts
	- Technical / Email / Subtypes / Discussions
	- Uncheck Default
	- Go on any contact
	- Add an user as follower
	- Edit the follower, check any box
	- Save
	- Re-edit for checking

	Not saved

Cause

	In mail_followers.py _add_followers method

	We do:
	```py
	new_sids = set(channel_subtypes[channel_id]) - set(sids)
       	old_sids = set(sids) - set(channel_subtypes[channel_id])
	```

	If no box are checked, sids value will be [None] instead
	of [] (_get_subscription_data) so, new_sids and old_sids
	will have a value but old_sids should not, it override
	the change we made

	We have [None] value because in _get_subscription_data
	we use array_agg which returns a list or None if there
	are no input rows

Solution

	Compute old_sids if sids is not [None]

OPW-2271472

closes odoo/odoo#52869

X-original-commit: b1cdef0272a797fe2c1e5e0634ff400d17480d85
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-06-11 14:55:37 +00:00
jvm-odoo 149763f372 [FIX] web: load_translation fallback to url language
Issue

	- Install eCommerce, Sales, Stock, Product availability
	- Install another language & add it to website too
	- Create a product
		- eCommerce tab select 'Availability Show ':
		  inventory below a threshold and prevent
		  sales if not enough stock
	- Go to website, publish it
	- Private tab > go on your website url
	- Open the product page
	Availability text should show up
	- Switch language without debugger open
	Availability text not translated
	- Open debugger with disable cache
	- Refresh
	Availability text translated

Cause

	In this case, we have no user_context,
	but the load_translation is based on
	the user_context language.

	Since lang = undefined, we use the cached language

Solution

	Fallback to the context language if the user_context
	langague is not defined

OPW-2244843

closes odoo/odoo#52868

X-original-commit: a9a756cf75963e0771a05859b29b03f08ae592b1
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-06-11 14:53:25 +00:00
Denis Ledoux ad258ee7d1 [FIX] l10n_*: try_loading should stay in a noupdate=1 data block
Oversight during 293ccca9e94a1cdf9ef5c65349c4a18edb2fb399

`try_loading` should be called on install only,
not on module update.

closes odoo/odoo#52877

X-original-commit: 3557c265b878b21b95210c5708afbfa2826e11cc
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2020-06-11 17:15:26 +00:00
Denis Ledoux 0f966196fb [FIX] l10n_*: no chart template should be set to noupdate
In a general manner,
the chart templates should not be set to noupdate,
that way, if a new company starts in an existing database,
it starts with an up-to-date chart of accounts.

For instance,
if the chart of template is not updated from
12.0 to 13.0, the `default_pos_receivable_account_id`
is not added in the chart template,
and when a new company is created,
the default pos receivable account is not set on the company.
Besides, the field `res.company``account_default_pos_receivable_account_id`
is not displayed on any form view,
whether or not the full accounting is installed,
so we must especially pay attention this default account is well set
from start, as the user as no opportunity to correct this by himself.

In addition,
in upgrade scripts,
the default pos receivable account on the chart template
is used to correctly set the pos receivable account on the company
and on the pos payment methods,
so it must be well set for the upgrade script to do its job correctly.

Technically, it means, without this revision, the fields:
- `account.chart.template``default_pos_receivable_account_id`,
- `res.company``account_default_pos_receivable_account_id`,
- `pos.payment.method``receivable_account_id`
were not filled properly on upgrade,
causing critical issues in the accounting entries on pos session closing.

Related to #52786
Related to odoo/upgrade@ccfd2371ef

closes odoo/odoo#52870

X-original-commit: 3258ba015ff75b7c176d83a44261d24ebfcc26de
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2020-06-11 15:13:19 +00:00
Raphael Collet a6c43e0366 [FIX] website, website_blog: adapt tests
closes odoo/odoo#52865

X-original-commit: ae268ec99e25d246593b3996981b4287a0ed3081
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-06-11 15:26:29 +00:00
Raphael Collet 4f9efd2eb1 [FIX] core: flushing an environment should not leave things to compute
Upon cursor `commit()`, the pending computations are performed with
method `flush()`.  However the latter method leaves fields to compute on
new records.  As the `commit` ends the current transaction, we can clear
those pending computations.

X-original-commit: d27e98d9048d0cb1250522205286ebc7b7d5ea39
2020-06-11 14:40:33 +00:00
Raphael Collet 150f68108c [FIX] core: do not compute a field on a mix of new and real records
This fix looks like good practice to avoid confusing developers when
writing compute methods for fields, and should not be necessary.  But it
actually fixes an extremely obscure bug in the computation of the field
`sale.order.invoice_status` when dealing with timesheets (module
sale_timesheet_enterprise).  The bug seems triggered by the fact that
the field is computed on both a given sales order and a new record with
that sales order as origin.

X-original-commit: f9c128c6f567dfaab5cfb0080e4fdc847942911a
2020-06-11 14:40:33 +00:00
Raphael Collet b15c280369 [FIX] core: update on new records should only recompute new records
The following situation can occur: a computed field depends on one2many
lines, and during an onchange, a line is modified.  Both the main record
and the line are new records.  If the many2one field is not in cache on
the line, its value is fetched from the line's origin, and the field
will be triggered for recomputation on the main record's origin instead
of the record itself.

The fix enforces the following property: if new records are modified,
only new records can be triggered for recomputation.

X-original-commit: f038b6c40b7045b6fe569c009d29ea092b614ed6
2020-06-11 14:40:32 +00:00
Thibault Delavallée 574dd61351 [HACK] crm: allow ordering on my activities deadline
RATIONALE

Activities are a way to organize our daily pipe. Notably in a sales pipeline
salesmen may have multiple leads with activities to perform in the next few
days. We would like to be able to have a list view displaying a list of leads
with "my" deadline, and to order leads based on this field.

PURPOSE

As activities are linked to records through a one2many and as my activities
are only a subset of those activities, it is impossible to store a field
on lead model. Indeed it would depend on the current user which makes storing
it impossible.

However ordering on a column in list view asks for a stored field. As it is
not possible, this commit proposes to hijack the web client and search of lead
model in order to allow it.

SPECIFICATIONS

Introduce a activity_date_deadline_my field, computed and searchable that
behaves like activity_date_deadline. It is filtered on current user activities
instead of being global to the record activities. "My" deadline is the earliest
deadline of my activities, even in the past.

Ordering through web client calls search_read with an order parameter set.
Search_read then calls search. In this commit we therefore override search
to intercept a search without count with an order on activity_date_deadline_my.
In that case we do the search in two steps.

First step: fill with deadline-based results

  * Perform a read_group on my activities to get a mapping lead_id / deadline
    Remember date_deadline is required, we always have a value for it. Only
    the earliest deadline per lead is kept.
  * Search leads linked to those activities that also match the asked domain
    and order from the original search request.
  * Results of that search will be at the top of returned results. Use limit
    None because we have to search all leads linked to activities as ordering
    on deadline is done in post processing.
  * Reorder them according to deadline asc or desc depending on original
    search ordering. Finally take only a subset of those leads to fill with
    results matching asked offset / limit.

Second step: fill with other results. If first step does not gives results
enough to match offset and limit parameters we fill with a search on other
leads. We keep the asked domain and ordering while filtering out already
scanned leads to keep a coherent results.

All other search and search_read are left untouched by this commit to avoid
side effects. Search_count is not affected by this commit.

As web client order availability is simply based on field being stored we
have to allow hijacking its value. A new option 'allow_order' is added that
display the order icon in list view column headers. It allows calling
search_read with an order based on the column but nothing more. Using it
on a not-stored field will give a warning log and ORM ignores it by default.

LIMITATIONS

At least following limitations apply

  * search on "my activities" gives a list of ids that is used for searching
    and ordering. It means that having too much activities on a given user can
    result in poor performances.
    -> we consider that activities assigned to a given user should be kept
    under control. Leads with activities for a given user should be a small
    subset of leads without activities.
  * ordering on activity_date_deadline_my always put those records on the top
    (deadline asc or desc) whatever the actual ordering of order items given
    to search. This is done to avoid complex implementation where deadline
    would be used to order records within groups ordered by another field.
    -> for example: order = 'priority DESC, activity_date_deadline_my ASC'
    actually behaves like 'activity_date_deadline_my ASC, priority DESC'.

WARNING

This implementation is a hack. It has been done by professionals. Do not try
to do it at home.

More seriously this is hackish and should be avoided. IN our case we consider
that the use of activities in sales pipeline is mainly driven by "my activities
deadline", which is not necessarily the case with longer processes like tasks.

Moreover user tests tend to show that this feature could be interesting. It
will improve quality of Odoo CRM and its adoption by improving its daily
use. A framework solution has to be found. Until this is done we keep this
hack and hope it is not duplicated in other applications.

LINKS

Task ID 2276011
Prepares Task ID 2243124 (My activities in CRM)
PR #52232

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-06-11 15:17:52 +00:00
Pierre Collinet (pic) 4c2db92aec [IMP] crm_iap_lead: improve onboarding tour of module crm_iap_lead
- Improve crm onboarding tour text messages and display

- Modify CRMLeadMiningRequest to improve the Lead Generation Process
Default value for lead_number changes from 10 to 3;
Computed value for team_id : per default add the
current user sale_team_id;
Default value for user_id : per default add the current user;
Default values for country_ids : Per default, add the country
of the active company because it avoids a click and is usually correct;

- Improve crm_iap_lead_mining_request_form
Group fields by sections for more readability;
Change string attribute of some fields;
Change the position of the alert messages to the top of the form
(as a ribbon);
Change button string from Submit to Generate Leads to be more explicit;

Task ID 2226563
Community PR #51587

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-06-11 12:26:51 +00:00
Pierre Collinet (pic) f1c99a60fa [IMP] crm: improve onboarding tour of module CRM
Add an autocomplete for opportunity name. If no name is set when a customer is
selected set the name partner_id.name's Opportunity

Change help title and subtitle to be more explicit. Change title from "Create
an opportunity in your pipeline" to "Create opportunities to keep an eye on
all your ongoing sales talks." Concerning subtitle, if a valid
and active email alias is found : Emails sent to ALIAS@address automatically
create opportunities.

Improve crm onboarding tour text messages and display.

Change menuitem from Teams to Team Pipelines to be more explicit. Update
the corresponding act_window name in the sales_team module.

Make the "schedule an activity" button bigger (100% of the div) and highlight
the entire Schedule button box.

Update test tours accordingly. Since quick create opportunity form is updated
the tests were failing. Reason is a trigger on input:first trying to detect
the field "name". This is not the case after this commit's changes.

Task ID 2226563
Community PR #51587
2020-06-11 12:26:45 +00:00
Sébastien Theys 87f49b0616 [REM] im_support: remove im_support module
The goal of the module was to communicate with livechat operators on our
production server, except the feature is disabled on our prod and we don't plan
to reactivate it any time soon.

closes odoo/odoo#52691

Related: odoo/upgrade#1313
Signed-off-by: Christophe Simonis <chs@odoo.com>
2020-06-09 10:58:52 +00:00
Denis Ledoux 302bf7c1bb [FIX] point_of_sale: check payment methods intermediary accounts is set
This is normally not supposed to happen to have a payment method without a receivable account set,
as this is a required field. However, it happens the receivable account cannot be found during upgrades
and this is a bommer to block the upgrade for that point, given the user can correct this by himself,
without requiring a manual intervention from our upgrade support.
However, this must be ensured this receivable is well set before opening a POS session.

closes odoo/odoo#52862

X-original-commit: 88cad346445f21d1513c066e965fc7df59582a56
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2020-06-11 14:05:26 +00:00
Krupa Patel eb6a53812c [IMP] website(_*) : allow quick publishing using multi edit in list
Before this commit, published column was not shown as option and user not able
to multi edit at a time in list

In this commit, we ease the purpose of multi edit at a time and keep a column
in option so user can keep hide it when not needed and can show as well.

task-2153812
Closes #43029

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-06-11 14:14:42 +00:00
qsm-odoo 0067566cf3 [FIX] web_editor: consider ]0, 1] values as 'active' values in editor
Before this commit, the left panel input widgets were considering the
values between 0 and 1 as 'inactive' and thus were forcing their
default value if the user entered those. As the default is most of the
time 0, entering 0.9 gave a 0 result for no apparent reason.

Part of https://github.com/odoo/odoo/pull/52821

closes odoo/odoo#52841

X-original-commit: ee08dbb27afe165035ee683884737d4867034913
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-11 11:17:01 +00:00
qsm-odoo 55d6bbd723 [FIX] web_editor: trigger 'content_changed' event on correct elements
When 'data-apply-to' was introduced to be able to target different
elements for snippet option methods, we kept triggering the
'content_changed' event on the main option element. This can be a
problem if the main option element is not in an editable element and the
elements targeted by apply-to are, as that editable element would not
be marked as dirty.

Note: the bug could actually still be produced, even in Odoo <= 13.0
where the apply-to param does not exist, by using a option method
which searches by itself for an inner element in an inside editable
element. This is considered as a limitation for the time being.

Part of https://github.com/odoo/odoo/pull/52821

X-original-commit: 906b2d9d4679c03365f949633e3c90319724deb8
2020-06-11 11:17:00 +00:00
Julien Mougenot 65a952e999 [IMP] web: remove color from 'Start typing' option
closes odoo/odoo#52842

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-06-11 11:16:32 +00:00
jvm-odoo 2303fc8bce [FIX] sale_stock: fix quantity available widget display
Issue

	- Runbot (or install every modules needed)
	- Sales > Any order (or create a new one)
	- Enable all columns
	- Remove all lines then add a line
	- Select any product

	The "i" icon container is not large enough
	so it's partially hidden but if you resize
	the window, it will be corrected.

Cause

	Since there is no icon (display none) before
	selecting the product, the _freezeColumnWidths
	method computes the width without the icon

	When selecting the product, the icon is added
	but the width is not adjusted.

Solution

	Change d-none to invisible so that, the icon
	is there but not visible and the width
	computation will be correct

OPW-2269665

closes odoo/odoo#52840

X-original-commit: 0058ba467e7cf2f1bb0b8f606c7d4559897a31c4
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-06-11 11:15:03 +00:00
Nasreddin (bon) 8f2be8560e [FIX] fleet: User is set to "Plan To Change Car" when set as future driver
Issue

	- Install "Fleet" app and open it
	- Add new car with user X as driver and set state as "Registered".
	- Add new car with user X as future driver and set state as
	  'Waiting list'

	The user is set as "Plan To Change Car".

Cause

	When a user is set to a new car as a future driver,
	the user will automaticly be set as "Plan To Change Car".

Solution

	Add condition to set as "Plan To Change Car" only if the user
	new car state is not "Waiting List".

opw-2259606

closes odoo/odoo#52836

X-original-commit: 6d35733e61b1d8b18acc3510046423aec7fe1c85
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2020-06-11 10:39:10 +00:00
jvm-odoo 329b6c2409 [FIX] mail: fix redirect to mention in ThreadWindow
Issue

	- Install Contacts
	- In systray, open #general
	- Mention anyone (except your user)
	- Send
	- Click on the mention

	It does nothing

Cause

	In thread_window _onRedirect, we pass
	the _open method bounded to this.

	But this = the #general thread window
	so it will open the general thread again.

	As it is already open, it does nothing

Solution

	Modify the open method in order to
	receive the returned channelID and
	pass it to the call

OPW-2265580

closes odoo/odoo#52834

X-original-commit: 5957aa317e8bb5b0041a1b5d8256cb3ff7d9fe42
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-06-11 10:25:15 +00:00
Lucas Lefèvre 997d21a67e [IMP] web: Allow to use a custom control panel
The abilty to use a custom control panel for an action
seems to have been lost with 18e5416.

With this commit the action config can specify a custom
component to use as control panel.

Usefull for o-spreadsheet integration.

Task 2238915

closes odoo/odoo#52807

Signed-off-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
2020-06-11 07:41:02 +00:00
Pierre Masereel 09cfde14bd [IMP] point_of_sale: responsive UI
The point of sale user interface has been adapted to work on mobile
devices.

We modified the design of payment lines to look like payment methods and
stack them together in the mobile view.

When you had a cash method, the amount was not preffilled during
payment, now we always prefill the amount to keep it more simple.

closes odoo/odoo#51891

Task-id: 1887609
Related: odoo/upgrade#1334
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-06-10 17:54:54 +00:00
Nicolas Lempereur 152b3464c0 [FIX] website: improve help for scheme in domain
The domain field on a website is used:

1) to get the right website in case of multi-website
2) to compute base URL of canonical URL

For the 2nd usage, a scheme can be set (eg. https://hello.world) that
will be used instead of default http://

opw-2266224
closes #52784

closes odoo/odoo#52796

X-original-commit: bc2899ba0905fe14a481d922a8fc57decf069692
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-06-10 18:01:24 +00:00
Benjamin Vray 556b42bba8 [FIX] website: fix path of logo img in footers template
Related to task-2229551

closes odoo/odoo#52781

X-original-commit: 3e1765254abbdd2487719de5b04a5b76610b0faa
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-10 14:28:07 +00:00
Nicolas Lempereur eaef67323b [FIX] tools: add bdi tag as safe tag
We already have BDO tag as allowed tag in sanitized HTML that is
similar to BDI tag, so this commit also adds BDI in allowed tags.

BDI* tags make sense in email since email client can have different
orientation than Odoo (alternative is to use `<div dir="auto"></div>`).

*: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/bdi

opw-2256982
closes #52787

closes odoo/odoo#52801

X-original-commit: 68edebb0d862acb3dc14f839aaef744306c5e269
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-06-11 06:39:11 +00:00
Nicolas Martinelli edccc677aa [FIX] repair: operation translation
Translate the repair fees description in the language of the partner, as
done for repair lines.

opw-2274120

closes odoo/odoo#52760

X-original-commit: 0bc7ac2a9d60534f0e7bec120ad716bbb7d13155
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-06-10 11:04:34 +00:00
Pierre Rousseau 8878cf45a8 [IMP] web: expose pivot variables
This is useful for integration with spreadsheet.

closes odoo/odoo#52582

Task-id: 2168016
Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2020-06-11 05:35:53 +00:00