Commit Graph

92076 Commits

Author SHA1 Message Date
Xavier Morel fd6dde7ca0 [FIX] enable --debug for non-xmlrpc contexts
fixes #3102
2014-11-28 08:35:14 +01:00
Arthur Maniet d7a46b4d84 [FIX] account: floating point comparisons in get_reconciliation_proposition 2014-11-28 05:20:09 +01:00
Denis Ledoux 1cbf48417e [FIX] translate: lang detection fallback actually falls back
For instance, when a context was passed to a method, but no lang was defined in the context, it did not tried to fallback to other places where we could have find the user language.
2014-11-27 17:18:46 +01:00
Christophe Simonis de27e19794 [FIX] fields.py: in many2one convert_to_cache, value can be int but long as well 2014-11-27 17:06:48 +01:00
Christophe Simonis 5f47fc84e9 [FIX] web: m2o search facet do no set `default_*` context key for "name_search" values 2014-11-27 17:06:48 +01:00
Christophe Simonis 9b670049b6 [FIX] fields.py: Many2one fields only put valid values in cache 2014-11-27 17:06:48 +01:00
Olivier Dony fc85a7ee5c [FIX] product: remove unnecessary UoM rounding step, add missing test
Remove the intermediate rounding inside _compute_qty(), as it
is not necessary after rev. fa2f7b86 and has undesired side-effects.

An extra float_round() operation inside _compute_qty()
had been added at rev. 311c77bb to avoid a float representation
error in UoM factors that could bias the ceiling() operation
done as the last conversion step.

Example 1:
Dozen has a factor of 1/12, which was previously stored in the
database with a decimal accuracy of 12 significant decimal digits.
This meant the factor was exactly stored as 0.08333333333333.
When reading this back into a Python float, the precision was not
sufficient, and the UoM conversion of 1 Dozen to Units gave a
result of 12.00000000000047961...
After the final ceiling() operation to Unit's rounding, the
converted value ended up as 13.

This problem was initially solved using an extra rounding.

However at revision fa2f7b86 the decimal precision used to store
UoM factors was increased to preserve all significant digits.
This added the extra precision necessary to read the Dozen factor
back into an accurate float value of 1/12, and the conversion of
1 Dozen now gives 12.0 Units, even without the intermediate
rounding operation. (Works for other factor values too)

At the same time that extra rounding operation has undesired
side-effects, as it requires a fixed precision derived from
the rounding precisions of the UoMs. But there is no given precision
that would work in all cases for this intermediate value. It is
always possible to find a valid combination of UoM roundings
that breaks that intermediate step, e.g. by forcing integer
roundings.

Example 2:
Let Grams have a rounding precision set to 1 because no smaller
quantities are allowed, and Kilograms a rounding of 0.001 to allow
representing 1 Gram. (gram factor = 1000 and kilogram rounding = .001
by default)
If we try to convert 1234 Grams into Kilograms, the extra rounding
introduced in 311c77bb will cause a rounding of 1234.0/1000.0 at
the precision of Grams (1), which gives 1.0 as a result.
The net result of this conversion gives 1234.0 Gram = 1.0 Kilogram,
while the correct result (1.234 Kilogram) is perfectly compatible
with the UoM settings.

Similar errors could be triggered with various rounding settings, as
long as the intermediate rounding needs a finite precision.

Two extra tests have been added to cover Example 1 and Example 2.

--
Related to #2072, #1125, #1126, #2672
Closes #2495, #2498
2014-11-27 16:44:34 +01:00
Xavier Morel 8e9c23235a [IMP] ws doc: affix language switcher to page top 2014-11-27 16:37:27 +01:00
Xavier Morel 39d77f9e85 [FIX] doc: viewport meta missing 2014-11-27 16:37:27 +01:00
Xavier Morel 2cfd7182cc [CHG] ws doc: set right section against a dark background 2014-11-27 16:37:26 +01:00
Denis Ledoux 15d87a1732 [FIX] web_graph: pass context to fields_get for translation
In graph views, fields from the pivot table were not translated in the user language
We pass the context, containing the user language, to fields_get in order to get the translation
This is also done by the search view, in search.js line 1978 at this rev.

opw-616713
2014-11-27 16:06:05 +01:00
Denis Ledoux 62bc63e44f [FIX] web: force company_logo change on company change
In multi company environment, the company logo was not updated on company change in the user preferences
This disrupted the end user, as he might think the company change did not happen.
2014-11-27 15:21:25 +01:00
Denis Ledoux e347011f24 [MERGE] forward port of branch 7.0 up to 2080ea0 2014-11-27 13:27:37 +01:00
Denis Ledoux 2080ea0f0a [FIX] stock: on stock picking invoicing, allow to pick a journal if no move line 2014-11-27 13:26:57 +01:00
Sandy Carter 043f7b84b8 [FIX] base: avoid having 'False' in name of a bank
The name_get of res.partner.bank uses the format_layout to generate the name
of the bank. As every field is not required, we may get 'False' in the name.
Replace these missing values by an empty string.

Fixes #3590
2014-11-27 13:09:01 +01:00
Mohammad Alhashash 2461baa0dd [FIX] stock: prevent serial number deletion on stock.move
prodlot_id field may be required due to constraint `_check_tracking`.
When a stock.production.lot is deleted, the constraint on linked stock.move is
not checked. To avoid inconsistency, restrict the suppression.
To allow the modification of existing stock.move, remove the states attribute on
the field definition.

As removal of serial may impact the traceability, it makes sense on buisness
point of view to force the modification of previous stock.move, even if the
constraint would not have been violated.
The list of linked stock.move is present on the serial form view making
the operation easier.

Fixes #3560, lp:1176912
2014-11-27 12:47:41 +01:00
Denis Ledoux 117d0d0ca2 [FIX] sale_margin: stored field functions cannot trigger other stored field functions
the update of sale.order margin field was trigger with the margin stored field of sale.order.line: This cannot work with the old api
2014-11-27 12:06:19 +01:00
Will Stott c854404a2c [FIX] purchase(_requisition): typo negociation -> negotiation 2014-11-27 10:36:55 +01:00
David Monjoie f1c70d4cc9 [FIX] openerp: don't ignore active field on new views when updating a module
Without this fix, if you have a new view in a module with active=False, the active tag will be ignore when upgrading the module because of 'update' mode, and the view will be activated by default !
2014-11-27 09:52:17 +01:00
Olivier Dony 9bc712b075 [REV] product: rev. 42f5114 needs further review
Incorrect use of stock.move in product module + needs review.

This reverts commit 42f511405a4efe88e3903a4b4040ec9d83e462e2:
"[IMP] When no stock moves, change whatever you want, otherwise no change at all for UoM.  #3440 Enhancement request richard-willowit"
2014-11-26 18:20:28 +01:00
Josse Colpaert 42f511405a [IMP] When no stock moves, change whatever you want, otherwise no change at all for UoM. #3440 Enhancement request richard-willowit
The default UoM can only be changed when there are no stock moves (or only cancelled ones), but to any category.
The purchase UoM can be changed whenever you want, but has to be in the same category as the default UoM.

Closes #3440

[IMP] When no stock moves, change whatever you want, otherwise no change at all for UoM.  #3440 Enhancement request richard-willowit

[FIX] Remove line

[FIX] Constraint should be applied when UoM or PO UoM is changed
2014-11-26 18:01:00 +01:00
Jeremy Kersten 0313218123 [FIX] website_forum: Forum, use old API in v8. forum was not a browse record, so we need to re-browse. Tags: Force to delete tag. Before old tag deleted was not removed from relation, Now we use a 6 to force the update, followed by 0 to create. 2014-11-26 17:44:52 +01:00
Denis Ledoux 2b0a8363d9 [FIX] sale_layout: set 0 as default value for categ_sequence
Otherwise, in some cases, the categ_sequence can be set to null, which is not ordered the same way than 0, and you won't be able to sort lines with null and 0 as categ_sequence between each others
2014-11-26 17:03:42 +01:00
Maria G fde2046d5e [FIX] hr_attendance: use float division for worked_hours field
Used to be rounded to integer while the field is a float.
Fixes #3526
2014-11-26 16:46:26 +01:00
Frédéric Van der Essen 94aded554c Merge pull request #3803 from TheCloneMaster/patch-7
POS is loading all partners, not only customers
2014-11-26 16:38:44 +01:00
Pierre Verkest f0e331e005 [FIX] correctly update many2many in listview (web client)
Fixes the issue #1216 (follow the link for more information). The issue
was caused by a hack in list view: the magical suffix __display is used
in render_cell to determine if a many2many field should be updated. This
commit simply makes sure that old many2many fields + __display keys are
cleared.

A better way would be to redesign/refactor the list view to avoid that
hack in the first place.  But this would be a much more complex task.
2014-11-26 15:42:34 +01:00
Mario Arias Badila d349723271 [point_of_sale] Domain functions to literals
Replaced domain functions with literals where there are only constants
2014-11-26 08:32:33 -06:00
Edy Kendengis 002664ed79 [IMP] stock: display company in location tree view 2014-11-26 15:32:25 +01:00
Christophe Matthieu d3c562d4e8 [FIX] product: keep attribute on a variant with only one attribute
When adding informational attribute, with only one possible value, it used to be skipped.
Instead keep it and add it on every variant.

To avoid dropping and recreating product (and lose eventual customisations), the attributes with only one possible value are set on every product.
This makes sure that in following test, these are not considered in variants_inactive variable.

Fixes #3204
2014-11-26 14:35:08 +01:00
Denis Ledoux 02f4f9a572 [MERGE] forward port of branch 7.0 up to e2dd18f 2014-11-26 12:35:36 +01:00
Denis Ledoux e2dd18f1e7 [FIX] mrp: prevent recursion from phantom boms with no lines
if the bom is phantom and has no line, we attempt to find a new bom with the default product uom
This is possible that we find the same bom that the current one
In such a case, we must not explode, to avoid recursion.
2014-11-26 12:34:45 +01:00
Somesh Khare f317fedc4b [Fix] ir_translation: fix the problem of base_field object has no attribute model (Maintenance Case:618054)
Fixes #3859
2014-11-26 12:25:58 +01:00
Tymoteusz Motylewski 856eba1de0 [IMP] website_sale: performance on category page
public_categ_ids field was moved to product.template object
2014-11-26 12:09:37 +01:00
Martin Trigaux 342ec1083e [FIX] sale_service: typo in string Thick -> Tick 2014-11-26 12:07:53 +01:00
happyraul 8a4745f78c [FIX] doc: remove a word that does not make sense
closes #3594
2014-11-26 12:05:37 +01:00
Arthur Maniet a6de1b150c [IMP] account: bank statement reconciliation widget: allow to filter move lines on due date 2014-11-26 11:38:32 +01:00
Danimar Ribeiro 34da02e730 [FIX] l10n_br: remove reference to old base.group_extended group
Fixes #3879
2014-11-26 11:33:04 +01:00
Holger Brunn 7c070561b3 [FIX] mrp: duplicated xmlid for ir.model.access 2014-11-26 11:28:40 +01:00
Arthur Maniet 43f29b2b13 [FIX] account: bank statement reconciliation widget: correct multicurrency display 2014-11-26 11:27:46 +01:00
Christophe Matthieu 76080efdbc [FIX] website_sale: Discussion not working on product; issue: #3495 2014-11-26 10:38:38 +01:00
Christophe Matthieu 6b3777c2b6 [FIX] website_reseller: Navigation Broken for Partner List on Website issue#3522 2014-11-26 10:28:29 +01:00
Denis Ledoux 9f66f98520 [FIX] marketing_campaign: typo in manifest 2014-11-26 10:07:08 +01:00
Arthur Maniet 0003b7cd28 [FIX] account: bank statement reconciliation widget: disable buttons which trigger RPC calls until done 2014-11-26 09:44:50 +01:00
Paul Chater 463d332e34 [FIX] doc: typo in themes document
closes #3874
2014-11-26 09:38:51 +01:00
hiekmann 2a22a6151f [FIX] payment: docstring typo
closes #3557
2014-11-26 09:38:24 +01:00
Martin Trigaux e84b569fe4 [FIX] mrp_operation: missing context
It is present in mrp declaration but was not in mrp_production which was problematic if another module inherit as well from action_produce_end.
2014-11-26 09:18:53 +01:00
antonylesuisse 6fe2723e52 Merge pull request #3822 from the-digital-engineer/patch-1
updated deb-repository URL
2014-11-25 23:26:30 +01:00
Denis Ledoux b499eac2ed [FIX] website: the attachment creation improvment of a3e578068e must be done on res_model
instead of type
2014-11-25 19:26:13 +01:00
Martin Trigaux 7dca12ee08 [FIX] product: comparison of currency rounding
Setting 0.0001 as precision used to be converted to 9.999999999999999e-05
precision_digits of 6 is the precision of the field 'rounding' on res.currency
Fixes #3875
2014-11-25 18:41:00 +01:00
Olivier Dony e5f7b56735 [FIX] ir.ui.view: deletion of parent view should not cascade
This is safer to avoid inadvertently dropping customizations,
and does not impact the normal update/uninstall process, which
is based on the dependency order.
2014-11-25 18:38:39 +01:00