Commit Graph
119664 Commits
Author SHA1 Message Date
Fabien Pinckaers 0fcb7caa2a [FIX] lunch: tests broken on 2018-08-15, and magick mock issues with relativedelta 2018-08-15 10:01:21 +02:00
Olivier Colson 73fc643057 [IMP] account: draft entries creation through registering payments.
In some countries, it might be preferable not to recon the payments journal entries at the time they are registered in the system, but to do so at the date of the bank statement line they will be reconciled with.

Thus, to manage this we've added an option on bank journals to have payments generating draft account.move when they are validated, and posting them only after bank reconciliation (+overwriting their date)

Was task 1870892
Was PR #26349
2018-08-15 08:53:40 +02:00
Fabien Pinckaers 810ef6767c [FIX] web: test on mobile view action manager 2018-08-15 00:53:30 +02:00
Fabien Pinckaers 69e38dcf35 [IMP] base: remove carret on debug mode icon 2018-08-14 22:45:13 +02:00
Fabien Pinckaers 7aff231690 [IMP] web: improve mobile view switcher 2018-08-14 22:43:10 +02:00
Romain Derie 75f3d8f1d7 [FIX] website_event, website_sale: _order on is_published
As fbbf24f58a introduced multiwebsite and `website_published` became a
related and/or a computed field (depending of the mixin), we should not order
on this field as it is not on DB anymore.

We now have the field `is_published` that replace `website_published`.
2018-08-14 22:25:36 +02:00
Romain Derie fd9583982e [FIX] base_setup: remove upgrade_boolean on unsplash as it now OC
Commit 732702d5e moved web_unsplash from enterprise to community.
Thus, we don't need the upgrade_boolean on the settings
2018-08-14 22:25:30 +02:00
Christophe Simonis f666f4acb9 [FIX] sale: correct code syntax
This code hunk has wrongly been added by previous forward-port.
2018-08-14 20:49:30 +02:00
Christophe Simonis 0ac7f8fbe6 [MERGE] forward port branch saas-11.4 up to dabe59df9c 2018-08-14 20:16:03 +02:00
Christophe Simonis dabe59df9c [MERGE] forward port branch saas-11.3 up to 27d8daf8a7 2018-08-14 19:43:32 +02:00
Christophe Simonis 27d8daf8a7 [MERGE] forward port branch 11.0 up to 51225c9b9f 2018-08-14 18:59:57 +02:00
Christophe Simonis 51225c9b9f [MERGE] forward port branch saas-15 up to 52e88036f2 2018-08-14 18:24:40 +02:00
Christophe Simonis 52e88036f2 [MERGE] forward port branch saas-14 up to d4ee30b4fa 2018-08-14 17:45:46 +02:00
Xavier Morel 8c2b380768 [FIX] base_import: datetime patterns
Turns out %s is not the pattern for sub-minute seconds, that'd be
%S (note the casing). The former is the number of seconds since
epoch, which tends not to match sub-minute second patterns (sounds
like bull to me but there you are), and so importing datetimes was a
bit broken since the previous improvements.

Fix that.
2018-08-14 17:26:14 +02:00
XavierDo b7ff3544ee [FIX] test_mail: update query count 2
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.
Those are the changes for the second part of test
2018-08-14 17:23:23 +02:00
Christophe Simonis d4ee30b4fa [MERGE] forward port branch 10.0 up to a487d7d397 2018-08-14 17:09:32 +02:00
Christophe Simonis a487d7d397 [MERGE] forward port branch 9.0 up to 72cb16865c 2018-08-14 16:57:21 +02:00
Christophe Simonis 71bba5e43d [FIX] anonymization: ignore unreachable code pylint warning 2018-08-14 16:55:36 +02:00
Sébastien Theys fd3febf7d7 [IMP] various: add event and ticket name on sale order and invoice line
In event_sale it is possible to have one product representing several tickets. But before this commit, on the sale order and invoice the client only saw the name of the product and didn't know which event/ticket they subscribed to.

The goal of this commit is to overwrite that behavior whenever a sale order or invoice line is related to an event ticket, to show the ticket name and event name instead of the product name.

Technically, the following changes have been done:

----------------------------------------

* various: add a method to compute a default name for a SaleOrderLine, based on its product

I added the method because the code to compute the name was duplicated in several places. This will make it more consistent.

Moreover this gives the option for modules to override the method to define a custom name as necessary.

----------------------------------------

* event_sale: compute a consistent description for a SaleOrderLine based on an EventTicket

The description will be the same whether the sale order comes from the front end or the back end. It takes into account the customer language.

The default description will be computed as follow:

1. The ticket name should be the first line of the product description on the SO.
2. The event name should be the second line of the product description on the SO.

To compute the ticket multi-line description we decided to ignore entirely the product name and the product description_sale because they are considered to be replaced by the ticket name and event name.

We also ignore them because the work-flow of creating a new event does not lead to filling them correctly, as the product is created through the event interface.

----------------------------------------

* event_sale: improve sale order line and event registration views

It was possible to select a ticket related to a product before an event was selected.
This is typically the case for tickets defined in an event_type but not in an event.

The ticket field is now hidden until both the product and the event have been selected.
This way we are sure the selected ticket will belong to an event and not an event_type.

We reset the ticket on event change because we don't want the user to be able to select a ticket belonging to the wrong event.

We also improve here the comments of the related on-change methods.

----------------------------------------

* website_event_sale: update views to show ticket name and event name

The standard behavior was to show the product name in several places instead of the sale order line description.

However, for event tickets, we don't want to show the product name, but the ticket name and event name instead.

----------------------------------------

* website_event_sale: add ticket on confirmation page

The ticket name was missing from the registration confirmation page (shown when the ticket is free and/or the user paid with a direct method). This is now fixed.

----------------------------------------

Task: 1837987
PR: 25819
2018-08-14 16:51:16 +02:00
Toufik Benjaa 4f69be7ead [FIX] sale_timesheet: avoid adding buttonbox on invoices
- Instead of adding the "timesheet" statbutton on the invoice's
buttonbox, this inherit view is adding a new buttonbox which causes
conflict with the original buttonbox.
2018-08-14 16:45:51 +02:00
Laurent Smet c99eb1b8fb [ADD] account: import vendor bills files from dashboard
This adds a button to import several bills from the accounting dashboard: will create a new vendor bill for each, with the file attached to it. That file will be visible in the chatter (in enterprise) and allow easilly completion/encoding of it. This task also comes along with the import/export of xml files attached to the PDF files created from the invoice report.

Was task 1859277
Was PR #26339
2018-08-14 16:40:39 +02:00
Christophe Simonis 72cb16865c [FIX] purchase: avoid non-sense domain on invoice's purchase order
PO that can be linked to an invoice are filtered via a domain
restricting the partner. However when no partner is selected yet, the
domain was `('partner_id', 'child_of', False)` which, beside being horribly slow, was also useless as it returns ALL partners.

Only generate a meaningfull domain.
2018-08-14 16:19:20 +02:00
Fabien Pinckaers 1ab2a4d47d [IMP] base: config panel close dialog: correct buttons 2018-08-14 16:18:05 +02:00
Christophe Simonis a711c5acb8 [MERGE] forward port branch 9.0 up to 0b7c1d2978 2018-08-14 15:55:43 +02:00
Richard Mathot 0b7c1d2978 [REV] anonymization: partial revert of 2039c3c792
Shame on me.
2018-08-14 15:49:33 +02:00
Xavier Morel 61a6347c54 [IMP] tests logging
* Make phantomjs logging clearer by logging within the test case's
  module, not odoo.tests.common.

  This way, a tour in e.g. point of sale is clearly logged as that,
  rather than be logged as odoo.tests.common.phantomjs and require
  hunting which module/test we happen to be in.

* Clarify tagging causes for exclusion of selection of tests.
2018-08-14 15:37:26 +02:00
Adrien Dieudonne 60733264fa [FIX] web: dataComparisonUtils: replace Math.sign ES6 function
Math.sign(comparisonValue) * comparisonValue being equivalent to
Math.abs(comparisonValue) in all the cases that we consider, we use
the latter formulation that is available in ES5.
2018-08-14 15:25:53 +02:00
Christophe Simonis 70128a2dfc [MERGE] forward port branch 9.0 up to d2605bccdb 2018-08-14 15:12:47 +02:00
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
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