Commit Graph
107397 Commits
Author SHA1 Message Date
amoyaux c0dffa3433 [FIX] Website_Sale: State / Province doesn't appear when needed.
Use case when it happens:
* Go to billing for a product in website
* Modify or create an address
* Select a country without state
* State field disappear
* Select a country with states
* State field doesn't appear -> Bug

If you confirm, it raises an error asking you to fill the state
field and this one reappear.

The bug come from this forward port 1ef4061e68

This fix removes :visible from the jquery selector on state tag selector
since the logic is different in version 10.

opw-707402
2017-03-03 15:38:11 +01:00
bluesoft83 3513151e57 [FIX] product: wrong default datetime
On model product.price.history the default value for datetime field was evaluated at server start

Closes #15707
2017-03-03 14:14:25 +01:00
bluesoft83 2bf6e69e28 [FIX] web: keep focus field when navigating with keyboard
When moving with keys up or down on editable list view, jumping of line was
bringing the cusor back to the first cell.
The cell focus is stored in the option dict (e.g. {'field_focus': 'name'}.
Previous code was discarding the content of the given option dict to create
a new one.

Closes #15703
2017-03-03 14:12:53 +01:00
Martin Trigaux 0c3659e14b [I18N] translation correction for nl_BE
Regional languages are not on Transifex
2017-03-03 11:39:31 +01:00
Leonardo Rochael Almeida 2b5e879957 [IMP] web: Enhance registry.js tests
Make sure we're really setting and getting registry values instead of
just `undefined` values.
2017-03-03 10:17:46 +01:00
Leonardo Rochael Almeida 6eb15a6263 [IMP] web: Remove tiny code duplication 2017-03-03 10:17:41 +01:00
Leonardo Rochael Almeida bf8cc11e7e [FIX] web: QUnit context in js tests
Previously, the context for `options.{before,after}Each()` functions was
isolated from the context created by the odoo `test` function, making
it impossible to save attributes in the test during
`options.beforeEach()` that are accessible from the test itself, or to
clear resources created in the test in `options.afterEach()`

Moreover, the odoo test infrastructure was set up completely inside the
test wrapper, after `options.beforeContext()` had already run, making
it impossible for `options.beforeContext()` to use this infrastructure.

Here we use the QUnit context directly in the test, but move the
initialization previously done in the test wrapper to a `beforeEach`
wrapper (and, symetrically, on `afterEach`), making it possible to use
the odoo infrastructure in the javascript test setup, including
declared section dependencies.
2017-03-03 10:17:33 +01:00
bluesoft83 2580a6d04d [CLA] signature for bluesoft83
Done at #15705
2017-03-03 08:15:06 +01:00
Denis Ledoux 9f62be8387 [FIX] point_of_sale: sale details datetime in user UTC and lang format
The time in the sales details were in the UTC timezone,
instead of the user timezone, which confused the user

Besides, the datetime was formatted in the database
format, rather than in the language format

opw-710290
2017-03-02 18:47:07 +01:00
Martin Trigaux 2d199ed460 [FIX] stock: do not compute unrelevant inventory quantity
The total quantity of an inventory only makes sense if the same product is
counted.
This commit avoids useless recompute of the field when a ligne is changed.
The trigger were missing meaning it was recomputed after any change, slowing
down already unefficiant large inventory.
2017-03-02 10:37:57 +01:00
Goffin Simon 8c55e57c7f [FIX] product_margin: _compute_product_margin_fields_values
All the fields defined in model "product.product" from module product_margin
are computed and not stored with the same function which is _compute_product_margin_fields_values.
This function has a deprecated argument which is field_names and this agrument is only used in
function read_group overwritten in this module in model "product.product. This overwrite of
read_group uses a variable "fields_list" with almost all the fields defined in "product.product"
in this module (excepted: date_from, date_to and invoice_state which are read from the context).

Each time, the fields total_margin, expected_margin, total_margin_rate, expected_margin_rate,
date_from, date_to, invoice_state were needed, nothing was returned due to the empty argument
field_names passed to this method. For example, when opening product.margin.form.inherit form
view.

In old API, it works because the compute was called with the list of the fields and in new API, it is not the case.

Closes #15604
opw:709962
2017-03-01 15:50:56 +01:00
Goffin Simon 5d27b3d6c0 [FIX] hr_attendance: Wrong timezone
The timezones are already managed in the JS.
So on the attendance check in/out screen when a user clocked out
after 8 hrs he got a message saying that he has been in for more than 12 hrs.

opw:710161
2017-03-01 15:39:48 +01:00
Christophe Simonis 7abeace770 [MERGE] forward port branch saas-11 up to 5c4744cd1f 2017-03-01 15:17:55 +01:00
Christophe Simonis 5c4744cd1f [MERGE] forward port branch 9.0 up to 5f9f4f4d9d 2017-03-01 14:07:15 +01:00
Christophe Simonis 8efd51acd3 [FIX] website: check request existence before use 2017-03-01 13:07:57 +01:00
Christophe Simonis 5f9f4f4d9d [MERGE] forward port branch saas-6 up to 7eaa9f767a 2017-03-01 12:23:57 +01:00
Christophe Simonis 5655b43929 [FIX] base: clear cache through model instead of method
This allow cached method to be overwritten.
2017-03-01 12:21:11 +01:00
Christophe Simonis 7eaa9f767a [MERGE] forward port branch 8.0 up to 775022e01f 2017-03-01 11:26:31 +01:00
Odoo Translation Bot 775022e01f [I18N] Update translation terms from Transifex 2017-03-01 02:54:50 +01:00
Christophe Simonis 42de3f8e26 [FIX] website: use CDN for assets 2017-02-28 19:20:53 +01:00
Martin Trigaux 18fd9fe0a8 [FIX] server: avoid cron thread death
In case an exception (programming, out of memory or any other unexpected
failure), the cron_thread would crash and not recover until server restart.

Issue #15666 was an example of failure.

Courtesy of Nils Hamerlinck
2017-02-28 18:00:50 +01:00
Martin Trigaux 69e91f6a7c [FIX] base: recover thread from down postgresql
If postgresql database is temporarly down, the cron thread may fail.

The cursor creation fails when trying to connect to the server which leads to
the cron thread to die (uncatched exception) and will not restart when postgres
is back.

Fixes #15666
2017-02-28 18:00:00 +01:00
Goffin Simon 6c2414ac47 [FIX] membership: wrong overwrite
The signature _check_recursion already exists in odoo/models.py
So calling _check_recursion, the function which checks the constraint on
associate_member overwrote _check_recursion in "res.partner" model and
the function _check_parent_id defined in "res.partner" was completely
wrong because it needs _check_recursion defined in models.py

opw:710524
2017-02-28 13:54:24 +01:00
Fabien Meghazi 38ec6d7522 [FIX] qweb2.js: fix erratic object type detection in foreach (Fixes #15655)
Could not add a test as the qweb js testsuite is broken and it's xml
test files have been modified in order to test qweb.py specific cases.
2017-02-28 13:00:54 +01:00
Goffin Simon b411334acb [FIX] stock_account: product_price_update_before_done
Fine tuning this commit: 95038f0bf3
standard_price is company dependent.
Writing the standard price in sudo because a warehouse manager may not
have the right to write on products.

opw:709329
2017-02-28 10:53:11 +01:00
Goffin Simon ad2982308d [FIX] sale: _get_sale_order_line with order in state='done'
Steps to reproduce in runbot 10.0:

1.Create a new sale order and use the Odoo Monthly quotation template.
It will set the Odoo SAAS product on the sale order.
2.Go to the Odoo SAAS product form view, check "Can be expensed",
then on Invoicing tab, choose "At Cost" for the "Re-Invoice Expenses" field.
3.Confirm the sale order so it is in done (Locked) state.
4.Create an invoice, try to validate it, a UserError is raised:
'The Sale Order SO0158 linked to the Analytic Account must be validated before registering expenses.'

This UserError only makes sens when new SO lines are created.

NB:Now it's possible possible to update an analytic line linked to SO  in other state than 'sale'
but it's still forbidden to create a SO line when the state is different than 'sale'.

opw:708661
2017-02-28 10:20:12 +01:00
Thibault Delavallée 12c51cd847 [FIX] mail_thread inheritance: add api.returns on override of message_post
As message_post is defined on mail.thread abstract class its api.returns
is not automatically added on overridden versions of the method. This
commit add missing api.returns on all overrides of the method.
2017-02-28 10:07:19 +01:00
Florian da Costa e0392500dc [FIX] l10n_fr_fec: evaluation of unaffected earning line
Change the condition from
  [...] and debit != and credit != 0
to
  [...] and (debit != or credit != 0)

as at least one of debit or credit may have an unaffected value

Without this patch a past unpaid entry will not be included in the report.

Closes #15550
2017-02-27 17:00:28 +01:00
Florian da Costa 433f295b94 [FIX] l10n_fr_fec: unaffected earning sign and separator in FEC
The separator in the debit/credit columns of the report must contains coma
instead of dots for decimal separator (fr).
All the other columns (cf SQL query) contains coma but not this one.

Inverse the currency sign of the credit column. Otherwise the credit is negative
and sum of the balance is wrong (sum credit != debit)

Closes #15550
2017-02-27 17:00:28 +01:00
Alexis de Lattre c21354666d [FIX] account: match fields_view_get definition to master
The default `view_type` is `form`, not `False`.

Closes #15649
2017-02-27 12:31:10 +01:00
Csaba Fazekas a1224f5ca9 [FIX] web: Contact form modal not responsive
When creating a contact from "Contacts & Adresses" in res.partner view form.
The radio button (field "type") was not responsive.

opw:706338
2017-02-27 12:28:42 +01:00
Isaac Gallart Bochons 48cebafdaf [FIX] mrp: call message_post separately
message_post accepts only one id

CLA signature for igallart done at #15625

Closes #15625
2017-02-27 12:26:42 +01:00
Goffin Simon d612daae71 [FIX] product_visible_discount: product_id_change
When computing the discount in product_id_change, before the fix

discount was equal to (new_list_price - line.price_unit) / new_list_price * 100

But line.price_unit was already rounded so the discount computed was not the
discount set in the pricelist due to rounding error.

opw:709704
2017-02-27 11:08:43 +01:00
Paulius Sladkevičius b4c6390065 [CLA] fix typo in email address
Done at #15651
2017-02-27 10:33:43 +01:00
Odoo Translation Bot c224df04a5 [I18N] Update translation terms from Transifex 2017-02-26 04:31:11 +01:00
Odoo Translation Bot 333e7d1f9e [I18N] Update translation terms from Transifex 2017-02-26 02:55:24 +01:00
Odoo Translation Bot 24fa6012e7 [I18N] Update translation terms from Transifex 2017-02-26 00:31:32 +01:00
Olivier Dony 2cffcfd860 [FIX] website_mail: disable sha_in based message_post
The _message_post_helper() method historically allowed
passing a `sha_in` signature to let an unauthenticated
user post a message on a record.

This option is unused and an alternative is preferred:
passing a `token` value that matches the value of a
given field of the record.

In light of the increasingly grim future of SHA-1
as a cryptographic hash function, we consider it
better to entirely remove this specific option.

It has been unused for a while, and a simple
alternative exists.

The `object_shasign` method itself will be dropped
in master.
2017-02-25 02:10:36 +01:00
Jeremy Kersten 3f26151cbd [FIX] website_sale_portal: show cancel invoice fixing typo in domain
This commit closes #15254

Courtesy of @hugho-ad for reporting
2017-02-24 20:52:22 +01:00
Jeremy Kersten 2bf6eab609 [FIX] website: fix sitemap for multi website if more than one page
Template "sitemap_index_xml":
    <loc><t t-esc="url_root"/>sitemap-<t t-esc="page"/>.xml</loc>
should be:
    <loc><t t-esc="url_root"/>sitemap-<t t-esc="website_id"/>-<t t-esc="page"/>.xml</loc>

The fix in python is not elegant but allow to fix without -u of website.
2017-02-24 20:52:22 +01:00
Jeremy Kersten 6969c6c5ad [FIX] website: allow to edit master if 'automatic footer' is disabled
Before this commit, impossible to edit the master if no language switcher
was displayed on the web page.
2017-02-24 19:18:31 +01:00
Jeremy Kersten 14d1f6f6c1 [FIX] website_event[_sale]: don't allow register when event is done
Some previous links could still point to old register page and so display an
error 500 if product of ticket has been already archived.
2017-02-24 19:18:31 +01:00
qdp-odoo 807751aece [FIX] base: fix mixing currency in company/pricelist
A company should have at least a pricelist having the same currency, that's common sense.
This was causing problems in tests on 10.0-nightly, where the main pricelist was created
in EUR, then the localization module was setting the right currency on the company without
any reflection on the pricelist.
To avoid this problem, when we write the currency on a company, we reflect that change on
the main pricelist if it's the only company in the system. Otherwise as we can't decide
which pricelist modify, we just create a new one, which should be ok.
2017-02-24 17:57:36 +01:00
Laurent Smet bf8b359b29 [FIX] delivery: fix bad Exception handling
When get_price() is called during tests, a ValidationError was returned but not catched
correctly due to the unavailability of delivery service.
Because this method is called during the creation of new sale order, it leads to some
operational error (broken cursor).
2017-02-24 17:57:36 +01:00
gilles 961b731da3 [IMP] hr: add name attribute on page to improve inheritance
Closes #15620
2017-02-24 17:51:49 +01:00
gilles f1a7e3142c [CLA] signature for GillesTephaneMeyomesse
Done at #15620
2017-02-24 17:50:27 +01:00
Whitley 914f509284 [IMP] doc: add dependency to CentOS installation
yum-config-manager is not installed by default with CentOS from some VPS companies.

Closes #15631
2017-02-24 17:23:13 +01:00
Leandro Di Pasquale 3401887e6e [CLA] Update List of Contributors of bacgroup
Add Osvaldo Jorge Gentile and remove Cesar Rodriguez from Bacgroup Organization

Done at #15630
2017-02-24 17:20:23 +01:00
Stéphane Bidoul (ACSONE) 6f1c291982 [FIX] auth_ldap: allow non-ascii ldap base
For installations with accents in the name

Closes #15597
2017-02-24 15:18:51 +01:00
Raphael Collet 1f77c2d681 [FIX] models: add warning for inconsistent compute_sudo on fields (#15184)
Check that fields using the same compute method have the same value for
parameter `compute_sudo`.
2017-02-24 11:45:15 +01:00