Commit Graph
134333 Commits
Author SHA1 Message Date
Pierre Paridans 5d88e164bc [FIX] mail: chatter has horizontal scroll on medium screen sizes
A horizontal scroll appears on medium to large screen sizes in the
form's chatter sidebar (e.g. between 1534px and 1619px, when all modules
are installed).

This commit restores the padding set by Bootstrap for `.nav-link`
elements instead of a fraction of the grid gutter's (?) width then
applying slightly smaller padding.

Task ID: 2193950

X-original-commit: 7bc8b577d822b057d1bccf881b9c4b1ee127a728
2020-03-05 11:39:59 +00:00
Cocographique 43800cb046 [FIX] website: update path to author default image in blockquote snippet
task-2209946

closes odoo/odoo#46959

X-original-commit: a248391008caa8a0f04dcd2bc027fc8f0b7b0945
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-03-05 11:40:41 +00:00
Siddarth Gajjar 6a56b6c47b [IMP] crm: remove custom css on form view
Purpose of this commit is to get rid of custom css code and file and use
standard bootstrap classes.

TaskID 2182610
Closes #45472

closes odoo/odoo#46948

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-05 10:42:43 +00:00
Pierre Masereel b10841acbe [FIX] delivery: access rights when computing price rules
When a picking is validated with the delivery prices based on rules, you
can face an error, if you are not inventory manager or sales manager.

First, because you don't have access rights to see the sales orders used
to compute the price.

And then you don't don't have access rights on the delivery.price.rule
object to apply the formulas.

As the computation of the price of a delivery should not depends on
access rights other than the ones that let the user validate the
picking, as 'sudo' is called.

OPW-2209148

closes odoo/odoo#46947

X-original-commit: b68139bf2fec8fd2a79e1a578d126f260891c4f6
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-03-05 09:57:32 +00:00
Nicolas Martinelli 2e02be7404 [FIX] l10n_fr_pos_cert: decrease quantity
In a French configuration, the decimal separator is a comma.
Unfortunately, `parseFloat` doesn't handle this case and incorrectly
parses the string.

Similar issue and correction than
https://github.com/odoo/enterprise/commit/af8177612e569907bcb8fe4b9ce2d845de5ab2a0

opw-2207795

closes odoo/odoo#46945

X-original-commit: 3d87d79ecec92cafd7f964712ad0014add5cbb6a
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-03-05 09:49:15 +00:00
Harpritsinh Sisodiya d061852a97 [FIX] web: autocomplete dropdown: style of selected item
Before this commit, in the website, the background of the
highlighted item in an autocomplete dropdown didn't take full
width. Now it does.

closes odoo/odoo#46924

Task: 2066536
Closes: #36997
X-original-commit: e184e971790c0045b58db6ae588b1d1b14d3154c
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-03-04 16:44:06 +00:00
Adrian Torres 26680badef [FIX] base: handle custom non-stored m2m
Before this commit, one could create a custom, non-stored m2m field
through the web interface BUT the deletion of the custom field would be
impossible after saving the form.

This is due to the fact that the relation would not be stored in DB
since the field is store=False, therefore the value of the relation
would equal to None, and since the unlinking mechanism assumes that
the value is never None, it tries to drop a table of name None, which
does not exist.

closes odoo/odoo#46909

X-original-commit: cdd1439a380810569db80d984c8cb80d213b1bf3
Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
2020-03-04 15:39:18 +00:00
Goffin Simon babf9e4f2c [FIX] account: Reference of invoices in payment receipt
Steps to reproduce the bug:

- Let's consider a supplier S
- Create two vendor bills for S B1 and B2
- B1 with the vendor reference R1
- B2 with the vendor reference R2
- Register a payment P for B1 and B2
- Print the payment receipt of P

Bug:

The reference of each vendor bill didn't appear in the payment receipt

opw:2190086

closes odoo/odoo#46360

X-original-commit: 068bc8b22b14c5a9756a19aed2f28a786265ad67
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-02-26 15:06:10 +00:00
Mohammed Shekha a4a4ad1a39 [IMP] web: trim many2one search terms
This commit trims leading and trailing spaces in search terms of
many2one.

task-2187414

closes odoo/odoo#45282

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-03-04 14:46:18 +00:00
Krupal Oza 6f1ec915cf [FIX] crm: fix demo data
Purpose: Replace user's role by partner in the chatter of lead.

Currently the discussion in the chatter of the lead is incorrect as both
are users.The message is sent by user to demo user instead of partner.

This commit fixes the behavior by setting the author of mail message to
partner instead of user and if there is no partner selected then the message
is sent by the contact email.

Task 2180228

closes odoo/odoo#44253

Closes: https://github.com/odoo/odoo/pull/44253
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-04 12:31:06 +00:00
Xavier Morel be82b0516a [FIX] base_setup: test checking config links
The tag "nightly" is not an actual thing, so the test gets run all the
time, and since the taxcloud page has been moved it now breaks.

Replace by the proper tag.

closes odoo/odoo#46938

Related: odoo/enterprise#9019
2020-03-05 09:12:44 +00:00
Lucas Perais (lpe) 8c8f328e29 [FIX] orm: fields x2m are not sortable
Before this commit, x2m fields were described as 'sortable'
This was odd since:
- When actually sorting on one of those fields through the webclient
the sorting was gibbrish
- Even the orm silently warned in the log that
the field was not a sql column and therefore was not sortable

After this commit, only a field which is column (and a few other conditions)
can be sorted

Task 1863492

closes odoo/odoo#46921

X-original-commit: dd3094378fc322447d1aef994f6bace3f0c24288
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2020-03-04 16:26:07 +00:00
Thibault Francois 92bd23746b [FIX] account: allow to reconcile batch payment
For the moment it's not possible to reconcile batch payment in multicurrency set up
 because the reconciliation trigger _compute_amount for all entry
 recompute_amout trigger _inverse_amount_total that will
 write on protected field such as debit, credit

 1° when the currency is not same as company currency because the
    convertion was done from currency_id to currency_id and not currency_id
    to company_currency_id

 2° even when the correction is correct you may have data that lead to
    different rate at the computation then when the move was originially
    computed
 3° when you have float representation issue because != is use to
    compare float

Solution:
  Fix _inverse_amount_total
  In Trigger the compute_amount only for invoice
  and since the method _inverse_amount_total try to change the amount
  only for entry with 2 lines the method will be never trigger during
  reconcilation.

closes odoo/odoo#46886

X-original-commit: 5bd659fb16a44d1bc593cf932445e2cc628e12a8
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-03-04 14:56:10 +00:00
Laurent Smet 6282e45462 [FIX] account: Fix onchange_currency triggered for COGS (anglo-saxon)
When creating a new invoice, the date is not set by default. This date is set when posting it.
Otherwise, since the date changed, we need to trigger onchange_currency to manage the new
conversion rate at the new date set. Otherwise:
1) anglo-saxon lines never have a foreign currency.
2) it will recompute the balance based on the subtotal. Using a FIFO method, the
price_unit is computed as an average and, in our case, the price_unit should be
9.33333333 x 6 = 56. Then, at the creation of the invoice, balance=56 and
price_unit is rounded by the orm to 9.33. When posting the invoice, since onchange_currency
is triggered after setting the invoice date, the balance is recomputed as 9.33 * 6 = 55.98.

github issue: 46615

closes odoo/odoo#46917

Co-author: sle-odoo (sle@odoo.com)
X-original-commit: 19251c684119a537111126d15374e3d0b6e040b3
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-03-04 16:08:19 +00:00
Thibault Delavallée 4501e3081d [FIX] hr_expense: set expense_extract_show_ocr_option_selection as not required
Adding required fields on company model is annoying for tests. Indeed multi
company tests may run during module installation, notably in CRM. Those tests
generally require to create a new company which is not possible if the column
is required but module not already loaded in registry. This is the case
if for example hr_expense is installed and updating CRM.

When possible, avoid required fields on a such used model as company. In this
case we can easily consider a void value as 'no_send'.

In this commit we simply make the field not required in database but set
a required on the view itself to avoid confusion. That way behavior is still
the same, existing databases are left untouched as all keys still exist
and running tests is smoother.

LINKS

Follow up of odoo/odoo@4eeeb4f172 and odoo/enterprise@be3cfc3bab
and odoo/enterprise@227da38f9a .

Task ID 2207180
Community PR odoo/odoo#46601
Enterprise PR odoo/enterprise#8903

closes odoo/odoo#46889

X-original-commit: 1c289d8692e0cdff25b08988994820af655cb289
Related: odoo/enterprise#9013
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-04 13:47:45 +00:00
Samuel Degueldre 4e14151465 [FIX] web_editor: stop media-dialog from loading all db attachments
Before this commit, the media-dialog was reading all attachments that
matched certain criteria for each tab. On large databases, this results
in the search_read call timing out, preventing the media-dialog from
opening and making all images and documents un-editable.

One unfortunate consequence of this is that we can no longer use the
firstFilter and lastFilter features, as those rely on fetching all
records and sorting them client-side, as such, this feature has been
removed entirely.

task-2198527
closes https://github.com/odoo/odoo/issues/43113

closes odoo/odoo#46895

X-original-commit: 1e91a89b78ff6019c6120c73ea1eab09b3d58d2f
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-03-04 14:31:06 +00:00
Jeremy Kersten 67868583ac [FIX] web_editor: avoid traceback on error
Revert of old editor (35b6182) has reintroduce code invalid.
Now the data is wrapped in message (f8fe314e7)

Remove guarded that raise a warning, it is the default behavior now.

closes odoo/odoo#46870

X-original-commit: 9d3a2903fd7bf946c033ec78e959e3ed86754845
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-03-04 12:34:31 +00:00
Rémi Rahir 9f2b2ed130 [FIX] partner_autocomplete: image.mixin on partner form
The m2o widget did not provide the correct default context key.

closes odoo/odoo#46888

X-original-commit: d59ebe634f3d9f89d493ca38418513bea24f3ba9
Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2020-03-04 13:25:14 +00:00
Paul Morelle 35a7d113af [FIX] base_iban: fix display of IBAN validation
Before this commit, the IBAN number was showing behind the X or V of the
validator.

This commit adds a class on the input when the validator is added, so
that a padding is set on it. The result is that the IBAN text doesn't
show behind the validator any more, once it has been displayed.

closes odoo/odoo#46859

X-original-commit: 0b2c40dbe0df2802b6a1d2969b4e6651a750f928
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2020-03-04 11:26:00 +00:00
Goffin Simon 2fcff8dee1 [FIX] base: China Layout in Reports
Format taken from: https://en.wikipedia.org/wiki/Address#China

opw:2206707

closes odoo/odoo#46847

X-original-commit: 89d29ac8c1201bb4d4213d054f43ad563ea9367e
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-03-04 10:39:36 +00:00
Aaron Bohy 1af097db51 [IMP] web: display CompanySwitcher next to UserMenu
Task 2186309

closes odoo/odoo#45169

Related: odoo/enterprise#8376
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-03-04 09:56:40 +00:00
Aaron Bohy f159608e02 [IMP] web: remove caret from systray items
The UserMenu and CompanySwitcher still had a caret, whereas all
other items don't. For the sake of consistency, this commit
removes the caret for every items.

Task 2186309
2020-03-04 09:55:04 +00:00
Kaushalya Mandaliya 97cd3c98cd [FIX] web: list: set proper width for the handle widget
Before this commit, when creating the first record in an editable
list (displaying no content helper), the width of the handle widget
cell was correct while the row was in edition, but it was reset to
0 as soon as the record was saved.

There are two places where this issue occurred: Journal Groups
(Accounting) and Ticket Type (Helpdesk).

After this commit, proper width will be set for the handle widget
in the editable listview on the first record creation.

task-2166338

closes odoo/odoo#46846

X-original-commit: 28b06e78b4940d3b6feb23c77c7de3441a50c0dc
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-03-04 10:37:25 +00:00
Ankita Raval 65513ef3f9 [IMP] mrp: mrp_document
Purpose:
Modernizes and facilitates files upload in manufacturing app.

In this Commit:
  - Show the image in Kanban.
  - Allow to access a preview of the file when clicking on it in the
    Kanban view.
  - Add a 'Edit', 'Delete' and 'Download' in kanban card dropdown menu.
  - Add Upload button in control panel to upload document which will
    create new record of `mrp.document` and also add a testcase for it.

task-1960733

closes odoo/odoo#42168

Related: odoo/enterprise#8977
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-03-04 10:12:46 +00:00
William Henrotin a56a4f8aee [MOV] tools: put _neuter_mimetype from Document app
This method will be used later in other module(s) than Document.

Task : 1960733
2020-03-04 10:12:04 +00:00
jvm-odoo 024010bbe1 [FIX] website_form: fix wrong user sending website forms
Issue
	- Set outgoing mail server
	- Install Online Ticket Submission
	- Publish an Helpdesk Team
	- Log out
	- Create a ticket from the helpdesk form

	The user who created the ticket is "Public User"
	He has no email address, so the mail is not sent

Cause

	insert_record method in website_form/main.py uses .sudo()
	In v12 => sudo replaces the user in env by the superuser => ok
	In v13 => sudo adds a flag "su" and does not replace the user in env

Solution

	Add a with_user(SUPERUSER_ID) to the create method's call in
	insert_record

OPW-2196668

closes odoo/odoo#46835

X-original-commit: 761ae16634b14bec7be522666bb2163490566ecc
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-03-04 09:53:50 +00:00
Kaushalya Mandaliya 617e53229e [IMP] web: avoid control panel height flickering
Before this commit, control panel height flickered when the
bottom bar only contained the pager (no view switcher and no
action buttons): when the user added a filter matched by no
record, the pager disappeared and the bottom bar height went from
35px to 30px.

To reproduce the issue, go to Data Cleaning (have some data), and
add a filter.

This commit reworks a bit the control panel layout such that the
bottom bar always keeps the same height.

task-2178933

closes odoo/odoo#46117

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-03-04 09:40:29 +00:00
Goffin Simon 279f4da88d [FIX] sale: Create invoices in multi companies
Steps to reproduce the bug:

- Let's consider two companies A and B
- Let's consider a user U logged in A and with A and B in company_ids
- Let's consider SO1 in A and SO2 in B for the same partner P
- Go to the sale order list view and select SO1 and SO2
- In action select 'Invoice orders'
- Create the invoices

Bug:

One invoice in A was created for the two sale orders instead of two.
One for each company.

opw:2199315

closes odoo/odoo#46787

X-original-commit: eac547c7cac3e1a9fb1bb8934a1e801522a9d498
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-03-03 16:30:54 +00:00
Nisha patel e4130ddd97 [FIX] hr_holidays: Fix time off calendar meetings
closes odoo/odoo#46762

Taskid: 2167996
Closes: #45292
X-original-commit: 163574641f7470f6bdc40e8aeafd055169305fb6
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-03 14:35:04 +00:00
Nicolas Martinelli bc836bac32 [FIX] account: default group_id
- Set a product category to automated
- Create an Analytic Default for a product with the automated category
- Create an SO with said product.
- Confirm SO and try to validate the delivery order

Get an error (Model Analytic Line (account.analytic.line), Restriction: account_analytic_line_group_id_fkey)

opw-2204771

closes odoo/odoo#46795

X-original-commit: 6cdbc8c43afb560ee4fa1c9486aba0d919b8ed51
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-03-03 17:14:27 +00:00
jvm-odoo bb1fa25615 [FIX] mail: fix activity notification language
Issue

	- Install CRM, Discuss
	- Have 2 languages (e.g. french english)
	- User 1 > French
	- User 2 > English
	- Create an activity as user 1 for user 2
	- As user 2, check discuss > history

	Notification received in french

Cause

	mail_activity action_notify method uses
	the context language which is the active
	user language.

Solution

	If user 2 has a language set, use this
	language for translating body template (self)
	and activity type (activity)

OPW-2205409

closes odoo/odoo#46800

X-original-commit: ccfe573b4eee82de92d130addb745f68b3fd3bd9
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-03-03 17:53:33 +00:00
Victor Feyens d490a33157 [IMP] repair: strict model consistency
* Repair lines should have a repair order
* Repair fees and lines companies should be related to the order 
company.

closes odoo/odoo#46774

Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-03-03 15:42:50 +00:00
Victor Feyens bb285b47e1 [FIX] repair: missing digits on price_unit
closes odoo/odoo#46806

X-original-commit: e876af720ca985d49f27538163f974875488dd94
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-03-03 19:09:14 +00:00
Victor Feyens 0fd9b80d39 [FIX] product: cost_currency_id is company_dependent
X-original-commit: 0455ff88cb7c9211327b31866be54840730336dc
2020-03-03 19:09:13 +00:00
Paul Morelle 56d714ec94 [FIX] auth_signup: fix layout of reset password form
Since 12.0, the links on the login forms are no longer next to the
main button, but under it.

This commit reflects this change in the reset password form, which has
not been updated yet.

closes odoo/odoo#46798

X-original-commit: b71bf59d417983000592a226025637ee250c2bb8
Signed-off-by: Paul Morelle <madprog@users.noreply.github.com>
2020-03-03 17:29:47 +00:00
Thibault Delavallée 48d884678c [FIX] mail: route only to other models when routing a forward
When mailgateway receives an incoming email being a reply to a thread but
containing a recipient being an alias linked to another model, it is
considered as a forward to that new alias. It therefore skips the reply
step in routing and applies rules related to new thread, aka checking
all recipients.

Consider this use case: receives a email on a task from "project@domain"
project being the alias of the project which creates new tasks when not
routing replies. Reply / forward it to "project@domain, sales@domain" in
order to transfer it to the sales team (sales alias creates new leads).
As this is a forward, both aliases are evaluated, leading to a new task and a
lead which is not what we expect.

We solve this issue by removing alias linked to the ignored reply model
when considering recipients.

PR #46764
Task ID 2121551

closes odoo/odoo#46784

X-original-commit: 7cff7787cb42cc9d3d0cb4c5af41a9f09d59d1ff
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-03 16:25:01 +00:00
Thibault Delavallée 68a457e174 [FW][FIX] mail: correctly check all recipients when routing on aliases
/!\ This commit is a manual forward-port of two PR targetting originally
11.0: #40442 and its fix / partial revert #41042. /!\

Purpose of this commit is to check all recipients of incoming emails when
trying to determine the route to apply. Notably

  * an incoming email should be considered as a write to catchall only if all
    recipients are catchall. Catchall + a valid alias should take the alias
    into account;
  * an incoming email sent to the bounce alias should be considered as a bounce
    even if another valid alias is in recipients and whatever the order. Indeed
    it indicates an issue and bounce is considered as more important;
  * forward to an alias linked to another model should check all recipients
    and not only the first one. Otherwise reply_alias, forward_alias is
    considered as a reply whereas it should be considered as a forward when
    considering all recipients;

Tests are added according to those specifications.

Please see original PRs for more details about the content, the comments
done on it and the various discussions.

PR #46764
Task ID 2121551

X-original-commit: df00bd2d3bddf9a2b56e8554380669025e146d21
2020-03-03 16:25:00 +00:00
Cocographique 1380bd9123 [IMP] website: clean styles of Company team snippet
Part of https://github.com/odoo/odoo/pull/46773
task-2191381

closes odoo/odoo#46773

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-03-03 16:12:23 +00:00
Cocographique 9800c89913 [IMP] website: improve images and layout of References snippet
Part of https://github.com/odoo/odoo/pull/46773
task-2191381
2020-03-03 16:12:23 +00:00
qsm-odooandCocographique 219b29c4e2 [IMP] website: improve edition of Showcase snippet
Also no more scss required for the snippet.

Part of https://github.com/odoo/odoo/pull/46773
task-2191381

Co-authored-by: Cocographique <nmi@odoo.com>
2020-03-03 16:12:23 +00:00
Cocographique f8cafbea87 [IMP] website: add extra space between text and image in Picture snippet
Part of https://github.com/odoo/odoo/pull/46773
task-2191381
2020-03-03 16:00:05 +00:00
Cocographique dfd993cae6 [IMP] website: add spacing to Countdown snippet
Part of https://github.com/odoo/odoo/pull/46773
task-2191381
2020-03-03 16:00:05 +00:00
Cocographique 45aa1ad1ac [IMP] website: remove main title of Masonry block snippet
Part of https://github.com/odoo/odoo/pull/46773
task-2191381
2020-03-03 16:00:05 +00:00
qsm-odoo d3f75a0569 [IMP] website: simplify Product Catalog snippet
Part of https://github.com/odoo/odoo/pull/46773
task-2191381
2020-03-03 16:00:05 +00:00
Cocographique 26a30d366e [IMP] website: set half screen by default for parallax snippet
Part of https://github.com/odoo/odoo/pull/46773
task-2191381
2020-03-03 16:00:05 +00:00
Cocographique 5096064018 [IMP] website: remove titles colors used in snippets
Part of https://github.com/odoo/odoo/pull/46773
task-2191381
2020-03-03 16:00:05 +00:00
Cocographique dcddcdf761 [IMP] website: change button classes to be more standard in snippets
Part of https://github.com/odoo/odoo/pull/46773
task-2191381
2020-03-03 16:00:05 +00:00
Cocographique fe3e24ea68 [IMP] website: make images replaceable in themes in 3-col snippet
Part of https://github.com/odoo/odoo/pull/46773
task-2191381
2020-03-03 16:00:04 +00:00
Cocographique 518db3a886 [IMP] website: remove button specific style in Image-Text snippet
Part of https://github.com/odoo/odoo/pull/46773
task-2191381
2020-03-03 16:00:04 +00:00
Cocographique 0730d4793a [IMP] website: adapt layout and styles of Text Highlight snippet
Part of https://github.com/odoo/odoo/pull/46773
task-2191381
2020-03-03 16:00:04 +00:00