Commit Graph

95293 Commits

Author SHA1 Message Date
Odoo Translation Bot 72a4229130 [I18N] Update translation terms from Transifex 2016-12-11 02:58:13 +01:00
Cristian Moncho 5ece76b717
[FIX] project: remove redundant context declaration
Declaring the keyword argument `context` in an API v7 `orm.browse_record` can
lead to mixed API v7/v8 inheritance bugs (`context` will be treated as a
function parameter instead of being injected in `self.env.context`). As the
context is already propagated in line 953, we can safely remove it from line
971.

Closes #13115
2016-12-09 14:37:21 +01:00
sergiov 4792a669d3
[FIX] auth_signup: display full error message
When the user name entered hasn't an email specified the error message wasn't
displayed in the reset view.
The error message was in e.name, not e.message
2016-12-09 14:32:16 +01:00
sergiov 85dc060a06
[CLA] signature for Sergio2409
cf #13960
2016-12-09 14:28:15 +01:00
baimo d16d1c6d9f
[FIX] web_gantt: translate "Gantt View" term
Closes #13328
2016-12-08 10:43:28 +01:00
Denis Ledoux 82a07d1072 [FIX] sale: fix company_id assignment on order line creation
Due to the following revision:
456d7b38f1

The company on the order line was not assigned
when creating a new line in an existing sale order.

The company was correctly assigned when you created
the order line with the order, and when changing the company
of the order, but not when adding a new line on an existing order.

This new trigger repairs this regression.
2016-12-07 16:33:18 +01:00
Denis Ledoux 36c6edf4bc [FIX] product: fix company_id assignment on pricelist version & items creation
Due to the following revision:
295b96c0b3

The company on the version and items was not assigned
when creating a new pricelist version on an existing
pricelist.

They were if you changed the company of the pricelist,
thanks to the triggers added in the above revision,
but not when they have just been created in the pricelist.

These new triggers repairs this regression. It also handle
changing the `pricelist_id` of a version (this is doable through
the "Sales > Configuration > Pricelists > Pricelist Versions" menu).

Fixes #14631
2016-12-07 16:26:11 +01:00
Josse Colpaert 86718d98bd [FIX] stock: don't delete package when you would still use Unpack button as it can create problems on pickings, ... 2016-12-07 11:59:19 +01:00
Raphael Collet 4116ac2f1c [ADD] models: warning on non-stored @constrains parameter 2016-12-06 14:08:01 +01:00
Paul Catinean ee2f2f2229
[FIX] website_sale_options: untranslated term
Case sensitive term wrongly exported
Introduced at 414175c
2016-12-05 17:02:20 +01:00
Odoo Translation Bot efdeb6779f [I18N] Update translation terms from Transifex 2016-12-04 02:57:30 +01:00
Denis Ledoux 0105cbbcf9 [FIX] website: make website default language required
The website `default_lang_id` was not required,
while the algorithm choosing the website language
expects it to be required.

This solves the below issue, when your browser language is en_US:
 - add a second language to the website (e.g. fr_BE or es_VE),
 - in the website settings, remove English from the languages
 - in the website settings, unset the default language
 - try to go on the website

You will have a crash:
```
  File "/home/odoo/src/odoo/saas-11/addons/website/models/ir_http.py", line 193, in _dispatch
    resp.set_cookie('website_lang', request.lang)
  File "/usr/lib/python2.7/dist-packages/werkzeug/wrappers.py", line 992, in set_cookie
    self.charset))
  File "/usr/lib/python2.7/dist-packages/werkzeug/http.py", line 905, in dump_cookie
    value = to_bytes(value, charset)
  File "/usr/lib/python2.7/dist-packages/werkzeug/_compat.py", line 106, in to_bytes
    raise TypeError('Expected bytes')
TypeError: Expected bytes
```

This is because the `request.lang` is set to `False`
because of the below algorithm in `ir_http.py`:
```
    nearest_lang = not func and self.get_nearest_lang(path[1])
    url_lang = nearest_lang and path[1]
    preferred_lang = ((cook_lang if cook_lang in langs else False)
                      or self.get_nearest_lang(request.lang)
                      or request.website.default_lang_code)

    is_a_bot = self.is_a_bot()

    request.lang = request.context['lang'] = nearest_lang or preferred_lang
```
`nearest_lang` is `False`, because there is no nearest language
available for the browser lang (`en_US`)
`cook_lang` is `False` for users who never went on the website
`request.website.default_lang_code`, which is the last feedback,
is also `False` because you removed the default language
in the website settings.

opw-695621
2016-12-01 11:37:03 +01:00
Goffin Simon a433ae65cb [FIX] purchase: default picking_type_id with ir.values
The deleted code put the same picking_type_id for all companies.
The function _get_picking_in returns the right default picking_type_id
according to the company.

Steps to reproduce:
-stock.warehouse0 is on company A.
-Define another company B with its own warehouse.
-Update the purchase module -> a new default value for picking_type_id on purchase
order for company B is created wtih the value of company A
-Create a purchase order on company B, Odoo tries to get the picking_type_id from company A.
If user doesn't have any rights on company A, it occurs a security warning.
Otherwise the purchase order is linked to a picking operation of another company.

opw:694059
2016-12-01 10:04:30 +01:00
Antonio Espinosa aac0faafb8
[FIX] membership: remove date_cancel for draft invoices
In `action_cancel` method below, the date_cancel is set when the linked invoice
is canceled.
When the canceled invoiced was reset to draft, the date_cancel was not removed.
This change makes sense as the state of the membership line is changed from
`cancel` to `waiting` when the invoice is reset to draft.

Closes #14313
2016-11-30 14:33:16 +01:00
Martin Trigaux adb12f95ea
[IMP] sale: remove untranslated terms
Closes #14497
2016-11-30 08:37:57 +01:00
Jeremy Kersten 1f10ef8055 [FIX] website_sale: fix amount format display
Before this commit, amount updated from ajax request don't respect currency format.
Eg: 1.200,000 => 1200.00

Now we use the grouping/thousand separator/decimal separator from l10n,
and if class decimal_precision is defined in dom, we use it. (format=0.001)

This commits closes: #11553
This commits is related to #1103
2016-11-29 17:00:18 +01:00
Odoo Translation Bot 8d724924f7 [I18N] Update translation terms from Transifex 2016-11-27 02:57:09 +01:00
Nicolas Martinelli cd440312ce [FIX] account: partial payment reconciliation
When processing a partial reconciliation in a foreign currency, a
currency exchange difference might be generated during the
reconciliation process (see OPW for a detailed use case).

This prevents the user to process the reconciliation since he will get
the error: 'You have to provide an account for the write off/exchange
difference entry.'

The fix is to use the company-related foreign echange gain and loss
accounts automatically to book this difference.

opw-687975
2016-11-25 10:21:01 +01:00
Zambu 623d61872d
[CLA] Corporate signature for Diagram Software
Closes #14409
2016-11-24 16:31:46 +01:00
Denis Ledoux 456d7b38f1 [FIX] sale: store triggers for related stored `company_id` sale orders
When changing the company of a sales order,
the change was not propagated to the related, stored, company field
of its sale order lines

These triggers makes that happen.

opw-694683
2016-11-24 16:14:36 +01:00
Denis Ledoux 295b96c0b3 [FIX] product: store triggers for related stored `company_id` in pricelists
When changing the company of a pricelist,
the change was not propagated to the related, stored, company fields
of the `product.pricelist.version` and the `product.pricelist.item`

These triggers makes that happen.

opw-694683
2016-11-24 16:08:07 +01:00
Jairo Llopis fbdac9c853 [FIX] website: fix search in existing pages
Previous implementation did not allow the user to search for pages 'name'
but only on the slugified name.

Now we slugify the needles before to find a match.

1. Create a new page: 'The new'
2. add a link on your website and try to find this page...
    - Before this commit, the only ways was to type 'the-new'
    - After this commit 'the new', 'The new', 'The-new', ... will match

This commit closes #10771
2016-11-22 13:47:17 +01:00
Jairo Llopis 954fb6da3c [FIX] website_event_sale: Preserve context when updating cart
Without this patch, when a product was added to cart, if this addon
was installed, it always landed in English in the SO.

This happened because the context, containing the current language,
was being aborted here (`context=None` instead of `context=context`).

This commit closes #14340
2016-11-21 22:18:48 +01:00
Odoo Translation Bot f9f562339f [I18N] Update translation terms from Transifex 2016-11-20 02:58:43 +01:00
Damien Bouvy 205b5542ca
[FIX] payment_paypal: accept PDT requests on /dpn route
It seems Paypal does not always send the same responses on auto-return
even when PDT is off. Although not reproducible on a Paypal sandbox,
sometimes the system auto-return to /payment/paypal/dpn without any
meaningful POST data. This seems to only happen with new accounts
that use the 'Hermes' web application of Paypal.

The correct thing to do would be to add a new field on the paypal
payment provider for PDT token and make the PDT flow available
to users; but this is a stable branch and this fix is already
sufficiently delicate. This shall be done in master though.

From this revision on, users can then activate PDT on their paypal
account, set the PDT token as an ir.config_parameter value (WITH
GROUP RESTRICTION SET TO ADMIN/SETTINGS GROUP!!!) and the system
will process these requests correctly.
2016-11-18 09:46:37 +01:00
Olivier Dony 8e8b7925d2
[FIX] hw_escpos: auto-detect endpoint address
Instead of hardcoding the IN & OUT endpoint
addresses for the ESC/POS printers, we now
attempt to auto-detect them.

This should increase compatibility with many
compatible thermal printers that are simply
using a different address, such as the
- STMicroelectronics POS58 Printer USB
- HU HAI SUNCSW Receipt Printer Co.,Ltd. Gprinter USB Printer

Fixes #12890
2016-11-16 14:52:34 +01:00
Josse Colpaert 1de37862d6 [FIX] stock: when matching moves with pack operations through quants, it did not match the packages correctly. Courtesy of Pedro Baeza
Before, it did a search to see if the package existed,
but the only thing it needs to do is see if the package
on the pack operation corresponds to that of the quant.  (no need to check children also)

There is a test added:
A picking with 120 pieces incoming, 120 in pack 1, 80 in pack2
When we deliver those in a picking out, with product pack operations: (by taking them out of the pack)

120 from pack 1 and 80 from pack2,
we should only have 2 quants and links between moves in the end

And before, it generated 3 because it matched the wrong quants and made the wrong links.

opw 693760 closes #13836
2016-11-16 11:26:20 +01:00
Olivier Dony 46ce74cdde
[FIX] hw_posbox_homepage: update links and version
Also added a direct link to the remote connect page to
grant remote SSH access via ngrok.
2016-11-14 17:11:57 +01:00
Olivier Dony 265c9f7b06
[IMP] hw_proxy: add lsusb full output to hw status page 2016-11-14 17:11:57 +01:00
Olivier Dony d1b0b9e656
[FIX] point_of_sale: check required commands before building POSBox image 2016-11-14 17:11:57 +01:00
Olivier Dony f579acf02f
[FIX] hw_scale: update driver for rs232_devices map and support AdamAZExtra scale
This commit fixes the driver to respect the new device
registration mechanism via hw_proxy.rs232_devices.

It also refactors the code to more easily support multiple
scale protocols, and introduces support for the ADAM Equipment
AZExtra scale protocol. (Might be compatible with other ADAM
Equipment scales)

Support for th AZExtra scale is experimental at the moment,
especially given two annoying problems with this model:
 -  they do not support proper probing (stays mute until a
    non-zero weight is measured), so they have to be probed
    last and *assumed* to work
 -  the scale beeps when a read attempt is made and the
    weight is not stable yet, or the weight has been already
    read previously. This constant beeping during operation
    is mitigated by extra delays between readings, but might
    still prove to be a major issue for supporting this scale.
2016-11-14 17:11:57 +01:00
Olivier Dony eeadeb0d6e
[FIX] hw_proxy,hw_blackbox_be: make RS-232 drivers protect their device
RS-232 drivers now need to register any device
they are handling in the hw_proxy.rs232_devices map.
This will prevent other drivers from probing them,
possibly messing up with the device.
Any update to rs232_devices must be done while holding
the hw_proxy.rs232_lock.

The hw_scale driver will be updated to use this mechanism
in the next commit, that will also handle a new RS-232
scale protocol.
2016-11-14 17:11:57 +01:00
Olivier Dony 2fd4dfca7f
[FIX] point_of_sale: update POSBox image creation script
- ngrok download URL has changed
- default kernel for raspbian image has changed and needs to match
- remove pre-existing git checkout to avoid conflicting
- wait a few seconds after setting up loop dev with kpartx to access image
  contents - sometimes required to let the device appear in /dev
2016-11-14 17:11:57 +01:00
Christophe Simonis 51561d3ac8 [FIX] base: restart server when installing module from apps
When a new module is installed, its controllers and static files should
be available. A restart is required to do so.
2016-11-14 13:45:24 +01:00
Odoo Translation Bot fa544c9da0 [I18N] Update translation terms from Transifex 2016-11-13 02:57:18 +01:00
Nicolas Martinelli 4809b57283 [FIX] account: tax line amount
The company currency is USD, the invoice currency is EUR.
- Create an invoice in EUR, set an invoice date
- Compute the taxes (click on "update" button)
- Change the exchange rate between EUR and USD
- Validate the invoice

At validation, the tax lines are not recomputed. Therefore, the tax
amounts, are still converted in the company currency using the old
rates. On the other hands, the other account move lines will have the
appropriate new rate.

Closes #14024
opw-692430
2016-11-07 14:31:00 +01:00
Nicolas Martinelli 0a17be70e0 [FIX] account: tax line amount
The company currency is USD, the invoice currency is EUR.
- Create an invoice in EUR, set an invoice date
- Compute the taxes (click on "update" button)
- Change the exchange rate between EUR and USD
- Validate the invoice

At validation, the tax amounts are not recomputed. Therefore, they are
still converted in the company currency using the old rate.

Closes #14024
opw-692430
2016-11-07 13:35:54 +01:00
Odoo Translation Bot 369e0bcb45 [I18N] Update translation terms from Transifex 2016-11-06 02:56:48 +01:00
Goffin Simon e0ffc23a59 [FIX] report_intrastat: Not allowed to delete record
It's not allowed to delete record from the tree view of intrastat report.

opw:692016
2016-11-03 14:46:47 +01:00
Nicolas Martinelli 2508786127 [FIX] account_asset: first depreciation amount
When an asset is set as Prorata Temporis, with a one month period, the
first depreciation amount is computed on the basis of the remaining days
in the purchase year. This doesn't make sense for a monthly
depreciation.

This commit makes the distinction between a monthly and a yearly
depreciation. In the case of a monthly depreciation, the remaining days
in the purchase month are taken into account.

opw-690034
2016-11-03 09:15:05 +01:00
Olivier Dony f2158e32c8
[FIX] http: permit debug mode on CORS-enabled routes
As of f814dd9908355465dd03735f4589dd1697b3658a, debug
mode causes an extra X-Debug-Mode header to be sent
by the rpc() JS method.

This custom header was not whitelisted in the accepted
CORS headers, therefore any cross-origin call to a route with
`cors=True` would fail in debug mode, with a console error
along those lines:
   "Request header field X-Debug-Mode is not allowed by
    Access-Control-Allow-Headers in preflight response"

This would prevent loading the POS GUI in debug mode,
for example.

This commit is necessary in the 8.0 branch because
the POSBox is currently based on a 8.0 server and may
be accessed by a 9.0 POS or later, thus with the extra header.
2016-11-02 14:03:19 +01:00
Christophe Simonis 86a9b7893e [IMP] tests: use long message in case of error 2016-11-02 11:45:29 +01:00
Goffin Simon d406314638 [FIX] account_voucher: Wrong reconciliation of customer payments
Steps to reproduce :

1. Create a new customer
2. Create an invoice with an amount of 50.- for this new customer and validate it
3. Create a refund with an amount of 70.- for the same customer and validate it
4. Create a Customer Payment for this customer and validate it. The Invoice will be paid with 50.- of the refund. 20.- are still on residual in the refund.
5. Create a new invoice with an amount of 50.- for the same customer.
6. Create a new Customer Payment for the same Customer and validate it.

The Full Reconcile Boolean stays checked inspite of "Open Balance" of Refund amount is less than the Invoice amount.

After the fix:
Full Reconciliation Boolean doesn't get checked and Allocation amount on invoice journal item line should be same
as Open balance of the Refund Journal Item. So Invoice stays open with Balance amount.

opw:691577
2016-10-31 11:55:49 +01:00
Odoo Translation Bot c340284a60 [I18N] Update translation terms from Transifex 2016-10-30 02:56:40 +02:00
Wolfgang Taferner c39ca45c6d [FIX] config: avoid to accept server-wide-modules with None as a module
Fixes #14048
Fixes #14045
Closes #14051
2016-10-28 15:02:52 +02:00
Martin Geubelle 9f09c625f5 [FIX] calendar: rule._bynweekday can be a set
Depending on the version of dateutil, rule._bynweekday can either be
a tuple or a set (see https://github.com/dateutil/dateutil/pull/54), which,
in the case of a set, breaks the access by index (see related issue:
https://github.com/dateutil/dateutil/issues/24).

By casting it into a list, we make sure that we can access [0] in both case.

Credits to jke ; closes opw-690761.
2016-10-28 11:26:23 +02:00
Leonardo Rochael Almeida 5ee4344efd [IMP] Allow configuration of server_wide_modules from file
Allow reading and saving the value of `server_wide_modules` from the
configuration file, instead of just the command line.
2016-10-25 15:23:41 +02:00
Simon Lejeune 097f46e09a [REF] packaging: debian: depend on python-babel
Before this patch, the debian package depends on `python-pybabel`.
According to the documentation, this is a dummy package for transition
from `python-pybabel` to `python-babel`[1].

This dummy package has thus been removed in debian stretch in favor of
`python-babel`, and the odoo package is thus not installable in debian
stretch.

To fix this, we depend directly on `python-babel`, which is available in
all debian releases[2].

Closes #13905

[1] https://packages.debian.org/jessie/python-pybabel
[2] https://packages.debian.org/jessie/python-babel
2016-10-24 16:22:17 +02:00
Nicolas Lempereur 5d17749ff4 [FIX] web: repair length field in view list
Underscore method _.each expects an array like object when a "length"
property is present.

This was an issue with a record having a numeric "length" field set to a
non-negative value. When changing a line the change would not appear on
blur.

This issue was fixed with 0e664c9e9 but introduced back with f0e331e00.

opw-691070
2016-10-24 13:25:58 +02:00
Odoo Translation Bot 8f484fd137 [I18N] Update translation terms from Transifex 2016-10-23 02:57:47 +02:00