Commit Graph
117156 Commits
Author SHA1 Message Date
fwi-odoo ef6074beb6 [FIX] web: fix x2m tests
When a x2m field is modified, the 'save' rpc doesn't send 'False' as second
argument of the special command that manipulate the set of records.
From now on, the virtual id of the record is sent to the server as second
argument. This commit fixes the tests making the assumption that 'False'
was sent.
2017-09-07 11:25:30 +02:00
Martin Geubelle b2c916de83 [FIX] web: correctly display no content helper in dashboards
The no content helper was displayed next to some dashboards instead of below.
2017-09-07 11:21:43 +02:00
xmo-odoo e0f9479545 [FIX] core: dropped paren in P3-related changes
Fixes #19315
2017-09-07 10:54:50 +02:00
Xavier Morel 6bb6944e6b [FIX] P3: resizing of image *fields*
Fields sent from the client are pretty much always *text*. This can be
problematic for image fields sent as base64 *text* as in Python 3 the
base64 routines only work between bytes.

Alter the core field-resizing function (image_get_resized_images) such
that it ensures text base64 sources are encoded back to bytes before
being forwarded to the main resizing routines (which I don't think
should deal with *that* issue).

Fixes #18985: error when trying to update a company's logo
2017-09-07 10:47:02 +02:00
Nicolas Lempereur 73edebc371 [FIX] web_editor: enter remove or duplicate node
There is some odd behavior especially inside a editable containing
newlines.

For example in the sale description on an ecommerce item, lines could
contain newline (it is editable from backend) but as an effect of other
use case, pressing enter could have a range of unwanted side effects:

- removing all the content,
- duplicating the editable (should never happen, if we have one field
  "description_sale" we don't want to duplicate it, this has no sense)

In a product name which is in the same use case, there is no newline so
the problem is not apparent, and ENTER do nothing. This is the behavior
we should want in every instance.

If we still want a newline, we have to force it with SHIFT + ENTER key,
also this is regarding field that may or could be present in the backend
views, so it could also be edited in backend.

This change make ENTER ignored when we are editing a node directly child
of an node being edited.

A second part of the issue was that dom.removeBetween (used to remove
content inside a range) could remove the ancestor node that was an
editable. This is not wanted.

For example if we did CTRL + A inside a field with `<br />` then ENTER
or pasting something, the field would be removed and not just emptied
and could not be gotten back without editing the template manually.

This was sometimes mitigated because if a `<br />` was at the end of an
element, it would stay in this use case avoiding the issue.

note: not necessary after saas-16

fixes #17445
opw-751360
closes #19313
2017-09-07 09:38:56 +02:00
Joren Van Onder d3617fd852 [IMP] mrp: warn the user when not consuming all materials on an MO
Pops up a warning dialog similar to stock.immediate.transfer.
2017-09-06 21:19:59 -07:00
Fabien Pinckaers 32f4888cce [IMP] mail: no default text for activity types. Avoid bug when changing activity 2017-09-06 21:40:26 +02:00
Christophe Simonis b05e838099 [MERGE] forward port branch saas-17 up to 9dff6516e4 2017-09-06 19:20:29 +02:00
Christophe Simonis 9dff6516e4 [FIX] point_of_sale: avoid storing undefined in localstorage 2017-09-06 19:03:13 +02:00
Christophe Simonis 7580bfa49d [FIX] point_of_sale: stupid typo introduced by previous forward-port 2017-09-06 18:09:23 +02:00
stefanorigano ef64fbba8f [REF] web: remove margin-left for kanban columns' quick-add 2017-09-06 17:55:49 +02:00
stefanorigano 2ef5db7f90 [REF] web: review kanban records' title LESS
- Force vertical margin to 0 in case the class is added to elements
  that comes with a default margin (eg. titles tags)

- Move title & subtitle rules at root level
2017-09-06 17:55:49 +02:00
stefanorigano 9e69958099 [REF] web: review graphs layout 2017-09-06 17:55:49 +02:00
qsm-odoo 9380169c74 [FIX] mail: allow identifying the chatter in creation mode
Before this commit, the chatter was rendered as an empty <div/> without
any class while in creation mode. This <div/> was then placed inside
the .o_form_view_bg element by mistake, as it did not match the
'.oe_chatter' selector.
2017-09-06 17:52:24 +02:00
qsm-odoo cf4f357647 [REF] web: review form view layout
The goal of this review is to have a layout which is correct to
implement the enterprise side-chatter.

This also removes/fixes deprecated community rules and xml templates.
2017-09-06 17:52:24 +02:00
Christophe Simonis d5382abeaa [MERGE] forward port branch saas-17 up to b8dd34fcbb 2017-09-06 17:40:59 +02:00
Nicolas Martinelli 18d63d4717 [FIX] delivery: zip code comparison
Some countries, such as Canada, are using letters in their zip code.
When we check if the zip code is within the accepted range, we should
make sure to normalize it by making it case insensitive.

opw-767866
2017-09-06 17:31:02 +02:00
Nicolas Martinelli 60dbf05750 [FIX] stock: performance issue
Commit 6a366b216b introduces a subquery when fetching translations in
order to avoid fetching duplicates. On large a `ir.translation` table
(~500000 records), this can cause a major performance degradation when
the user is not using the English language.

A typical example is a `read_group` call such as:
```
self.env['stock.quant'].with_context(lang='fr_BE').read_group([
    ('location_id', 'child_of', self.env.ref('stock.stock_location_stock').id)],
    ['product_id', 'qty'], ['product_id'], limit=80)
```

When no `orderby` parameter is used, the `groupby` fields are
implicitly used for ordering. While this makes sense for direct calls
from the web client, this implicit order might be problematic for
programmatic calls (such as computed fields). Indeed, in case of
grouping by product, the subquery mentioned earlier is used to sort by
product name. This is costly, and in most of the cases useless.

The workaround is to explicitely order by `id`, to avoid the use of the
subquery. For the upcoming version, a cleaner fix should be made in
order to prevent duplicated translations, and get rid of the subquery.

opw-767532
2017-09-06 17:14:45 +02:00
Laurent Smet c75fe95dfc [IMP] l10n_nl: add missing stuff for the Dutch localization
- Add new tags to have a more detailed P&L with sub-categories.
    - Add Standard Business Reporting (SBR) codes and link them to l10n_nl coa.
    - Add/delete some accounts to the l10n_nl coa.

    see task: https://www.odoo.com/web#id=31825&view_type=form&model=project.task&action=333&active_id=967&menu_id=4720

    Was PR #18636
2017-09-06 16:38:32 +02:00
Martin Geubelle bae4aacad8 [FIX] web: edit x2many editable list view after resequence
In an embedded editable list view with the widget `handle`, resequencing a
record and try to edit it afterwards won't work. The selected record isn't the
correct one, as if the resequencing had no impact.

To make this work, the list datapoint needs to be ordered by the field with the
widget `handle` ; if it isn't, resequencing the records won't change the x2many
data order but the list view expects the same order.
2017-09-06 16:34:18 +02:00
Martin Geubelle 3052a43494 [FIX] web: edit editable list view after resequence
In an editable list view with the widget `handle`, resequencing a record
and try to edit it afterwards won't work. The selected record isn't the
correct one, as if the resequencing had no impact.

A small refactoring has been done to fix this because the resequence logic
was placed in the ListController (but should logically be placed in the model).
Several views are using the resequencing ; the code is thus now placed in the
BasicModel.

The list renderer state is then updated after the resequence.

The resequencing and the line edition have been placed in a common mutex to
avoid problems when the user tries to edit a record while the resequence rpc
isn't finished yet.
2017-09-06 16:34:18 +02:00
Goffin Simon ce9bbf6c10 [FIX] web: Setting ir.values for computed fields
Setting ir.values for computed fields is useless as the function onchange
in models.py will set to False all the computed fields with a modified dependence.

opw:767942
2017-09-06 16:30:05 +02:00
Raphael Collet 81192d66d9 [ADD] test_performance: check the performance of CRUD operations 2017-09-06 16:05:10 +02:00
Raphael Collet 68fb4b95b4 [FIX] odoo.modules.loading: environment is reset while installing a database 2017-09-06 16:05:10 +02:00
Christophe Monniez 25f7040998 [IMP] base, base_vat*: Company update on template
Purpose: When a user print a report, for the first time, if there is
         no default template choosen, the user should choose a
         template AND should be able to update company information at
         the same time.
         The company form have to be simplified.

* The company report form now inherits from the company form
* Removing the Curency from the company view
* The choosen template is now highlighted
* Footer and website are moved to the other column to balance the view

base_vat: Removing the VIES VAT check from company form view

base_vat_autocomplete: Move VAT as the first field to fill on the
                       company form view
2017-09-06 15:27:30 +02:00
Mahendra barad df20fe9b85 [FIX] web: Place correctly the enterprise tag for widget upgrade_boolean 2017-09-06 15:21:25 +02:00
Mahendra barad e38e251588 [IMP] website: Clean and simplify res_config view
Purpose
=======

- Settings are too complex: too long + too many options that shouldn't be suggested with checkboxes

e.g. twitter roller is now suggested as a new snippet to install from website editor
google maps, slides, forum, etc. should show up in the apps store

- When saving the page I expect to stay in the settings -> no redirection to homepage anymore!

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

See task 33620
2017-09-06 15:21:25 +02:00
fwi-odoo c0ceae2f93 [FIX] crm: module crm_voip doesn't exist anymore
Since the refactoring of VOIP, there is no more a module crm_voip but only
voip.
2017-09-06 15:18:19 +02:00
Lucas Perais (lpe) 45e0cd564a [FIX] web_editor, website_forum: allow to post videos on the forum
The commit 8749410b10 corrected the way the iframe was rendered to display a video in v9.0.
In v10 though, the html sanitizer is a bit more severe and cleans data-src attributes, preventing the iframe to have a src

This commit works around that and allows the src of the video to be saved in db

OPW 761424

closes #19125
2017-09-06 13:52:03 +02:00
Goffin Simon 8fd5951fbe [FIX] base_import: Specified Date Format in Import Statment is not recognized
Steps to reproduce the bug:

1. Import a bank statement with the shown dateformad DDMMYYYY (without headers)
2. Specify this date format in the advanced options
3. Try to find the date column to assign.

Bug:

The date format is not suggested for the fields with format DDMMYYYY.

opw:769118
2017-09-06 13:45:16 +02:00
Christophe Simonis b8dd34fcbb [MERGE] forward port branch saas-16 up to 64d56995e0 2017-09-06 13:29:05 +02:00
Thibault Delavallée 16541ae2ae [FIX] website_sale: fix call to generate_and_pay_invoice
Still using saas-16 call convention. Method arguments have changed since then.
2017-09-06 12:57:50 +02:00
Christophe Simonis 64d56995e0 [MERGE] forward port branch saas-15 up to ef5ac872b8 2017-09-06 12:26:36 +02:00
Thibault Delavallée 7820d67210 [MERGE] account/sale(_payment): add invoice and order confirmation and payment in customer portal
This merge improve account and sale customer portal by

 * adding quote confirmation and signature in sale portal;
 * adding a signature widget replacing the one in website_quote;
 * improving the payment form to support URLs and access token
   propagation;
 * adding payment support on orders in sale_payment portal with both
   server2server and form-based payments;
 * adding payment support on invoices in account_payment portal with
   both server2server and form-based payments;
 * globally improving navigation, display and access token use in
   account and sale customer portal;

Please refer to subcommits for more details. Thanks to @jpr-odoo for
preliminary work on those features. Closes #19074.
2017-09-06 11:42:38 +02:00
Thibault Delavallée 0f207f755e [REM] website_sale: remove dead controllers and templates used by old payment form
Those do not seem necessary anymore since commit 1fdb10f0ac introduced
new routes along with the new payment form.
2017-09-06 11:41:25 +02:00
Thibault Delavallée 01f69f65fe [IMP] account_payment: add invoice payment support in customer portal
This commit adds support of payment in the account customer portal. This
is done in the account_payment module. This way customers can now pay
invoices directly on the customer portal and have access to the status
of their invoices. It replaces the old website payment mechanism that
was only allowing to pay without generating payments and reconciliating
them.

Two routes are defined in this commit, one for form-based payments and
one for server2server-based payment. Please refer to commit 1fdb10f0ac
for more details about the new payment form.

Tools methods are added to handle transaction / invoice matching, the
check of invoice and the automatic payment and reconciliation.
2017-09-06 11:41:25 +02:00
Christophe Simonis ef5ac872b8 [MERGE] forward port branch saas-14 up to ec0d51f20e 2017-09-06 11:28:11 +02:00
fwi-odoo 5563168fe7 [FIX] web: calendar: keep scroll after an event quick creation
Before this commit, the scroll was reset to the top of the calendar after
an event quick create.
This commit fixes this by defining the get/set localState for the calendar
renderer in order to keep the scroll and calling 'reinitView' from the
fullCalendar lib instead of always calling 'render'.
2017-09-06 11:17:29 +02:00
Christophe Simonis ec0d51f20e [MERGE] forward port branch 10.0 up to a4bcb66bfc 2017-09-06 10:59:06 +02:00
Christophe Simonis 827b1e8e3d [FIX] P3: reraise exception correctly 2017-09-06 10:57:35 +02:00
Thibault Delavallée 699aa47b00 [IMP] account_payment: add invoice / transaction link
Purpose of this commit is to add a link between invoices and transactions
to store payment data like what is already done for sale orders.

 * add payment_tx_id on account.invoice model that stores the last
   transaction; also add the acquirer related on the tx;
 * add a stat button on invoice with links to all transactions linked
   to that invoice;
 * add account_invoice_id on payment.transaction model that stores the
   link to the invoice;
 * add the inverse one2many from invoice to all its transactions so
   that we can browse them if necessary;
2017-09-06 10:49:03 +02:00
Thibault Delavallée e6120eb7d6 [IMP] account: improve invoice page view on customer portal
* keep query on pdf link so that customers have access to the pdf when
   using the access token instead of having an access rights error;
 * add redirect to record override that allow to take into account
   /mail/view links containing an access token for invoices like what
   is already supported for sale orders;
 * improve action buttons display;
 * reduce headers and better display invoice name and customer address;
2017-09-06 10:49:03 +02:00
Thibault Delavallée 1fad5698fc [IMP] account: support error, warning and success codes in customer portal
Purpose is to allow to display error, warning or success messages based
on some user action like payment. This is done using kwargs in the invoice
view route. Codes are added in URL and message display has to be managed
in the template itself. Inheriting modules and/or new features will have
to add their specific message according to the error, warning or success
messages they want to support.
2017-09-06 10:49:03 +02:00
Thibault Delavallée 2d4c8103f9 [IMP] sale, website_quote: improve email link and wording computation
The 'View', 'Accept and Sign', 'Pay Online' buttons are now correctly
computed based on the sales settings or the online quote settings.
Indeed it is now possible to sign and/or pay quotations without having
website_quote module installed.
2017-09-06 10:49:02 +02:00
Thibault Delavallée 1925837d47 [IMP] sale_payment: support payment in sale customer portal
This commit adds support of payment in the sale customer portal. This
is done in the sale_payment module and uses the settings introduced
previously about online confirmation and payment. This way customers can
now pay orders without having to rely on online quote mechanism.

Two routes are defined in this commit, one for form-based payments and
one for server2server-based payment. Please refer to commit 1fdb10f0ac
for more details about the new payment form.

Some small modifications are done SO confirmation and invoice generation
methods to return error codes that can be used in the customer portal.
As return values were not used in website_sale or website_quote this
should not impact those modules.
2017-09-06 10:48:52 +02:00
Thibault Delavallée 06fe263a15 [IMP] payment: add new explicit parameters to the payment widget
Purpose of this commit is to ease the use of the payment widget and
avoid having to perform too much custom code in the various routes used
when doing payments :

 * when instantiating the widget give him its parent element data so
   that parameters given when calling the payment form template are
   automatically present in the widget options;
 * support more parameters when calling the route for form-based acquirers
   including access_token, URLs and callback method;
 * when doing a form-based payment a call to a JSON route returning the
   rendered form is done. Payment widget now uses all data from that
   form including the URL of the acquirer website. This way form-based
   acquirers are really dynamic and values update is easier;
 * remove hidden display of form-based acquirers as all data come now
   from the called JSON route that returns the form;
 * add a warning about partner-id not being set as it is an issue some
   people may encounter;
2017-09-06 10:40:46 +02:00
Thibault Delavallée faea658382 [IMP] website_quote: use generic portal signature widget
Online quote can now use the generic signature widget already used on
the standard sale customer portal. We therefore remove the custom
widget build in website_quote.

A route already exists to sign quotes; the old route is removed. The
existing route is overridden so that quotations with template requiring
payment cannot be signed. This is the expected behavior.
2017-09-06 10:40:32 +02:00
Thibault Delavallée 22734f47d8 [IMP] website_quote: improve quote url management in customer portal
* website_quote should not override all sale links from the customer
   portal to replace them by website_quote specific view. Indeed the
   quote view should be used only if the order has an active template
   defined on it;
 * do not override existing columns of the order page view on portal
   with same content;
 * implement redirection at route level by overriding the
   controller order route;
2017-09-06 10:40:22 +02:00
Thibault Delavallée 071451a884 [IMP] sale: propagate token use to invoices when viewing order on customer portal
Customers can access orders using an access token. Order page view may
contain links to invoices linked to that order. However currently the link
does propagate the use of access token and therefore leads to a crash due
to access rights error. This is improved here by adding the invoice access
token in the embedded links.
2017-09-06 10:39:24 +02:00
Thibault Delavallée a3e048a001 [IMP] sale: support quote confirmation and sign in customer portal
Purpose is to allow customers to accept and confirm orders on the
customer portal without having to rely on advanced website_quote
(online quotation) features. Including :

 * add quote confirmation route;
 * add support in customer portal using the newly-introduced signature
   widget;
 * add action button on the order page view;
2017-09-06 10:39:05 +02:00