Commit Graph
141473 Commits
Author SHA1 Message Date
Robot Odoo d2b83bbe8f [MERGE][IMP] mail, web: drag/drop files in conversations
This merge adds the support of drag/drop files in a conversation
(discuss, document chatter and chat windows).

It also adds helper functions to simulate drag/drop with files in test
environments.

Task-ID 32469

closes odoo/odoo#18914
2018-11-26 13:50:33 +01:00
Robot Odoo db0f80ee53 [IMP] repair, stock: views improvements
Display destination and source location on picking tree view
Order repair button with primary first in the list
Add the source document on stock move line view

Pad:https://pad.odoo.com/p/r.66fe9d8682b74783346d91b0fe7e3a87
Task:https://www.odoo.com/web?#id=1872294&action=333&active_id=131&model=project.task&view_type=form&menu_id=4720

Description of the issue/feature this PR addresses:

Current behavior before PR:

Desired behavior after PR is merged:

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

closes odoo/odoo#26380
2018-11-26 12:46:49 +01:00
Alexandre Kühn 6f8bb750f3 [ADD] mail:tests: discuss drag-and-drop file in composer
Task-ID 32469
2018-11-26 11:34:00 +00:00
Alexandre Kühn fb895f9119 [ADD] web:tests: test utils for drag/drop files
This commit adds test helper functions to drag and drop
files:

- `createFile`: create a file that can be used for drag and
  drop in tests.
- `dragoverFile`: to drag a file created from `createFile`
  over a DOM element.
- `dropFile`: to drop a file created from `createFile` on
  a DOM element.

These utility functions are available from `testUtils.file`.

Example of usage:

```js
var testUtils = require('web.test_utils');
testUtils.file.createFile({
	name: 'text.txt',
	content: 'hello, world',
	contentType: 'text/plain',
}).then(function (file) {
	testUtils.file.dragoverFile($el, file);
	testUtils.file.dropFile($el, file);
});
```
2018-11-26 11:34:00 +00:00
Dharmang Soni fb051d3420 [IMP] mail: Allowing drag/drop files/images on mail composer
By this commit user can upload attachments by drag and drop in chatter composer.
This feature can be used from discuss UI, chat windows and form view chatter.

Before this commit chatter unlinks the attachment if another attachment uploaded
with same name. Criteria for removing duplicate attachment is changed with this
commit. Now it will remove the attachment based on name and size of attachment.
The reason for this change is, when you upload image with same name from different
directory with old condition it was not possible to attach more then one image/file
of same name.

Related to task #32469
Closes #18914
2018-11-26 11:34:00 +00:00
Prakash Prajapati c5ce51168e [IMP] stock: Add the new field 'origin' in 'stock.move.line'
Useful to know for which SO the product is reserved

Task #1872294
Closes #26380
2018-11-26 10:40:41 +00:00
Prakash Prajapati 4e3a357cca [IMP] repair: Primary buttons first in form view
First display the primary button and after it display normal button.

Task #1872294
Closes #26380
2018-11-26 10:40:11 +00:00
Prakash Prajapati 4031227b54 [IMP] stock: Show source and dest in list view of pickings
If multilocation is active then display 'source' location in tree views.
Also in tree views rename the source location to 'From' and destination location to 'To'

Task #1872294
Closes #26380
2018-11-26 10:39:07 +00:00
Hetashree Chauhan 702317fbb8 [IMP] sale_stock: Show warehouse on SO only if user has rights for multi warehouses
Purpose of this commit:
Currently warehouse is showing in sale order even if user has no rights for multi warehouses.
After this commit:
User can access warehouse on sale order even if we have enabled multiple warehouses.

This commit is related to task_id  : 1896087.

closes odoo/odoo#28021
2018-11-26 07:26:54 +00:00
Nirali Sapra c892a11fb0 [IMP] purchase: Settings options for the invoicing policy should be right
This commit is change the name of deliverd quantities to received quantities in invoicing policy in settings of purchase module

This commit is related to task ID :1871494

closes odoo/odoo#27147
2018-11-26 08:57:06 +00:00
Darshil Trivedi 9e12dbc33d [FIX] base: Typo in summary of MRP II module.
This commit is related to task ID : 1893027

closes odoo/odoo#28400
2018-11-26 07:04:16 +00:00
Thibault DelavalléeandKishan Gajjar ec88479048 [IMP] mass_mailing: improve UTM display on mailings
This commit is the community commit linked to an enterprise improvement of
marketing automation. In this commit we simply improve display of UTM
information on mass mailings.

This commit is linked to task ID 42548 and PR #28500.

Co-Authored-By: Kishan Gajjar <kig@odoo.com>
Co-Authored-By: Thibault Delavallée <tde@odoo.com>
2018-11-23 13:34:15 +00:00
Robot Odoo ec078b88a7 [MERGE][REF] survey: refactor tests
Purpose of this merge is to clean survey tests and add some more. This
merge holds several commits that

 * create a common file holding test data and tools methods to create
   questions, answers and answerlines as well as implemented some custom
   assertions;
 * clean exiting tests by removing tests about implementation details and
   unnecessary code;
 * expand tests by adding a functional test using survey routes and
   controllers;

This merge is linked to task ID 1911238 and PR #28831 .
2018-11-23 14:29:08 +01:00
Thibault Delavallée 4eb9433bd5 [IMP] survey: add small functional flow test
Purpose of this commit is to add a test working with routes and controllers
that check the flow of people going through the portal to fill surveys.

This commit is linked to task ID 1911238 and PR #28831.
2018-11-23 12:51:45 +00:00
Thibault Delavallée 3124944d53 [REF] survey: clean existing tests
Purpose of this commit is to clean existing tests in survey. This commit

 * removes unnecessary tests checking that basically create / write correctly
   works;
 * removes tests based on implementation details;
 * cleans tests for validation and answer creation to make them more easier
   to read and understand;
 * moves invitation tests into their own file;

Some helpers methods are added in common.py to ease question and answer
creation.

This commit is linked to task ID 1911238 and PR #28831.
2018-11-23 12:49:52 +00:00
Thibault Delavallée 8349e1d77a [IMP] survey: improve common file and add tools methods
Purpose of this commit is to add some prepared data in survey common test
file. We also add some tool methods in order to easily create new questions,
answers and answer lines. Some specific assert methods are also added to
avoid noise in tests and avoid having to duplicate some check and assertions.

This commit is linked to task ID 1911238 and PR #28831.
2018-11-23 12:49:52 +00:00
Thibault Delavallée ed8842045e [REF] survey: use a common file for tests for tools and data
Purpose of this commit is to clean a bit survey test files before updating
them and creating new tests. In this commit we add a common file holding
user creation and we use the recently-introduced tool method to create
test users. Survey test class is done child of SavepointCase to use
breakpoints and avoid recreating data at each test.

Future commits will gradually remove unnecessary content for test_survey.py,
rewrite part of it to be easier to understand and add new tests.

This commit is linked to task ID 1911238 and PR #28831.
2018-11-23 12:49:52 +00:00
lul-odoo c370f644a2 [IMP] hr_holidays: add a leave request without validation mechanism
Purpose
=======

Allow to create a leave type for which leaves are not required to be approved
by a manager.

When a leave is created, it is automatically approved if the
validation type is set to "No validation".

It is useful if a manager does not need to manually approve some leave types.

Specification
=============

Add a validation type option for 'hr.leave.request': 'no_validation'

Automatically approve the leave when created and add the approver as follower
so that he can be notified about the leave creation/validation.

closes odoo/odoo#28268
2018-11-23 10:49:25 +00:00
Christophe Simonis 7a0243ec15 [MERGE] forward port branch 12.0 up to b3052b690f 2018-11-23 12:11:32 +01:00
Robot Odoo 75477052a0 [MERGE][IMP] snailmail: Improve integration and usability
- Improved the form and list views of snailmail.letter objects,
- Added menus to access the letters from the account app,
- Manage invalid address on the partners when trying to send a postal letter

This merge is linked to the task ID 1892473

closes odoo/odoo#28057
2018-11-22 19:06:51 +01:00
Antoine Prieels (ANP) a08cb50e7e [I18N] snailmail,snailmail_account: Update translation files 2018-11-22 15:38:42 +00:00
Antoine Prieels (ANP) 8573b4647b [IMP] snailmail_account: Deal with invalid addresses
- Raise UserError when sending an invoice with an invalid address
- Notify when sending letters in batch mode with invalid addresses
2018-11-22 15:38:42 +00:00
Antoine Prieels (ANP) f68df47ddf [IMP] snailmail: Show the price in terms of stamps
- The price of sending a letter was displayed in the currency of the company, now we express the price in terms of stamps
- Show a different message in the modal depending on the validity of the address
2018-11-22 15:38:42 +00:00
Antoine Prieels (ANP) d5ca268438 [IMP] snailmail: Change order of settings and default values
Task #1892473
2018-11-22 15:38:42 +00:00
Antoine Prieels (ANP) 2dfa7cd597 [IMP] snailmail: Add form and tree views for snailmail.letter
Add new form and tree views for snailmail.letter available in Accounting > Configuration > Management > Snailmail Letters
Add a many2one field to snailmail.letter to link to a mail.activity in case of an error with snailmail

Task #1892473
2018-11-22 15:38:42 +00:00
wan 182b4d86f4 [IMP] l10n_be/fr/lu: set refund_sequence on sale/purchase journals
Belgium, France and Luxembourg should, by default, have a dedicated sequence for refunds.

Task ID: 1872181

closes odoo/odoo#28639
2018-11-22 10:49:46 +00:00
Yenthe V.G 1b43116ec0 [IMP] uom: add sheet on uom.uom and uom.category form views
closes odoo/odoo#27335
2018-11-22 10:31:21 +00:00
Yenthe V.G fcc3766233 [IMP] membership: add sheet on product.template form view
closes odoo/odoo#27328
2018-11-22 10:36:30 +00:00
Yenthe V.G a5e6bf2397 [IMP] mass_mailing: Add sheet of mail.mass_mailing.tag form view
closes odoo/odoo#27200
2018-11-22 10:12:48 +00:00
Robot Odoo a8a7c248cd [MERGE][REF] survey: break survey composer inherit on mail composer
Purpose of this merge is to clean survey composer model. It currently
inherits from mail.compose.message which also inherits from mail.message.
That means a lot of fields and behavior coming from both models are present
on the survey composer. Most of them are not necessary as

 * send_mail method of mail composer is overriden and super is not called.
   Nothing from the complex behavior of mail.compose.message is used;
 * templates are just basically supported in survey, notably mass mailing or
   mass posting mode are not used;
 * methods from mail.message should not be available on survey composer;
 * most m2m fields coming from mail.message and composer have no use here;

In this merge we simply add the required fields and template behavior on
the survey composer and remove inheritance on mail.compose.message.

In this merge we also rename survey.mail.compose.message to survey.invite
as it simplifies code and is easier to understand.

This commit is linked to task ID 1909804.

closes odoo/odoo#28783
2018-11-21 15:48:06 +01:00
Thibault Delavallée cb59cb0436 [REF] survey: rename invitation wizard to better match its business use
Purpose is to have a somehow cleaner name for this wizard as its purpose
is to send invitations. Email and composer are details on how it works.

This commit is linked to task ID 1909804 and PR #28783.
2018-11-21 13:27:52 +00:00
Thibault Delavallée ebbe0cac03 [REF] survey: break dependency from survey composer on mail composer
Purpose of this commit is to clean survey composer model. It currently
inherits from mail.compose.message which also inherits from mail.message.
That means a lot of fields and behavior coming from both models are present
on the survey composer. Most of them are not necessary as

 * send_mail method of mail composer is overriden and super is not called.
   Nothing from the complex behavior of mail.compose.message is used;
 * templates are just basically supported in survey, notably mass mailing or
   mass posting mode are not used;
 * methods from mail.message should not be available on survey composer;
 * most m2m fields coming from mail.message and composer have no use here;

In this commit we simply add the required fields and template behavior on
the survey composer and remove inheritance on mail.compose.message.

This commit is linked to task ID 1909804 and PR #28783.
2018-11-21 13:27:52 +00:00
RomainLibert 8d869b06e2 [FIX] hr_holidays: change selection key type from float to string
In the following commit (744de4e) we introduced some floats as keys
to Selection fields (namely request_hour_from and request_hour_to)

This lead to the ORM creating a column of type int4 to store this
field which rounded the values.

In order to fix that faulty behaviour, we change these keys into strings
and then convert them to floats.

closes odoo/odoo#28891
2018-11-21 11:26:16 +00:00
Christophe Monniez ff051bf829 [IMP] web_tour: better logs in case of failure
With this commit, a failing tour will display more information in the logs,
which may be useful for debugging purpose.

- display full html instead of just the content of body
- display the 'content' flag of the step, which is very useful to see
  which step failed

closes odoo/odoo#28863
2018-11-21 09:23:17 +00:00
Goffin Simon eca8826a90 [FIX] crm: All activities displayed when clicking on notifications
When clicking on notifications "Late", "Today" or "Future" for the crm.lead model,
the search view called "crm.lead.search.lead" was taken instead of "view_crm_case_opportunities_filter".
and then the filters "Late Activities", "Today Activities" and "Future Activities" didn't
exist.

opw:1905722

closes odoo/odoo#28793
2018-11-19 10:58:42 +00:00
qsm-odoo 30e937cf74 [FIX] website_theme_install: review post copy view toggling
If a theme post copy wants to enable/disable a view, this is to
enable/disable a given functionality which is disabled/enabled
by default. So if a post copy asks to enable/disable a view which
is already enabled/disabled, we would not consider it otherwise it
would COW the view for nothing.

closes odoo/odoo#28772
2018-11-19 10:25:26 +00:00
qsm-odoo 551eb34f92 [FIX] website: improve COW feature readability
This commit only re-indents the COW feature code and adds comments to
help understand its tricky parts. Also evaluate the 'no_cow' flag only
once per write.

closes odoo/odoo#28753
2018-11-19 09:39:37 +00:00
Julien (juc) Castiaux ccd1552b83 [FIX] account: missing tax computation in reconciliation
Install the accounting module, create a new payment for a customer
go to payment matching, reconcile the payment for the account
'Account recievable' and select a tax. There is a traceback
because of a incomplete implementation of the tax computation.

This commit complete the implementation and add the missing tests.

opw-1903172

closes odoo/odoo#28591
2018-11-19 08:55:56 +00:00
jem-odoo 255816c035 [IMP] sale: reflection refund of invoices from SO in all cases
When creating a credit note from an invoice coming from a Sales Order,
only the "modify" mode links the refund lines with the sale lines. This
link make the invoiced quantity decreased on the sale line, which is
a willing behavior.
The 2 other modes ("cancel", and "create") does not do that link.
As the behavior of the "modify" mode was introduced as bugfix years
ago, it was time to clean that !

This commit
- extends the behavior to every mode: all refund lines are now
linked to their origin sale lines, so the invoiced quantities
are correctly applied
- clean the bricolage used to determine the invoice of the
sales order (`_get_invoiced` method) by avoiding searching
on the document source field.
- provides some tests. The old one was moved and extended.

Task-1859308

closes odoo/odoo#28471
2018-11-19 08:29:08 +00:00
Olivier Dony 7765689f63 [DOC] orm: fix a typo in parent_path doc 2018-11-18 02:59:53 +01:00
Olivier Dony 6d2b055d5e [DOC] orm: update doc for parent_path field
As of 12.0, the `parent_left` and `parent_right` special fields previously
used to store the tree structure have been replaced with a single
`parent_path` field. See also PR #22558.
2018-11-18 02:55:52 +01:00
Odoo Translation Bot b60f9bb739 [I18N] Update translation terms from Transifex 2018-11-18 01:28:38 +01:00
Robot Odoo bc744a1da4 [MERGE][FIX] mail: several fixes in discuss, chat window, chatter
This merge fixes a crash in discuss, in addition to re-introduce some _quality of life_
features that have been mistakenly removed from the chatter and from chat windows:

### 1. No crash when searching messages

This was caused by the addition of moderated channels. In short, fetching twice
the same message was performing a re-render of the thread due to a mis-consideration
of a moderation status change. When the fetch reaches the fetch limit, the re-render is
considered as a "load more" fetch, which only works when there is at least one message
registered for the current search.

This is fixed by re-render when there is a change of moderation status only.

Task-ID 1910180

### 2. Easily mention followers and employees in chatter

When mentioning a user from the chatter in a document, it was always
fetching all partners in a arbitrary order. As a result, it was hard to mention
followers and employees.

This is fixed by re-introducing the previous behaviour on mentions, which
groups them by followers, then employees, then all partners.

Task-ID 1910111

### 3. Show message document link in chat window

When a message is linked to a document, it usually shows a
link next to the message. This still works in the Discuss app,
but not in chat windows.

This erroneous regression was caused by a refactoring.
This is fixed by re-introduced document links on messages in chat
windows.

Task-ID 1910119

closes odoo/odoo#28744
2018-11-16 17:53:55 +01:00
Katherine Zaoral d1b85c8d9a [FIX] mail: Future Activities filter in the mail activity search view.
closes odoo/odoo#28768
2018-11-16 16:39:15 +00:00
Adrian Torres 407f6e3532 [FIX] stock: do not prefetch stock.move fields
For a SO of 300 lines, when confirmed, it takes 195s to process stock
moves for the SO, which is an insane amount of time for any kind of
process in Odoo.

This happens because stock.move is a heavy model with lots of fields,
prefetching all these fields at once can hinder performance when
processing a lot of stock.moves.

To reduce the processing time, the prefetching is disabled in the
specific scenario of processing stock moves and pickings on SO
confirmation.

This patch increases the performance of SO validation (with stock
installed) by ~30%.

Pre-patch: 195s (300 SOL)
Post-patch: 135s (300 SOL)

closes odoo/odoo#28835
2018-11-20 10:51:07 +00:00
Katherine Zaoral edfcee0190 [FIX] base: fix name for country state of Buenos Aires
Change "Buenos Aires City" to "Ciudad Autónoma de Buenos Aires" accordingly to
http://www.afip.gob.ar/fe/documentos/TABLA%20PROVINCIAS%20V.0%20%2025082010.xls

closes odoo/odoo#28584
2018-11-20 18:11:20 +00:00
Julien (juc) Castiaux 124b5b8fee [FIX] product: disable "create & edit" shotcut for product variants
With the purchase module, when you create a new vendor, you can
select what variant of the product the vendor sells. The droplist
has the "Create & Edit" button to quickly create/edit variants.
This is not the wanted behavior. This PR removes the "Create & Edit"
suggestion.

opw-1909009

closes odoo/odoo#28845
2018-11-20 14:05:52 +00:00
Lucas Perais (lpe) e713ed2a69 [FIX] web: implement filter orderedBy
related to: #28446

On a pure list view, click on a column to sort the records by that field.

Save the filter as favorite

Reload, now apply the filter

Before this commit, there were two issues:
1. The order of the list was never propagated to search view, which couldn't save
the filter with its attribute "sort"

2. There was no mechanism to load the attribute sort from a loading Filter

After this commit, those two issues are corrected
Unfortunately, complex search view flows are not testable in v11.0

OPW 1906968

closes odoo/odoo#28766
2018-11-20 13:53:52 +00:00
Denis Ledoux 48dafd5b20 [FIX] point_of_sale: default pricelist test
The POS js tests expect the "Public Pricelist" when
selecting a lambda customer in the pos interface.

Nevertheless, when installing a localization
with a specific currency,
other than the currency of the public pricelist,
it creates a new pricelist called
"Default %(currency)s pricelist for %(company)s"
and sets it by default for the customers sale pricelist.
See
https://github.com/odoo/odoo/commit/787e1037cdca48fe361ae65d790056a3d57e6b67#diff-840bfc6fc7a986fbf0e248c83d2ac1d5R57

Therefore, in the POS js tests, the pricelist selected
when selecting a lambda user was no longer
'public pricelist' but the one mentioned above,
and the tests therefore failed.

The issue is solved by creating a dedicated "Public Pricelist"
for the purpose of these tests, and sets it by default
for the customer sale pricelist,
as well as for the pos config default pricelist.

The test case was to install `l10n_pe` with `point_of_sale`
while activating the test.
e.g. `-i l10n_pe,point_of_sale --test-enable`

opw-1890928
opw-1910249

closes odoo/odoo#28839
2018-11-20 11:59:45 +00:00
Nicolas Martinelli 8bff607f07 [FIX] point_of_sale: order currency
- Configure the company in USD
- Set-up the POS in EUR:
  Pricelist in EUR
  Payment journal in EUR
  Sales journal in EUR
- In the POS, sell a product (in EUR)
- Validate the session and post entries

The entry amounts are the EUR amounts, but they are posted in USD.

Long story short: nothing was foreseen to convert the amounts in the
appropriate currency.

Fixes #27175

opw-1904146
opw-1910248

closes odoo/odoo#28785
2018-11-20 09:44:37 +00:00