Commit Graph
126133 Commits
Author SHA1 Message Date
Christophe Simonis 38fcea389c [FIX] base: explicitly define Human Resources module category
As this category is used by `hr` module, we need to ensure the records
exists in database.
Even if the xmlid is automatically created if not present, it may be
deleted during upgrade (migration) if noupdate flag is not set in
database.
2018-08-30 14:46:40 +02:00
Florent de Labarre 1ece9412be [FIX] stock: avoid useless processing
Define variables `product_id` and `rounding` to avoid useless Python
processing when accessing the corresponding values.

Closes #23111
opw-1868447
2018-08-30 14:01:54 +02:00
Moises Lopez e68350fcb5 [FIX] project: iterate on a single task
Do not retrieve the attachment of all records
Performance impromevement when iterating on a large number of records

From #26446
2018-08-30 13:33:52 +02:00
Alexandre Kühn f0f81e8db3 [FIX] mail: correctly handle (non-)passive thread windows
Definition of '(non-)passive' thread window:

  Thread windows can be either 'passive' or 'active'
  (default: 'active').

  - When opening a thread window in 'active' mode, the messages
    are marked as read, and the focus is on the thread window.
  - When opening a thread window in 'passive' mode, the messages
    are not marked as read and there is no focus on the thread
    window. Messages are kept unread until the user interacts with
    the thread window (e.g. by clicking on composer).

  When the user intentionally opens a thread window, it should
  be open in active mode. However, when a thread window is open
  without any user iteractions, it should open in passive mode.

  The later case is useful in some cases. For instance, when
  receiving a new message from a DM conversation, it should
  automatically open the corresponding thread window. However,
  it should not automatically mark messages as read.

This commit contains 2 bug fixes:

1. When receiving a new message on an active thread window,
   it no longer increments the unread counter.

   (When the focus is on the composer of the thread window,
   the user is immediately reading newly received messages.)

2. When receiving a new message from an unpinned DM conversation,
   the newly open thread window is always passive.

   (This was not the case before, so when receiving new messages,
   it did not increment the unread counter.)
2018-08-30 13:30:12 +02:00
Alexandre Kühn be44efe852 [REF] mail: clean some JS code
1. Removed `getLocalMessages` method in mailbox, and replaced
   with an override on `getMessages`.

   (This method was used before the distinction was made
   between `getMessages` and `fetchMessages`)

2. Removed unused method `_warnUpdatedUnreadCounter` in
   abstract thread window.

   (Leftover from an early POC)

3. Set the default value `''` for the status of a thread.

   (The method `getStatus` should always return a string)

4. Enforce default value `false` for detached status of channel.

   (The method `isDetached` should always return a boolean)

5. Improve readability of some tests.

   (removed useless variables and/or redundant code)
2018-08-30 13:26:07 +02:00
Siddarth Gajjar bd43df539f [IMP] mail: improve envelop icon tooltip style
This commit improves the style of the tooltip on the mail envelop
icon next to a message related to an email. To do so, we have removed
existing CSS and custom tooltip UI and replaced them with boostrap
popover.

This commit also removes most flickering issue when mouse hovering
on gaps between the tooltip and message icons.

Note that there are still corner cases that produce flickers.
This is unfortunately a known issue with bootstrap 4, as this glitch
can also be observed on bootstrap website.

Task-ID 1879282
Closes #26546
2018-08-30 12:47:28 +02:00
Christophe Simonis 6b1b507deb [MERGE] forward port branch saas-14 up to ab8e27382f 2018-08-30 12:43:43 +02:00
Christophe Simonis ab8e27382f [MERGE] forward port branch 10.0 up to 09ad560660 2018-08-30 12:43:12 +02:00
Davor Bojkić - Bole 09ad560660 [ADD] base: add Kosovo to list of countries
According to discussion on jvOrsouw/Odoo11#1

Closes #20605
2018-08-30 11:58:05 +02:00
William Henrotin c7c6f911a8 [FIX] sale: loading onboarding panel
the commit 4136072588 translated some 
fields linked to the sale onboarding panel. The issue is the values 
should be single quoted + double quoted while it was only double quoted. 
The t-value tag evaluates what's inside the quotes as python expression. 
If we want to pass a string, we need to use two kind of quotes.
2018-08-30 11:14:02 +02:00
qsm-odoo 8a0b39be24 [FIX] website: add an ID to the main colorpicker option
Needed for theme migration.
2018-08-30 11:10:56 +02:00
qsm-odoo fc13c53837 [FIX] website: wrap footer copyright in a full-width div
Needed for themes migration.
2018-08-30 11:10:56 +02:00
qsm-odoo aa24a2cad4 [FIX] website: use variables for boxed layout option
- More efficient
- Needed for theme migration
2018-08-30 11:10:56 +02:00
qsm-odoo 77402a4efc [REF] web_editor, *: review color theming system
* web, website

- Introduce gray color palettes (needed for themes migration)

- Synchronize BS4 color maps with individual variables (see comments
 about this in the code).

- Review alpha/primary, beta/secondary matching:

Before this commit, we decided that the common way to define a color
palette was defining primary, secondary, gamma, delta and epsilon.
alpha and beta were then forced to primary and secondary without other
possibility.
The new system makes more sense:
1) define alpha, beta, gamma, delta and epsilon
2) primary and secondary will automatically be set to your alpha and
  beta (allowing to style the default UI with BS4-independant
  variables)
3) if you are not happy with (2), you can define primary / secondary
  in your color palette so that they are not automatically set to
  alpha / beta

This commit also changes what classes the editor uses. Background colors
and text colors will now use alpha/beta/gamma/delta/epsilon (not primary
and secondary anymore). For buttons, all the possibilities are suggested
but color duplicates are hidden (so if your primary and alpha are equal,
only one button color is suggested).
2018-08-30 11:10:56 +02:00
qsm-odoo 6e33301693 [REF] website: simplify color preview system in theme dialog
Only one color palette is shown at a time, so no need for the extra
css rules.
2018-08-30 11:10:56 +02:00
qsm-odoo b3c4eb46d8 [REF] web: introduce a way to extend the bg-variant mixin
Needed for themes migration.
2018-08-30 11:10:56 +02:00
Christophe Simonis 50bd9376d7 [MERGE] forward port branch 10.0 up to 90ce4733ae 2018-08-30 11:10:22 +02:00
qdp-odoo 005fbddbcd [FIX] account: caption position in reconciliation widget
Default position is now bellow, but in the reconciliation widget we want it above each line so we explicitly have to say it
2018-08-30 11:10:04 +02:00
Nicolas Martinelli 052a5702c5 [FIX] purchase: keep vendor reference
Create a PO and assign any string to the Vendor Reference field. Confirm
and create an invoice.

The Vendor Reference field on the invoice is empty, while it is expected
to be filled in.

opw-1879379
2018-08-30 10:07:35 +02:00
Martin Trigaux 4136072588 [FIX] sale,website: correct translatable content
Remove untranslated terms
Rephrase unclear content
2018-08-30 10:02:27 +02:00
Nicolas Martinelli 90ce4733ae [FIX] website_sale: add back compute_currency function from qweb template
Unless there is a a bug, do not remove a currency conversion.

This reverts commit 5028da3873.
2018-08-30 09:56:53 +02:00
David Beguin e7871625f6 [FIX] mail, mass_mailing: remove user error if remove unexisting record from blacklist
In unsubscribe page, if the user try to come back
(and be removed from the blacklist)
but his email have been deleted from the blacklist,
it was leading to an error.
Instead, and in order to keep a trace of what the user asked,
if the email is not found in the blacklist, the record will be
created but archived directly.
Also, it aligns the return of both methods _add/_remove
2018-08-30 09:45:58 +02:00
David Beguin a409dd3d31 [IMP] mail, mass_mailing : avoid edit blacklist entries
Edit blacklist records has the side effect of unblacklist the
contact that had the old blacklist email address.
If the user entered a wrong email address to create a balcklist record,
he now has to delete the record and start again.
2018-08-30 09:45:58 +02:00
David Beguin 39a628e586 [IMP] mass_mailing : review unsubscribe page + renaming blacklist creation date in form
Reviewing unsubscribe page style and button naming.
Rewritting the feedback controller to be easily readable.
Renaming blacklist creation date field in form to remove confusion.
2018-08-30 09:45:58 +02:00
Mitali Patel 5028da3873 [FIX] website_sale: removing compute_currency function from qweb template (#26606)
compute method called 2 times in t-esc case when monetary field has "from_currency ::
 1) value_to_html: compute method call when qweb monetary widget is return value as a html.
     see https://github.com/odoo/odoo/blob/10.0/odoo/addons/base/ir/ir_qweb/fields.py#L325
 2) compute_currency : compute_currency method is pass from controller into render engine and it is call the compute method.
So, we removed compute_currency method from qweb template in the t-esc with monetary widget.
2018-08-30 09:26:49 +02:00
Lucas Perais (lpe) e65c8826ef [FIX] sale_timesheet: timesheet cost with company on analytic account
FIXUP da2140b

The above commmit was half-right in the business logic, but overlooked that if a user is not
in the company of the project, it will crash.
This use case worked before that commit

While agreeing that a little more clear access right is needed
like for example be able to get the project_time_mode_id on the companies
that are in user.company_ids,
the aim of this present commit is to avoid regression

OPW 1878204
closes #26539
2018-08-30 09:21:02 +02:00
Lucas Perais (lpe) b8fe404eae [FIX] project: portal should see projects only when he has tasks
before this commit, on /my/tasks, in the filter dropdown, every project that had visibility = portal was displayed
regardless of whether the portal user was a follower or not

After this commit, we search project in a more clever manner

OPW 1878187
closes #26615
2018-08-30 09:17:23 +02:00
Goffin Simon 1962d17c4b [FIX] hr_attendance: White screen if employee is not set
When the user was not linked to an employee, the first screen of the Attendance app
(the check-in/out screen) stayed white.

opw:1880582
2018-08-30 09:12:34 +02:00
Nicolas Martinelli 93a586be7c [FIX] calendar: recurring events
Do not parse the rule with `rrulestr`, because converting back to string
will change the original rule.
2018-08-30 09:04:23 +02:00
Joren Van Onder a1802fa327 [FIX] point_of_sale: iface_print_auto doesn't require a POSBox
Auto-printing works with and without a POSBox. Skipping the print
screen only works with a POSBox.

Was possible in v10, small oversight of
80e89c7a11.

opw-1874390
2018-08-29 14:39:01 -07:00
Sébastien Theys 9441a1f5e1 [FIX] base: RNG validate text attribute for field (url)
The UrlWidget supports a text attribute to define the text of the <a> tag, but the text attribute wasn't supported in the RNG of the field.
Thus it wasn't possible to use it in tree views. However it already worked fine in form views because those are not RNG validated.

PR: none
Task: none
2018-08-29 23:22:33 +02:00
sed-odoo 9f9ba96013 [FIX] base: Fix traceback on draft invoice preview
Purpose
=======

- fix a traceback when preview a draft invoice while using SEPA QR code.

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

- add a condition to not get the length of the communication if the field is not defined.
2018-08-29 17:41:51 +02:00
Sébastien Theys 4a3fd02af4 [FIX] various: clean up portal and reports (sales and invoices)
The goal of this commit is to fix the various views and reports of sales and invoices.

======
Portal
======

Fix breadcrumbs

Fix BS4 issues, alignment of various elements

Better auto resize of the invoice iframe

Fix invoice list for draft invoices

Fix previous/next document pagers

Remove unnecessary monetary widgets (not needed when using t-field if the field is Monetary)

Standardize invoice and sale routes:
- especially when related to displaying: html, pdf (print and download), text
- by using the get_portal_url() also for invoices

Add the total on the left column of sales order

================
Section and note
================

Improve general style:
- notes in italics
- sections: less padding, darker background, no borders

=========
Demo Data
=========

Fix sales order demo data to appear for the admin (instead of system)

PR: #25997
task-1869469
2018-08-29 17:16:06 +02:00
Christophe Monniez 984554f4ca [REF] web: move debug_managers in tools 2018-08-29 16:57:27 +02:00
Christophe Monniez 3f0ebca192 [IMP] web: New test to test Odoo menus
This commit adds a new js test in web that enters each app and click on
each view switcher, each menu and each search filter.

This test is tagged '-standard' and 'click_all' as it could last a long
time, that way it's not executed by default.

It could also be started from the browser console with
'clickEverywhere();'.
2018-08-29 16:57:27 +02:00
XavierDo 334b57fbf6 [FIX] base: remove error_context message from test log
Some error_context messages were logged during tests
causing some useless noise in log.
Corresponding mute logger are now fixed/added.
2018-08-29 16:51:42 +02:00
Christophe Simonis 0b8ef693a0 [MERGE] forward port branch saas-15 up to 0dc8588c5b 2018-08-29 16:45:36 +02:00
Goffin Simon 7b87212ea8 [FIX] account: Wrong quantity in Invoices analysis
Steps to reproduce:

Create a customer invoice with 2 product A and refund 1 product A.
Display account.invoice.report for this custumer.

Bug:

The quantity should be 1 not 3.

Fine tuning of this commit: e890682656

opw:1868116
2018-08-29 16:29:34 +02:00
Lucas Perais (lpe) 4ba87e073d [FIX] mail: right user_ids when calling /mail/follow
On a SO, write a note to a user
The mail the user receives contains a follow button
Click on it

Before this commit, the link did not add the user as follower of the SO
this was because the wrong uid was passed to the function

After this commit, user is added as follower

OPW 1869849
closes #26634
2018-08-29 15:58:10 +02:00
Jeremy Kersten 19cc218d03 [FIX] website: make field required once feature enable via checkbox
Now that this field is computed (true if value), once the user check a feature, it is required to fill in the field.

Before this commit, you can click on checkbox, and save without key in field, and a refresh checkbow was again unchecked.
2018-08-29 15:18:19 +02:00
Jeremy Kersten 2a9a514551 [FIX] website, website_theme_install: improve flow for new website creation 2018-08-29 15:18:19 +02:00
Jeremy Kersten e24fedb757 [FIX] website: create public user in sudo
If new user is not in the current company, once created you will not be able to read it and
a traceback is raised.
2018-08-29 15:18:13 +02:00
Christophe Simonis 0dc8588c5b [MERGE] forward port branch saas-14 up to 2a515bc7cb 2018-08-29 14:43:54 +02:00
Odoo Translation Bot f22e61dc74 [I18N] Update translation terms from Transifex 2018-08-29 14:19:27 +02:00
Toufik Benjaa b367625248 [FIX] sale_payment: create payment.token when needed
- Before this commit, a sale order that generate a subscription and paid
  by the form method do not create a payment.token.

  After this commit, we check if the sale order need a payment.token to
  be created, if so we set the correct transaction type.
2018-08-29 13:55:03 +02:00
Nicolas Martinelli b53b637745 [FIX] mrp: 'To Consume' in workorder
Hide the field since it is always set to zero.

opw-1869511
2018-08-29 13:38:51 +02:00
Christophe Simonis 2a515bc7cb [MERGE] forward port branch 10.0 up to 068f1cd302 2018-08-29 12:13:48 +02:00
David Beguin e5f490821b [FIX] mass_mailing: Feedback when multiple contacts with same email address 2018-08-29 12:13:29 +02:00
Christophe Simonis 068f1cd302 [MERGE] forward port branch 9.0 up to 5f25b902e5 2018-08-29 12:12:01 +02:00
Jeremy Kersten 2bc2ea0039 [FIX] website_sale_wishlist: allow the public user to delete product from the wishlist
Search 'id', 'in' instead to browse old record
Update session wishlist_ids when a product is deleted
Garbage old archived public wishlist, now we unlink theme directly, but for previous version
2018-08-29 11:56:27 +02:00