Commit Graph
134299 Commits
Author SHA1 Message Date
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
Romain Estievenart e0231481d6 [FIX] base,hr,web: kanban image sizing/look & feel
The image illustrating some kanban cards (like "Employees" or
"Contacts") has a weird scaling and rendering on smaller screen sizes.

Step to reproduce (on small screen):
1. Open Employee
2. Apply a filter
3. Picture is ugly (shape changes to get something pretty weird)

This commit fixes it by:
1. removing the rounding which was only applied (sic) on smaller screens
2. adjusting the size and/or the margins of the image to keep its ratio
   and the alignment with the other kanban cards.

Task ID: 2198419

closes odoo/odoo#45956

X-original-commit: dd5db84464998b45d0524055f9c96bcad894c4c9
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2020-02-21 14:28:04 +00:00
Jeremy Kersten e6997dae2b [FIX] website_blog: avoid loop of redirect if no trailing / in tag
Before this commit in case you start on blog with url like /blog/blog-1/tag/2,
you should be redirected to /blog/blog-1/tag/website-2 to avoid duplicate
content.

But because the replace was done with /tag/%s/ it will be not replaced and so
you are redirected to the same url, creating a loop.

closes odoo/odoo#45927

X-original-commit: 666306326cecc6ac8587b45d2dbf24c0463b33a5
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-02-21 12:30:15 +00:00
Jeremy Kersten 01028b1cf3 [FIX] website_blog: avoid traceback if tag has been deleted
Before this commit, if you have a link with a tag that doesn't exists anymore,
you will have a traceback because you try to access to a unexisting record.

odoo.exceptions.MissingError:
('Record does not exist or has been deleted.\n\n(Records: [3], User: 2)', None)

Now, we filter on existing tag before to access a field.

X-original-commit: 54b45e5c287138a87a0b04ce4f301ea6893b9223
2020-02-21 12:30:15 +00:00
Jeremy Kersten d020dd89b5 [FIX] website_blog: simplify call to s_latest_posts
Common part of the domain is automatically appended by controller now.

X-original-commit: 38058cc6642b36195329e03ca187bd7d4366914d
2020-02-21 12:30:14 +00:00
jerome hanke (jhk) 8b63f15e27 [FIX] calendar: recurring events can have 0 repetitions
Steps to reproduce:
- install calendar
- create a recurring event with 0 repetitions
- save

Previous behavior:
raises an UserError, this would interrupt the sync with google calendar
Google calendar sometimes sets recurring events to 0 repetitions
once they are done recurring

Current behavior:
the event is handled like a punctual event but remains recurrent

initial commit: https://github.com/odoo/odoo/commit/ba727e15d2dc9a1325cd20527e2ccfe6f8bc63f0
opw-2185699

closes odoo/odoo#45947

X-original-commit: 5b63ddb4e03f34f015e7668c69108fb4a2badd08
Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
2020-02-21 13:49:06 +00:00
Christophe Monniez 952c668b82 [FIX] account, l10n_latam_invoice_document: fix move_type typo
Two typos were introduced with d675dbaa4c.

closes odoo/odoo#45926

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-02-21 12:18:32 +00:00
Denis Ledoux c59aefb783 [FIX] doc: backend, internationalization, renamed menus
closes odoo/odoo#45946

X-original-commit: 08df477c819aab1c91b04fada285ae1aae340800
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2020-02-21 13:42:11 +00:00
lejeune quentin 4756e6694a [FIX] point_of_sale: remove hw_blabox_be from odoo in init.d
Since PR 45225 hw_blackbox_be is no longer a module in the IOT but a driver.
It should therefore no longer be executed

closes odoo/odoo#45924

X-original-commit: acf11a68d17f300de3cc03cc53aa1cbac2f1977a
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2020-02-21 12:01:22 +00:00
yhu-odoo 839e14ee09 [FIX] stock: don't assign immediate transfer in comfirm
Missing part of #44947 of task 2160847

closes odoo/odoo#45922

X-original-commit: 367d236a974b1b726a770e58a03344a3d83fa49f
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-02-21 11:53:21 +00:00
574d7f0d4c [IMP] core: import-compatible export of m2m fields
When performing an import-compatible export, m2m values would be
exported as a record per cell unless the `id` subfield was the first
to be exported. Which is not the case when using the export UI (as it
always adds the field itself before any subfield). This would make the
m2m not actually export-compatible in most cases.

* export m2m "display name" in an import compatible format as well
* re-prioritise exporting xids when there are multiple m2m exports in
  import-compatible mode
* never fall back on the o2m / non-import-compatible m2m path for m2ms
  in import-compatible mode

Note: if multiple m2m fields are specified only one of them gets filled.

Task 2065428

closes odoo/odoo#37407

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Co-authored-by: Ravi Singh <ras@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
Co-authored-by: Xavier Morel <xmo@odoo.com>
2020-02-21 12:12:19 +00:00
Michael Mattiello (mcm) 3ecea2c934 [FIX] web_tour: listen on date range picker event
When applying the selected date range using the widget the
tip wasn't consumed. This commit fixes it by listening on the
event triggered when clicking on button apply.

closes odoo/odoo#45916

X-original-commit: 150d69f70a505efa298c66119eced29d8caa3699
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-02-21 11:21:03 +00:00
Victor Feyens cfabde8386 [IMP] stock: batch creation of company default locations
closes odoo/odoo#45907

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-02-21 10:25:00 +00:00
Krupal Oza 3a02f08960 [IMP] crm, event(_sale), gamification: avoid long labels in embedded tree views
PURPOSE

In various views, the min width of some columns is too short for the label of
the field. This task aims at fixing this by increasing some minimal widths
and relabeling some fields.

SPECIFICATIONS

crm
  * in view_crm_lead2opportunity_partner_mass, view_crm_lead2opportunity_partner
    add date widget on create_date and remove the phone field in the inline
    treeview of opportunity_ids;

event
  * in view_event_form set width of boolean field 'done' to 70px and in
    view_event_mail_tree set string of field 'mail_sent' to 'Sent'
  * in view_event_form_inherit_ticket set string of fields seats_max to
    'Maximum', seats_reserved to 'Reserved', seats_unconfirmed to 'Unconfirmed'
    and set width '100px' in the inline treeview of event_ticket_ids;

gamification
  * in challenge_line_list_view and challenge_form_view set string of field
    'target_goal' to 'Target' in the tree view and inline treeview of line_ids

LINKS

Task ID 2166865
PR #43401

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-02-21 09:45:56 +00:00
Loan (lse)andNicolas Lempereur 7ceba92511 [FIX] website_blog: handle None window selection
In the code for commenting or posting to twitter a selected range of
text, we did not take into account the case of no selection (eg. we
click on an element, but another code prevent default browser action).

opw-2197227

closes odoo/odoo#45883

X-original-commit: c578279dba4a3fd95e261d8dc58f2704c3b50eb0
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Co-authored-by: Nicolas Lempereur <nle@odoo.com>
2020-02-20 20:12:17 +00:00
Toufik Ben Jaa 5ab518ce67 [FIX] mail: referenced before assignment error
- In some cases when trying to open a discuss conversation a
    traceback can occur because of the usage of a local variable
    before its assignation.

closes odoo/odoo#45867

X-original-commit: 47bec812a36c1e41bdb525439dfd18a208e1dd79
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2020-02-20 17:26:35 +00:00
Thibault Francois 8c1c7f2687 [FIX] mail: Don't create duplicate mail.notification
When more than one user are linked to the same res.partner and this user is assigned to a task or a sale.order
as many email notifications will be created as there are users linked to the same res.partner.
This won't send more than 1 email, but multiple mail.notification
records will be created.
This causes duplicate entries in the mail.notification table, and can
crash when an old unique constraint is still present in that table (from
earlier Odoo versions)

To prevent this, we deduplicate the notifications and order by notification
type to get 'email' first in case the user have different notification
type ('email', 'inbox').

How to reproduce:
   - Create a first user test1
   - Create a second user test2
   - Merge the contact test1 and test2
   - Create a customer customer
   - Set the user test1 as salesman
   - Create a new sale.order with customer as partner

Add a test to reproduce the pathological scenario

Solution
  add distinct on partner.id and order by partner.id,
users.notification_type

closes odoo/odoo#45386

X-original-commit: 00f36c60e4790c8f5341cbc4f2c67e22e6d68f87
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2020-02-14 10:40:57 +00:00
Harpritsinh SisodiyaandMohammed Shekha 7639f7fbcb [IMP] web_editor: check resource is custom or not to display warning on editor
adds _isCustomResource method which will check whether resource is custom or
not, this method checks for JS and SCSS resource, if resource is custom then
do not show "No Update" warning inside ace editor.

task-2167570

closes odoo/odoo#44536

Related: odoo/enterprise#8368
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
2020-02-21 08:34:24 +00:00
jerome hanke (jhk) 0c4d808fd7 [FIX] delivery: handle multiple references in delivery email
Steps to reproduce:
- install sales and easypost shipping
- have a delivery order of multiple packages with easypost
- click "send confirmation email"

previous behavior:
the template does not handle multiple package references
and the associated link is wrong

current behavior:
each reference is set in a separated link

opw-2167037

closes odoo/odoo#45507

X-original-commit: 65eaa3e7daf0b547ae2bb98e335fc5941cb200a6
Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
2020-02-17 13:39:48 +00:00
Nicolas Martinelli bef4a3bad6 [FIX] stock_landed_costs: multi-currency
- Activate 2 currencies
- Create a landed cost product
- Create a Vendor Bill in a currency different from the company currency
- Add the landed cost product
- Click on 'Create Landed Costs'

The landed cost is created in the company currency, but with the amounts
in the vendor bill currency.

This happens because the currency conversion is missing.

opw-2200500

closes odoo/odoo#45861

X-original-commit: 41f52aef54ddf9ab4cd0f23c1224c2d7581a1ede
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-20 16:57:31 +00:00
xmo-odoo 44aa17cc46 [REV] re-enable the multiple calls of initialize_sys_path
Some of the implicit side-effects got missed, namely that under some conditions
(e.g. using an odoo subcommand) `initialize_sys_path` can be called before the
config has been loaded at all, resulting in the first call not properly setting
up things, and one of the subsequent calls fixing things up.

Since this breaks workflows right now, quickly fix it, we'll re-investigate
how to fixup the entire thing in order to restrict & enforce a single call.

closes odoo/odoo#45844

X-original-commit: 6cb4c829e1559bcf836e4b573051760565b7d0c1
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-02-20 15:45:42 +00:00
Nicolas Martinelli 9b95bb7904 [FIX] stock: immediate transfer in multi-step
- Activate multi-step routes
- Set Incoming Shipments: Receive goods in input, then quality and then
  stock (3 steps)
- Create an Immediate Transfer from 'WH/Input' to 'WH/Quality Control'
- Add 2 products, set a quantity
- Validate

Two immediate transfers are created, one for each product, while a
single planned transfer is expected.

This is because the `default_immediate_transfer`i key is polluting the
context.

opw-2180556
opw-2197720

closes odoo/odoo#45843

X-original-commit: 74ad073fd66ca4ff345aaf37a7245a8b93808cb3
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-20 15:44:28 +00:00
Romain Derie 3d3e8f3187 [FIX] website_event_track: add space between icon and date
Line return will add a space between icon & text, as it is done for the one
just above and the one below.

closes odoo/odoo#45875

X-original-commit: c26db3344b1e62158c4a3aa0c457802ea2376c63
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2020-02-20 18:42:04 +00:00
Christophe Monniez 253d5341a4 [FIX] tests: remove memory limit for chrome headless
Since Chrome version 80, the V8 javascript engine is using an new
pointer compression feature [1]. This features tries to reserve more the
4GiB of memory. As a consequence, during HttpCase tests, odoo tries to
launch chrome headless in a subprocess but fails because of the
memory-limit-soft.

With this commit, the Chrome browser is spawned in a forked process
that removes the memory limit.

Also a new Chrome CLI switch is used to prevent crash reports to be sent
to google.

[1] https://v8.dev/blog/v8-release-80

closes odoo/odoo#45859

X-original-commit: 726d9c50720c2d3c9e617e998ed0dcd12272a271
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-02-20 16:53:33 +00:00
Christophe Monniez 426fc163ba [FIX] tests: avoid confusing traceback at browser start
During an HttpCase, when the Chrome browser starts, it may happens that
the websocket is unreachable. In such a case, the stop method is called
and tries to stop the browser gracefully by sending a `Browser.close`
through the websocket ... which is not reachable.

The result is a confusing traceback. With this commit, nothing is sent
is the websocket is not available.

Moreover, the `sigxcpu_handler` attribute is used in the stop method but
not yet declared. Fixed by moving it before calling the _chrome_start
method.

X-original-commit: 0d156fd3bc114b40680ca5aa0456e0f21a5b8cff
2020-02-20 16:53:33 +00:00
alt-odoo 54e1a69b09 [FIX] point_of_sale: allow deletion of contact to any user
Before this fix, if the user has no PoS access rights, he cannot delete a contact
due to a check done on open PoS sessions.

closes odoo/odoo#45868

X-original-commit: f7b83cfc41045e1cc81d2e1c5540ac105f333a61
Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
2020-02-20 17:40:10 +00:00
Romeo Fragomeli 49c46b0bb4 [FIX] mail: activity popup is outside the screen
Before this commit, the popup activity in kanban was rendered using
the position of the button. So the left popup was nearly in the center
of the screen but the width is too large to be contained on the screen.

After this commit, in mobile, the popup activity in kanban will be
placed on the left of the button to avoid to go outside of the viewport.

Steps to reproduce:
* Go to sale app (in mobile)
* Click on the activity button of a kanban card (clock icon) BUG

Task ID: 2198429

closes odoo/odoo#45860

X-original-commit: 392c8a57df798d92b8be73d743b690891cf2fda2
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2020-02-20 16:56:13 +00:00
Aurélien Warnon aaa7cfa535 [FIX] survey: only show attendees ranking when relevant
The computed field 'session_show_ranking' was only computed based on the fact
that the survey had a scoring mechanism.

It's not very accurate since we also need a question that saves as the attendee
nickname to be able to display a relevant ranking chart.

This commit fixes the compute method by adding the necessary condition.

Task ID 2188482

closes odoo/odoo#45852

X-original-commit: 86ca11517d3872b2bf3cf89eda513a3bc8c84292
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
2020-02-20 16:20:49 +00:00
Arnaud Baes caa09423e0 [FIX] sale: Fields in debug mode only.
`require_signature`and `require_payment` were visible in
debug-mode only for seemingly no reasons, making our
sales team having difficulties with our customers payments.

Issue introduced by TaskID #2033229.

closes odoo/odoo#45842

X-original-commit: dffba03715aba7da3c372f61645720a6e122ad74
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-02-20 15:35:10 +00:00