Commit Graph
119195 Commits
Author SHA1 Message Date
Christophe Matthieu a8e4e625f4 [IMP] web: remove useless service name
We use the registry keys as name for the services.
2018-08-09 02:31:59 +02:00
Christophe Matthieu cf4c4a11b7 [IMP] web: the service mixins _rpc method add the abort method
This change is usefull to convert the bus.bus into a sweet bus and cross tab bus service.
Actually, if we use the _rpc mixins in the bus, the long polling can't be abort, and
raise an exception.
2018-08-09 02:31:59 +02:00
Christophe Matthieu 693c771111 [IMP] web: abord the poll when destroy to avoid useless call
If the service bus are called and destroyed the rpc can be returned after, to
avoid a useless call to the database and unexpected behavior, we abort the
connection.
2018-08-09 02:31:59 +02:00
Ankit Joshi 23c0c79128 [TEST] purchase_stock: Add reordering rule test case
- Receive products in 2 steps
- The product has a reordering rule
- On the PO generated, the source document should be the name of the reordering rule

Task-1838639
2018-08-08 17:39:02 +02:00
Pierre Masereel b3d30969a4 [IMP] stock: do not use rule name in origin
We don't want to use the name of the rule that created a move anymore,
so we propagate the origin of previous move if it has any and, use the
picking name of the previous move if doesn't hav any origin.

This behaviour make more sense as it will alway keep the origin of the
document that trigger the creation of a move.

TASK-1838639
2018-08-08 17:39:02 +02:00
Yannick Tivisse 64f6e50d0c [FIX] web: Reset correctly the selection on reference fields
Purpose
=======

If the model on a reference fields is not modified from the interface
by the user but by the server, the selection is not correctly
recomputed on the interface.

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

By calling super first on the '_reset' method, the new model
is taken into account when resetting the selection.
2018-08-08 17:35:34 +02:00
Pierre Paridans 91b62235f8 [IMP] base: Allow to select a record by its name on a server action line
Purpose
=======

When you update a record on a server action, you can modify a field
value (like the partner id). It's boring to be forced to specify
the id on the server action line. It would be easier to search on the
record name.

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

A a server action line type 'Reference'. It allows to select the partner
name (Agrolait) instead of being forced to specify its id (3493).
2018-08-08 17:35:34 +02:00
Pierre Paridans 7309981426 [IMP] mail: Add 'Next Activity' in server action type
Purpose
=======

As a server action could add followers on a record, here the goal
is to be able to add a next activity on a record.

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

Based on the configured trigger, we can add a next activity on a record
by specifying :
- The activity type
- A summary
- A note
- A due date in x days/weeks/months
- A responsible
2018-08-08 17:35:34 +02:00
Pierre Paridans e4381d9f1b [IMP] base_automation: Reorganize server action form view 2018-08-08 17:35:34 +02:00
jem-odoo 001ab92bd3 [FIX] sale_timesheet: use datetime and not string 2018-08-08 17:27:02 +02:00
Thibault Delavallée db8c5e6c16 [MERGE][IMP] hr_holidays: improve and fix views
According to tasks purpose: clean leave view

See sub commits for more details.

This commit is linked to task ID 1871812 and closes PR #26180.
2018-08-08 16:33:02 +02:00
Thibault Delavallée a072f13688 [IMP] hr_holidays: fix display of duration in allocation form view
Purpose: better display duration. Label for hours / days is not very user
friendly when displayed left compared to the value. In this commit we
move the unit display right of the value and correctly display choices
related to the leave request date options.

This commit is linked to task ID 1871812 and PR #26180.
2018-08-08 16:28:56 +02:00
Thibault Delavallée 5ee535f297 [IMP] hr_holidays: improve leave type form view
Purpose: according to tasks's specifications

 * place elements in order it is not changing according what you select
 * https://drive.google.com/a/odoo.com/file/d/18gat1lw8mo9NTqU3mDuXqvuZXlMRzASX/view?usp=drivesdk
 * https://drive.google.com/a/odoo.com/file/d/1fLKpnW6RcaQetYJ0Ep7vZ7YHr_pW8-x_/view?usp=drivesdk

This commit is linked to task ID 1871812 and PR #26180.
2018-08-08 16:28:52 +02:00
Thibault Delavallée 7e7ea0aa82 [IMP] hr_holidays: limit configuration menu to hr officers
Purpose: an employee shouldn't see the leave type menu in configuration
(access right)

This commit is linked to task ID 1871812 and PR #26180.
2018-08-08 16:28:48 +02:00
Thibault Delavallée 9af6e9070a [IMP] hr_holidays: improve application menus
Purpose: new menu organization

 * Dashboard (only for officer and manager like currently)
 * New Request (= leave requetss in calendar view)
 * My Leaves
 * Leaves Summary
 * Leaves Requests (in list view)
 * Allocation Requests
 * Managers (current menu is ok)
 * Reporting (current menu is ok)
 * Configuration (ok)

This commit is linked to task ID 1871812 and PR #26180.
2018-08-08 16:28:40 +02:00
Thibault Delavallée 48210c76db [IMP] hr_holidays: improve leave request form display of duration
Purpose: better display duration. Label for hours / days is not very user
friendly when displayed left compared to the value. In this commit we
move the unit display right of the value and correctly display choices
related to the leave request date options.

Part of the spec: https://drive.google.com/file/d/1XQtw5ZiAebycXbeHmfbDYYwrFTRmkBNU/view

This commit is linked to task ID 1871812 and PR #26180.
2018-08-08 16:28:24 +02:00
RomainLibert 8cebbe4c31 [MERGE] various: improve product form usability
* product_product, product_template :
    - Add `uom_name` field to display stat buttons with UoM's name.

* delivery:
    - Move field 'HS Code' from `General Information` to `Accounting`.

* hr_expense:
    - Make checkbox `Can be Expensed` visible for all products.

* mrp:
    - Stat button update, we now count the uom quantity of product we have in our MOs
      limited to the last 365 days. Before that we were counting all the MOs.

    To achive this,
        - Add a stored compute field `product_uom_qty` on `mrp.production`.
        - Stat button now uses `action_view_mos`
        - The field was called `mo_count`, renaming it to `mrp_product_qty` as its
          function changed.

* point_of_sale:
    - Add a new tab (`Point of Sale`) and moved the `Point of Sale` section
      previously located in `Sales` to this newly created tab.

* product_email_template:
    - Renamed header 'Email' to 'Automatic Email at Invoice'.

* purchase:
    - Improved tooltip of field 'property_account_creditor_price_difference'.
    - Set `product_uom` to `uom.product_uom_hour` instead of
      `uom.product_uom_unit` in demo data.
    - Add a stored compute field `product_uom_qty` on `purchase.order.line`.

* report_intrastat:
    - Move field `Intrastat` from `General Information` to `Accounting`.
    - For product template's form view, inherit from
      `product.product_template_form_view` instead of 'stock.view_template_property_form'.

* sale:
    - Move `expense_policy` from `Purchase` to `Sales`.

* stock:
    - Add a new section in `Inventory` called `Logistics`, and put fields
    - `Weight`, `Volume` and `Responsible` in it.
    - `incoming_qty` is now only visible in debug mode.

* website_sale:
    - Add a new tab 'eCommerce' and move 'eCommerce' section from 'Sales' tab to this newly created tab.
    - Rename 'eCommerce Categories' to 'Categories'.

Task: #51125
Closes: #23868
2018-08-08 14:51:15 +02:00
Deep Patel af1a935604 [IMP] web: Added help option in stat buttons. 2018-08-08 14:51:14 +02:00
Kirti Choudhary 9108a271bc [IMP] purchase: correct demo data
A service type product should be counted in hours instead of units
2018-08-08 14:51:13 +02:00
Kirti Choudhary 227dbaa037 [IMP] mrp,stock: use custom action for product variant
Before this commit we used the same view everywhere, now each module has
its own view.
2018-08-08 14:51:13 +02:00
Kirti Choudhary 815154df2e [IMP] various: clean product search views
Lots of modules are adding their search view for products
this commit tries to clean them in order to have something clearer
2018-08-08 14:51:12 +02:00
Kirti Choudhary 5118d248cc [IMP] various: use uom in stat buttons
In purchase we add a stat button that counts the number of purchase
orders linked to the product.
In this commit we change this count to count the quantity of products
linked to a purchase order.

We basically do the same thing with the stat button of sale (sale
orders) and mrp (manufacturing orders).
2018-08-08 14:51:12 +02:00
Kirti Choudhary c1f7987f49 [IMP] various: improve product form usability 2018-08-08 14:51:11 +02:00
Laurent Smet 10b9d06689 [ADD] account: allow forcing tax included tax in reconciliation widget
Before this commit, the only way to deal with the same tax either with price included or not was to duplicate it, one with the price included checked.

This commit add a new boolean on the reconciliation widget propositions to decide if the tax must be used like a price included tax or not.

PR: 17040
task: 32717
2018-08-08 13:45:11 +02:00
Martin Trigaux fb1a8cc19d [FIX] point_of_sale: set a date and not a datetime
last_session_closing_date is a date field but stop_at us a datetime
2018-08-08 12:24:59 +02:00
Olivier Colson 87f0d2eefb [REF] account, account_check_printing, payment, l10n_do, l10n_de, l10n_fr, l10n_nl, l10n_mx: chart templates installation: remove old useless wizards and move everything to account.chart.template
Was task 1858974
Was PR https://github.com/odoo/odoo/pull/25243
2018-08-07 17:11:08 +02:00
Thibault Delavallée 8edae4200f [FIX] hr_holidays: yet another date/datetime fix
Still fixing some side effects of https://github.com/odoo-dev/odoo/commit/960360afe478a8f7b9c456721b5591154952a37d.
2018-08-07 16:45:16 +02:00
Thibault Delavallée 41eb02c218 [MERGE][REF] mail: optimize message notification process
This merge optimizes and lessens query count of notification process. When
posting a message some computation is done to fetch followers and/or people
and channels to notify, then notify them on their Inbox or by email. This
process now takes less queries thanks to several improvements :

 * fetching followers / recipients data is now done manually in SQL allowing
   to fetch data across several models in less queries;
 * computing recipients is now separated from notifying them. Notification
   better uses precomputed data in order to avoid fetching and browsing
   several time the same data;

When possible code has been made more readable through code inlining. Several
methods have been removed because they are not used in inheritance. Some code
is now more low-level. Optimizing part of the process can make it harder to
inherit or modify.

Performance counters are updated showing gain in nearly all tested cases.
An enterprise branch is linked to this one that also improve notification
process.

This merge is linked to task ID 47934 and closes PR #24033. No functional
change should occur with this merge.
2018-08-07 15:44:15 +02:00
Thibault Delavallée 689a496f1c [REF] mail: propagate recipient data through notification process
Purpose of this commit is to avoid browsing and prefetching data about
recipients when notifying a message to partners and channels. Mail message
_notify computes all necessary data in a single query. This commit allow
to re-use this data by propagating it through the call chain.

Addons inheriting from classification methods used when sending notification
emails are updated accordingly to the API and data update.

This commit is linked to task ID 47934 and PR #24033. No functional change
should occur with this commit.
2018-08-07 15:43:06 +02:00
Thibault Delavallée 89051058f4 [REF] mail: clean code related to notification email generation
This commit cleans code about sending email notification to recipients.
Purpose of this code is to prepare notification emails, group recipients
and finally send emails. In this commit we clean and optimize a bit by

 * propagating some additional parameter to simplify code, like record
   on which the notification process runs;
 * inlining some code currently located in sub-methods. It eases code
   understanding as there are less code jumps. As those methods are not
   inherited inlining them can be done;
 * simplifying a bit notification emails preparation and computation;

It allows to save a few query by avoiding to fetch and browse again some
data that were already computed.

This commit is linked to task ID 47934 and PR #24033. No functional change
should occur with this commit.
2018-08-07 15:43:06 +02:00
Thibault Delavallée df8130b2fa [REF] test_mail: update counters due to enterprise mail_push update
This commit is related to enterprise commit that updated mail_push. It is about
[REF] mail_push: optimize mail.message notification process override

It updates code of mail_push to lessen its impact on mail-related code. It
allows to change a few counters in test_mail. Indeed counters are impacted
by code located in enterprise because those are "maximum queries" counters.
As mail_push is an auto-install module enterprise runbot would be broken
if the counters weren't updated.

This commit is linked to task ID 47934 and PR #24033. No functional change
should occur with this commit.
2018-08-07 15:42:50 +02:00
Thibault Delavallée 6de76cc4f1 [REF] mail: optimize notification recipients data fetch through SQL query
In this commit we update _notify method of mail.message to fetch most data
related to notification process in a single query.  Indeed posting a
message can be a costly process, especially when involving several partners,
channels, depending on their notification status, user groups, ... Most
of the required data can be fetched in a single hand-tuned query.

Purpose is to lessen query count. Side effect of this commit is that code
is less recordset based and therefore more low-level. It is also harder to
customize the behavior through inheritance as it implies rewriting a bit
more of code.

This query is located in a private method on follower model. It takes
parameters allowing to either fetch data related to followers of a given
subtype, either related to some partners and channels. First use case is
related to the process of posting a message with a subtype that triggers
notification of followers. Second use case is related to notifying some
specific partners or channels of a given message. It takes notably into
consideration internal subtypes and active field of partners, allowing to
correctly handle corner case for deactivated followers and portal / share
partners.

Notification process is divided into two steps. First one is to compute
recipient data. Second one is to apply the result of this computation and
call the various notification mechanisms accordingly. Doing so allows to
easily re-call notification process or compute some data differently
if necessary.

API of notification methods is updated to allow passing notably the values
used to create the newly-posted message. It allows in some simple case to
avoid browsing message and partners when no notification is necessary. It
saves some queries in simple case like posting messages with specific
subtypes not often followed or logging notes without mentioning people.

This commit allows to save a few queries on several performance tests as
indicated by updated performance counters. Future commits will gradually
propagate the use of this data to further lessen query count.

This commit is linked to task ID 47934 and PR #24033. No functional change
should occur with this commit.
2018-08-07 15:42:45 +02:00
Thibault Delavallée 40922cc027 [FIX] hr_holidays: fix date computation
Since date / datetime refactoring done at 960360afe4 we cannot
encode new leave requests or new allocation requests anymore. This commit
fixes that by correctly setting date / datetime on date / datetime field
and correctly computing one from the other.
2018-08-07 15:39:36 +02:00
qsm-odoo 240b338dd9 [FIX] mail: BS4, restore activity popover
Adapt SCSS which was BS3-specific and remove misuses of the
dropdown-item class.

Closes https://github.com/odoo/odoo/pull/24419
2018-08-07 14:50:06 +02:00
Olivier Colson 3de7521174 [IMP] account: new setting to define a start for bank reconciliation
Payments older than the chosen date won't be proposed in the widget allowing to match payments with bank statements. This is useful if the db used invoicing for years and then installed accounting : users don't want to have to match all the old payments that were generated by invoicing with bank statements.

Was task 1829536
Was PR https://github.com/odoo/odoo/pull/24728
2018-08-07 13:39:02 +02:00
David Beguin 8c1805cdc6 [FIX] Crash Manager - Clipboard JS reference updated
The instanciation of the clipboard in the crash manager was not updated
in the fix that upgraded the clipboard.js
2018-08-07 10:37:55 +02:00
Deep Patel 70df0bb586 [FIX] website, website_sale: BS4, adapt carousel controls
Completes https://github.com/odoo/odoo/commit/20d033a782f4d85fdd6f15df68d116b2fd7a7dfd

Closes https://github.com/odoo/odoo/pull/26077
2018-08-07 10:03:59 +02:00
Prakash Prajapati 5caa9a46a0 [FIX] stock: review some report layout
The 'table-responsive' class should not be used on <table/> elements
directly (this is allowed by BS4 but this is not good practice to me).

Closes https://github.com/odoo/odoo/pull/26148
2018-08-07 10:03:59 +02:00
Prakash Prajapati ba8a52972a [FIX] website_forum, website_forum_doc: BS4, fix some layout issues
Closes https://github.com/odoo/odoo/pull/26178
2018-08-07 10:03:59 +02:00
Siddarth Gajjar 0d8b1f5ba3 [FIX] web: BS4, fix tooltip flickering issues
Closes #26186
2018-08-07 10:03:59 +02:00
qsm-odoo 57400c1560 [FIX] mail: BS4, properly style followers list
Thanks to @hbh-odoo
2018-08-07 10:03:59 +02:00
Florent de Labarre b16a40721d [FIX] account: add countraints on account type
You cannot have more than one account with "Current Year Earnings" as type for a company.

opw:1868446
2018-08-07 09:43:04 +02:00
Ivan Yelizariev d458ec953b [REM] point_of_sale: remove fastclick.js
It was introduced in 2013, but it's not needed in 2018. According to library's
note: 

"As of late 2015 most mobile browsers - notably Chrome and Safari - no
longer have a 300ms touch delay, so fastclick offers no benefit on newer
browsers, and risks introducing bugs into your application. Consider carefully
whether you really need to use it."

PR #26200
2018-08-07 08:49:18 +02:00
Thibault Delavallée 027b3a35d7 [IMP] mail: improve use of templates linked to activities
Purpose: Give the ability to people to directly sign (sic) an email template
without opening the mail composer.

Specifications
 * do not display 'email' in activity view: either there are emails and new
   display applies, either there aren't any and do not dispaly anything;
 * update display of template choice: https://www.awesomescreenshot.com/image/3531694/7f6ac0250009599089ec62b6951a88b4;
 * add an "mt 16" between activity and first mail template;

Tests have been updated to new specifications.

This commit is linked to task ID 1872169 and PR #26185.
2018-08-06 16:24:43 +02:00
Thibault Delavallée 92dcbfe8d0 [IMP] mail: add method to send an email on activity mixin
Purpose of this commit is to have a shortcut allowing to send an email based
on an email template in the activity mixin. Its use will be to integrate
the sending of emails directly in chatter-activity widget.

This commit is linked to task ID 1872169 and PR #26185.
2018-08-06 16:24:43 +02:00
Deep Patel 967d228a44 [IMP] mass_mailing, mail: added support for media queries in mass mail
- Email generated from mass mailing will have its own layout with internal css.
- strip_classes is removed from mail_message because mail client are now supporting
  internal stylesheet. we need it for make mail responsive.

mail: manually removed classes from incoming mail body

Because we removed strip_classes from mail message body field because we want to
allow classes in outgoing mail to make it responsive but classes are not removed
from incoming mails so here we manually removed classes from incoming mail.

opw-1836556
2018-08-06 16:06:45 +02:00
Fabien Pinckaers 8b4b61dfcc [IMP] base: reducing report template preview by 180kb for 4 pictures + change size to reduce height 2018-08-06 15:49:26 +02:00
Fabien Pinckaers ecc69c93ba Merge branch 'master-enterprise2-fp' 2018-08-06 14:47:06 +02:00
Fabien Pinckaers ae97e5b93a [IMP] base: avoid tab on optional dropdown menu 2018-08-06 14:46:22 +02:00
Raphael Collet 960360afe4 [REF] *: use native date/datetime for Date/Datetime fields
From this commit onwards, Date fields will return datetime.date objects and Datetime fields will return datetime.datetime objects, this implies a number of things that are clearly explained both in the ORM API for master.

This commit also introduces a number of helper functions for dates and datetimes that are exposed in tools.date_utils and fields.Date[time], explained in the documentation as well.

Task-ID: 47189
2018-08-06 14:37:19 +02:00