Commit Graph

94234 Commits

Author SHA1 Message Date
Maarten De Wispelaere 543c9fde83 [FIX] requirements.txt : gevent & greenlet versions updated
gevent 1.0.1 (old) causes issue on Debian 8.0 Jessie : Disk running out of free space
Cause: /var/log/syslog and /var/log/daemon.log full of "NameError: name 'PROTOCOL_SSLv3' is not defined"

FYI: disk of 20GB runs out of space in less than 24h!

gevent 1.0.2 release notes : https://github.com/gevent/gevent/blob/1.0.2/changelog.rst#release-102-may-23-2015
2015-09-18 00:55:02 +02:00
Christophe Combelles c73f3d7d1b [FIX] requirements.txt: reportlab version updated
switch to reportlab 3.1.44 because of install problems with 3.1.8
(See https://bitbucket.org/rptlab/reportlab/issues/55/setuptools-80-cannot-install-reportlab-318 )
2015-09-18 00:54:57 +02:00
Martin Trigaux e1163691e7 [IMP] l10n_sa: remove sequence on manifest
No reason to get Saudi Arabia CoA as the first module, use default sequence
2015-09-17 18:03:49 +02:00
Valencia Rodrigues Sah c2aff4772e [FIX] product: default value on required field
The qty fields has become computed in 6.1, and the value set by the user is on
min_qty. Set default value as it is required.

Closes #8561
2015-09-17 17:45:20 +02:00
Martin Trigaux cafe326b59 [FIX] tools: avoid duplicates when synchronising translation
The "Synchronise translation" wizard almost doubles the number of translated
terms in database.
This is due to the loss of the module reference at the synchronisation
(`module_name` is empty as updating all modules)
Only overwrite the module when it is set (default None)
Fixes #6149

Second part of the patches avoid inserting translations without any module for
locale xml ids.
2015-09-17 17:09:55 +02:00
Denis Ledoux 90dfaa7add [FIX] delivery: add the delivery after all order lines in SO
The delivery line in the SO was added among other lines,
in second most of the time, due to the fact
the sequence of the line was set after
all other order lines sequences.

opw-649629
2015-09-17 12:47:34 +02:00
dufresnedavid cc9113f818 [IMP] Prevent unclosed cursor during tests
If an error happens in an overload of setUp, the already-open cursor
is likely not to get properly released before the next test,
deadlocking the db, because tearDown only runs if setUp has
succesfully completed.

Cleanups were added specifically to run every time, after tearDown has
(potentially) been executed.

closes #8327

Note: cleanups run in LIFO order (as they should).
2015-09-17 12:23:09 +02:00
Joren Van Onder a11a490d30 [IMP] hw_escpos: support Star TSP650II
In order for the printer to work we need to configure it in USB vendor
mode. This means it will not have a USB interfaceClass of 7. So when
we don't find any USB device that identifies as a printer, we search
for Star devices and use the first one of those we find.

This should be reasonably safe because Star does not manufacture other
devices apart from printers that one would attach to the posbox.
2015-09-17 09:26:33 +02:00
Joren Van Onder ad727be267 [FIX] hw_escpos: don't try too hard to close a printer
Although it might be a good idea to make sure a printer device is
properly closed, trying for >1 min to do so is too much. It can cause a
>1 min delay between receiving a receipt and actually printing. Also,
just because the device is not cleanly closed does not mean that it will
not work when we open it again.
2015-09-17 09:26:33 +02:00
Joren Van Onder 1440dc1c96 [IMP] hw_escpos: don't replace a USBError exception with some string
There's absolutely no point to hiding exceptions like this, it makes
debugging more difficult than it has to be.
2015-09-17 09:26:33 +02:00
Denis Ledoux 2c81ab75c8 [FIX] payment: fees recomputation on transaction amount/acquirer change
Fees were not recomputed when the amount or the acquirer of the
payment transaction was changed.

This can happen if the user clicks on
"Pay now", which creates the transaction and computes
the fees for the first time and then redirects
to the payment provider, and then the user
came back from the payment provider, hitting the previous
button in his browser, for instance, and then
changes the content of his cart (the quantity, or even
the products) or change of payment provider
(from Ogone to Paypal, for instance).

opw-649509
2015-09-16 16:41:30 +02:00
Joren Van Onder 9365ecaada [FIX] hw_proxy: remove forms related to supported devices
The concept of supported devices was removed in
e7c51228f3. These forms should have been
removed with them.
2015-09-16 15:05:04 +02:00
Goffin Simon 8ef590bb28 [FIX] stock_account: stock inventory valuation
The function "open_table" is not called when triggering the action
window "Current Inventory Valuation". Then the 'history_date' is not
set in the context.

opw:649168
2015-09-16 14:18:40 +02:00
Paul Catinean 40c35fb48a [FIX] website: set multilang to `False`on `website_image`
Add multilang=False to website_image controller to prevent redirects

Because website_image is decorated with website=True
Requests made for the product image at
`/website/image/product.template/xx_xx/..`
triggered redirections to add the language code to the
requests URLs. This redirection was useless, as setting
the language code for images is non-sense.

Adding `websitelang=False` prevents this redirection.

In addition, the redirection could lead to
SSL security concerns, as the redirection
could use the http:// scheme.

Closes #8515
2015-09-16 14:12:44 +02:00
Olivier Dony 2b1cdd551f [FIX] fields.float: avoid non-deterministic side-effects on other cursors
In 5efac22043 and
1cf5723835 the computation
of the decimal precision of float fields was modified to
reuse a random cursor from the request environments.
Environment.envs is a WeakSet, subject to unpredictable
garbage collections.

This could cause hard-to-diagnose problems by executing
a SELECT query in a cursor that is supposed to be
otherwise idle and untouched.

As an example, this could cause a transaction start in a
cursor that was just committed/rolled back,
and was waiting for another operation to complete.

One such case happened semi-randomly during a module
installation triggered from the web client, where the request
cursor is committed and waiting for the registry
initialization done with a different cursor,
in the middle of _button_immediate_function()

After the registry initialization, the request cursor is
used again to determine the next action (ir.actions.todo),
and this could cause a TransactionRollbackError if the
request cursor was used during the initialization.

Using a new cursor every time is much safer, simpler,
and will not cause any significant performance hit,
because it will usually grab an available connection
from the connection pool, rather than create a new one.

Fixes opw-649151
2015-09-15 19:38:19 +02:00
Xavier Morel a139d81c46 [FIX] doc: odoo theme so it's compatible with Sphinx 1.3
Sphinx.set_translator is a Sphinx 1.3 API, and we only require Sphinx
1.2 at this point. Replace the use of set_translator with explicitly
setting the ``html_translator_class`` config setting.
2015-09-15 16:06:13 +02:00
Xavier Morel 2474a91bc9 [IMP] doc: recommend not using @api.one
* alter docstring of @api.one to mark it as deprecated for 9.0,
  recommend using @api.multi instead
  - deprecation notes were not correctly styled, add styling
    matching "warning" alerts
* move @api.one down the doc page to deemphasize it
* fix "backend" tutorial to remove all instances of ``@api.one``

closes #8527
2015-09-15 14:38:45 +02:00
Goffin Simon acf22b7bc8 [FIX] resource: current_hour in interval_get_multi
The minutes of dt_from(start date) must be taken into account by current_hour and not by
todo (hours).
2015-09-14 15:53:59 +02:00
Goffin Simon 2442fe2e4b [FIX] resource: hour_to and hour_from in interval_get_multi
The function interval_get_multi must take into account the minutes in
hour_from and hour_to. hour_to and hour_from are float fields in the model
"resource.calendar.attendance" and the decimal part of these two fields is
for the minutes.

opw:648349
2015-09-14 14:53:14 +02:00
Denis Ledoux f627199def [FIX] payment_ogone: Waiting status
Waiting status should be seen as pending status:
They require a manual intervention, except
if a new feedback is provided later.

opw-649302
2015-09-14 12:45:13 +02:00
Nicolas Lempereur 1fe932a7bc [FIX] web: css for popup search view float position
The widget SelectCreatePopup display the search view drawer directly
after the search view input field. But in current firefox version this
could lead to an issue with float positionning.

fixes #8462
opw-648999
2015-09-14 12:15:10 +02:00
Olivier Laurent 47133c7d3f [ADD] doc: database upgrade API: structure change
1° add a second level of titles because they were too long and
overrided the second column (the 'code column)
2° Add 'double backticks' around some keys
2015-09-14 11:52:12 +02:00
Nicolas Lempereur 5ac77c943b [FIX] membership, website_membership: paid but expired
A paid membership is expired if the validity period (period between
date_from and date_to) doesn't match with the current date.

closes #8505
opw-648627
2015-09-14 10:43:29 +02:00
Nicolas Lempereur e03d64cfaa [FIX] website: remove cancelled request for mobile preview
In 7d40a7d, f820c07, 3ed0628 the way the mobile preview iframe is set
was altered several times. This left an inconsistent needless page load.

This page load was cancelled, but as a side effect in a given set of
conditions:

- an ajax request is done early in current (and so iframe) page,
- phantomjs is used for the test,
- server response time

this could lead to a false positive caused by a cancelled xhr request
throwing the error: "Can't load template, http status 0".
2015-09-14 10:13:25 +02:00
Odoo Translation Bot 7ed58916df [I18N] Update translation terms from Transifex 2015-09-13 01:55:09 +02:00
Christophe Simonis 024177ebc4 [FIX] resource: get_working_intervals_of_day
Use patch from 8.0 (64e1c28e35) instead of
the one from 7.0 (bbd15cdca6).
2015-09-11 18:07:49 +02:00
Raphael Collet 1a47ac3921 [FIX] models: fix write() on inherited field that is not a column of parent 2015-09-11 17:35:24 +02:00
Christophe Simonis 35233dbbe2 [FIX] core: tools.html_sanitize: allow svg images 2015-09-11 16:42:47 +02:00
Christophe Simonis 1a8569095e [MERGE] forward port of branch saas-3 up to d48aa27 2015-09-11 16:38:00 +02:00
Christophe Simonis d48aa27cce [MERGE] forward port of branch 7.0 up to a7ff110 2015-09-11 16:16:27 +02:00
Goffin Simon 9e2062a74b [FIX] purchase: _create_invoice_line_from_vals
When creating a SO in dropshipping with 'create invoice' = 'on delivery order',
the resulting invoice must not be linked to the PO but to the SO created.
Inspired from '_create_invoice_line_from_vals' in addons/sale_stock/sale_stock.py

opw:647628
2015-09-11 15:41:33 +02:00
Christophe Simonis a7ff1104bc [FIX] base: sanitize module description 2015-09-11 14:58:44 +02:00
Nicolas Martinelli 94588c4302 [FIX] account_cancel: allow canceling the Cash Register in the same manner as Bank Statement
Closes #8342
2015-09-11 09:07:11 +02:00
Olivier Laurent 7163a0c865 [ADD] doc: database upgrade API (background image)
Add a background image.
The previous one was empty.
2015-09-11 08:46:01 +02:00
Mohamed M. Hagag 9069f29efa [ADD] l10n_sa: Saudi Arabia multi-lang CoA
Closes #8098
2015-09-10 15:20:05 +02:00
Denis Ledoux 428588a8b7 [FIX] website_quote: Amount before discount with included taxes
The undiscounted amount did not take into account the taxes
included in the price. Included taxes were seen as a discount.

For a quotation with one line with an included tax of 15%,
but no discount, the undiscounted amount must be the line price subtotal,
the price subtotal already removing the taxes from the price unit.

For a quotation with one line with an included tax of 15%,
and a discount of 10%, the undiscounted amount must be the line price subtotal,
plus the amount discounted. That way, the taxes included are already removed
from the price, but the discount is not included.

opw-648388
2015-09-10 15:06:44 +02:00
Martin Trigaux a9757d99c3 [FIX] account_anglo_saxon: price computation with different uom
When recording the cost of good sold, fetch the price based on the stock.move
Revision fb57514c used the standard_price fixing a UoM issues
2015-09-10 15:04:37 +02:00
Goffin Simon 92c4a3e89a [FIX] stock_landed_costs: Former Cost
The former cost of a stock.valuation.adjustment.lines line is the sum
of cost * qty  of each quant linked to the stock.move record linked to
this line (with the field 'move_id').

opw:648922
2015-09-10 14:08:37 +02:00
Olivier Laurent 1545591f3b [ADD] doc: database upgrade API 2015-09-10 12:51:47 +02:00
Martin Trigaux 8f7484b6af [FIX] crm_partner_assign: message translation structure
Backport of 1989495 without breaking existing translations.
do not forward port in 9 where proper fix has been made at 1989495.

Do not generate the messages by putting bits of sentences together.
Other languages do not have the same structure (and 'have not' was not
translated anyway).

For 8.0 keep the same source for the base error message but create a new one for
the negation as it was wrong in other languages.
2015-09-10 11:45:50 +02:00
Goffin Simon 77c8da7d2f [FIX] point_of_sale: tax_amount sign
The sign of the tax_amount in an "account.move.line" can be negative.
Introduced by cb86fef

opw:648231
2015-09-10 09:10:50 +02:00
Antonio Espinosa 74711efa0a [FIX] website: Default company of website model
Default website.company_id to base.main_company instead of base.public_user

base.public_user being a `res.users` and not a `res.company`

Closes #8236
2015-09-09 17:23:54 +02:00
Jos De Graeve ca47d4117f [FIX] delivery: Dont add other companies taxes deliveries
When delivery_set is called from the website_delivery module, the
uid is set to SUPERUSER_ID. In a multi-company environment, this
causes the linked taxes from the delivery product to be added
to the sale_order_line.

Closes #8311
2015-09-09 16:50:26 +02:00
Olivier Dony 2f8d6e796b [CLA] Update Camptocamp CLA
Typo + add older Camptocamp contributors.

Confirmed by email with Joël Grand-Guillaume
and Luc Maurer on 2015-09-09.
2015-09-09 15:51:15 +02:00
Stéphane Bidoul 8d58d985dd [FIX] http: no auto-load for modules not installable
Closes #8289
2015-09-09 13:56:55 +02:00
Denis Ledoux 097fbd3941 [FIX] payment_paypal: receiver email different than business email
Check receiver_email only if receiver_id was not checked.
In Paypal, this is possible to configure as receiver_email
a different email than the business email (the login email)
In Odoo, there is only one field for the Paypal email:
the business email. This isn't possible to set a receiver_email
different than the business email.
Therefore, if you want such a configuration in your Paypal,
you are then obliged to fill
the Merchant ID in the Paypal payment acquirer in Odoo,
so the check is performed on this variable instead of the receiver_email.
At least one of the two checks must be done, to avoid fraudsters.

opw-648776
2015-09-09 13:38:19 +02:00
Nicolas Lempereur 4626240d5d [FIX] point_of_sale: don't read for barcode when search focused
The product search field already handle product scanned by a code bar
(by adding it if it corresponds to only one product to the order) so
when the barcode is entered in this search input, the scan doesn't need to
be done.

closes #8433
opw-648856
2015-09-09 12:10:59 +02:00
Goffin Simon c092c40d14 [FIX] purchase: _calc_new_qty_price
The price must be compute with the purchase unit of measure set
on the product because qty is computed according to this unit of
measure.

opw:648513
2015-09-09 10:53:48 +02:00
Nicolas Martinelli 186c77dad1 [FIX] stock: do not remove lot id when splitting lot
Partial revert of the commit b62191c171.
We want to keep the lot number if we don't add all the products at once.

opw-648629
Fixes #7044
2015-09-09 10:50:04 +02:00
Raphael Collet 085875619f [FIX] fields: in `one2many.set`, replace incorrect query by ORM access
When linking a record into a `one2many` relation with command `(4, rid)`, a
query checks whether the record is already linked to the current record id:

    SELECT 1 FROM {inv_table} WHERE id={rid} AND {inv_field}={id}

where `inv_field` is the name of the inverse field, and `inv_table` is the
table where this field is stored.

The query is wrong if the inverse field is inherited, because the `rid` does
not belong to the table `inv_table`.

The test has been replaced by a plain ORM access:

    rec = obj.browse(cr, SUPERUSER_ID, rid)
    if int(rec[inv_field]) != id:
        ...

This fixes #4685.
2015-09-09 09:36:40 +02:00