Commit Graph
134311 Commits
Author SHA1 Message Date
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
Cocographique 266446284e [FIX] website: fix default indicators carousel style
Part of https://github.com/odoo/odoo/pull/46773
task-2191381
2020-03-03 16:00:04 +00:00
Samuel Degueldre 56cddd70d1 [FIX] web_editor: stop snippet editors from finding widget in parent
Because of the event propagating to an option's parent, a snippet option
requesting a uservalue widget would also get back the corresponding
widgets on the parent snippetEditor, this has the potential to cause
unforeseen problems. This commit fixes that by stopping the event's
propagation.

closes odoo/odoo#46724

X-original-commit: 1441b3c2f4f935771b3210be82f7b471aa028b64
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-03-03 11:28:16 +00:00
David Beguin a37a82cbcd [IMP] website: remove dead code in visitor management
This commit cleans visitor's code:
  * remove 'response' parameter that is not used anymore
    in _handle_website_page_visit method.
  * remove 'website_track_values' parameter that was not set anywhere anymore
    in the _create_visitor method.

Task ID: 2205541
PR #46339

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-03-03 16:38:48 +00:00
Goffin Simon 51257d64bf [FIX] mrp: Unbuilding MO
Steps to reproduce the bug:

- Create a MO
- Click on 'MARK AS TODO'
- Update the quantity to produce
- Produce the MO and click on 'MARK AS DONE'
- Unbuild the MO

Bug:

A traceback was raised because finished_move was not a singleton.

opw:2199529

closes odoo/odoo#46765

X-original-commit: a48573f3089bf78892f90df1dc883a257d047312
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-03-03 14:49:19 +00:00
Toufik Ben Jaa ac32c3ea6c [FIX] models: crash on one2many fields without inverse
- In some cases One2many fields defined as computed without
    inverse field defined could cause crashes if it is used
    in a search.

    This should not be done, but shouldn't crash either.
    With this fix, trying to search on one of this fields
    would just print a warning.

closes odoo/odoo#46742

X-original-commit: 4b4f1623590f2e872c565e8e56002bc3f5bf9efe
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2020-03-03 12:19:10 +00:00
Nicolas Martinelli ed3f448e68 [FIX] purchase_stock: deliver qui with different UoM
- Create a product A with UoM set to 'Units(s)'
- Create a product B with UoM set to 'Liter(s)'
- Create a BOM of type kit, 2 Liters of B to create 1 Unit of A
- Create a PO with A, validate
- Validate the corresponding picking

An error is raised since we try to compute the quantity received in
Units based on a quantity in Liters.

In case of a kit BOM, an override exists in `purchase_mrp` to compute
correctly the quantity. Therefore, we can skip the line.

Corresponding fix for SO: 47959438b6

Closes #45871
opw-2205970

closes odoo/odoo#46748

X-original-commit: 2ad4621c03a1885f2bb210960ebe8b5ae277e439
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-03-03 13:05:32 +00:00
Andrea Grazioso (agr-odoo) 071b00f6a1 [FIX] product_margin: exclude accounting line from calculation
Install account_accountant,stock,purchase,sale_management
Activate 'Margin Analysis' in Accounting settings

Create a new product (on the category set FIFO and Automated Inventory
Valuation). Set $100 for the price and $60 for the cost,
update 2 quantity on hand.

Receive 1 more product via PO ($70 as the cost), and deliver 1 via
SO. With 2 quantity left (inventory value is $135 for 1 $60 and 1
$75) open Accounting>Reporting>Product Margins

The Avg. Sale Unit Price and #Invoiced in Sale are incorrect,
we only sold 1 item so far, but the report display 3.

This occur because accounting lines are kept into the calculation of the
sale line. Using 'exclude_from_invoice_tab' to filter out such lines fix the issue.

opw-2196625

closes odoo/odoo#46741

X-original-commit: 5f28d1865aa6b4e204e052bf43ecfbfe7d45252b
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-03-03 12:18:51 +00:00
Florent de Labarre cce4730e59 [FIX] stock: use same picking_type_id
closes odoo/odoo#46715

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-03-03 10:40:51 +00:00
Rémy Baranx (bar) 4f805e2af1 [FIX]: hr_timesheet: allow_timesheet_timer wrongly set at project creation
The 'allow_timesheet_timer' field should not have a default value as it is
computed according to the 'allow_timesheets' field value.

Some tests have been added to check the coherency between 'allow_timesheets'
and 'allow_timesheet_timer' fields, at project creation and update.

closes odoo/odoo#46692

Taskid: 2206820
Related: odoo/enterprise#8923
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-03 12:37:27 +00:00
Lucas Lefèvre b7d1db596b [FIX] web: Call on_attach_callback on systray widgets
Currently, the method `on_attach_callback` is never called on any Widget in the
systray.

Calling `on_attach_callback` is required if any systray widget uses an OWL
component via the ComponentWrapper. Without the callback, the component is never
considered mounted to the DOM and no event handler is triggered.

closes odoo/odoo#46566

Related: odoo/enterprise#8887
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-03-03 11:01:03 +00:00
qdp-odoo 4f602d31b4 [FIX] l10n_be: CoA fix (accounts 446000 => 460000 and 461000)
- Remove the deprecated 446000 Acomptes reçus account
 - Create a new account 461000 Acomptes reçus (Current Liabilities)
 - Create a new acompte 460000 Acomptes à recevoir (Current Liabilities)

Was task 2205560.

closes odoo/odoo#46714

X-original-commit: 8d6c5c9a2b576b67692ac1d6970d7711f9695c79
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-03-03 10:42:29 +00:00
Andrea Grazioso (agr-odoo) 50e14c0542 [FIX] l10n_it_edi: fix xml namespace when importing
When importing vendor bills it may appen that xml are rejected with a
TypeError traceback (TypeError: empty namespace prefix is not supported
in XPath) because the namespace parsed from the file is
something similar to

{
None: 'http://ivaservizi.agenziaentrate.gov.it/docs/xsd/fatture/v1.2',
'xsd': 'http://www.w3.org/2001/XMLSchema',
'xsi':'http://www.w3.org/2001/XMLSchema-instance'
}

which create an issue on xpath when the key None is detected.
Avoiding writing explicitly the namespace to avoid the null key
fix the issue. Other solution would require fixing the namespace
parsing directly in the library.

opw-2198541

closes odoo/odoo#46702

X-original-commit: 04009a8562e38e92f3dbdb38bd2761e75174bf3a
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-03-03 09:32:23 +00:00
fja-odoo 3959f30d73 [FIX] website_form,*: fix d-none field no options
* = website_hr_recruitment

The hidden fields containing form infos have options activated on them
because of the class s_website_form_field. When a saved snippet is
dropped the snippet editor tries to activate them. They should not have
any options.

closes odoo/odoo#46660

X-original-commit: 14d2283e739282f82828e0ba3792f9f1126d0033
Related: odoo/enterprise#8956
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-03-02 15:18:29 +00:00
Jinal Patel b657463d56 [IMP] event_sale: make product_uom readonly on so lines
Specifications
--------------

Updating the uom of Sales Order Lines related to an event (selling event
tickets) should be avoided because it doesn't have any sense and wouldn't
work correctly if changed.

Note: As the product_uom field is already readonly according to the SO state,
introduce a new field on the 'sale' application to handle the different
behaviors server side instead of multiplicating the view overrides.

task-2178371
Closes #44818

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-03 09:33:46 +00:00
jerome hanke (jhk) a1e87bbf23 [FIX] mail_bot: odoobot waits 1 week between notification requests
Steps to reproduce:
- install mail_bot
- wait for odoobot to ask you if you want to receive notifications
- do not select "grant" or "deny", click the closing cross

Previous behavior:
Odoobot would consider that you denied the request

Current behavior:
Odoobot waits 1 week and will ask you again

opw-2186299

closes odoo/odoo#46697

X-original-commit: b7254ecaeee7f8fa564ca2059f119f5d12404af6
Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
2020-03-03 09:01:21 +00:00
Thibault Francois 49fc39b202 [FIX] crm: get pls probabilities with sudo
Portal user that have opportunities in their portal
may change the stage of the opportunity
Changing the stage on the portal trigger
direcly the method write.

With the pls, write on the stage
trigger the recompute of the probabilities
that read on crm.lead.scoring.frequency
which portal user don't have acess

closes odoo/odoo#46551

Solution: compute probabilities in sudo mode
X-original-commit: 9cd7fe0ff3ce07618635b4d13ca564bd2f326980
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-02-28 12:22:03 +00:00
Rémy Voet (ryv) ef863e812b [REM] delivery: remove unused field/method
- The volume field of stock.picking extended in delivery was unused,
-> remove it.
- The commit 2ff3749064, add
the 'check_packages_are_identical', which is never used.
- Remove useless variable 'res' of print_return_label in stock_picking

task-2201168

closes odoo/odoo#46516

Related: odoo/upgrade#866
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-02-28 09:23:58 +00:00
Swapnesh Shah 36cec45f43 [IMP] auth_oauth: use sequence field for ordering
A sequence field is present in the model but was not used.
After this commit, the field is used as sorting criteria. This allows to sort providers on the login page.

closes odoo/odoo#43968

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-03-02 17:13:33 +00:00
Swapnesh Shah 4867c64ae3 [IMP] auth_oauth: Add missing field in form
Field `css_class` was not added on Views.
In this commit, we add this field on form view.
2020-03-02 16:52:09 +00:00
Adrien Dieudonne 464968de36 [FIX] account, hr_expense: amounts on multiple lines in the dashboard
Before this commit, the amount currency could be wrapped on a
second line (on mobile).

To fix this, we had to find a way to have more space:
- Buttons are now displayed at the top (mobile only).
- Amounts can grow (col-auto) and the other column will take the
  space left (col) and add "..." when there is not enough space.
  (mobile + desktop)

We also had to remove a button from a div tag in order to display
the buttons next to each other on mobile (buttons are "inline-block"
but div is a "block").
The main flow tour has been adapted accordingly and the typo has
been fixed too...

closes odoo/odoo#46680

Task-id: 2184243
X-original-commit: 159e3d4cb8a301c908f7718a56138528033e75d4
Related: odoo/enterprise#8963
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2020-03-03 08:09:49 +00:00
Humberto Arocha 39c4d122a2 [FIX] account: extract code into method to allow changing the date of the tax
Before this commit, when two lines belonging to a period that is already
closed a cash basis entry is created at the present date. There are
localizations that could not allow creating the cash basis entry in a
date other than the maximum between the Journal Items being reconciled.

Now, the localizations are able to override and chose the date without
having to override the whole 'create_tax_cash_basis_entry' method.

opw-2195016

closes odoo/odoo#46661

X-original-commit: 2d3ab28c22c8ad5f9ed379e6b49697822e01a002
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2020-03-02 15:19:04 +00:00
Lois Rilo 0e11d7383c [IMP] purchase_stock: enhance extensibility of _run_buy method by
allowing to force the vendor to be used in the procurement batch.

This does not change any default behavior.

closes odoo/odoo#46678

X-original-commit: 8bff35182c38522bbd6fc218956fe0f8fe99eca4
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-03-02 19:34:15 +00:00