Commit Graph
126133 Commits
Author SHA1 Message Date
XavierDo 2222a1c21e [FIX] test_mail: update query count
Update the query count to avoid the runbot to be randomly red
Temporary fix!!!!! Will need to check with in details what is the
cause of this.
2018-08-14 15:06:41 +02:00
XavierDo 651fd4dbe7 [FIX] mail_bot: fix not_initialized inversion 2018-08-14 14:58:12 +02:00
Olivier Dony d2605bccdb [FIX] requirements: bump up pillow,jinja2 reqs
Recommended by GitHub's repository alerts.

We normally stick as close as possible to the version we depend
on in the official DEB packages. This in turn depends on the version of
Debian stable at the time of release - for 9.0 that would be Debian 8
(jessie) and thus Pillow 2.6.1.

However Pillow versions before 3.3.2 and Jinja2 before 2.8.1 suffer
from a few issues that could lead to crashes of Odoo workers.
The bugfixes have been backported in the DEB packages for Pillow,
so users of Debian/Ubuntu LTS versions won't be affected if they are
keeping their systems updated.

However it's worth an exception to our rule for pip users.
2018-08-14 14:54:57 +02:00
Laurent Smet ef42e03b69 [IMP] sale: add reference on SO + improve usability
Like invoices, a reference is now computed on sales orders.
The configuration of such reference is done through the Wire Transfer acquirer.

The usability of the communication feature (on invoices/SO) has been a bit improved to be more clear.

Was task: 1870121
Was PR #26152
2018-08-14 14:44:11 +02:00
Jigar Vaghela ea154d283e [FIX] l10n_in_stock: Adapt picking operation report
commit 9a65dda391 display the information
base on move line instead of move. This report should have been updated.

task: 1862307
2018-08-14 14:42:23 +02:00
Richard Mathot 2039c3c792 [FIX] anonymization: end of support
task: 51094
2018-08-14 14:36:18 +02:00
Richard Mathot c8a4f42ef8 [REM] anonymization: end of life of a broken module
task: 51094
2018-08-14 14:31:11 +02:00
Christophe Simonis c0f147173e [MERGE] forward port branch 9.0 up to 2917b38f28 2018-08-14 14:15:13 +02:00
Jeremy Kersten 863b86ea9f [FIX] website_sale_coupon: make test determinist
avoid race condition when refresh of /shop finish after the search click.

Now we start on the search page directly, that make tour faster and that
don't remove any usefull test, since the purpose of this test is to test
coupon and not the search view already tested by others tests.
2018-08-14 14:02:48 +02:00
Nhomar Hernández c77d4effc4 [IMP] web: Better view fields for debug mode.
When you need to fast review all properties of a model, mostly the
fields it is really anoying go to all the technical path which has all
the information already.

The previous "View Fields" action was very messy.

My proposal is simply instead use a dialog which is almost useless open
a normal vie (a little improved) which allow us audit completely
everything.

Remove the previous dialog, this will not be used anymore.

Closes #26364
2018-08-14 13:59:59 +02:00
Dharmang Soni 4dfabb8f7a [IMP] web: FieldSelection: no empty value if required
From this rev., the empty value isn't available in the options of
required selection fields, thus preventing the user to unset it.

Related to task #49262
Closes #24404
2018-08-14 13:51:07 +02:00
Nicolas Martinelli 388bc549c1 [FIX] stock: remove unnecessary manual step
- Create a product A tracked by S/N
- Get some stock of A
- Create a SO and sell 1 unit of A, confirm
- Go to the picking, validate

An error message forces the user to manually encode the 'Done'
quantities.

This step is not necessary, since the user will still get a message
notifying him that the reserved quantities will be used as done
quantities.

opw-1873180
2018-08-14 13:43:43 +02:00
jem-odoo 92bdd0e7c5 [FIX] hr_timesheet: set correct label on timesheet subview
When a subview is defined in a form view, the fields_view_get
extracts it from the global view arch returned. So extending the
field_view_get does not work to change label on subview.
This commit make this work by extending private implementation
instead.

Task #39079
2018-08-14 13:35:19 +02:00
jem-odoo f20c361095 [FIX] sale: untaxed amount to invoice should include discounts
Use price_reduce instead of price_unit to include
discount in the computation of amount to invoice.

Task #1857652
2018-08-14 13:35:11 +02:00
Nicolas Martinelli 90cdc91638 [FIX] account: fiscal year last day
Do not replace the day value without notifying the user.

In undetermined circumstances, a fiscal year last day and month can be
replaced by the default December 31st value. Since all settings are
re-written for any setting changed, this is likely to happen in the back
of the user.

Moreover, the `_verify_fiscalyear_last_day` is not correct since it
doesn't accept February 29th, while `compute_fiscalyear_dates` handles
it.

opw-1867978
opw-1873260
2018-08-14 13:32:41 +02:00
Francois Volral 8527b01f23 [IMP] web: Pie Chart Widget
This commit brings a Pie Chart Widget that allows to visualize
simple information on in a single pie chart.

For now it is only used in dashboard view but it could also be
used in another view that uses a basic renderer.

An element with tat widget with attribute name 'pie_chart'
can now be added to the arch view.
Three keys should also be provided in the attribute 'attrs':

	- measure (determines the field to aggregate on)
	- groupby (determines the field used to group data)
	- title (determines the legend of the pie chart)

Task Id: 1835644
2018-08-14 12:37:44 +02:00
Mathieu Duckerts-Antoine ad0a758b75 [FIX] web: autocompletion in the new search view
A lot of new features have been implemented in search view
but autocompletion was forgotten. This commit fixes many
small problems that were introduced:

	- synchronization of facets created through
		autocompletion with filters and groupby menus
	- filters created through autocompletion can be saved
2018-08-14 12:37:44 +02:00
Adrien Dieudonne 89931d1749 [IMP] web: comparisons in graph view
A previous commit [333ac27] has introduced a new widget TimeRangeMenu
that allows to create two sets of data to compare relatively
to a given date or datetime field.

This commit allows the graph view to render appropriately two
sets of data as would be expected in the different modes.

Task Id: 1835644
2018-08-14 12:37:36 +02:00
Adrien Dieudonne d4461cd434 [IMP] web: comparisons in pivot view
A previous commit [333ac27] has introduced a new widget TimeRangeMenu
that allows to create two sets of data to compare relatively
to a given date or datetime field.

This commit allows the pivot view to render appropriately two
sets of data in a unique table. In comparison mode, instead of
one column, three columns are created. One contains the
aggregates from the data of interest, one contains the
aggregates from the comparison data, and the last one contains
information on the data variation (expressed in percentage).

Task Id: 1835644
2018-08-14 12:37:25 +02:00
Mathieu Duckerts-Antoine 333ac27cd5 [IMP] web: new TimeRangeMenu widget in search view
This commit introduces a new widget 'TimeRangeMenu' used in
the search view. It allows a user to easily:

	- search data with a given date or datetime field value
		in a specified period of time

	- compare the data of interest with data of the previous
		period or the previous year.

The time range menu is available in the search view when one
of the four following view types is instantiated:
graph, pivot, cohort, or dashboard.

Task Id: 1835644
2018-08-14 12:30:51 +02:00
Mathieu Duckerts-Antoine 3523694b6c [IMP] web: add a patchDate function in testUtils
This function allows to properly mock Dates in js Tests
2018-08-14 12:30:51 +02:00
Christophe Simonis 2917b38f28 [FIX] crm: do not consider leads without emails as duplicated 2018-08-14 12:08:04 +02:00
Martin Trigaux e08f947abe [FIX] purchase: use field in purchase_stock
The field move_dest_ids is now defined in purchase_stock (since the split at
rev 8d4609a1db)

The line was added in purchase at f6b3247c31 in 11.0 but incorrectly forward
ported.

This commit only moves the code to the appropriate module.
2018-08-14 11:16:50 +02:00
Nicolas Lempereur b46156d4a2 [FIX] mail: update dm chat ok for f2302dfb
In f2302df dm type of channel was renamed to dm_chat, this commit takes
this into account in other part of the code.
2018-08-14 10:47:57 +02:00
David Arnold f3c2760353 [REM] account: remove useless domain
A domain on a date field is useless

Closes #26360
2018-08-14 10:37:11 +02:00
Jeremy Kersten 13e4df637e [FIX] website: bs4 fix for backend dashboard
Before this commit graph was unreadable because child of row was not col-*
2018-08-14 08:47:32 +02:00
Sébastien Theys 9b7635dd67 [FIX] test_main_flows: fix issue with button name
Commit 4c31a758cf changed the name of a button, but the test wasn't updated correctly.

PR: none
Task: none
2018-08-13 23:09:30 +02:00
jpr-odoo c556fa9be8 [REF] sale_subscription, website_quote_subscription: move sale_payment and website_quote into sale
Enterprise counterpart of https://github.com/odoo/odoo/commit/4c31a758cf0715b1c1ff2f5b3cef18fec92c2d84

PR: #2517
Task: 49205, 1838924
2018-08-13 21:54:30 +02:00
jpr-odoo 4c31a758cf [REF] various: move sale_payment and website_quote into sale and sale_management
[MOV] move sale_payment into sale
=================================

Almost all use cases of sale require sale_payment down the line.

There is only one case which does not: using sale_management without website_sale or website_quote.

However, since we want to move most of the features of website_quote into sale_management, moving sale_payement first will make the task easier.

[MOV] move website_quote into sale and sale_management
======================================================

We want to use some features of website_quote without having to install the whole module.

The main issue with website_quote was that it had a requirement on website.

What is common to website_sale and sale_management has been moved into sale. This is primarily the sales order portal view.

What is only related to sale_management has been moved into it. This is notably: sales order templates, optional products, sign and pay, ...

Everything that requires website has been moved into a new module named sale_quotation_builder. This is related to using the HTML builder to customize the quotation view.

Models, files and routes have been renamed to better convey their purpose and to follow guidelines more closely.

[IMP] merge sales order portal views
====================================

The old sales order view on the portal has been merged into the one from website_quote. The new view contains features of the two.

A lot of fixes and improvements have also been done, related to BS4 issues but also to improve the sales order view in general.

[IMP] add new settings
======================

The commit adds new settings related to activating the features that previously were activated by installing website_quote.

PR: #26345
Task: 49205, 1838924
2018-08-13 21:53:19 +02:00
Sébastien Theys 5cf167abc6 [IMP] sale: reorder menuitems in xml to match their sequence
The items were hardly readable in the xml because they were in a random order. They are now logically sorted by parent relation and sequence.

Unnecessary groups were also removed (child groups when parents already had more restrictive groups).

PR: #26345
Task: none
2018-08-13 21:52:54 +02:00
XavierDo 2df29bcfbd [IMP] mail_bot: make odoobot statefull
The current implementation of odoobot is stateless, making him a little dummy.
Adding a state on the user allow to be sure that the user don't skip a step,
or loop back to a previous step.

States also allows odoobot to repeat the question when the user don't give the
right answer.

A quick modification asked by FP before freeze, in order to change the field
type in time.
2018-08-13 21:45:53 +02:00
Alexandre Kühn 9916e5bad3 [FIX] mail:tests: destroy mocked environment on qunit test end
Before this commit, some tests had created mocked environments without
destroying the parent widget. As a result, following tests may crash.
2018-08-13 20:54:51 +02:00
Romain Derie 732702d5e2 [ADD] web_unsplash: Find free high-resolution images from Unsplash
Move module from enterprise to community

Work of @dep-odoo and @rdeodoo
2018-08-13 20:38:38 +02:00
Jeremy Kersten 0b608109ee [FIX] website_version: unpromote this module
It doesn't exists anymore in enterprise version.

Combinaison of website_publish , website_page, and multi website allow to
partially replace it.

AB testing will be back in a later version after a big refactoring.
2018-08-13 20:38:38 +02:00
Jeremy Kersten fbbf24f58a [MERGE] website: add multi-websites support 2018-08-13 20:36:28 +02:00
Jeremy KerstenandDerie Romain 853e13800f [IMP] base,web,website: asset bundle make url overridable
Allow to override the asset url generation to add in the path the website ID
and avoid continue invalidation cache and bad cache by browser.

Asset url is:
    "/web/content/{id}-{unique}/{extra}{name}{page}{type}"
with:
    id = attachment id
    unique = hash
    extra = allow to add custom params eg: website_id/ or rtl/
    name = filename
    page = used in css to split rules 4095 / file
    type = css|js

Co-authored-by: Derie Romain <rde@odoo.com>
Co-authored-by: Kersten Jérémy <jke@odoo.com>
2018-08-13 20:16:34 +02:00
Jeremy KerstenandDerie Romain c0968e68ed [ADD] website_theme_install: try to make theme multi website compliant
From now, when you install a theme, it load the data from xml to template
table theme [ir.ui.view|ir.attachment|website.page|website.menu].

Data are only copied from this template table into the real table when you
choose a theme on a website; Making them website_specific and with a link
to the original to allow futur update.

A special case is done to create theme.ir.ui.view when you are installing
a theme, even if you continue to use template tag to create quick view.

Co-authored-by: Derie Romain <rde@odoo.com>
Co-authored-by: Kersten Jérémy <jke@odoo.com>
2018-08-13 20:16:34 +02:00
Jeremy KerstenandDerie Romain 066cfc9598 [IMP] website_[blog|event|forum|sale|slide]: make website specific
Set up env & tools for module website multiwebsite (blog, event, sale..)
website_id in modelConverter and ir_rule

add _compute_domain_keys to have a different cache per website
  or rules would not be correctly website_dependant
  eg: blog 1 on website 1, blog 2 on website 2
      access blog 1 from website 1 => can access -> normal
      access blog 1 from website 2 => can access -> should crash because (ir rule)

split mixing website.published.mixin and website.published.multi.mixin to have
website_id only on last one.
 multi mixing will:
     - override website_published compute to take current_website into account (not in backend)
     - force website when clicking on published in backend

- website blog, website_sale, website_event, website_forum, website_slides are now multi website

Co-authored-by: Derie Romain <rde@odoo.com>
Co-authored-by: Kersten Jérémy <jke@odoo.com>
2018-08-13 20:16:34 +02:00
Jeremy KerstenandDerie Romain 8300155cd6 [IMP] website: res_config_setting make most key website specific
google analytics, google map api key, ... can be set by website

Remove useless duplicated label

Co-authored-by: Derie Romain <rde@odoo.com>
Co-authored-by: Kersten Jérémy <jke@odoo.com>
2018-08-13 20:16:34 +02:00
Jeremy KerstenandDerie Romain 62d73253f3 [ADD] website, base: improve name_get in case of multi_Website mode
In some case like for website_menu or res.partner from the sale_order form view
it is nice to know easily on which website this record is depending.

Co-authored-by: Derie Romain <rde@odoo.com>
Co-authored-by: Kersten Jérémy <jke@odoo.com>
2018-08-13 20:16:34 +02:00
Jeremy KerstenandDerie Romain 602807acdf [FIX] website: improve/fix menu, copy on unlink, clone page, unique_path, sale_report, ...
Fix bug from the initial poc of JOV

Fix menu creation
   - creating a menu would create a 'container' menu in the DB (.create is call without website_id)
   then writing on it would copy (if condition to cow) the menu with a website_id leaving the first
   one as a menu container unused.
   - website_menu should always have a website_id
     we dont want to support the multiwebsite system that allow to have generic/specific menu
     unlink/write is useless now since we always have a website_id

Make unique_path website dependent, 2 distinct website can have a page with same name

Make Sale report multiwebsite compliant

Make website_id on sale_order / account.invoice as a related stored from partner_id.

Co-authored-by: Derie Romain <rde@odoo.com>
Co-authored-by: Kersten Jérémy <jke@odoo.com>
2018-08-13 20:16:34 +02:00
Jeremy KerstenandDerie Romain a45bb90fac [IMP] website: improve pagemanager to be multi website compliant
Now we can see which specific page override wich page when page are sorted by url.

Co-authored-by: Derie Romain <rde@odoo.com>
Co-authored-by: Kersten Jérémy <jke@odoo.com>
2018-08-13 19:51:32 +02:00
Jeremy KerstenandDerie Romain ff26b20a48 [REF] website: small diff pep, renaming, make generic function
This commit should not change the behaviour in most cases.

Co-authored-by: Derie Romain <rde@odoo.com>
Co-authored-by: Kersten Jérémy <jke@odoo.com>
2018-08-13 19:51:17 +02:00
Joren Van Onder 4f6ec1cd2a [IMP] website,*: support multiple websites
This implements support to administer multiple websites. Although the
core functionality already existed, managing multiple websites was
fairly technical.

In the interest of database updates and migration this attempts to
keep duplicated data to a minimum. To do this the usual generic
records are rendered unless some website-specific record exists that
replaces it. Copy-on-write (COW) is used to create these
website-specific records. Through this mechanism creating a
website-specific record is delayed until necessary. A COW mechanism
has been implemented on 4 models: ir.ui.view, website.page,
website.menu and ir.attachment. These COW mechanisms are activated
when editing data through the website (aka frontend). These frontend
edits (e.g. with web_editor) will be website-specific, possibly
creating a website-specific record when necessary. When editing data
in the backend nothing special will happen, even when editing a
generic record. Note that because of this mechanism also facilitates
the ability to create new, uncustomized websites because the generic
data is kept.

Support is provided for a website to have any theme. Themes are fairly
complex to handle. Standalone themes can depend on other standalone
themes (e.g. theme_beauty depends on theme_loftspace) and themes
usually modify some data of the themes they depend on. Because a theme
can be installed on multiple websites, using website_id m2o fields
does not work well. It would require duplicate data, making updates
and migration harder. Because of this, data for themes (ir.ui.view and
ir.attachment specifically) have a theme_id m2o. website has a
theme_ids m2m that identifies all theme modules currently installed on
it. Through these fields we figure out what to render. A theme is only
fully uninstalled when it's no longer active on any website. The
advantage of this approach is that upgrading or migrating theme data
is no different from the single-website case.

The website.published.mixin class was modified to handle multiple
websites. A wizard was added in the backend to easily manage this for
multiple website.

Although not used anywhere in this commit, a 'website_id' variable has
been added in the evaluation context of ir.rule. It allows to easily
make any model multi-website aware, all that's needed is a custom
website_id m2o field on a model and a custom record rule.
2018-08-13 19:51:10 +02:00
Joren Van Onder 5ff87e8039 [FIX] website: make filter_duplicate work
itertools' groupby function expects the iterable to be sorted as
hinted to in the documentation:

"Generally, the iterable needs to already be sorted on the same key
function."

When running groupby on an unsorted iterable non-adjacent duplicates
will remain:

>>> from itertools import groupby
>>> [e[0] for e in groupby([1, 2, 1])]
[1, 2, 1]

Because of this filter_duplicate would occassionally return
duplicates. To resolve this sort on the key field. Afterwards sort the
result on the usual inherit order: (priority, id).
2018-08-13 19:18:35 +02:00
Joren Van Onder 0e45dfc591 [FIX] website: ascii is not a valid encoding system in GNU Emacs
Warning (mule): Invalid coding system ‘ascii’ is specified
for the current buffer/file by the :coding tag.
It is highly recommended to fix it before writing to a file.
2018-08-13 19:18:35 +02:00
qsm-odoo 15df14b9e1 [IMP] website, *: add header overlay and color options
* web_editor, portal

This commit introduces the first page options: header overlay and color.
The website builder is improved to allow the management of those. With
this commit, users can now click on the website header to make it go on
top of the first snippet, with a chosen transparent color. This is a
configuration that can be done on each page individually (as the feature
is very dependent of the first snippet on the page, this is typically an
option for homepages).

task-32155
2018-08-13 18:58:06 +02:00
qsm-odoo b56e647f2c [REF] web_editor, website: improve animations' restart
- Before this commit, when we asked to (re)start animations on an
  element, we checked the animations to be started on the element
  and started them after destroying the animations with the same
  name which were already running on that element. This is in fact
  not correct. Indeed, if an animation was running on element but
  that the conditions that made the animation start are now gone,
  asking to restart the animations on that element should destroy
  the deprecated ones. (e.g. an animation "A" is to be started on
  all elements which have a class "a", if we remove the class "a"
  on an element then restart animations, the animation "A" should
  be destroy). The implementation is in fact even simpler: when
  asking a restart, a full stop is performed then a simple start.

  Note: this does not need to be a fix as multiple animations on
  a same element was recently introduced and the described case
  never occurs with current features.

- When stopping the animations on an element, stops the animations
  of all its descendants too.

- Add an helper method in the `SnippetOption` class to restart the
  animations running on the `$target` element.
2018-08-13 18:42:52 +02:00
Cocographique 4dce6cc98b [IMP] website, *: review snippets and colors
* web, web_editor, website_hr_recruitment, website_mail_channel,
  website_mass_mailing

- Review all snippets and add new ones
- Add lots of new options
- Use odoo colors as default theme colors

task-38878
2018-08-13 18:30:01 +02:00
Christophe Simonis b75e007122 [FIX] web: check emptiness of attribute using lodash
Attribute may be undefined.
2018-08-13 17:35:20 +02:00