Commit Graph
136359 Commits
Author SHA1 Message Date
yhu-odoo 85f3c08039 [IMP] purchase: set scheduled date to the last minute of that day
When set scheduled date on PO line, set it to be the last minute of
that day to correctly decide the late of the receipt.

Task 2265912
PR #52693

Related: odoo/enterprise#11034
Related: odoo/upgrade#1323
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-06-09 14:22:51 +00:00
yhu-odoo f48aad5944 [IMP] purchase: add reminder mail tests
Test the reminder mail can be correctly send.

Task 2265912
PR #52693
2020-06-09 13:59:27 +00:00
Fabien Pinckaers ccfc54113d [IMP] purchase: Improve reminder mail usability
Some change to imporve reminder mail usability:

1. Scheduled date on POL of the PO form now is always editable.
2. Improve tooltip for the reminder email
3. don't show number of days when reminder email not checked on
   both PO and partner form.
4. only show "confirm receipt date" button in debug model
5. In the mail, format date by partner.lang
6. Add button to send preview reminder mail
7. On default, receipt_reminder_email on res.partner is False
8. merge expected_date with date_planned (done by FP)

Task 2265912
PR #52693
2020-06-09 13:59:10 +00:00
yhu-odoo d3d0fd7c59 [IMP] purchase_stock: improve usability of on-time delivery rate
Change how we show on-time delivery rate on the purchase form to
imporve usability.

Task 2265912
PR #52693
2020-06-09 13:56:11 +00:00
Nicolas Martinelli aa8588e305 [FIX] point_of_sale: close session with accountg rights
- Create a user with only Point Of Sale User rights
- As this user, open a POS session, create a POS order
- Validate and Close the session

An `AccessError` is raised because the user has no Accounting access
rights.

A POS user should be allowed to close a POS session, as it was the case
in 12.0.

opw-2251699

closes odoo/odoo#52710

X-original-commit: bc3aec38a092c7117dd8de8f6c975cdfad04b05d
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-06-10 09:18:43 +00:00
Nicolas Martinelli e3b22264d8 [FIX] point_of_sale: mix of sale and refund
- Set rounding policy to 'Round Globally'
- Create a Tax T
  Amount: 21.0%
  Different tax tags for invoice and credit notes
  Set any account Repartition Line
  Advanced Options => Included in Price
- Create a Product P1
  Sales Price: 11.8
  Customer Taxes: T
- Create a Product P2
  Sales Price: 15.3
  Customer Taxes: T
- Create a new POS Session
- Create a POS order:
  P1, Quantity: -6, Discount: 5%
  P2, Quantity: 6, Discount: 5%
- Validate and close the session

A difference of 0.01 prevents from closing the session.

The error arises because the tax tags are different for an invoice and a
refund. In the following:
https://github.com/odoo/odoo/blob/1a9e147639012cc847099e69fc964f3669a36cbb/addons/point_of_sale/models/pos_session.py#L394

Both lines have different `tag_ids`, therefore their amount is not
summed when closing the session. On the other hand, the POS UI is not
aware of the `tag_ids`, so it sums then round the amounts.

The situation is quite unusual: from SO or Invoices, it is possible to
create either an invoice or a refund, but not a mixed object as the POS
is doing. Moreover, if a user invoices the POS order, there is no
problem to close the session since a regular invoice is created and tax
amounts are summed.

We consider a refund if all lines have negative quantities. We only do
it in 'Round Globally' configuration to avoid impacting non-problematic
use cases.

opw-2254211

closes odoo/odoo#52704

X-original-commit: 5f25be8eef9a9efc18a995f2c6405d08a657ac96
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-06-09 12:46:18 +00:00
Katherine Zaoral d1c38bbf0f [FIX] l10n_ar: Show proper message when trying to use a use_document journal when is not expected
We found an error by trying to post journals entries from an expense with a use_document journals.
Add new constraint that only let the user to create invoices in use documents journals, it can not create account.move of type entry

closes odoo/odoo#52690

X-original-commit: 82bbf3784e3bdf684eef25c53bf3235ebc2b7237
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-06-09 11:12:54 +00:00
Yannick Tivisse 0215a52252 [IMP] survey: Extract code to allow inheritance
closes odoo/odoo#52636

Taskid: 2186462
Related: odoo/enterprise#10951
Related: odoo/upgrade#1314
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-10 09:03:06 +00:00
Hiral Bhavsar d46610ccb2 [IMP] mail: few improvements on activity widget
PURPOSE

Display the activity type through the icon of the widget and change the place to
display to whom the activity is assigned (if it is not assigned to the current
user).

SPECIFICATION

Display the deadline with a prefix as responsible if the activity assigned to
another user than the current one (uid).
Add a new 'activity_type_icon' field to the mail mixin to get the 'icon' of the
type (fa-phone, fa-users, etc...) and for the list_activity widget, display it
as an icon instead of the default 'fa-clock-o' icon.

LINKS

PR https://github.com/odoo/odoo/pull/52252
Task-2267579

closes odoo/odoo#52252

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-06-10 05:23:34 +00:00
qsm-odoo bae8636124 [FIX] website: restore bg color compatibility for s_media_list
[1] removed the associated bg color of media list items as it was now
defined directly on the XML of the snippet. This was however enough to
break the style of old-db snippets. As the s_media_list snippet was just
refactored to need a 001 version, in the same Odoo version where the
mentioned bug was introduced, this commit can just restore the
background color associated for 000 versions.

[1]: https://github.com/odoo/odoo/commit/5953c4df6b9c08519f64a65c1cf5d5558d59f7d4#diff-62db7349afa5503cc8308e815d41db5dL10

closes odoo/odoo#49697

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-10 08:53:09 +00:00
Cocographique 6aeda4ed72 [FIX] website: correct linguistic errors in "Table of Content" snippet
Part of #49697
task-2210730
2020-06-10 08:35:39 +00:00
Cocographique 7523d0477f [IMP] website: clean "countdown" snippet end message
Part of #49697
task-2210730
2020-06-10 08:35:39 +00:00
Cocographique 2a21271d41 [IMP] website: shorten default text in "showcase" snippet
Part of #49697
task-2210730
2020-06-10 08:35:39 +00:00
Cocographique 6d3fba5913 [FIX] website: remove unnecessary line breaks in snippets
Part of #49697
task-2210730
2020-06-10 08:35:39 +00:00
Cocographique 642f497e52 [FIX] website: remove uneditable margin in "Carousel" snippet
Part of #49697
task-2210730
2020-06-10 08:35:39 +00:00
Cocographique 408678cd54 [IMP] website: improve images of "Media List" snippet
Part of #49697
task-2210730
2020-06-10 08:35:39 +00:00
Cocographiqueandqsm-odoo ba719b9589 [IMP] website: improve edition and options of "Media List" snippet
Part of #49697
task-2210730

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-06-10 08:35:39 +00:00
Cocographiqueandqsm-odoo c9477d820b [IMP] website: improve "Products catalog" snippet
Part of #49697
task-2210730

Co-authored-by: qsm-odoo <qsm@odoo.com>
2020-06-10 08:35:39 +00:00
Cocographique d6cdf19610 [IMP] website: improve spacing and alignment in "call to action" snippet
Part of #49697
task-2210730
2020-06-10 08:35:39 +00:00
Cocographique e042aff778 [FIX] website: remove unnecessary colors in "features grid" snippet
Part of #49697
task-2210730
2020-06-10 08:35:39 +00:00
Cocographique 75892e2b48 [FIX] website: correct linguistic errors in "company team" snippet
Part of #49697
task-2210730
2020-06-10 08:35:39 +00:00
Cocographique 4d7cf4db68 [FIX] website: correct linguistic errors in "features grid" snippet
Part of #49697
task-2210730
2020-06-10 08:35:39 +00:00
Cocographique 3b19d413ed [FIX] website: correct linguistic errors in "text block" snippet
Part of #49697
task-2210730
2020-06-10 08:35:38 +00:00
Nicolas Martinelli 6aebf5d359 [FIX] product: import pricelist
When importing a file to populate a pricelist applying to a product
category, it is necessary to add a leading space to ` Product Category`
name to match with `2_product_category`.

We can simply remove it.

opw-2271033

closes odoo/odoo#52722

X-original-commit: 11809ee1a12df6b967f03591adb6d11579e3e947
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-06-09 14:38:21 +00:00
Dhruv Patel 3288304f59 [IMP] web,*: make notification title optional
*odoo_referral,portal

Currently, it is not possible to have one line notification,
when you are not passing the title parameter as an option when
generating the notification,then it will display the blank div
with the default button icon only. so it is not possible to have
one-line notifications since the title is mandatory.

So the purpose of the task is to make the title optional, allowing
for more minimalistic notification.

Also removed some unnecessary titles from the notification and
some stying change.

This commit also increase the autoclose delay of non sticky
notifications, from 2.5s to 4s.

task : 2264749

closes odoo/odoo#52229

Related: odoo/enterprise#10981
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Dhruv Patel <dhp@odoo.com>
2020-06-10 08:36:05 +00:00
svs-odoo 6c44424cd9 [FIX] stock: wrong company_id domain
Commit 6c4447ef59 set a new domain on stock rule `company_id` but
it was wrongly written. This commit make it syntactically correct.

closes odoo/odoo#52743

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-06-09 15:47:22 +00:00
Goffin Simon 0ff961039c [FIX] auth_signup: Server Error when sending message on task with portal
- Let's consider a product P (invocing policy based on timesheet and creating new task)
- Create a quotation with the product P for a customer with portal access CPU
- Confirm it (A new task T is created)
- Go to T and add a follower (who is another portal user PU (third party)) in the task
  but uncheck the box to send him an email
- Connect to the portal with PU
- Go to T and send a message

Bug:

A server error was raised.

opw:2270074

closes odoo/odoo#52689

X-original-commit: 2a924b44f17f7e9574e2b0074d8ce8adb041c67e
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-06-09 11:09:21 +00:00
Jalpesh Patel 7aa7a5a6e3 [FIX] mrp: force empty context on manufacturing "deshboard"
Oversight of 47bb7ab3f5

Allow a seamless upgrade...

closes odoo/odoo#52732

X-original-commit: ff37268638b281207802473acf90f47c7b880ef2
Signed-off-by: Christophe Simonis <chs@odoo.com>
2020-06-09 15:52:38 +00:00
Cocographique 01f88d0d66 [FIX] website: adapt separator in "Carousel" snippet
Related to task-2210730

closes odoo/odoo#52717

X-original-commit: 8ece24f913becb03f8c3745fcf1e9d35e3abe427
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-09 15:11:01 +00:00
Benjamin Frantzen (bfr) b1d19c61b1 [FIX] tools.pdf: do not crash when PDF has no attachments
Depending on the PDF version and the presence of embedded files, the PDF
document catalog `trailer["/Root"]` may not have any Name Dictionary
`["/Names"]`, and the latter may not have any `EmbeddedFiles` entry.

In that case `getAttachments()` should return an empty list rather than
raising a `KeyError`.

closes odoo/odoo#52312

Ref: Section 7.7.2, 7.7.4 and 7.11.4 of [PDF 1.7 spec](https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/PDF32000_2008.pdf)
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2020-06-03 14:08:37 +00:00
qsm-odoo 42a424db20 [FIX] website: only open s_popup snippet once (outside of editor)
When the snippet was configured to be opened "on exit", it was opened
on every screen exit until the page was reloaded/left.

Part of https://github.com/odoo/odoo/pull/52663

closes odoo/odoo#52686

X-original-commit: e07a25c40dc48ff36150f5a10461d95a86e95804
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-09 10:52:27 +00:00
qsm-odoo 117552f097 [FIX] web_editor: properly cover modal snippets
When a snippet contains a modal, the editor overlay should not cover the
0-height wrapping div but the modal element itself.

Part of https://github.com/odoo/odoo/pull/52663

X-original-commit: bc055e7822b9b2e7f8f9608e335456a71d7896a1
2020-06-09 10:52:26 +00:00
Christophe Simonis 4fda0f43b7 [FIX] l10n_it_edi: use algorithmically correct VAT numbers in demo data
Avoid warnings at module install.

closes odoo/odoo#52683

X-original-commit: 5299dd45f07894d46b68feabe581fe5fbee03981
Signed-off-by: Christophe Simonis <chs@odoo.com>
2020-06-09 10:44:18 +00:00
Xavier Dubuc c50cc1ddac [FIX] web: QUnit.only detection is now back in business
Assets bundle names have been changed in #48676 but QUnit.only uses check was
still using old names. This commit makes that check use the new names.

task-2274185

closes odoo/odoo#52687

Signed-off-by: Julien Mougenot (jum) <jum@odoo.com>
2020-06-09 11:10:40 +00:00
Yannick Tivisse 893ec20236 [IMP] various: Add date filters on search views
PURPOSE
=======

The task aims at adding date filters across various modules in preparation
for the 'time range' feature rework on task 2245719

https://www.odoo.com/web#id=2245719&action=327&model=project.task&view_type=form&cids=1&menu_id=4720

SPECIFICATION
=============

New date filters to compensate the deprecated time ranges feature:

See task's pad for the complete details

closes odoo/odoo#52398

Taskid: 2263661
Related: odoo/enterprise#10938
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-09 10:50:17 +00:00
Julien Mougenot a3e5ac19b2 [REF] web: update control panel doc
Class documentation for the control panel component has been updated
to reflect the changes on the comparison menu and the advanced search.

closes odoo/odoo#52662

Related: odoo/enterprise#11022
Signed-off-by: Mathieu Duckerts-Antoine <Polymorphe57@users.noreply.github.com>
2020-06-09 09:24:21 +00:00
qsm-odoo b61a3c9744 [FIX] web_editor: restore invisible snippet activation
The loading effect of the left panel was conflicting with the invisible
snippet activation. This is to be reviewed with the new UI anyway, so
the loading effect is just removed in that case for now.

closes odoo/odoo#52676

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-09 09:36:05 +00:00
Nicolas Martinelli 7087116ad3 [FIX] sale_stock: find stock moves linked to invoices
In order to find the stock moves linekd to SO line, there is no need to
go through the order and the pickings. Indeed, the SO lines have a
direct link to the stock move lines.

On ~14500 invoices, the duration of the process goes from 90 to 30
seconds.

opw-2266052

closes odoo/odoo#52666

X-original-commit: 155e456a64c54d2c5fdd4078381ed8c1fad28334
Related: odoo/enterprise#11023
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-06-09 09:08:08 +00:00
Martin Trigaux 8458c58436 [IMP] website_form: avoid string concatanation
This is a slow operation and string join is significantly faster
https://stackoverflow.com/a/3055541/1398110

This can make a noticable difference when processing a long form

Courtesy of Nils Hamerlinck

closes odoo/odoo#52664

X-original-commit: 87a2702fdabdcfeb774ddfb9db2e28bdd5595f9a
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-06-09 08:47:07 +00:00
Katherine Zaoral fc83be07b9 [FIX] l10n_ar: fix the purchase vat taxes accounts
The accounts of these taxes were inverted for the invoices and refunds.
now are properly configured.

closes odoo/odoo#52121

X-original-commit: 0a8303b8cfbaa087ab89dcb56afbfe15d50bd1a2
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-05-28 15:25:03 +00:00
Michael Mattiello (mcm) 1019e1529c [FIX] web: update owl to last version
This commit updates owl from v1.0.8 to v1.0.9.

closes odoo/odoo#52657

X-original-commit: 584b1f428ace121b125699ee93ee500fe069a5bd
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-06-09 08:04:03 +00:00
Andrea Grazioso (agr-odoo) 95324638c7 [FIX] product: on CoA choose do not create pricelist if already present
Create a new company with it's currency
A default price list has been created for this company in this currency
Install the "customizable Chart of Account" under the settings tab, Accounting
By installing this CoA, Odoo creates a new pricelist, in Dollars,
that overwrites the one in the currency of the country.

Avoid creating the new pricelist if there is already a
pricelist for the current company in the company currency

opw-2221854

closes odoo/odoo#52429

X-original-commit: dc0d6af54f56bf6e576013d67cf44b5cd3608351
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-06-08 08:15:06 +00:00
1c522ee778 [ADD] odoo-bin cloc cli subcommand.
Odoo cloc is a tool to count the number of relevant lines written in Python,
Javascript or XML. This can be used as rough metric for pricing maintenance of
customizations.

It has two modes of operation, either by providing a path:

    odoo-bin cloc -p module_path

Or by providing the name of a database:

    odoo-bin cloc --addons-path=dirs -d database

In the latter mode, only the custom code is accounted for.
Both modes can be used simultaneously.

Files that cannot be parsed are shown at the end of the report.
Parsing can fail due to syntax errors or excessive file size.

closes odoo/odoo#52635

X-original-commit: ae858c3ac66267b4726db459032b91a6be1cc1d6
Related: odoo/enterprise#11018
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Co-authored-by: Thibault Francois <tfr@odoo.com>
Co-authored-by: Antoine Vandevenne (anv) <anv@odoo.com>
2020-06-09 00:30:55 +00:00
fja-odoo 061ff011df [IMP] base, website: fix prewebsite specific views
Things to know about specific views:

Since the introduction of website specific views, we can have multiple
views that are related to a website (specific views). These views have
no xml_id as it is only set on the original view (generic view).
We rely on the view's key to identify related views as it is the same
for all specific views of a generic view. Also the key is equals to the
xml_id.

When a generic view is updated, we will check if the specific views have
the same values as the generic view. If it is the case, the value that
are the same are considered updatable and are updated on both the
generic and specific view. Else these are considered as noupdate.

When a generic view is created we will check if the potential parent
generic view has specific views. If it is the case we will create a copy
of the created view for each specific view.

The issue:

The method that checks if a created/updated view has specific views is
located in website. When we update a module, each modules are
initialized and updated in a specific order. If a generic view that has
specific views located in a module loaded before website this view's
specific views will not be updated/created as the method does not exist.
This issue is mainly affecting portal views at the moment.

The solution:

For write:
We now COW(copy on write) the views in base module, meaning this will
apply to all qweb views that are duplicated and not only the website
specific ones.

For create:
We  will create the generic view as before but wait until we have
updated all the modules to gather all generic views that are supposed
to have a specific view but don't and create the specific views.
This will result in a change of behavior being that if a specific view
that have a parent is deleted it will be recreated on update
(same behavior as a generic view).

closes odoo/odoo#52629

X-original-commit: b1a90ee2bb441aa52e3cf4607c43fb464b55b1d7
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Signed-off-by: fja-odoo <fja-odoo@users.noreply.github.com>
2020-06-08 17:23:59 +00:00
Goffin Simon 54c828bcba [FIX] sale: Duplicated Sale Order Sequences through Imports
Steps to reproduce the bug:

- Let's consider a company C in the Arab Emirates(AE) with l10n_ae
- Let's consider a customer C1 from AE (as country) and Abu Dhabi (as state)
- Let's consider a customer C2 from AE (as country) and Dubai (as state)
- Let's consider that the current user has no right in accounting
- Let's consider the SO sequence with no_gap and with next_number=1
- Create a product P with 5% dubai tax
- Create SO1 for C1 with P (next_number=2)
- Create SO2 for C2 with P (next_number=3)
- Export SO1 and SO2 xlsx file F
- Import F

Bug:

An error message appeared in the logs:
odoo.addons.base.models.ir_model: Access Denied by ACLs for operation: write, uid: 6, model: account.tax

because odoo tried to write on the field invoice_repartition_line_ids computed from function compute_all on model account.tax

The next_number was 4 instead of 5 because the update made in function _update_nogap was rollbacked
due the Access Denied

opw:2266048

closes odoo/odoo#52588

X-original-commit: e009c3a0df12801e06a4e2301f888ca77bb24946
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-06-08 11:21:24 +00:00
jvm-odoo 6ac5b14d52 [FIX] mail: fix mark several messages as read
Issue

	- Install Discuss & any app with a chatter
	- Have 2 session, admin & demo
	- Clear admin systray messages

	As demo:
		- Discuss > #general
		- Ping (@...) admin 2 times

	As admin:
		- Go in the app you installed
		- Open systray messages
		- Mark messages as read

	It doesn't work

Cause

	When marking as read we get the message-ids as a string
	and if you have several ids it will be ["1,2"] which is
	not supported by the back-end

Solution

	The back-end should receive an array like [1, 2]

OPW-2234671

closes odoo/odoo#52608

X-original-commit: fbe91697fb1bc2ade5eba034b97bd671eeaf200b
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
2020-06-08 13:44:26 +00:00
Elmeri Niemelä 4c5a219f02 [FIX] l10n_fi: Add missing account.account.tags on chart of accounts
closes odoo/odoo#52625

X-original-commit: b10561cb448e45c7037b3b82920c7d4791f3ca82
Signed-off-by: Josse Colpaert <jco@openerp.com>
2020-06-08 16:09:13 +00:00
qsm-odoo a33e23da74 [FIX] web_editor: restore crop widget backdrop color
Revert https://github.com/odoo/odoo/commit/14c8b285ef3e11cf8a8387bb211272e6456e4d42
which fixed a scss compilation error but changed the design by mistake.
The 4 digits hexa was not supported in old sass compiler so we use a
rgba() value instead.

closes odoo/odoo#52622

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-06-08 15:11:19 +00:00
Nasreddin (bon) c503faab53 [FIX] base: User loses company access when merging the related contact
Issue

	- Create a second company
	- Create user with access to main and second company
	- Go to "Contacts" app
	- Edit contact of the new user, and under the "Sales & Purchases" tab,
	  ensure that the company field is set
	- Create a new contact with same email of the new user
	- In list view, select both contact related to new user
	- Click on Action->Merge Selected Contacts, then merge contacts

	User has no more access to both companies, only company related to
	merged destination Contact/Partner.

Cause

	All related companies are unliked from user, and instead overwrited
	with one company related of the merged destination Contact/Partner.

Solution

	Instead of unlink all companies, we will only add the contact company
	to the allowed companies of the user.

opw-2269397

closes odoo/odoo#52620

X-original-commit: e00b23b73f00fb24b2771ea8894031b35204e65e
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: bon-odoo <nboulif@users.noreply.github.com>
2020-06-08 15:04:06 +00:00
fja-odoo 315346ad28 [IMP] website_form, *: add field type to form
*= website_hr_recruitment, website_sale, website_crm

Adding 2 new types of fields: tel, url
email, url and tel type can now be applied on existing char fields.

task-2213083

closes odoo/odoo#50891

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-06-08 14:47:58 +00:00