Commit Graph
110564 Commits
Author SHA1 Message Date
Khoi Nguyen 104dfe3c07 [FIX] web: don't fold quickcreate after adding a column in Kanban view
This commit aims to replicate saas-15 behaviour when adding columns in
a Kanban view by not folding the column quick create widget when
creating a new column, thereby allowing users to add multiple columns in
one go.
2017-07-20 09:14:46 +02:00
Christophe Simonis 6fa9ea14fa [MERGE] forward port branch saas-15 up to b31cd558e5 2017-07-19 18:48:42 +02:00
Christophe Simonis b31cd558e5 [MERGE] forward port branch saas-14 up to b857fd4c90 2017-07-19 17:04:28 +02:00
Christophe Simonis b857fd4c90 [MERGE] forward port branch 10.0 up to 11270336fa 2017-07-19 16:21:12 +02:00
Christophe Simonis 11270336fa [MERGE] forward port branch saas-11 up to f07ca36b9b 2017-07-19 16:18:40 +02:00
Christophe Simonis f07ca36b9b [MERGE] forward port branch 9.0 up to 41433debdb 2017-07-19 16:16:57 +02:00
Raphael Collet 5b054ffbf2 [IMP] model: optimize setup_models (#18300)
When setting up models, retrieve all manual fields in a single and specific
query.  This makes the method `_add_manual_fields` 20 times faster.
2017-07-19 15:50:03 +02:00
Xavier Morel b656eda22d [FIX] ir_qweb: decoding of attachment assets
For uploaded modules (e.g. saas), uploaded assets are stored in
attachments.

When the asset content is retrieved, static "filesystem" files are
assumed to be UTF8 and properly decoded, but attachment data is not
and is thus interpreted as ASCII further down the line, leading to a
UnicodeDecodeError (and a broken page/template/...) if the asset data
is not actually ASCII (e.g. if it's UTF-8).

Fix by treating attachment assets as UTF8 encoded, same as filesystem
assets.

OPW-752858
2017-07-19 15:41:37 +02:00
Nicolas Martinelli 21fbb9776a [FIX] sale, sale_timesheet: unnecessary complex domain
The use case was not supported anyway.

This reverts a0fed3b845
2017-07-19 14:32:55 +02:00
Nicolas Martinelli e909533e30 [IMP] sale, sale_timesheet: unnecessary search
Check if there is any sale line before compute analytic.

opw-752100
Closes #18173
2017-07-19 14:32:55 +02:00
Goffin Simon b2fb17f3c4 [FIX] hr_expense: Domain on field account_id in model hr.expense
It was possible to set a payable account for an expense.
So it raised a UserError when reconciling the lines in
function expense_post_payment because two different accounts
were used as payable account.

A expense account is expected as account for an expense.

opw:752695
2017-07-19 13:51:37 +02:00
Elkasitu 72efb820c8 [FIX] web: Display translate icon properly in list view
In an editable list view, the translation icon would display incorrectly
(out of place) for translatable char fields. This can be traced back to
two reasons, compared to saas-15:

- We now use tables instead of divs for list views
- The translate icon would have inline css that would override its
positioning with top and left attributes

This is fixed by adding top and left attributes to translate buttons
inside a field inside a table cell using CSS classes
2017-07-19 13:45:20 +02:00
Nicolas Martinelli 41433debdb [FIX] account: leap year
If the end of the accounting period is set to the 28-29th of February,
crashes may occur in date computation.

opw-752939
2017-07-19 12:58:05 +02:00
Timo Talvitie c0dbbe6320 [CLA] signature for timotalvitie
Done at #18314
2017-07-19 11:58:12 +02:00
xmo-odoo 27127b73c1 [FIX] Close POS session with amount 0 on statement lines
When trying to close a POS session (which confirms the bank statements
which reconciles the statement lines) if one of the statement lines
has an amount of 0 no payment object is
created (addons/account/models/account_bank_statement.py:905) and thus
``payment`` remains set to ``False``. In the past this was not an
issue but since b17e4a0f6b at the end of
the method (line addons/account/models/account_bank_statement.py:1003)
we unconditionally write to ``payment`` which blows up when it's
``False`` rather than a recordset.

This can happen if e.g. a POS order is composed only of free
products (don't ask...)

Fix by using an empty recordset instead of a boolean for a
non-payment, making payment.write a no-op.

OPW-752922
2017-07-19 11:43:32 +02:00
Khoi Nguyen f889d3af82 [FIX] web: prevent traceback when double-clicking links in modals
Before this revision, double-clicking links in a modal triggered a
traceback. This is because the second click attempts to change the
active view while it is still being changed by the first click (more
precisely, the controller of the active view is undefined on the second
click).

This commit ensures that on_attach_callback is called only if the
controller is defined.

Steps to reproduce the issue fixed by this commit:

1. Open a sales order;
2. Click on a product line;
3. Double-click on the product.
2017-07-19 11:00:39 +02:00
Jigar Patel b63e22f50e [FIX] web: Groupby not working on Pivot and Graph view
The groupby property was wrongly set in some cases: if a graph/pivot view is defined as a groupby on field F, but there is another groupby key G in the context, it will take F instead of G (at initial load).
2017-07-19 10:50:21 +02:00
qsm-odoo 9494161e23 [FIX] website_quote: increase robustess of menu generation
On online quotations, a left menu is automatically generated on page
load by searching for the <h1/> and <h2/> elements in the page. This
also considered the empty ones which do not make sense and were
breaking the menu's layout. Ideally, there should not be any empty
title in the page.

opw-752764
2017-07-19 09:25:11 +02:00
Nicolas Martinelli 1cf12a9ae4 [FIX] sale: keep Salesperson
When creating an advance from a SO, the Salesperson is not kept.

opw-752490
2017-07-19 09:12:32 +02:00
Christophe Simonis 044ab92270 [MERGE] forward port branch saas-11 up to f081f19fb8 2017-07-18 20:09:37 +02:00
Christophe Simonis f081f19fb8 [MERGE] forward port branch 9.0 up to ba294a397e 2017-07-18 19:45:42 +02:00
Christophe Simonis ba294a397e [MERGE] forward port branch saas-6 up to 3228694bdd 2017-07-18 19:18:59 +02:00
Christophe Simonis 12fdf46a5b [FIX] mass_mailing: avoid creating mass mailing for messages posts
In case a default value is set for the field `mass_mailing_name` of the
mail composer, the automatic messages sent via message_post_with_* are
considered as a mass mailing. It may also create an AccessError if the
current user is not a mass mailing user.

In the case of the "assign user" email (for auto-subscribed users), the
url wasn't shorten, which resulted in invalid links (opw-752941) (fixed
by 3228694bdd)
2017-07-18 19:00:08 +02:00
Christophe Simonis 3228694bdd [FIX] mass_mailing: only track shorten links
It may happen that some mails attached to a mailing contains non
shorten links.
2017-07-18 18:36:21 +02:00
pashute b237c3e25e [IMP] doc: move demonstration path
To show forward slash in paths are needed and to use path guidelines

Closes #17989
2017-07-18 17:25:16 +02:00
Jarmo Kortetjärvi 2550cc08c3 [CLA] signature Oy Tawasta OS Technologies Ltd.
Done at #18301
2017-07-18 16:40:40 +02:00
Martin Trigaux 01b8f6be99 [I18N] website_sale: export source terms
To include 6d7648e9f0
2017-07-18 16:29:20 +02:00
Rakesh Sindhav 6d7648e9f0 [FIX] website_sale: don't transalte CSS classes
Closes #18000
2017-07-18 16:27:36 +02:00
Rakesh Sindhav f0c9275e35 [CLA] Signature for sindhav
Done at #18000
2017-07-18 16:27:36 +02:00
David Monjoie efd1585234 [FIX] web: fix action context
Previously, we had to filter the context values to exclude some
erroneous values we propagated earlier.

This commit removes the earlier propagation of wrong values (the
current record context when executing an action) and thus also
removes the filtering of those values, which was actually removing
useful values from the action context.

The bug could be seen by following these steps:
- Install crm and sale
- Go to My Pipeline
- Open an opportunity which has a customer set
- Click on "New Quotation" action button
- See that the customer is not set on the new quotation, it should
  be set by the default_partner_id value in the action context
2017-07-18 15:59:48 +02:00
David Monjoie 1ceb201d5e [FIX] web: fix boolean fields display in calendar
Since formatBoolean returns a jQuery object, boolean fields were
displayed as [Object object] in calendar view.

This is a fix for stable version. The real fix would be to get rid
of the jQuery object returned by formatBoolean but the change is
not trivial.
2017-07-18 15:59:48 +02:00
David Monjoie bce3defc8c [FIX] web: fix calendar server values parsing
The record data given to fullCalendar to use in the renderEvent
function was not parsed like it is in basic model for example.

As a result, date(time) fields were string rather than moment
objects, which was triggering the crash that started this commit.
2017-07-18 15:51:49 +02:00
Elkasitu e83c3e2678 [FIX] web: Fix actions for widgets w/o controllers
Execution of actions is usually done with trigger_up, which delegates
the action execution to the widget's controller.

This is troublesome for actions done on widgets that have no
controllers, like widgets in Studio for example.

The commit fixes this by adding a standalone option for AbstractFields,
if the flag is true when instantiating a widget, the action will be
called directly from within the widget object and will not be propagated
upwards.

A test to verify that this works properly has been added as well
2017-07-18 15:12:55 +02:00
Géry Debongnie f7dd085e80 [FIX] web: mock name search actually evaluates the domain
Before this commit, the _mockNameSearch method of the mock server was
computing by hand the first element of the domain.  This was adhoc and
wrong (for example, the '==' operator).  Also, we actually have a method
designed to just return the records matching a given domain.
2017-07-18 14:45:22 +02:00
Géry Debongnie 5f8dea490a [FIX] web: properly display id in some cases
When a one2many is set through an onchange, the web client did not set
the id field properly.  Because of that, it could not be displayed in a
list. This is due to the fact that the id is given in the command like this:

[1, 53, {...}]

Here, the command is 1 (update), then 53 (id), then some values, which
do not have the id. So, in this specific case, we assumed that all the
new values were in the object, even though we properly set the res_id
property.

We fix this issue at the root: in the _makeDataPoint method, we make
sure that no datapoint can be created with a res_id and without the
corresponding id key.

Note that this issue was not found in a standard installation of Odoo
(but it may be present somewhere), but in some custom code.  It is rare
to actually use the id field in a view, but in this case, we had a
many2many in kanban view, and the id was used to format the url of an
image.
2017-07-18 14:45:22 +02:00
Nicolas Martinelli 957d57eaf7 [FIX] hr_expense: mail to manager
When an employee submits an expense, no mail is sent to the manager.
This should be the case, since it works this way on holidays.

The trick, however, is that the expense is created as submitted, but the
followers are only added afterwards. We need to make sure to add the
followers at creation.

opw-751085
2017-07-18 13:53:13 +02:00
Moisés López c0bdf81a5b [FIX] doc: correct patch line number
to avoid "WARNING: Hunk"

Closes #18286
2017-07-18 11:14:47 +02:00
Josse Colpaert 274432ecac [FIX] stock: force orderpoint deactivation
Deactivating product should not be working when you still have active
orderpoints.

Closes #16954
2017-07-18 09:48:02 +02:00
Goffin Simon 61304087e7 [FIX] point_of_sale: Creating pos order line with qty=0
Steps to reproduce:

1.Create pos order with two products.
2.One of the products, must be type="Stockable Product" and quantity=0.
3.Pay order.
4.Check order --> extra info --> picking

Bug:
picking state = Waiting Availability

In 9.0, the picking state is equal to "Done".

Fixes #18089
opw:751565
2017-07-18 09:40:34 +02:00
rar-odoo cb863ed0bb [FIX] gamification: email template for challenges (#18265)
* [IMP] Gamification: email template

- new template for challenges for both personal and ranking mode.
2017-07-17 18:07:48 +02:00
Alexis de Lattre ad14be036c [FIX] l10n_fr: allow to reconcile on 511xxx accounts
Closes #18152
2017-07-17 16:30:31 +02:00
Khoi Nguyen 3dd1c0f87e [FIX] web: undefined group name for group by date:<interval>
Previously, grouping a list by a non-default time interval (e.g.
'creation date:week') yielded a grouped list of records with undefined
group names.
2017-07-17 15:40:44 +02:00
Martin Trigaux f0a03da2b2 [I18N] Update translation terms from Transifex
Not sure why it did not fetched
2017-07-17 13:33:29 +02:00
Goffin Simon fea5057425 [FIX] account: Unlinking payment term
When unlinking payment terms, the ir.property records linked to
the fields "property_payment_term_id" and "property_supplier_payment_term_id"
were not deleted.

opw:749459
2017-07-17 12:56:57 +02:00
Martin Trigaux 6a61921ddd [I18N] Update translation terms from Transifex 2017-07-17 11:52:51 +02:00
Martin Trigaux 47859c393c [I18N] export saas-15 source terms
4 new modules that were not exported
Reword unclear error message
2017-07-17 11:02:33 +02:00
Nicolas Martinelli 74e4130f5f [FIX] account: accounting date vs invoice date
The accounting date is an hidden field, which is by default the invoice
date. However, a user can make it available in the interface, and modify
it.

When the accounting date is different from the invoice date, we must
make sure to make the accounting date prevail when it comes to currency
conversion. Otherwise, the account move created will use a currency
exchange rate which is not in line with its date.

opw-751848
2017-07-17 10:28:34 +02:00
Nicolas Martinelli 779fc8e4fe [FIX] *: raw_value for id
Since the new views, `record.id.value` contains the formatted value of
the ID, meaning it can contain separators. For example, by default,
`1234 => 1,234`. Since this value is used in the image URL, using
`value` won't work anymore.
2017-07-17 09:48:24 +02:00
Nicolas Martinelli 9b56c6d42d [FIX] account_bank_statement_import: decimal type
Ofxparse v0.16 returns decimal type for amounts, making `+=` crash in
case of a float.

opw-752172
2017-07-14 16:40:50 +02:00
Martin Trigaux 19113a461d [FIX] point_of_sale: typo 2017-07-14 16:29:24 +02:00