Commit Graph
103218 Commits
Author SHA1 Message Date
Simon Lejeune 02484f899a [FIX] report: thread-safe barcode generation
A lock occurs when the user wants to print a report having multiple barcode while the server is
started in threaded-mode. The reason is that reportlab has to build a cache of the T1 fonts
before rendering a barcode (done in a C extension) and this part is not thread safe. We attempt
here to init the T1 fonts cache at the start-up of Odoo so that rendering of barcode in multiple
thread does not lock the server.

Another workaround was to set an explicit lock around the reportlab's function call, but it's
more dangerous as it may introduce undetectable lock between python and postgresql.

Thanks to @odony and @KangOl.

Fixes #12236
2016-06-10 11:26:01 +02:00
Denis Ledoux d6e93d063b [FIX] project: project duplicate message followers
This is related to revision
c8aac116a6

`message_follower_ids` is a one2many field
on the thread. To copy them, you must
create new `mail.followers` records, and not
linking the followers of the project
being duplicated to the duplicated project.
2016-06-09 18:26:06 +02:00
Denis Ledoux 291561a197 [FIX] report, account: invoice reset to draft attachments
When cancelling and resetting to draft an invoice,
delete only the invoice report attachment from the
attachment, not all of them.

The reason why the report is removed from the
attachments on the invoice resetted to draft
is explained in
db0def38cc

opw-680295
2016-06-09 17:37:55 +02:00
Denis Ledoux c8aac116a6 [FIX] project: duplicate project must copy followers
Since duplicating a project copies the project
tasks, with the followers, the project followers must
remain as well.

This is done in the already overriden method
`copy` instead of simply adding `copy=True`
on the according one2many field, since this field
is defined on the inherited model
`mail.thread`, and to add `copy=True`, in the old api,
we would have to re-define the `message_follower_ids`
field within the `project.project`
model completely, making sure to copy all properties

opw-680313
2016-06-09 17:27:31 +02:00
Nicolas Martinelli 8f71292162 [FIX] l10n_fr_hr_payroll: children categories
When a rule category has children, the total of the category should
include the total of the children categories.

opw-673222
2016-06-09 15:21:03 +02:00
Nicolas Martinelli 8049d1e855 [FIX] base_import: file type on Windows
When a user imports a CSV file on Windows, the "CSV Format Options…"
field does not appear. This is an issue since it might be necessary to
tune these options depending on the file, e.g. change the encoding.

For some unknown reason, on Windows, the file type is empty whatever the
browser used. Therefore, we fall back on the extension of the file.

opw-680347
2016-06-09 15:09:22 +02:00
Goffin Simon a46f361698 [FIX] delivery, stock: carrier_id field in incoming stock picking
The field "carrier_id" must be hidden for the incoming stock picking.

In stock picking view form,
for an incoming stock picking, the Destination Location Zone must be hidden
for an outgoing stock picking, the Source Location Zone must be hidden
Introduced by 2cb3a90

opw:676411
2016-06-09 14:49:14 +02:00
Shelton Freddy 35536b7206 [FIX] purchase: do not allow creation on purchase.order.line
To match the behaviour on sale.order.line.
Purchase line form is expected to be open in popup (where parent is defined),
not individually when creating a line alone is not useful.

Fixes #6644
Closes #12325
2016-06-09 13:46:08 +02:00
Shelton Freddy 34eecbf4be [CLA] signature for sheltonfreddy141
Closes #12326
2016-06-09 13:21:28 +02:00
Peter Hahn 6d7cb5408e [FIX] sale,procurement: use super instead of direct call
Otherwise inheritance is not properly propagated

Closes #12337
2016-06-09 13:19:09 +02:00
Jeremy Kersten 6f223edf4f [FIX] mail: display date and datetime in tracking value with the right timzeone.
When tracking value is converted to be rendered as a message_post, we convert
the date/datetime with the current local from momentjs.

Related to #12327

Courtesy of @aab-odoo for help and review.
2016-06-09 10:45:35 +02:00
Patrik Lermon 529c2447b8 [CLA] individual signautre for Patrik Lermon (kler)
Closes #12347
2016-06-09 10:38:30 +02:00
qdp-odoo 09bf8b4363 [FIX] account: let the note field be visible on form view of fiscal positions 2016-06-09 10:17:19 +02:00
Nicolas Martinelli af2c69f0e5 [FIX] account: duplicate journal entry
When a journal entry includes taxes, it is impossible to duplicate it
because of an unbalanced entry error.
Indeed, by default the taxes are computed at the creation of the account
move lines, leading to the creation of a new tax line, therefore
unbalancing the account move.

Fixes #11919
opw-676788
2016-06-09 10:03:05 +02:00
Denis Ledoux dd1e67d263 Revert "[FIX] delivery, stock: carrier_id field in incoming stock picking"
This reverts commit 07e6f28df3.

This was no longer possible to create a picking from scratch.
`Inventory > Your Company: Receipts > Create`
Because `picking_type_id` is not in the res returned by the above call to default_get

Even by forcing `picking_type_id` in the `fields` list,
it doesn't return the value in the fields.
2016-06-08 18:23:08 +02:00
Denis Ledoux 3ddb446b3b [FIX] crm, mail: Convert to opportunity in mail notification
The button "Convert to opportunity" in the mail notifications
sent when posting a message on an opportunity just coudln't
work as it attempted to call the `convert_opportunity`
method without one of its required method parameter.

opw-680017
2016-06-08 17:15:15 +02:00
Pedro M. Baeza e3e5cfe82c [IMP] l10n_es: Added a new tax "IVA soportado no sujeto" 2016-06-08 16:15:20 +02:00
Pedro M. Baeza 730890f369 [IMP] l10n_es: New taxes, taxes codes and fiscal positions according law changes
* v5.2: Añadida retención 19,5% arrendamientos.
* v5.1: Renombrado todo lo relacionado con arrendamientos para no incluir la
  palabra "IRPF", ya que no es como tal IRPF.
* v5.0: Se ha rehecho toda la parte de impuestos para dar mayor facilidad de
  consulta de los datos para las declaraciones de la AEAT y para cubrir todas
  las casuísticas fiscales españolas actuales. Éstas son las características
  más destacadas:

  * Desdoblamiento de los impuestos principales para bienes y para servicios.
  * Nuevo árbol de códigos de impuestos orientado a cada modelo de la AEAT.
  * Nuevos códigos para los códigos de impuestos para facilitar su
    actualización.
  * La casilla del modelo viene ahora en la descripción, no en el código.
  * Posiciones fiscales ajustadas para el desdoblamiento.
  * Nuevo impuesto y posición fiscal para retención IRPF 19%.
  * Nuevo impuesto para revendedores con recargo de equivalencia.
  * Nuevas posiciones fiscales para retenciones de arrendamientos.
  * Pequeños ajustes en cuentas contables.

Closes #8453
2016-06-08 16:14:35 +02:00
Denis Ledoux 876b893a53 [FIX] stock_picking_wave: remove picking from a wave
When removing a picking from a wave,
it should simply remove the link between
the picking and the wave, not remove the picking itself.

opw-677590
2016-06-08 15:43:14 +02:00
Goffin Simon 07e6f28df3 [FIX] delivery, stock: carrier_id field in incoming stock picking
The field "carrier_id" must be hidden for the incoming stock picking.

opw:676411
2016-06-08 15:10:39 +02:00
Goffin Simon d0d3ba921d [FIX] website_quote: delay in SO line
When creating an SO line with a quotation template, the customer
lead time must be set.

opw:678039
2016-06-08 14:17:40 +02:00
Martin Trigaux f307e36e66 [FIX] base_import: disable tracking during validation
Force the value tracking_disable to be make sure that the validation (which is
supposed to have no impact), will not send any email.

Fixes #3173
2016-06-08 11:37:03 +02:00
Joren Van Onder fe99c51703 [IMP] hw_scanner: support multiple simultaneously attached devices
The hw_scanner module not only supports barcode readers (although that
was it's original intention). It also happens to support certain card
readers (like the MagTek Dynamag we use for Mercury) because they act
the same way as barcode scanners (like a keyboard and end sequence with
ENTER).

Before we supported Mercury there was no real reason to support multiple
devices on the POSBox, because it didn't make much sense to attach >1
barcode reader to the same POSBox. With Mercury however, this is a real
use case, as users want both a barcode reader and a card reader.

This commit implements support for this, while keeping the functionality
as close as possible to how it was before (eg. care was taken to not
break plug and play support).
2016-06-08 10:03:09 +02:00
Nicolas Martinelli 4cc01a34e4 [FIX] website_portal_sale: prevent overlap
In the website portal summary ('/my/home'), a long invoice number might
overlap the date.

opw-677567
2016-06-08 08:18:35 +02:00
Christophe Simonis fa4a371ba8 [MERGE] forward port of branch saas-6 up to 0211782 2016-06-07 19:11:49 +02:00
Denis Ledoux 57a5d1976b [FIX] qweb: t-lang warning logger
The evaluated lang is within the variable
`d.context['lang']`

`lang` contains the non-evaluated `t` attribute,
so, in the case of `report_saleorder`,
`doc.partner_id.lang`

opw-680074
2016-06-07 18:23:25 +02:00
Christophe Simonis 021178242f [MERGE] forward port of branch 8.0 up to 6140300 2016-06-07 18:01:12 +02:00
Nicolas Lempereur 5ea4937e5a [FIX] stock: reordering_{min,max}_qty &several ids
dict.fromkeys doesn't duplicate the passed 'values', hence the code
created a table with several times the same instance of values dict.

opw-679203
2016-06-07 17:27:17 +02:00
Jos De Graeve 2098b703a4 [FIX] sale_timesheet: set wrong code on analytic line
The product_id is the one of the timesheet line, not the one of the order (which
actually is the one of the first line).
Closes #12013
2016-06-07 17:02:21 +02:00
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
Nicolas Martinelli 7613cb36d6 [FIX] product: pricelist based on supplier price
In the case of a purchase pricelist based on the supplier price, the
price selected is incorrect if the supplier is not in the list of
suppliers of the product. Indeed, in this case, the price of the first
supplier is chosen.

We also need to make sure to go through all the pricelist items found.

opw-678440
2016-06-07 16:03:07 +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
Nicolas Martinelli 6140300da0 [FIX] account_analytic_analysis: fpos of invoices
When an invoice is created automatically thanks to the cron task, the
superuser is used. However, this implies that the company of the
superuser will be used for the account invoice creation, leading to
potentially incorrect taxes and fiscal positions.

opw-669714
2016-06-07 12:20:23 +02:00
Martin Trigaux ff3a0b12c6 [FIX] hr_evaluation: badly rendered form
The date was positioned inside the h1 and was badly rendered (field too small)
Fixes #2476
2016-06-07 12:16:38 +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