Commit Graph
101786 Commits
Author SHA1 Message Date
Denis Ledoux 4601b044a6 [FIX] web: prevent search dropdowns to close on click inside
In the Filters, Group By and Favorites dropdowns,
when clicking outside the `li` elements but still
inside the dropdown menu itself
(like on the dividers,
or next to the advanced search `Apply` button),
the dropdowns was closed.

This behavior was annoying when doing an advanced search
with a field using the datetime picker, as, to close the datetime
picker, you have to click outside it, and when you did, it closed
automatically the filter dropdown... So you had to open it again to
finally apply the filter.

opw-674310
2016-06-07 16:48:58 +02:00
Olivier Dony af47009815 [FIX] website_{quote,sale}: payment tx handling consistency
Both website_sale and website_quote have logic to independently
confirm sales orders when a successful payment transaction is
processed.
Rev 46c5f93b6c introduced an extra
check and logging for transactions with mismatching amounts in
website_sale, but the same change was not done in website_quote.

Consequently, when both modules were installed, the tx mismatch
check was bypassed by website_quote, and a spurious logging message
was emitted by website_sale if the website_quote logic had executed
first.

This patch makes tx handling consistent in both modules, and avoids
the misleading log message when both modules are installed.
2016-06-07 16:29:52 +02:00
Simon Lejeune 879e2b27d9 [FIX] packaging: redhat: don't write the conf file if already there
this avoid to overwrite the configuration file at each update.

closes  #11722
2016-06-07 16:25:21 +02:00
Christophe Simonis 7889d7e0ff [FIX] web,auth_signup: prevent login autocapitalization
Mobile virtual keyboards will often capitalize the first letter of
an input text field, which is annoying as odoo logins are case-sensitive.
This will no longer happen thanks to this new attribute.

X-port of commit odoo/enterprise@b8632f8bb6
2016-06-07 16:15:47 +02:00
Christophe Matthieu 3d9ccef81d [FIX] translate: doctype is removed from the backend web template
issue: The rendering is altered because the browser doesn't know how to parse the html and css content
2016-06-07 14:16:12 +02:00
Jeremy Kersten 2179f53a65 [FIX] web_calendar: use local format for week in title of calendar view.
Commit odoo/odoo@9be7a9535c changes the week number
computation to match calendar and pivot views.

Now, calendar don't use isoWeek format by default, but the weekNumber from locale(),
So we need to adapt also the format for title.

closes #12068, closes #9629
2016-06-07 14:09:17 +02:00
Denis Leemann 004ebd3a58 [CLA] add leemannd to c2c coprorate signature
Closes #12317
2016-06-07 12:00:08 +02:00
Holden Rehg ee71ba392c [CLA] signature for user holdenrehg
Closes #12305
2016-06-07 09:42:02 +02:00
xmo-odoo ef1fb844f5 [IMP] delivery: allow to set delivery price from XML-RPC call
(a method that returns nothing is not callable through XML-RPC)

Backport of dc043cf1bb to 9.0

Fixes #12289 and tinyerp/erppeek#87
2016-06-07 09:36:30 +02:00
Olivier Laurent e5a42b2644 [FIX] doc: use correct variable in bash example 2016-06-07 08:48:30 +02:00
Denis Ledoux 1d1debf6ae [FIX] purchase: exclude cancelled invoice for billed qty
The billed quantity field on the purchase order line
must exclude the cancelled invoice, as a cancelled invoice
is not considered as invoiced.

`draft` could be considered as well, but we do not
take the chance now, as this field is used
when creating a new invoice, to determine the
quantity to invoice. Therefore, if there are
draft invoices with some quantities invoiced,
it can make sense to reduce the quantity
in this new invoice. Nevertheless, it must not be the case
for cancelled invoices.

opw-679363
2016-06-06 17:56:13 +02:00
Denis Ledoux fc8d96d2cb [FIX] account: Invoices & Refunds filters together
When both selected, these filters are expected
to display Invoices - OR - Refunds.

It was not the case, because the web client
expects to receive the domains normalized
when concatenating domains together with a
`|` statement.

Selecting both filters resulted in the below domain:

```
[
    '|',
    ('state','in',['open','paid']),
    ('type','in',('out_invoice','in_invoice'))`,
    ('state','in',['open','paid']),
    ('type','in',('out_refund','in_refund')),
]
```
Instead of
```
[
    '|',
    '&', ('state','in',['open','paid']), ('type','in',('out_invoice','in_invoice'))`,
    '&', ('state','in',['open','paid']), ('type','in',('out_refund','in_refund')),
]
```

opw-679246
2016-06-06 17:25:55 +02:00
Goffin Simon 19dcd7c3ec [FIX] website_event: endDate appeared twice in event_details
endDate appeared twice in event_details

opw:678823
2016-06-06 16:08:53 +02:00
Christophe Simonis 93d8f4f803 [MERGE] forward port of branch saas-6 up to 6b7caa0 2016-06-06 16:01:43 +02:00
Christophe Simonis 6b7caa0bc0 [FIX] *: remove conflict markers from ta.po files 2016-06-06 15:45:58 +02:00
Christophe Simonis ca2dad4c44 [MERGE] forward port of branch 8.0 up to b9a006c 2016-06-06 15:41:50 +02:00
Goffin Simon cce3fce3d0 [FIX] product_extended: bom_count field in product template view
To apply this domain ('bom_count', '=', 0) in the product template view,
the field bom_count must be in the view.

opw:679095
2016-06-06 14:56:52 +02:00
Denis Ledoux b9a006c1c0 [FIX] account: Exchange test failing on Jun 6
The test `test_balanced_exchanges_gain_loss`
failed on Jun 6, because it created a specific rate
for today's date at midnight
(e.g. on Jun 6, 201x-06-06 00:00:00) for the test purpose,
but a rate is created in the demo data for Jun 6 midnight exactly:
`base.rateUSDbis`, making the test confused about which rate
to use.

We solve this by making the test use the rate `base.rateUSDbis`,
modifying the rate for its own need, instead of creating a new
rate.
2016-06-06 13:11:20 +02:00
Jérome Maes 412175b005 [FIX] web_tip : remove unused code that can trigger error 2016-06-06 11:47:03 +02:00
Denis Ledoux 950fd97d06 [FIX] fields: translations of the help of inherited fields
This is similar to revision 54140331f3

opw-673716
2016-06-06 11:44:34 +02:00
Christophe Matthieu a4c1e10ae6 [FIX] translate: do not translate <!DOCTYPE>
Avoid the DOCTYPE tranlation. If this tag is changed, the html rendering is altered. The other effet is that the web_editor wrap the content with <span> to translate, but some explorer eject tags (doctype, head content, script, style, meta) et insert this tags in the body.
NB: DOCTYPE is not a node but a text.
2016-06-06 11:18:41 +02:00
Goffin Simon bb6013f6ab [FIX] account_asset: compute_depreciation_board
The last depreciation date must be take from the last posted depreciation
line.

opw:679212
2016-06-06 09:33:58 +02:00
Odoo Translation Bot eb48b94cea [I18N] Update translation terms from Transifex 2016-06-05 03:01:35 +02:00
Odoo Translation Bot d1fa3350bb [I18N] Update translation terms from Transifex 2016-06-05 00:30:55 +02:00
qdp-odoo 9d6b9cc93d [FIX] account: Filter on contact by total receivable/payable fixed. opw 669833 2016-06-03 17:59:19 +02:00
Denis Ledoux 4810513f3c [FIX] res_currency: company rates subselect
The sub-select used to fetch companies rates
was wrong in the case rates with no company set
were entered before rates for specific companies.

e.g., for USD, the below rates:
Date        Rate        Company
2016-02-13  0.721400
2016-02-25  0.738800    1
2016-02-26  0.740000    1

the sub-select returned
Rate        Start       End
0.721400    2016-02-13
0.738800    2016-02-25  2016-02-26
0.740000    2016-02-26

while it was expected to return
Rate        Start        End
0.721400    2016-02-13  2016-02-25
0.738800    2016-02-25  2016-02-26
0.740000    2016-02-26

as the rate 0.721400 ended on 2016-02-25,
since a new rate specific to this company 1 was
added at that date.

opw-678726
2016-06-03 17:09:41 +02:00
xmo-odoo def824682e [FIX] purchase: properly forward defaults in copy override
fixes #12280
2016-06-03 13:01:55 +02:00
Nicolas Lempereur 3c3cf94863 [IMP] sales_team: don't auto install sales_cteam
Module sales_team was auto installed if base and mail was installed, but
this isn't wanted as it is already a depends of crm and sale modules
which should be anyway installed for sales team to have a meaning.

This could lead to a glitch with the sale apps displayed whilst it
should not be.

opw-679223
2016-06-03 11:27:22 +02:00
Christophe Simonis 5419485e72 [MERGE] forward port of branch saas-6 up to d5df729 2016-06-03 11:15:10 +02:00
Christophe Simonis d5df729294 [MERGE] forward port of branch 8.0 up to 2779d46 2016-06-03 11:07:56 +02:00
Ravi Patel 5ed14ce9b0 [IMP] account: The new draft invoice has the sale order as the source document.
Context:
Source document on invoice created through a credit note with the modify option

Current issue:
create an invoice from a sale order,
validate it,
Create a refund with the modify option
The first invoice is reconciled with the refund
The new draft invoice doesn't have a source document and can't be reached from the SO

Expect result:
The new draft invoice should have the sale order as the source document
2016-06-03 10:56:08 +02:00
Olivier Dony af1a8758ec [FIX] res.partner: performance of name_get()
Rev. 93e9a4dce7 tried to speed up
the 9.0 name_get() of res.partner by only calling fields_get()
once for the whole name_get, instead of calling it lazily.

This may have worked for name_get calls on multiple unnamed
addresses (name is NULL), but this is a rare occurrence
in practice - while now every single name_get() call would
incur the full cost of the fields_get() call.

That fields_get() call is O(n) in the number of fields,
and there can be quite a few for res.partner.
Calling it only for the specific 'type' field can easily be
about 40x faster than without it.

And since name_get() is called for each Many2One field
of each record being read (due to convert_to_read()), reading
a batch of records with partner fields had become quite
a bit slower!

Avoiding this cost entirely with lazy fields_get() calls
saves quite a lot of time for the common cases. And now
that fields_get() specifies a single field, it is cheap
enough to be called within the loop.

Non-scientific benchmark: account.invoice.search_read() in
the list view of invoices took 500ms for 25 invoices
_before_ this fix, and 90ms after!
2016-06-02 21:15:21 +02:00
Xudong Yang f558c049d0 [FIX] base_import: t-if does not work with t-jquery
Not evaluated, move the condition to the button
Closes #12230
2016-06-02 17:56:23 +02:00
Jairo Llopis f94f570be6 [FIX] doc: declaration of computed fields
Cannot link a method before declaring it.

Closes #12057
2016-06-02 17:56:23 +02:00
Laurent Bélorgey 149b8fe2c6 [CLA] signature for lbelorgey
Closes #11226
2016-06-02 17:56:23 +02:00
Adrien Peiffer (ACSONE) 2779d463e8 [FIX] l10n_lu: Change the sign for VP-IC-EX. Was PR #12041 2016-06-02 17:38:05 +02:00
Martin Trigaux 30f06fd39e [FIX] website_forum: convert content of posted comment to plaintext
HTML content should be escaped before being sanitized. Any content (link, image,
code,...) that is acceptable in usual mail.message but should not be interprated
when posted on a comment of the forum.

Fixes #3737
2016-06-02 17:00:17 +02:00
Denis Ledoux c751c129da [FIX] website_sale: State select readonly in shipping info
If we take the below facts:
 - The country select is set as disabled
   when Shipping is set to "Ship to the same address"
 - The disable property of select inputs is
   removed when shipping is set to
   `create a new address`:
   In `website_sale.js`:
   ```
   $selects.attr("disabled", value <= 0 ? null : "disabled" ).prop("disabled", value <= 0 ? null : "disabled" );
   ```

We can safely assume that the select input "State / Province" was supposed
to be set as `disabled` in the first place, not as `readonly`

Before this revision, State / Provice was greyed when choosing
"Create a new address" for shipping, and selecting the United States
(but the select input was still usable, though, it was just greyed)

opw-675739
2016-06-02 16:57:36 +02:00
Nicolas Martinelli 543f75f46e [FIX] product_extended: traceback on bom_count
The field `bom_count` is added in the view for group `group_mrp_user`.
Therefore when extending the view, we should make sure to restrict the
access as well.

opw-679172
2016-06-02 15:26:52 +02:00
Christophe Simonis 928bc262a6 [MERGE] forward port of branch saas-6 up to 589751c 2016-06-02 14:26:19 +02:00
qdp-odoo 649b289fa1 [FIX] account: invoice analysis report fixed.
* price_average is now always positive regardless of the invoice type, because it's an average and there's no point in summing those values
* price_total is now computed by using ABS() because of a migration bug of price_subtotal_signed introduced in saas-6, where in_invoice and in_refund invoices were set with a negative value while on the help tooltip it was saying that in/out refunds are negative and in/out invoices are positive. That bug was only revealed in v9 -since saas-6 wasn't using that field at all-, with the effect of having wrong values in report for migrated databases. This workaround using ABS() will be removed in a further version with a migration script to fix people's databases.
* residual field is now negative for in_invoices and out_refunds.
* These 2 points ensure that we can group by invoice type and sum the price_total or the residual fields to get the gross income of a month for example.
2016-06-02 13:41:27 +02:00
Christophe Simonis 589751ca28 [MERGE] forward port of branch 8.0 up to bde083a 2016-06-02 12:58:48 +02:00
Denis Ledoux 473d2ab98a [FIX] mrp: inventory value of produced items
Since the revision bc23c92c3e,
the inventory value of the produced items could
be doubled, because the list
`total_consume_moves` could contain several time
the same move ids, e.g. when it was added by
`total_consume_moves.append(raw_material_line.id)`
and
`total_consume_moves += already_consumed_lines.ids`

The list is replaced by a set to ensure a same move
cannot be counted twice.

opw-678727
2016-06-02 12:53:12 +02:00
Martin Trigaux 440c5d6e44 [FIX] subscription: avoid trying to access to subscriptions without cron
The cron may no longer be present (e.g. deleted) and the subscribtion would be
blocked in running state.

Fixes #12207
2016-06-02 12:48:07 +02:00
Christophe Simonis bde083a5f9 [MERGE] forward port of branch 7.0 up to 0ae392c 2016-06-02 12:42:34 +02:00
Jairo Llopis 57e5d703c2 [FIX] mass_mailing: filter emails to avoid duplicates
When subscribing a user to a mailing list, the `mail.mass_mailing.contact`
created is processed to identify it's name and email from the address (method
`get_name_email` called in `add_to_list` and `name_create`).
For a better consistency, the search of existing contacts should also be done
using the method `get_name_email`.

This avoids that subscribing twice `Example <example@example.com>` fails to
detect duplicates and creates two subscriptions.

Closes #12265
2016-06-02 11:38:00 +02:00
Raphael Collet fa8abe6aed [FIX] custom fields: make the flag 'translate' visible for html fields
opw:678921
2016-06-02 11:24:02 +02:00
Joren Van Onder 50eb591bbd [FIX] stock: hide header on stock.picking form view on small displays
Related to c6fc91b318.

fp request
2016-06-02 10:09:25 +02:00
Goffin Simon a0b918645a [FIX] account : _prepare_reconciliation_move_line
When computing the amount_currency, the ratio is 1.0 if the difference
between amount(computed like this -sum([x.balance for x in move.line_ids]))
and the amount set in the statement is not greater than the currency rounding.
opw:678588
2016-06-02 09:40:01 +02:00
Olivier Dony 011ce1e83a [FIX] ir.translation: avoid duplicating translations
Rev. 253437f81f meant to
avoid the creation of duplicate entries during translation
import, caused by existing translations created with an
empty `module` field.

But the fix was over-zealous and caused an extra side-effect:
the creation of missing translations (the blue flag icon)
now creates duplicate translations if other translations
exist with different `module` values.
(This could happen because translations are provided by
several modules, or due to manual translation entries with
no module value, etc.)
2016-06-02 00:41:51 +02:00