Commit Graph
135251 Commits
Author SHA1 Message Date
Adrian Torres 2cb77eb104 [FIX] http: do not redirect to database manager on registry crash
Before this commit if the loading of the registry failed because of an
AttributeError or a psycopg2 error the http dispatcher would redirect
the user to the database manager.

This can be problematic because integrators (e.g. odoo.sh) may choose to
disable / forbid access to the database manager, and when the registry
crashes because of e.g. a migration, the real error will be overshadowed
by an AccessDenied error or somesuch depending on the path taken to
forbid access to the database manager.

With this commit, the real exception is simply reraised

closes odoo/odoo#49238

X-original-commit: de4e67dcc52916337251370387aea6aea893a60e
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-04-08 13:22:34 +00:00
oco-odoo 7a65152bcc [FIX] l10n_ch: QR-code generation: limit address lines to 70 characters instead of 71
closes odoo/odoo#49231

X-original-commit: 396fc027709f38679a211c1391d0cc2d8f919421
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-04-08 12:50:08 +00:00
jvm-odoo 50caf4d6b4 [FIX] sale: fix quantity buttons size
This commit is another fine-tuning of 348a5d0.
The buttons size is sometimes problematic so
we should reduce it.

OPW-2220893

closes odoo/odoo#49227

X-original-commit: 57999ea32c0cc85283faf06f6edb8649af784838
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-04-08 12:39:17 +00:00
Nisha patel 4fe9eda03d [IMP] various: Change the label Model insted of Object
Currently, sometimes users are getting confusing between the concepts
of 'objects' and 'models' when doing advanced configuration or
customization.

So, In this commit we replace 'object' label by 'model'.And also add
quicksearch on the relation field.

TaskId: 2209594
Related Ent PR: https://github.com/odoo/enterprise/pull/9556

closes odoo/odoo#48647

Closes: #48647
Related: odoo/enterprise#9556
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-31 11:31:24 +00:00
Nisha patel 04af701f76 [FIX] web: Fix the zoom image stick top on search of employee.
Currently, the Employee picture stays on top of the card of the employee
we're looking for. The image does not disappear after a search is validated.
Steps to reproduce:
 >> On employee kanban focus cursor on search panel, then mouse over
to employee image so it will be zoomed, now without mouse leave just
type in the search panel and enter, the big zoomed image stuck on
screen and don't even know how to make it go away.

So in this commit, We fix that on keudown hide the zoom image so
when user search on search panel it will hide the zoom image.
OnShow of zoom bind the generic even keydown and on that just
hide the image so it should not stick on screen.

TaskID : 2212808
Closes : #48253

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-04-03 07:19:28 +00:00
Romain DerieandKishan Gajjar babbe363b6 [FIX] website_theme_install: do not write view arch if it was modified
During theme install, theme.ir.ui.view are copied as ir.ui.view for the
requested website.
During theme update, those already created ir.ui.view will receive the
theme.ir.ui.view modifications, including the `arch`, even if it was changed by
the user, meaning the user changes would be lost.

Here are some examples which will be wiped away when the theme
is updated (only if the view is loaded from the theme module):

- Changes made from website HTML/CSS/JS editor.
- Changes made from website builder e.g. Theme modify footer with XPath
  and user make changes in footer then user changes will be gone on theme update
- Changes made directly in the arch of ir.ui.view in the backend.

This commit fixes that behavior by not updating views which were modified by
the user.

closes odoo/odoo#49224

X-original-commit: 9906e1d403c4e9137a0313c342a455f425e95b8e
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
Co-authored-by: Romain Derie <rde@odoo.com>
Co-authored-by: Kishan Gajjar <kishanegajjar@gmail.com>
2020-04-08 12:15:25 +00:00
Krupal Oza 637a591c05 [FIX] stock: show document reference on stock moves on mobile
Before this commit, invoices do show the reference in the body of
the document, while the stock moves don't. it wasn't consistent.

After this fix, the stock move title is now displayed on mobile too.

closes odoo/odoo#49217

Task-id: 2182609
X-original-commit: 4c12aff2998c436b5bc05f119bc3d7a5f95cdfcd
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2020-04-08 11:20:43 +00:00
jvm-odoo c0010f86c0 [FIX] web: fix can export all without access rights
Issue

	- Access rights > archive ir exports & line
	- Any list view
	- Select all > action > export

	Access rights error

	- Export all (next to import button)

	Export done

Cause

	Action > export does a search_read which checks
	access rights

	Export all is bypassing that check

Solution

	Do a search_read when clicking on export all
	before doing the export process

OPW-2230048

closes odoo/odoo#49203

X-original-commit: 8aa89d4c416bdcf3c7f6543f3d32006f9807c938
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-04-08 10:35:08 +00:00
Xavier Morel 172722c4d2 [IMP] base: remove redundant base64 back and forth in attachments
* add a `raw` computed field, though only update some of base to use
  it (addons for which that makes sense can be migrated progressively)
* avoid working with base64 data when it's possible to work with the
  actual data
* improve datas (base64 encoded content): should depend on bin_size

closes odoo/odoo#47212

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-04-08 06:03:28 +00:00
Andrea Grazioso (agr-odoo) 30988c932b [FIX] website_slides: correctly upload PDF in course
With website_slides installed go to website, select a course in which
the user is enrolled, try to upload a pdf

Traceback will occur because the category recordset is needed but the id
is passed to _resequence_slides

opw-2229756

closes odoo/odoo#49198

X-original-commit: 6d9b367a79d09d3d7a9dde890ca651aa09b93987
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-04-08 09:20:30 +00:00
Xavier Morel 28fdaf1229 [FIX] hr_timesheet: precision_digits should be digits, probably?
closes odoo/odoo#47917

Related: odoo/enterprise#9346
Related: odoo/upgrade#1047
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-04-07 09:25:08 +00:00
Xavier Morel 9b2e59d947 [REM] stock_landed_costs: digits on monetary field 2020-04-07 09:25:08 +00:00
Raphael Collet 6a69f107df [FIX] *: useless parameter 'ondelete' on One2many fields
Note: some of them were moved to the corresponding M2O.
2020-04-07 09:25:08 +00:00
Raphael Collet 51c4e6e2fc [FIX] *: invalid parameter 'tracking' on non-mail-thread models 2020-04-07 09:25:08 +00:00
Raphael Collet 4e95c9b999 [FIX] *: useless parameter 'placeholder' on fields 2020-04-07 09:25:08 +00:00
Raphael Collet 5ab51dee7b [FIX] *: useless old API field parameters 2020-04-07 09:25:08 +00:00
Raphael Collet 7d34a334a6 [FIX] fields: add support for parameter invisible (actually used) 2020-04-07 09:25:08 +00:00
Raphael Collet 1b1b2142f1 [IMP] fields: add validation of parameter names 2020-04-07 09:25:08 +00:00
Adrian Torres 00c82d3121 [FIX] account: ensure cleanup of registry after test_all_l10n
Followup of #48896, ensures that the registry is correctly cleaned up
after the installation of the different l10n_* modules and that the
subsequent setup_models is done with the correct registry

closes odoo/odoo#49197

X-original-commit: bfd6bdcd89724f04442bbe07307177c523bed5f0
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-04-08 09:11:24 +00:00
Odoo's Mergebot 74f8e8825c [IMP] web: bundle tests jum
Group all of the test scripts into a single minifyable assets bundle. This has been done for both the QUnit desktop and mobile suites.

Enterprise PR: https://github.com/odoo/enterprise/pull/9568
Task 2002399

closes odoo/odoo#48676

Related: odoo/enterprise#9568
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-04-08 11:40:16 +02:00
Julien Castiaux ab4000fb3c [REF] base: Remove deprecated exceptions and osv
TL;DR: remember `osv` and `except_orm` ? You can forget about them.

* Deprecated `except_orm` dropped.
* `UserError` elevated as super type of all user-related
  errors.
* Unused `DeferredException` dropped.
* Unused `QWebException` dropped (real one is in `qweb.py`).
* `MailDeliveryException` made a python exception.
* `name` legacy exception attribute made an alias of the python standard
  `args[0]` attribute and deprecated.
* `value` legacy exception attribute dropped.
* `exception_type` RPC error response key dropped.
* Deprecated `osv` module dropped.
* `--osv-memory-age-limit` cli option made an alias of
  `--transient-age-limit` and deprecated.

The `odoo.exceptions.Warning` have long been a deprecated alias to
`UserError`. It is going to be removed in a future version but first we
explicitly deprecate it with a warning.

The `odoo.exceptions.DeferredException` was a very old internal
exception, it has been removed without deprecation notice as it is never
raised.

The `odoo.exceptions.except_orm` has been a deprecated exception type
with deprecation warning for 5 years, it has been removed in favor of
UserError which becomes the super class of all user-related errors.

The `odoo.base.models.ir_mail_server.MailDeliveryException` was
inheriting `except_orm`. As it is not related to a user error but is
more of a problem an admin much take care of, the exception has been
made a Python error.

The `exception_type` JSON key in RPC error responses was holding an
hardcoded value derived from the exception type. Its usage has been
dropped in favor of the `name` JSON key that holds the precise exception
name. Again as it was hardly used in the source code (beside the crash
manager) it has been dropped without deprecation warning.

Since we are here trying to clean odoo custom exceptions, we are also
deprecating the `name` exception attribute in favor of the more standard
`args[0]` attribute.

The `name` (along with `value`) were two attributes used to raise
`except_orm` exceptions before the introduction of `UserError`,
`AccessError` and related exceptions. The `name` attribute, at the time,
was holding the exception type/title. Nowadays it contains the error
message. The `value` attribute, at the time, was holding the error
message. Nowadays it is no more used.

The `osv` module contains very old deprecated aliases. There is no
simple way to log a deprecation warning for osv, osv_memory and
osv_abstract but as they have not been in use for ages, they have been
removed too. To be consistent, the `--osv-memory-age-limit` cli option
has been made a deprecated alias to the `--transient-age-limit`.

closes odoo/odoo#45723

Task: 2187728
Related: odoo/enterprise#9162
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-04-08 08:41:17 +00:00
Christophe Monniez 640e63e371 [FIX] web: temporarily skip broken tests
After cb76a0022, three more Qunit tests were found to fail randomly.

closes odoo/odoo#49190

X-original-commit: 9809c53e65059d53a9f115ab29ef02583f84bdb5
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-04-08 08:42:32 +00:00
Aurélien Warnon f4803d548b [FIX] survey: fix survey timer related issues
This commit fixes timer related issues on survey flows, for both regulars
surveys and survey sessions.
The timer was unreliable in its completion by a whole second, which had not a
big impact at the user level but could make some tests fail (randomly).

Side changes from this commit:
- Reduced delays in the survey session tests to speed up testing
- Removed some timer flickering on survey views

LINKS

Task 2230526
Runbot error ID 535

closes odoo/odoo#49178

X-original-commit: 15c72aec71d42624685fb0fc9df25279c7855310
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-04-08 07:33:14 +00:00
Sébastien Mottet (oms) e3b5b20b39 [IMP] website_[profile|forum]: show filtering forum on user profile page
- A tag has been added next to the title of each tab in the profile when the user come from a specific forum. The goal is to indicate to the user that the displayed content is specific to a given forum. The tag can be clicked by the user to remove the applied filter.
- Change label in edit profile page from "real name" to "name"
Task Id: 2214425

closes odoo/odoo#48665

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-04-08 07:21:48 +00:00
Nicolas Lempereur dbb0222d63 [FIX] {website_,}sale: no salesperson better than customer
Before 13.0, when there is no salesperson on the customer or company or
website, when a ecommerce sale order is done we get the OdooBot as
salesperson because we update partner on sale order in superuser.

In 13.0, since superuser doesn't change UID, the salesperson will be
assigned to "Public User" or the customer that create this order.

opw-2232201
closes #49141

closes odoo/odoo#49161

X-original-commit: 0b6a2569920b6584652c39b3465998649fe305b4
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-04-07 14:51:40 +00:00
Nicolas Martinelli 4fc45fce2c [FIX] sale_stock: missing dependency
Following #48718

opw-2224335

closes odoo/odoo#49162

X-original-commit: e69c080d6b07578bc162e134d2e3b63335d23800
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-04-07 14:52:56 +00:00
Julien Mougenot 064a11890f [REF] web: remove unused test script in test assets 2020-04-07 14:41:43 +00:00
Julien Mougenot 48ee7272b6 [IMP] *: adapt qunit suite bundle inheritance
Since the test assets bundle name has been changed and its structure is different,
the inheriting assets need to be updated.

Task 2002399
2020-04-07 14:40:53 +00:00
Julien Mougenot 89dbb49235 [IMP] web: bundle tests
Group all of the test scripts into a single minifyable assets bundle.
This has been done for both the QUnit desktop and mobile suites.

Task 2002399
2020-04-07 14:39:43 +00:00
nje-odoo 0d007f24e6 [IMP] l10n_syscohada : update chart of account to cover a lot of african countries.
Task - 1906494

closes odoo/odoo#49099

closes odoo/odoo#49157

X-original-commit: 25121c7aec6c297e45107dee2982666e9dae4929
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-04-07 14:11:02 +00:00
Hardik Prajapati bc792b225b [FIX] hr_holidays: Fix access error on leave allocation with multi-company
Current Behaviour:
As Admin:
- Install timeoff and enable Multi company
- Create new company and switch to that company
- Go to timeoff > Managers > All > Allocations > Create a record
An AccessError is raised from `_onchange_type` because it try to
access `employee_ids[:1].id` and it may gives employee of another company.

Expected Behaviour:

After this commit, it will not raise the AccessError. if employee of
that company is exist then and then set on leave allocation.
so we have already compute field `employee_id`, it will gives employee
of current company.

closes odoo/odoo#49120

Taskid: 2179571
Closes: #45381
X-original-commit: 73b3d11a0b443116ce91d889397c6d85a13ca1eb
Related: odoo/enterprise#9712
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-04-07 10:03:01 +00:00
Nicolas Martinelli 42690cb4da [FIX] website_profile: fallback if missing kwargs
Avoid casting `None` to integer.

opw-2231620

closes odoo/odoo#49136

X-original-commit: d0eb912242ba0932ce8c56cf625775cb50f1526a
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-04-07 12:17:00 +00:00
Victor Feyens 57eb964182 [IMP] base: document all field types.
closes odoo/odoo#49135

X-original-commit: cc653d3f1a49e2b7b2cc0ec833097bd7cf3528a1
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-04-07 12:11:57 +00:00
Lavish Chhatwani a0348ba3bf [FIX] website_slides: fix right panel alignment issue
There is an alignment issue while browsing courses page in Leaderboard and
Latest achievements panel.

In this commit we simply fix it with no-gutters to have all items aligned
properly.

TaskID - 2227683

closes odoo/odoo#49125

X-original-commit: 84270b8f542313235a35fc0449600a8ff5dc8785
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-04-07 10:21:55 +00:00
Loan (lse) b2e6784c69 [FIX] point_of_sale: wrong stock valuation entry
Before this commit:
When a PoS session is closed in anglosaxon accounting with real time stock valuation, the stock moves linked to PoS orders are used to create the stock valuation entry.
When an order is composed of only products of type 'service', there are no picking linked to the order, and so the entry is created with all stock moves having no picking_id.

After this commit:
To avoid this problem, we are checking that the PoS order has a picking before looking for stock moves.

OPW-2206625

closes odoo/odoo#49117

X-original-commit: 0386e1f099bf42a59a79febfa06906dd76bd62e2
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-04-07 09:43:25 +00:00
Raphael Collet 1dc3c0d1a8 [FIX] base: use a dummy "user groups view" during install
While installing a module on an existing database, the modification of
groups should reset the `base.user_groups_view` to a dummy view in order
to validate user views.  The `user_groups_view` is set to its "right"
value at the end of the installation.

closes odoo/odoo#49114

X-original-commit: 071bd77944484bad6f2c0cb9a7a98785dcc693c6
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-04-07 09:25:00 +00:00
Sébastien Mottet (oms) 00404541e0 [IMP] mass_mailing: add minor improvements to views and reporting
Improve the mailing.trace.report search view to help users find their statistics based on specific campaigns, and added some minor changes to mailing views

- Rename "mass mail campaign" to "mailing campaign"
- Rename "create a mass mailing list" to "create a mailing list"
- Add sum footer on bounce
- Add mailing and campaign field to reporting search view
- Hide campaign field in search views when campaign option is not activated

Task ID 2210331

closes odoo/odoo#48711

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-04-02 07:33:25 +00:00
Krupal Oza 3287c28a0e [IMP] mass_mailing{_sms}: allow switching mail server in sent mailing
Currently, users can't switch Outgoing Mail Server once the mailing has been
sent. This might cause issue some situation. For example, the user has two
Email Servers. He tries sending with the first server and something is wrong
then emails couldn't be sent. So in this case user can not edit the mail
server and instead has to create another mailing with second working server.

This commit improves the behavior by removing the readonly attr on
`Mail Server` field of mass mailing.

Task-Id : 2223141
Closes  : #48256

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-30 10:26:54 +00:00
Nicolas Martinelli 5c97602c3f [FIX] point_of_sale: fixed tax price
- Create a tax:
  Fixed price: 0.355
  Included in price
- Assign the tax to product P
- Create a POS order with P and a price 0, pay by bank
- Create a POS order with P and a price 10, pay by bank
- Close the POS session.

The following entry is created:
                      D           C
Tax Received       0.01        0.00
Product Sales      0.00        9.65
Product Sales      0.36        0.00
Receivable        10.00        0.00

Several issues:
- the entry is posted and unbalanced: covered in #48484
- rounding of 0.355 was either 0.36 or 0.35: to fix one day... [1]
- the tax received of 0.36 for the POS order of 0 is booked on the debit
  rather than on credit, leading to a difference 0.01.

This happens because the taxes amounts for the POS order of 10 are
positive, while they should be negative for a sale as done in [2].

We set the amounts as negative as done for incoming invoices, and adapt
the tax line creation accordingly.

[1] The use case is weird: a fixed price of 0.355 while we only have 2
digits in the currency?
[2] https://github.com/odoo/odoo/blob/e415cffa2ffb3fe4b5f0e32bd96b3433387a95e3/addons/account/models/account_move.py#L461

opw-2168096

closes odoo/odoo#49104

X-original-commit: 5df8ed72d03de635f3c38ce59c1b3e9c9ce51ed2
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-04-07 07:54:38 +00:00
William Henrotin b6c629922d [FIX] stock,mrp: change procure method at cancellation
Usecase : sell a mto/manufacture product. Confirm the sale order.
Cancel the delivery and the production then
duplicate the delivery.
    - if the delivery was cancelled before the production, another
    production is created.
    - if the delivery was cancelled after the production, no other
    production is created.

In the second case, the production cancellation will reset the procure
method of the delivery. The duplication will not trigger the mto
procurement.

This commit will override the procure method of each cancelled moves and
set it to `make_to_stock'. This way, we have the same behavior independently of the flow.

Task : 2212125

closes odoo/odoo#48366

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-03-26 13:00:26 +00:00
Richard Mathot a6d38439d5 [REV] payment_sips: 9372ff3ac010bd3428eb866ddd3ecfaf939127c4
Python 3.7 is required for function datetime.datetime.fromisoformat to
work.
Ref: https://docs.python.org/3.7/library/datetime.html?highlight=fromisoformat#datetime.datetime.fromisoformat

This is a temporary revert, to avoid rejecting perfectly valid
transactions.

Ref: https://github.com/odoo/odoo/pull/48581
opw-2179123

closes odoo/odoo#49091

X-original-commit: dedac4efd0872bab71e06796f5a3158e2cf7bf15
Signed-off-by: Richard Mathot (rim) <rim@openerp.com>
2020-04-06 16:50:56 +00:00
Victor Feyens 5199d45760 [FIX] mrp: forgotten create decorator
Followup of
https://github.com/odoo/odoo/commit/58df6c86e06304b2c5f020e0fb93988e9e388fe0.

By default, the create, when not specified as `api.model`, supports
creation in batch (thus the batching opportunity isn't lost here).

BUT, if a create override isn't specified as `api.model` or
`api.model_create_multi`, it won't be accessible in rpc calls (because
the ORM thinks a record in self is needed).

It doesn't look like somebody can create stock move lines from the web
client itself, but it doesn't cost anything to follow the global api
(and it's clearer to clearly specify the create as create_multi).

closes odoo/odoo#48964

X-original-commit: a4fd8f8062046bcea97d9f7cfe300e19020cdecd
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-04-03 11:32:11 +00:00
svs-odoo 1b2b14879a [IMP] mrp: no help in workorder tablet view
For the `mrp.routing.workcenter`, removes the help from the `worksheet`
field to set it into the view.
This way, the tooltip doesn't appear each time the user cursor is placed
in front of the pdf in the workorder tablet view (`mpr_workorder`).

task-2225362

closes odoo/odoo#48903

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-04-06 06:24:03 +00:00
Daniel Blanco 326027af09 [FIX] l10n_cl: Adds exempt fiscal positions needed for some document types.
Adds special taxes used in sales and purchase of alcoholic beverages.
[FIX] l10n_cl: change percentage amount of "retencion de segunda categoría" to the value changed by law in year 2020

closes odoo/odoo#48804

X-original-commit: c7592d614728ded8e6a9faa570a49b370515ecea
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-04-01 21:16:15 +00:00
Adrian Torres 24b3cf63ff [FIX] crm: make crm.team.write work in batch again
When `_synchronize_alias` was introduced into crm.team.write, the write
method become incompatible with batch writes because
`_synchronize_alias` assumes `self` is a recordset of length 1 and
performs attribute accesses directly on self, this makes the __get__
crash because it performs a `self.ensure_one()`

With this commit, crm.team.write will iterate over the self recordset
and call `_synchronize_alias` on every record of the recordset.

This also solves a uninstallation problem in sale_crm because a write is
performed on crm.team in an uninstall_hook.

closes odoo/odoo#49088

X-original-commit: a9511cd42be365e58371d717b8197aac644eaf33
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
2020-04-06 16:18:02 +00:00
Aaron Bohy d997aa1574 [FIX] web_tour: consume tip on kanban record drag&drop
This commit concerns tours executed in onboarding mode (the user
manually follows the steps and consumes the tips).

Commit [1] changed the default event type to consume a tip from
'mousedown' to 'click'. This caused an issue when a tip was
attached to an element that had to be dragged and dropped. The
issue has been fixed by [2]. This fix is based on the fact
that draggable elements have classname 'ui-draggable-handle'.

Kanban records are draggable, but their implementation uses the
'sortable' feature of jQuery instead of the 'draggable' one (the
records are also sorted in their column). So [2] isn't enough in
this case. For instance, in the crm tour, the tip telling to drag
and drop a record to another column can't be consumed.

This commit handles the case of sortable elements that have to be
dragged and dropped.

[1] e5bc2e7306251a55ce90adeef992840517c240e6
[2] 3f458fe06e6a629edc72428eab749068c2eba1ba

closes odoo/odoo#49072

X-original-commit: 67335bda1653f592011a57146fb750d7b69cfc27
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-04-06 14:03:39 +00:00
Nicolas Martinelli 1766d3281e [FIX] auth_signup, website, base: identical logins
- Create a website:
  Free sign up
  Specific User Account activated
- In the backend, create a partner "test@test.com"
- Grant him portal access
  => user is not website-specific
- Go to the website, Sign Up with "test@test.com"
  => user is website-specific

At login, an expected singleton error arises at:
https://github.com/odoo/odoo/blob/c53f1c6a58b4c8c9e9b3c87f27281c9bfd65a0e1/odoo/addons/base/models/res_users.py#L613

Because this matches both users:
https://github.com/odoo/odoo/blob/c53f1c6a58b4c8c9e9b3c87f27281c9bfd65a0e1/addons/website/models/website.py#L44

When such a case arises, we make sure to always select the most specific
user first.

opw-2219618

closes odoo/odoo#49089

X-original-commit: 9e217125c0d8c951e895e9799795ac29b7962107
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-04-06 16:22:31 +00:00
Mohammed Shekha 2b776cbbb5 [IMP] do not propagate default_* key from parent context to sub view
before this commit: from commit: https://github.com/odoo/odoo/commit/d58d6e270f4106d717821438490f60bc4f71306e parent context
was propagated to sub views, propagating whole context to sub view creates
issue as it contains default_* key inside it, there is a chance that sub view
has same field name which matches with default_fieldName in context,
e.g. go to sale order form view and create sale order line, while selecting
product, write in product_id field so that Create and Edit option comes,
select Create and Edit option, so whatever previously written in product_id
field will be added in product.product form's context as default_name,
now go to Purchase tab of product form and try to create Supplier, but note
that Vendors One2many should be editable, if it is not then to produce this
issue, make Vendor o2m list editable top/bottom, as soon as you click on
Vendor o2m's create button traceback generated which comes from name_get of
res.partner, issue raised because vendor o2m has m2o of res.partner and field
name is 'name', when default_get for vendor o2m is called it will propagate context
and context has default_name='typed string in product_id', as name field is
m2o with res.partner it will generate traceback as m2o accepts (id, name) tuple
not string

after this commit: propagate context to sub view but remove default_* keys
from parent context

task-2121161

closes odoo/odoo#49075

X-original-commit: 2e3756e0ce96a9e0c5fa304632a2600cbd832ef5
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-04-06 14:42:34 +00:00
Nicolas Martinelli a210d75f55 [FIX] delivery: multiple tracking links
In case `carrier_tracking_url` is `False`, a `TypeError` is raised and
not catched.

opw-2232268

closes odoo/odoo#49083

X-original-commit: a4b5bd7770bca3f2e4327c65de673e2fcc00e7e5
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-04-06 15:25:07 +00:00
Nicolas Martinelli 173c6b69dd [FIX] sale_stock: product package
- Activate "Product Packagings" in the Sales Settings
- Define a package on a storable product with a contained Qty of 1.8
- Sell 5.4 units of this product in an SO and use the package.

A warning is raised.

This happens because 5.4 % 1.8 = 2.220446049250313e-16

opw-2228859

closes odoo/odoo#49070

X-original-commit: f1e79c74a5c07d6be3154629f6f381ebaf907fb1
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-04-06 13:51:10 +00:00