Commit Graph
127612 Commits
Author SHA1 Message Date
Thibault Delavallée 9e430e9bc3 [REF] crm: remove archive-related filters
Purpose of this commit is to remove filters and actions linked to archive
and restore.

Won / Lost filters are sufficient now as archive behavior has been removed.

Using the newly-introduced archivable option in kanban view we now hide the
archive / restore buttons present in the columns of leads kanban view. Indeed
people should go through the mark as won / mark as lost flow and not use the
archive feature.

In kanban view actions in vignette dropdown are also removed.

Finally some dead action code can now be removed.

This commit is linked to task ID 1880051 and PR #26977.
2018-09-21 11:22:01 +02:00
Thibault Delavallée 81782e680a [REF] crm: don't archive but mark as lost
People don't understand archive. According to POs leads are lost and restored
and not archived / unarchived. Let us restore the mark as lost behavior.

As sometimes I am better than a goldfish let us point to this old task from
3 yeas ago: https://github.com/odoo/odoo/commit/69a769fc9994d00060485703aa4307e2c8877fb7. This commit basically
reverts that one. It was linked to task ID 20996 that explainedwhy archive /
unarchive had to be used for leads as people don't understand won / lot for
leads.

This commit is linked to task ID 1880051 and PR #26977.
2018-09-21 11:22:01 +02:00
Thibault Delavallée 1fea0f18a8 [IMP] sale_crm: hide 'New Quotation' button if opportunity is lost
A lost opportunity is archived and should not have primary actions buttons.
First thing to do would be to restore it before having access to some
other actions.

This commit is linked to task ID 1880051 and PR #26977.
2018-09-21 11:22:01 +02:00
Thibault Delavallée 6663ff97b6 [IMP] web: add an option to hide archive option in kanban columns
Currently kanban columns propose an Archive / Unarchive option if the
records model has an active field. It allows to directly archive or
restore all records belonging to that column. It is currently not possible
to control whether this option is present or not as it only depends on the
active field being defined on the model.

In some specific cases we want to be able to hide this option even if the
active field exists. For example future commits will hide this option for
leads (crm.lead) as business flow goes through marking them as won or lost
instead of archiving / restoring them.

This commit adds support of a new archivable parameter when defining the
kanban view that hides the archive buttons if it is set to False. Default
value is true so that current behavior is kept as it is by default.

Doc and tests are added.

This commit is linked to task ID 1880051 and PR #26977.
2018-09-21 11:22:01 +02:00
Prakash Prajapati da03aa3138 [IMP] project: remove the label 'record's colour' before the color picker
It seems not necessary to have this label.

This commit is linked to task ID 1884053 and closes PR #26936 .
2018-09-21 11:10:20 +02:00
Prakash Prajapati 450efe6b75 [FIX] web: add a minimal width on dropdown box to avoid labels being squeezed
Purpose is to add a width on dropdown 'box' in order to have long labels
like 'Set cover image' being squeezed against the border.

This commit is related to task ID 1884053 and closes PR #26936.
2018-09-21 11:10:20 +02:00
Prakash Prajapati 4b5265b9b9 [IMP] contact, product, various: improve labels and tooltips of partner and product fields
Purpose: improve understanding of partner and product models as well as their
daily use. This is done by improving tooltips and labels of some fields
according to business logic.

This commit is related to task ID 1880696 and closes PR #27133 .

Thanks to @xmo-odoo for its in-depth review.
2018-09-21 10:57:58 +02:00
Vincent Schippefilt 9960e48e86 [FIX] web: on MAC, remove access keys activation interference
On MAC, some characters can only be typed using the ALT+Number that was
reserved for the menu access keys.
There is a system in place to collect the ALT+Number keys and force the
activation of the shortcut to make the experience better for all users
across all machines.

This fix remove this system that collects ALT+Number or other keys on MAC

Ticket number : 1887171
2018-09-21 10:55:38 +02:00
Priyanka Kakadiya c2328f5dcd [FIX] stock: remove duplicate field
On the stock picking form, the 'Effective date' and the 'Completion date'
are technically the same field. This commit remove the second one.

Related to Task: 1886591
2018-09-21 10:47:29 +02:00
Christophe Simonis a119373b5b [MERGE] forward port branch 10.0 up to cda1bec3e0 2018-09-21 10:42:19 +02:00
eco-odoo df01624670 [FIX] account: dashboard: fix count of number of items to reconcile
If a bank statement line has a linked account, it will be skipped by the
reconciliation widget and automatically reconciled when the bank
statement is closed. Thus, there is no need to count them in the
accounting dashboard.
2018-09-21 10:17:01 +02:00
Xavier Morel 68715a46d1 [FIX] *: reassign data & demo mail aliases from system to admin 2018-09-21 10:06:23 +02:00
Xavier Morel 97b82ff7c1 [FIX] crm: reassign leads from system to admin 2018-09-21 10:06:23 +02:00
Xavier Morel 7ee9cc29a8 [CHG] *: "family" names of admin & demo users
avw/fp? request

58fc4e4409 changed various demo data,
including putting more "realistic" names in for the administrator and
demo users in demo mode. This is apparently inconvenient when actually
demo-ing Odoo as it's harder to see at a glance whether the current user
is the administrator or "regular" (demo) user of the db, though this
should have less impact since the userification of the admin
(2f7c03d9ca).
2018-09-21 10:06:23 +02:00
eco-odoo 5ec554732e [IMP] account: improve reconciliation congratulation message
If there was only one reconciliation the (rounded) time per transaction
was often different from the real one.
2018-09-21 09:47:56 +02:00
William Henrotin 8565348b0c [FIX] uom: rename ratio field
The ratio field in the UoM form view has 2 different labels depending
on the type (bigger or smaller). This commit put the same label 'ratio'
for two cases.

Task :1859328
2018-09-21 09:32:54 +02:00
Nicolas Martinelli 84aea12bac [FIX] google_drive: current record
- Open a partner view, click on Action > Partner Review
- Switch to another partner
- Click again on Action > Partner Review

The Google Doc file of the second partner is the same than the first
partner.

This is due to `_onGoogleDocItemClicked` which is always called with the
same `resID`, i.e. the `resID` used at `start`.

We retrieve the active ID at each click instead.

opw-1882068
2018-09-21 08:45:17 +02:00
Alexandre Kühn e962f2bb77 [FIX] mail: add new note without date from activity menu
Before this commit, it was not possible to add a note
from the activity menu when no datetime has been selected
from the datepicker.

This is due to the server-side code that requires a deadline
date to be set, otherwise no note is created. Even though
the placeholder of the datetime tells 'Today', no datetime
was provided to the server, thus the problem mentionned above.

This commit fixes the issue by ensuring that a deadline date
is always provided to the server from the `/note/new` route.
In particular, if no datetime has been selected, it still
displays 'Today' and sets the current datetime before the
RPC.

Task-ID 1875668
2018-09-20 17:19:02 +02:00
Alexandre Kühn 3457e037e9 [FIX] mail: mark document thread preview as read
Before this commit, it was not possible to mark a document
thread preview as read from the messaging menu.

This issue comes from the fact that document message previews
are built from messages in the Inbox. The computation of
the unread counter is correct for the preview, but not for
the associated document thread object which has a counter of 0.
Since it is only possible to mark as read when the counter is
strictly greater than 0, the 'mark as read' did not have any
impact.

This commit fixes this issue by ensuring that the unread counter
of a document thread matches the number of needaction messages it
contains.

Task-ID 1875668
2018-09-20 17:19:02 +02:00
Alexandre Kühn 6a862ba0d5 [IMP] mail:tests: add mocked 'set_message_done' rpc 2018-09-20 17:19:02 +02:00
Alexandre Kühn e2b41f0dfe [FIX] mail: add missing abstract method in AbstractThread 2018-09-20 17:19:02 +02:00
Alexandre Kühn 85820a25d7 [FIX] web: light gray background for search facet
The change of navbar color from blue to purple in community,
also changed the the background color of the search facets were light purple
before this commit.

This commit fixes the background color of search facet to light gray,
which should look almost the same as before the change above.
2018-09-20 17:19:02 +02:00
Alexandre Kühn 2668d695db [IMP] web: purple odoo brand color in community
Task-ID 1878649
2018-09-20 17:19:02 +02:00
Alexandre Kühn 12fd72a621 [IMP] web: increase form sheet max-width in community
Task-ID 1878649
2018-09-20 17:19:02 +02:00
Alexandre Kühn 5af3bcda6d [IMP] web: reduce form sheet padding in community
Task-ID 1878649
2018-09-20 17:19:02 +02:00
Alexandre Kühn 6bfb6ca1c0 [IMP] web: no dropdown icon ('v') next to app menu icon
Task-ID 1878649
2018-09-20 17:19:02 +02:00
Laurent Smet 7053ae7828 [IMP] account: management of reconciliation rules
Bank statement lines need to be matched with entries; We have to automate this operation as much as possible.
At the same time, create an algorithm that fit everyone needs is quite impossible.
For that reason we will let users choose the rules they want with the improvement of reconciliation models.

Note that we did it only for bank statement reconliation, not for manual reconciliations.

Was task: 1877375
Was PR #26669
2018-09-20 17:11:52 +02:00
Laurent Smet e19ecefa8e [MOVE] account: move account.reconcile.model to separate file 2018-09-20 17:09:30 +02:00
Martin Trigaux 60e9e1f738 [FIX] models: do not copy translations from specified inherited records
A copy call cn be made with a specified value to an inherits value, e.g.:
   self.env['product.product'].browse(42).copy({'product_tmpl_id': 1})

In such scenario, it is assumed the translations are already correct on the
specified related record and should not be used in the copy translation.
i.e. the translations of the product.template 1 must not be duplicated during
the copy call above

Same logic for One2many fields which should not recursively copy the
translations for user provided values

Closes #27108
2018-09-20 16:55:44 +02:00
Simon Lejeune 07cc961372 [FIX] mrp: _check_lots error message
Better wording.
rev bf65cd83ab
2018-09-20 16:37:18 +02:00
Martin Trigaux 2de8998863 [FIX] tools: skip bad translations
Backport of fccfd36e05, 4ba7fbbf81 and 1421949c67 to saas-11.3

[FIX] tools: use pot as reference file

In the first attempt at #26134, the pot_targets was cleared after creating
the pot_rows object.

Since the rows not present in the pot_targets are now skipped, clearing the pot
should not be done.

Still use a temporary list pot_rows to avoid modifying the list we are iterating
on.

Update the .po test file to match the new file format

[FIX] tools: import translation file without pot

Due to fccfd36 and 4ba7fbb the translations were only imported, considering the
.pot as the reference.

During import or a manual csv or po file, there is no pot file.

Add tests with Klingon and Dothraki
2018-09-20 16:21:11 +02:00
Yannick Tivisse b3fef6a72a [IMP] base: Order user's type groups by id
Purpose
=======

Traceback when following these steps:
- Install MRP
- Load French translations
- Set language to French
- Activate 'work orders' on MRP configuration

Error: The field 'sel_groups_9_10_1' doesn't exist.

This is because the only selection groups field on the res_users view
that doesn't have a transitive closure (the user's type Internal/Portal/Public)
is ordered by name.

1: Internal User
9: Portal
10: Public

becomes

9: Portail
10: Public
1: Utilisateur Interne

which lead to the traceback.

We should retrieve these groups ordered by 'id' to avoid the issue.
2018-09-20 16:19:24 +02:00
Toufik Benjaa 8a1030e162 [FIX] hr_holidays: overlap constraint
- Allow to request a leave that starts exactly when another leave ends.

  OPW-1887257
2018-09-20 15:26:37 +02:00
Adrien Dieudonne b23a981320 [IMP] web: graph view: design improvements
This commit improves UI of charts:

- Reduce margins of svg
- Put ticks label on right of y axis
- Bigger lines (line chart only)
- ligther area color (line chart only)
- Hide y axis line
- Force charts to begin at y=0
- Hide zero tick on y axes

There is no test because these changes only concerns visual effects.

Task ID: 1877588
2018-09-20 15:20:03 +02:00
William Henrotin 009e1ab4b6 [IMP] stock, stock_zebra: add label on picking type
This commit adds the posibility to print labels containing the barcode 
of a picking type. There are two available formats : pdf or zpl
2018-09-20 14:47:06 +02:00
William Henrotin cdbd33b6f3 [MOV] stock: barcode on picking type
The field barcode on picking type was introduced in stock_barcode module
(enterprise). We move it to the stock module to be a standard field like
the one on stock_location.

Task: 1872345
2018-09-20 14:47:06 +02:00
William Henrotin ff7df19bd3 [IMP] stock: choose destination wizard
Purpose : during a transfer, if some move lines have different
destination locations and the user click on 'put in pack' button, an
warning is triggered. This message, saying : 'You cannot put in the same
pack move lines having different destination location', is replaced by a
wizard allowing the user to choose a unique destination location. This
location will be set as location_dest_id on all transfer's stock move
lines. After that, the wizard calls again the _put_in_pack() method
where all the logic remains the same.

Task : 1872345
2018-09-20 14:47:06 +02:00
William Henrotin 7dee76b962 [IMP] stock, mrp: add ids in settings
Some modules in Enterprise version need to override the Inventory and 
MRP settings views. This commit allows them to make it easily

Task : 1872345
2018-09-20 14:47:06 +02:00
William Henrotin 55327729df [FIX] delivery: pass full context
In a picking of type 'delivery', hitting the Put in pack button load a wizard
to choose package information. This action that load the package wizard overide
the environement context. the issue is we need 'active_id' later. In a full
python flow, the ORM fill the context with standard values like lang,
timezone, ... and active_id. In a flow using RPCs from JS. The context is
not magically rebuild so we lose the active_id.
2018-09-20 14:47:06 +02:00
TWA eebaf55fde [ADD] crm_reveal: New IAP module
crm_reveal will allow the automated generation of leads based on the
visits of the website.
2018-09-20 13:58:33 +02:00
Romain Derie 93b2a55b5d [FIX] website: avoid translation issue with copy on inherited record
Since Odoo saas-11.3, copying a record with it's inherited record in the copy
dict values will trigger translation of the inherited record's fields which it
shouldn't.

This issue will be fixed with #27108

In the meantime, we can avoid this issue by not copying the view separately
from the page as this code is a residue from the old implementation (no
inheritS between `website.page` and `ir.ui.view` + they both had `name` field)
and is not usefull anymore.
2018-09-20 13:49:31 +02:00
Adrien Dieudonne 067754f0f6 [REF] web: Use graph renderer to render pie_chart widget
Before this rev., the pie_chart widget was rendered from scratch
with nv.d3 and we had duplicated code.
In comparison mode, two widgets were instancied and it was a bit
difficult to synchronize the size of these svg graphs.

nv.d3 graphs are attached when the dom is ready because it needs
to calculate the available space. UI bugs can appear if the dom
changes... .update() must be executed on the graph to avoid this
as we already do in graph renderer.

So now, the rendering of the pie_chart widget is done by the
graph renderer.
As comparaison mode is supported by the rendering, only one
widget needs to be instancied.

Task ID: 1835644
2018-09-20 13:30:50 +02:00
Nicolas Seinlet b5a12b4aac [IMP] website: ensure login uniqueness per website in SQL
Constraints in SQL are faster than python equivalent.
Adding a coalesce in PostgreSQL constraint doesn't seems possible.
This combination of constraint and weird named unique index is the
fastest way to ensure a unique constraint with NULL values.

This index require the website_id to be present in the res_users
table. To do this, a stored readonly related field is used.

This was introduced by 4f6ec1cd2a
2018-09-20 13:25:28 +02:00
Thibault Delavallée e7c53bd150 [IMP] mass mailing: improve demo data
Purpose of this commit is to have some demo data that are coherent. Main things
done in this commit are

 * clean the body of the first mass mailing given to the user in order to have
   a content more inlined with odoo emails;
 * update filter of the demo mass mailing to limit the results to something
   predictable, aka contacts of ReadyMat;
 * update statistics to be really linked to customer of the demo company by
   setting model and res_id;
 * create a statistics for each child of the company ReadyMat so that stat
   buttons redirect correctly to a filetered view;

This commit is linked to task ID 1885121 and closes PR #27003.
2018-09-20 13:02:17 +02:00
Thibault Delavallée 1f6d534f5a [IMP] mass_mailing: redirect to filtered view when clicking on stat buttons
Purpose of this commit is to improve user experience in mass mailing by
redirecting users on filtered views when clicking on sent / delivered /
read / opened / clicked stat buttons. Currently it redirects to the
statistics view which is not the most useful one.

This commit is linked to task ID 1885121 and closes PR #27003.
2018-09-20 13:02:17 +02:00
XavierDo 932ac0e42a [FIX] mail: clean context before default activity creation
When trying to mark an activity as done & launch next from the crm
kanban view, an default_type "opportunity" was present in the context,
and kept untill trying to create a voip phonecall if the default
next activity type had a category "Phonecall". Removing the default
from the context in this case will avoid this kind of error.

PR: #27128
2018-09-20 12:42:33 +02:00
XavierDo f7957fb6aa [FIX] mail: prevent redirect to app switcher
Before this commit, trying to send or preview a mail from a kanban view was
redirecting to the appswitcher.
2018-09-20 12:42:33 +02:00
Olivier Dony 84af9382e2 [IMP] mail: avoid costly queries on messages
The combined domain for moderated messages used to trigger a complex
database query with two OR conditions on the mail_message table.
Unfortunately PostgreSQL seems to be unable to optimize this with
indexes, or to detect that one of the conditions is void (included `AND
FALSE`). On large mail_message tables, this significantly slows down
calls to message_fetch, e.g. 6s instead of ~70ms, while returning the
same results.

As a workaround, move the logic for generating the moderation domain to
the server side, where it can be:
 - optimized out when the user is not a moderator
 - split into 2 distinct DB queries in order to avoid the pathological
   case

After this change, calls to message_fetch with and without messages
to moderate execute in respectively ~50ms and ~150ms, instead of 6s, in
a test database with 25 million messages.

The modified message_fetch signature is backwards-compatible.

+ modified mock server used for the tests, which unfortunately
duplicates most of the business logic.
2018-09-20 12:41:03 +02:00
Martin Trigaux 4558ca95cd [I18N] calendar: correct bad email template translation
opw-1887086
2018-09-20 11:44:02 +02:00
Vincent Schippefilt a0ce697b05 [FIX] web: add mouseenter when triggering a dra&drop in tests 2018-09-20 11:10:34 +02:00