Commit Graph
134127 Commits
Author SHA1 Message Date
Nicolas Martinelli fdf95cf0d2 [FIX] stock: do not include service in picking
- Create a kit which contains a stockable product and a service
- Create a SO with the kit, validate

The service is included in the picking, while it shouldn't be.

The procurements only make sense for for consumable and stockable
products. Therefore, we do not run procurements for services.

opw-2201923

closes odoo/odoo#46175

X-original-commit: 30387a1a6e90adf760146591809ad141ff645187
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-25 08:19:31 +00:00
jerome hanke (jhk) 089447517c [FIX] web_tour: rtl tooltips are aligned properly
Steps to reproduce:
- install sales
- install any rtl language and set your user language to it
- go to sales

this.info.position can have any of the 4 values 'bottom', 'top',
'right' and 'left'. It only needs to be reverted in rtl if it's left
or right.

Previous behavior:
tooltip is not positionned properly and covers the create button

Current behavior:
toolips align the way they are supposed to

opw-2193479

closes odoo/odoo#46156

X-original-commit: c75595bd8f2b44197a4a0751bd8622916ea5ef8c
Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
2020-02-24 17:34:06 +00:00
Jorge Pinna Puissant d4aa362512 [FIX] point_of_sale: long product name print receipt in safari
Fine-tunning of 263131f49828d2d8f2177bae15d0af84af341c37

Before this commit, when printing in safari a receipt that contains
products with long names, parts of the name were overlapped. This occurs
because, in safari, the library that transforms the html into text
mismanages the spaces.

Now, the name is printed correctly in safari, same behaviour than the
others browsers.

opw-2169656

closes odoo/odoo#45794

X-original-commit: 9e4ab0da0e84b2b792659477e3520f7847d51aac
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-02-25 08:16:01 +00:00
Lucas Perais (lpe) 9256492f10 [FIX] qweb2: ignore comments between branching directives
Have a template of that form:
```xml
<t t-if=""/>
<!-- Comment -->
<t t-elif=""/>
```

Before this commit, both python and JS crashed because any type of node
between branching directive was forbidden

After this commit, Comments are just ignored and removed, while actual
template nodes are still forbidden between branching directives
There is no crash anymore

closes odoo/odoo#45899

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2020-02-24 15:32:19 +00:00
William Henrotin 0e77b3d16a [IMP] stock: set index on stock_move_line.picking_id
This commit set an index on column `picking_id` of table
`stock_move_line`. Many sql requests on stock_move_line
have picking_id in their where-clause.

On a database filled with 1M pickings, reading a picking of 10
stock_move_lines is 60 times faster.

Closes https://github.com/odoo/odoo/issues/44623

closes odoo/odoo#46153

X-original-commit: a36a693733579e1e8bdaa3aa00fcc482c6299acf
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2020-02-24 16:55:02 +00:00
lejeune quentin fff277a4a7 [FIX] hw_drivers: Do not send request if the IoT is in access point
If IoT Box is in access point mode and a server is configured
the box try to reach the server.
But in access point mode all requests are redirected to the box

So now before return True in function 'get_odoo_server_url'
we verify if the service 'hostapd' is inactive

closes odoo/odoo#46141

X-original-commit: 365f0e384630bad16e0872d2307702fca5a4e295
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2020-02-24 16:03:12 +00:00
Toufik Ben Jaa 1744878573 [FIX] base: access rights issue on users form
- The form view on `res.users` displays information about
    how many record rules, ACL and groups are applied to the users.

    In some cases the current users may not have the required
    access rights to compute those values.
    To fix this issue, the computed fields are now computed
    in `compute_sudo` mode

closes odoo/odoo#46149

X-original-commit: 653f81f49ba4d92648eb04209cdbe73894dfac08
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2020-02-24 16:39:26 +00:00
Robin Heinz 19e7707f70 [FIX] iot: make PoS use an IoT Blackbox driver
Remove the community Blackbox Driver
Small changes to make it possible to use the Blackbox IoT driver with the PoS.

closes odoo/odoo#46135

X-original-commit: 8e48a0d5d4586729eb22ac8b6abc0fdc74771b78
Related: odoo/enterprise#8714
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2020-02-24 15:22:40 +00:00
Raphael Collet dfab454732 [IMP] fields: inherited field on new record are set on parent records
This makes the behavior of `onchange()` consistent in the case of
inherited models (with `_inherits`).

closes odoo/odoo#45910

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-02-24 15:52:32 +00:00
Romain Derie 4206c1f225 [FIX] website: don't load ir.ui.menu in frontend until needed
Before this commit:
When logged in and navigating on a frontend page, the accessible `ir.ui.menu`
would be loaded in qcontext.
Loading those menus performs alot of SQL request, up to ~2.000 requests on big
databases such as Odoo.com for an user with a lot of access rights.
This is not a problem on low traffic website as this is ORM cached, but when
there is a lot of traffic, the cache is clear very often, thus this code only
is adding a lot of requests for no reason most of the time as the user is just
navigating without any intention of opening the application menu.

Note that this qcontext computation in frontend was pointless in enterprise as
the applications menu in frontend redirect to the backend without using it.

This commit removes that computation from the qcontext. The menus will be
computed and loaded only when the user really needs it, when he is about to
open the application menu.

closes odoo/odoo#46127

X-original-commit: 471ddf85ce619961e46fb281bf721968ff298d3b
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2020-02-24 15:43:32 +00:00
Romain Derie 6898fec5a6 [FIX] website_forum: set website_id when created from frontend
Every records created from frontend should have the website_id set to the
current website.
Most was done with 066cfc9598, but forum was missing it.

Fixes #45749

closes odoo/odoo#46126

X-original-commit: 08540d7853d497e326182e822b359cd6fcb05d59
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2020-02-24 14:44:58 +00:00
qho 64460c38ac [FIX] hr: quick user creation and assign user to employee
When creating a new user on-the-fly on the employee detail page (HR Settings/Related User), if the employee is never linked with a user before, the new created user will not be linked with the employee automatically and we have to select the user again.

With this commit, the new created user will be linked with the employee automatically.

Fixes #44442

closes odoo/odoo#46125

X-original-commit: 136c0dbea0ab00ff27daac69c27dc0824a16ff70
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-24 14:44:37 +00:00
Barad Mahendra b13cee7989 [FIX] crm_iap_lead,project: Fix invalid client-side domain
Since the commit https://github.com/odoo/odoo/commit/e95ccf0908c263f6cf23c91c477a8e252e936ff1
invalid client-side domain will raise the error

so fix the incorrect domain in attrs.

Taskid:2196805

closes odoo/odoo#46116

Closes: #45680
X-original-commit: 4279a6bdd4041ff643c3ff5c55f55c93cf4f774f
Related: odoo/enterprise#8708
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-24 14:05:34 +00:00
lejeune quentin 7e806e47af [FIX] point_of_sale: Reboot IoT after upgrade
For a upgrade the IoT Box perform a "git reset hard"
And after we restart odoo.
But it is not enough and we need to reboot the IoT Box

closes odoo/odoo#46119

X-original-commit: c20a17bf33f13543a331d557d65c5e6f196d46e4
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2020-02-24 14:10:43 +00:00
Nicolas Martinelli e5b9f5e63e [FIX] mrp_subcontracting: multi-step receipt
- Activate the multi-step reception
- Create a Subcontracting BOM for product P and supplier S.
- Create a PO for S with P
- Validate the PO
- Validate the input transfer
- Validate the internal transfer

A error is raised because a mandatory field is not set.

The root cause comes from the INT move being flagged as a subcontract
move, while it shouldn't be. Indeed, only the input move should be
flagged as subcontract.

We force the `is_subcontract` value to `False` when a move is copied in
the context of a stock rule.

opw-2193009
opw-2202727

closes odoo/odoo#46115

X-original-commit: 8795e0f3d4301710a089d263395633759eae76b7
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-24 13:59:23 +00:00
Simon Lejeune 9104424186 [FIX] stock: move line: create batch
related to 896e36edab

Fixes #41813

closes odoo/odoo#46114

X-original-commit: e75bc034f121fd3790ebe11bb1b579e000912d2a
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-02-24 13:58:10 +00:00
Nicolas Lempereur 78545ce0ed [FIX] web: digits option for aggregate is taken into account
If you have a currency with 3 decimals, when you show a list view
grouped, you might have result like:

[group partner 1 : amount : 4.4€]
-                  amount : 1.11€
-                  amount : 3.33€

which is a little odd, it is not that odd since the groupings are an
approximation (eg. you could have a line in EUR and a line in USD and
the grouping value would be the sum of both line).

But there is no way to specify another precision, and since this is a
grouping it could be of line of different currencies so we can't use the
lines currency to decide.

With this changeset, having for example:

<field name="amount" digits="[69,3]"/>

with `digits` attribute is taken into account for the aggregate value
and it would be displayed with 3 decimals.

Without the fix, the added test fails with:

    aggregates monetary use digits attribute if available
    Expected: "2000.000", Result: "2000.00"

opw-2195042
closes #45545

closes odoo/odoo#46094

X-original-commit: 4dd293c71851d0c6e9ffe09402cf54cfe889f402
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-02-24 12:46:46 +00:00
Goffin Simon fd0937bdc7 [FIX] mrp: Quantities of components on MO
Steps to reproduce the bug:

- Install Manufacturing
- Go to General Settings/Inventory and tick Units of Measure
- Create a product P (storable) with UOM kg
- Create a Bill of Material for this product: e.g. 1 kg
- Add a component C with UOM "kg", but in the BOM uses "g"
- Create a MO for P, Mark as todo, Produce
- Click on C to change the quantities (e.g. change the first line to 900 g)
- Add a second line with 0.1 kg (as the uom of C is in kg, you are forced to set in kg)

Bug:
The strict consumption check is raised. It happens because the
lines quantity done are not correctly converted in the same
UoM

opw:2181892

closes odoo/odoo#46103

X-original-commit: e385930f8687fc4051ddd375fe0551dba59a8750
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-02-24 13:18:26 +00:00
Krunal Trivedi eb1207a705 [IMP] project: Allow to use kanban example stages in particular project
Purpose of the task is allow to use a example stages in real project.

Added a button 'Use this for my project' in modal dialog of project
stages examples, by clicking the button, user can directly use stages
of an example in his project. if some stages already exists in project
then new stages will be added next to existing stages.

NB: The stage will be created in user's language. user have to manually add
transalation for en_US.

Taskid-2179536

closes odoo/odoo#44562

Closes: #44562
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-18 10:26:43 +00:00
Simon Lejeune e9d3047ba2 [FIX] stock: write on warehouse name
fixes #19696

closes odoo/odoo#46093

X-original-commit: d4d012f693d3c177c782623bb1b460fa1a81d6eb
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-02-24 12:36:31 +00:00
koz-odoo 9c4b75f8a0 [IMP] hr_holidays: Close the leave dialog on click of save
Currently when click on "NEW TIME OFF REQUESTS" from the dashboard,
popup with save and discard buttons visible,
after create/save new time off request, the dialog is not closed.
the dialog is still there with footer buttons "Edit" & "Create".

After this commit, The dialog will be cloased when user click on save button.
Creted new form view because previous form view is used at other
place so we can not add buttons directly on that view.

closes odoo/odoo#45137

Task-id: 2183096
Closes: #45137
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-20 05:35:14 +00:00
Prakash Prajapati da591f5c6c [IMP] hr: Default employee gender should be null rather than male
Purpose of the task is, when creating a new employee, the default
gender should be empty.

closes odoo/odoo#42843

Taskid: 2165484
Closes: #42843
Related: odoo/enterprise#7648
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-12 09:57:58 +00:00
Ankita Raval 6e8e468e61 [FIX] stock_sms : Modify SMS confirmation settings name
Before Commit:
-The SMS confirmation settings doesn't have the right name.

After Commit:
-We change the field string 'SMS Validation with stock move'
to 'SMS Validation'.

closes odoo/odoo#46085

Task-id: 2185325
X-original-commit: d5edd512c128844598af4acedda57d75bf4d33d7
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-02-24 11:53:11 +00:00
Swapnesh Shah 8f703cb050 [FIX] website_slides: reset public views when duplicating
Followup on 82ce815a8c . When content (`slide.slide`) is
duplicated, public_views should not be copied. Indeed it gives a new slide
and it makes no sense to keep the old slide statistics.

closes odoo/odoo#46084

X-original-commit: a2f5f8b552b48483ce5fdf0be04da7c27b326f2e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-02-24 11:52:00 +00:00
Aurélien Warnon 30122c8c7b [FIX] website_slides: fix slide.slide category creation from kanban view
This commit fixes an issue that raised an error when trying to create a
slide.slide of type "category" on the slide.slide kanban view.

Since it's not possible to disable the "group creation" on the kanban for a
single filter, we disable it globally.

At the same time, we removed the capability to drag and drop slides in that
view.
It was not very useful and could mess up the records by changing the slide type
without changing the associated data (video link, presentation file, ...).

Issue #45452
Task 2201878

closes odoo/odoo#46083

X-original-commit: ae2117886d0a71be37525b63ee8456a11aee213c
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
2020-02-24 11:51:38 +00:00
Denis Ledoux 7a928bbdfb [FIX] doc: backend, internationalization, load a translation no longer exists
It has been replaced by a button in the languages list & form views
`Activate Language and Update Translations`

closes odoo/odoo#46070

X-original-commit: d451924dc79e84bb556ca7bc63b9f2908c4d077e
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2020-02-24 11:13:23 +00:00
wan 3091089fd5 [FIX] account: journal group multicompany rules
The xml id was duplicated, leading to a missing rule.

opw:2198528

closes odoo/odoo#46064

X-original-commit: 896784b547cc3556b28b51978a5b7de03dbaf3e8
Signed-off-by: wan <william-andre@users.noreply.github.com>
2020-02-24 10:55:56 +00:00
Luis Torres e53faee0ea [FIX] l10n_mx: Correct account type in MX chart template
Fix account type on 108.01.01 & 108.02.01

According to the SAT catalog must be an account of Current Assets

Fix the account type and the tag on 811.01.01
According to the SAT catalog must be an account of Expenses, and the tag
must be 811.01

The correct account for unaffected earnings in the SAT catalog is 305.01,
then, was added the account and assigned the correct type.

closes odoo/odoo#46046

X-original-commit: 632cc5417796ff375d47767fd7cdb358a5d4ce94
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-24 09:59:07 +00:00
Ipsita Borisagar 13eff43afc [IMP] mail: improve the help tooltip of auto_delete field
Currently the message for help tooltip of auto_delete field is not sufficiently
clear for user to understand.

In this commit, improving message for help tooltip by adding some extra details
in it so user can easily understand about it for models mail.mail, mail.template
and wizard mail_compose_message.

Task-2055702

Closes https://github.com/odoo/odoo/pull/45063

closes odoo/odoo#45063

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-02-18 10:01:38 +00:00
Xavier Morel 9b00d352a9 [IMP] core: logging of array remoteobjects
The old path would just return e.g. `Array(2)` for an array of size 2,
which is not very useful when trying to see if an array's contents are
relevant to an issue.

Turns out arrays are serialized pretty much exactly like objects
without a subtype, just with property names being indices instead of
keys. So add a case which formats such remoteobjects as
array-literal-ish.

closes odoo/odoo#46056

X-original-commit: 6d5639024fa0f7501efe836e5571cd45bb46b123
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-02-24 10:22:38 +00:00
Damien Bouvy 085c977af5 [FIX] payment_sips: correct automaticResponse URL
The automaticResponseURL should not be the same as the one the customer
uses, as this might mess up with the payment processing page when the
customer actually returns.

Add some logging while I'm here, and remove a useless write on a
non-existing field that generates log warnings (but nothing else).

closes odoo/odoo#46047

X-original-commit: 2e25ff3b1114a222ae8cff76c2ce8d31adf599e4
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-02-24 09:59:31 +00:00
Richard Mathot ecd9610ef6 [FIX] point_of_sale: faster UI search on products
In the POS interface, when searching through a large catalog of
products (~80000 in our test), the interface used to freeze for 5-10
seconds before returning search results.

After profiling the issue, we noticed that the unaccent'ing of product
names was done in the search loop.

Moving the unaccent outside the search loop (at product catalog
initialization) solves the issue.

We also change the timer before triggering a search: 70 ms after any
keypress is too short. In practice, this would trigger a search at every keypress.
200 ms appears to be a good compromise between UI interactivity and
saving useless computations

opw-2185087-rim
fixes 9ee9724a10

closes odoo/odoo#46040

X-original-commit: b5e01b48c32ad91e3e3df25917d035e36f97c6d2
Signed-off-by: Richard Mathot (rim) <rim@openerp.com>
2020-02-24 09:44:25 +00:00
Romain Derie b997684b06 [IMP] website, website_*: improvement of 7dd70438e1
* website_blog, website_event_track, website_forum, website_mail_channel

7dd70438e1 was introduced in stable as a fix, which obviously had some stable
policy preventing some changes.
This commit improves that commit in master.

task-2119086

closes odoo/odoo#45622

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-02-18 16:04:11 +00:00
Romain Derie 601795ba4e [FIX] website_sale: load states according to address mode
Step to reproduce:
  - Install delivery and restrict your delivery to a few states
  - Edit an already existing shipping address in checkout which is set to a
    country having restricted states in the delivery method
  - The states listed in the address shipping page are not the restricted ones
    but all states.

Related to #26530

closes odoo/odoo#45948

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-02-21 13:38:37 +00:00
Ivan Yelizariev 3c9e0b847c [FIX] website_sale: show all states available in billing address
Step to reproduce:
  - Install delivery and restrict your delivery to a few states
  - Edit your shipping address in checkout
  - Only the restricted states will be listed, while all should be since the
    restriction should only impact the shipping address.

Closed #26530
2020-02-21 13:35:34 +00:00
Swapnesh Shah 8c64021512 [IMP] base: add group by object on Access Rights
Create the same group by as available on ir.model.access

closes odoo/odoo#44677

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-02-24 08:18:35 +00:00
Sayan Bhowmik 49c87c2705 [FIX] doc: correct typo
Ko is in French

closes odoo/odoo#45984

X-original-commit: abdfba83f1f7aa16235ee6479e93a09e5edd2239
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-02-21 17:21:44 +00:00
Swapnesh Shah 129ce92f2d [FIX] point_of_sale: Remove wrong decorator
Follow-up on 118190f

Remove the wrong decorator from the write method.

closes odoo/odoo#45878

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-02-22 18:21:37 +00:00
Swapnesh Shah 6edc77941f [FIX] payment_alipay: Remove wrong decorator
Remove the wrong decorator from the write method.

closes odoo/odoo#46010

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-02-22 18:24:19 +00:00
Joren Van Onder 81f3c4e81d [FIX] hr_holidays: make _onchange_request_parameters handle timezones
At the end it constructs date_{from,to} (Datetime) by combining:

- request_date_{from,to} (Date) local to the user
- UTC time from date_{from,to} (extracted using time() into hour_{from,to})

This doesn't work in all cases, e.g.:

A leave in US/Pacific for one day (with request_unit_custom = True):
- request_date_from: 1st of Jan
- request_date_to:   1st of Jan
- hour_from:         15:00 (7:00 local)
- hour_to:           03:00 (19:00 local) <-- this happens on the 2nd of Jan in UTC

Before this patch it resulted in:
date_from: 1st of Jan 15:00
date_to:   1st of Jan 03:00

The correct value for date_to is:
date_to:   2nd of Jan 03:00

_adjust_date_based_on_tz takes care of adjusting the date based on the
hour and the user's timezone.

opw-2169863

closes odoo/odoo#44534

closes odoo/odoo#45746

X-original-commit: 523fd6e3c4ea3a4c153616bf6bdba9573501127f
Original-signed-off-by: jorenvo <jorenvo@users.noreply.github.com>
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-20 01:14:03 +00:00
Joren Van Onder 2e490f1c95 [FIX] hr_holidays: default date should be local to the user's timezone
Before this the following happened:

- Be in PST (UTC -8)
- Create a 1 day leave starting Jan 1 (clicking in the calendar view)

The default request_date_from is Jan 1, default request_date_to is Jan
2.

It happens because the dates are extracted from the UTC time, which in
this case are different (15:00 AM Jan 1 - 3:00 AM Jan 2).

To solve it set dates local to the user.

opw-2169863

X-original-commit: 740f39d31f2480ee7ae9cd3472b733087f1cf280
2020-02-20 01:14:02 +00:00
Arnaud Baes 96eb99f0f2 [FIX] web : force o_image_128 max priority.
On the partners page, the class is not fully applied to the logos
because 'img-fluid' is applied first via the 'image' widget.

This cause max-width to be overriden with the value 100%, breaking
the partners pae layout.

closes odoo/odoo#45451

X-original-commit: 35bb2978d1af008ea8e84c664bc62f6fae0677db
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-02-16 13:18:36 +00:00
Damien Bouvy c4b0bcbbd5 [FIX] sale: Unpredictable sales team
Steps to reproduce the bug:
- Install website_crm_score
- Add Mitchell Admin in 2 sales teams
- Create a quote
- Play with the ordering of sales teams sequences

Bug:

The default sales team will be different at quote creation, partner
selection, etc. and will basically be unpredictable (while you would
expect it to take the first team the salesperson is a member of in
the order of the sequence)

The problem is an inconsistent use of the _get_default_team_id method
and the sales team of a user. Since the website score module add the
possibility to have a user member of more than one team, using the
team of the user is bad. You should use the method all the time
for consistent results.

opw:2196934

closes odoo/odoo#45718

X-original-commit: 6d7bbd3074e6b3771b582bf544624cef59e1c6a3
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-02-19 13:14:20 +00:00
Romeo Fragomeli 7e47742225 [FIX] mail: fix scroll in discuss on small screens
When using the Discuss app (not the systray's thread window) on a small
device, it is not possible to scroll through the discussion (cf. tab
"Chat" or "Channels").

Steps to reproduce:
* Go in discuss (in mobile)
* Go to tab chat or channel => BUG
NB: you must have enough element to test the scroll

This bug is due to the commit odoo/odoo@3ad7706560.

Before it, the styles as interpreted by the browser looked like this:

    .o_mail_discuss_tab_pane {
        overflow-x:scroll; // explicitly set in discuss.scss
        overflow-y:auto;   // implicit ; due to the overflow-x rule
    }

But by removing the overflow-x rule, the styles ware interpreted as:

    .o_mail_discuss_tab_pane {
        overflow-x:visible;   // implicit ; due to the absence of overflow-* rule
        overflow-y:visible;   // implicit ; due to the absence of overflow-* rule
    }

In addition, the parent element had an overflow: auto rule scoped only
for desktop-like screens.

This commit fixes this issue by unscoping the overflow: auto rule on the
parent, allowing to scroll the messages' list in both desktop-like and
mobile-like screens.

Reference:
https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-x

closes odoo/odoo#45964

X-original-commit: f4b22af7ed28d3515d77bfd76691aba1129581b1
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2020-02-21 15:20:18 +00:00
alt-odoo 8f70f203d0 [FIX] base: merge user contacts without company
If some contacts are linked to a user, we keep the company consistent
but we should do it only if a company is set on the destination partner.

opw-2199352

closes odoo/odoo#46000

X-original-commit: 3f9cb47cb6fdc240a58f3daa3bd4cf32f55cb084
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2020-02-21 21:06:03 +00:00
Adrien Dieudonne c70e7ebeca [FIX] account: invoice outstanding wrong displayed on mobile
Steps to reproduce:
- Go to Invoicing
- Select an invoice
- Add credit note
- Click on "Post"
- Invoice footer is overlapped on mobile

This bug occured because of "float: right".
Get rid of this is too much work (oe_subtotal_footer is already floating),
so we decided to keep it with a "clear: both".
In desktop, this element is on the right of the screen but
on mobile we take the whole horizontal space.

closes odoo/odoo#46007

Task-id: 2184243
X-original-commit: 986152405a0ba6038df7d93c9264a46ee4207dd8
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2020-02-22 15:48:18 +00:00
Christophe Monniez 832bac0628 [REM] website: remove useless browser_js test
This test goes to the public homepage and directly logs a 'test
succesful'. It's useless as many other tests use the public homepage and
therefore, those tests will crash if the homepage is unavailable.

Moreover, it happens to trigger random failures due to the fact that
some RPC may occur between the cookies cleaning and the termination of
the browser.

Typically a "GET /web/webclient/locale/en_US" can be triggered right
after the clearing of the browser cookies, cache ...

closes odoo/odoo#46004

X-original-commit: 3aded126e78b18f8bb753f1b57b827667ca99d18
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-02-22 08:22:10 +00:00
Romain DerieandJeremy Kersten 4eafd78847 [FIX] web_editor, website: handle date edition in all lang and format
Before d00c0e317, `Datetime` fields would be editable in frontend but would
have unexpected results, especially in non-English languages, for when the
english lang format had been changed.
It would also crash when saving non-English strings, such as `Lundi`.
For more details, see https://github.com/odoo/odoo/pull/44484#issuecomment-586850490

Since d00c0e317, only date displayed in lang format would be editable, which
case is Event page in Odoo 12.0. Everywhere else, the format is changed for a
nicer layout, either with `widget=XXX` or `t-options=YYY`, such as:
`<time t-field="record.date" t-options='{"format": "MMM d, yyyy"}'/>`
`<time t-field="record.date" t-options="{'time_only': 'true', 'format': 'short'}"/>`

When a date parsing crashes during editor save, the problem is not only that
the date can be saved, but the whole changes of the page are lost, as they
won't be saved either.

This commit attempts to fix every languages cases, regardless of the website
lang or user lang.
To do so, we store the date in the user lang format in a data attribute of
every date field in the DOM. Once the field is clicked (to edit probably),
that value will replace the one displayed according to the widget/options.
That way, dates will always be sent to the server in the user lang format,
avoiding any possible mismatch.

This whole fix apply to `Datetime` and `Date` fields.

opw-2183055
Closes #44484
Closes #45555
Fixes #44047

closes odoo/odoo#45725

closes odoo/odoo#45997

X-original-commit: c0db9bb8027ff926c619aebe6e0a5cdd05808232
Original-signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Co-authored-by: Romain Derie <rde@odoo.com>
Co-authored-by: Jeremy Kersten <jke@odoo.com>
2020-02-21 18:57:59 +00:00
Antoine Prieels 4a6d3ae934 [IMP] doc: Add reference for IoT
Add documentation for development of new Drivers for the IoT Box.

closes odoo/odoo#45990

Taskid: 2092878
X-original-commit: 246060c0757b52725ebd93164c8151fa8db2c6b9
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
2020-02-21 18:07:11 +00:00
Romeo Fragomeli 2498b5ba23 [FIX] barcode: input text is visible
Before this commit, in mobile, the input to handle the input event of scanner
was visible but with a negative z-index to be in the back of Odoo
viewport.

After this commit, in mobile, the input is transparent (opacity 0) and
so is not visible anymore but it's still present.

Steps to reproduce:
* Go to app switcher (in mobile)
* Scan a barcode with a hardware scanner BUG

closes odoo/odoo#45975

X-original-commit: b2b1e68e541966ad832e03fbc230418d14c85616
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2020-02-21 16:45:24 +00:00