Commit Graph

71936 Commits

Author SHA1 Message Date
Christophe Simonis 2b2ec07435 [IMP] .gitignore maintenance migration scripts 2014-10-29 19:49:26 +01:00
Mohammad Alhashash 43db7267c5 [FIX] stock: UoS quantity in stock.picking
Implements the UoS TODO items on stock.picking.do_partial() to fix #1432.
Add a new method _compute_uos_qty() on product.product to computes
product's invoicing quantity in UoS from quantity in UoM.

The created invoice will use the product_uos of the stock.move, meaning keeping
the quantity specified on the partial picking and the unit of measure of the
original stock.move (e.g. recieving 1 dozen from a 12 unit picking should either
get uos=dozen, uos_qty=1 or uos=unit, uos_qty=12, not a mix of both)

Fixes #1432, opw 611479
2014-10-29 10:10:50 +01:00
Denis Ledoux f4870f8418 [FIX] sale: when invoicing on lines, set order in progress when all lines invoiced
This fix is related to rev. b1df5aab6e
2014-10-28 17:57:08 +01:00
Julien Legros b1df5aab6e [FIX] sale: trigger all_lines signal when all lines are invoiced 2014-10-28 15:16:06 +01:00
Denis Ledoux 0021fa977d Revert "[FIX] mail: read more show original message"
This reverts commit 0790682296.

This fix is not yet ready. See PR #3295
2014-10-28 13:43:25 +01:00
Denis Ledoux 00ec786e48 [FIX] account: partner balance general totals
General totals were not computed at all, due to the condition "if not self.ids" which was always true as self.ids wasn't set.

Besides, a parameter allows to display only partner with balance greater than 0, which was completely ignored by the totals computation methods: The totals always included all partners, even those having balance equals to 0
2014-10-28 13:18:22 +01:00
Antonio Esposito a00de91001 [FIX] hr_timesheet_invoice: warning in report generation
When generating the report 'Timesheet Profit', got a warning "The domain term '('user_id', '=', [...])' should use the 'in' or 'not in' operator."
This warning is due to the use of the '=' operator to compare the field 'user_id' while the reports sends a list of ids.
Fallback to still accept a single id in case of customised reports.
2014-10-28 11:00:07 +01:00
Martin Trigaux 79787084ff [FIX] sale_margin: cost price uom
When computing the cost price to display, take the uom into account. The cost of 1 Unit or 1 dozen should not be the same. opw 599727
2014-10-27 18:09:46 +01:00
Ravi Gohil d28cab5257 [FIX] stock: forbid adding new lines when processing picking
Source and destination locations are required and not displayed in the form view.
Adding new items when recieving a picking can not be easily guessed as we can put different locations for each line, using default locations may not be the expected result.
Instead should modify the original picking or create new one.
Fixes #2074, opw 612768
2014-10-27 14:37:36 +01:00
Martin Trigaux fcc59f12fc [FIX] product_visible_discount: use on_change result for product value
At the end of the onchange call product_id_change, the uom may have changed (e.g. if product in different category).
To compute the quantity, we need to use the new uom and not the first one (that may be Unit, default value)
2014-10-27 13:59:41 +01:00
Denis Ledoux 96bcaadd46 [FIX] account: limit search for fields_view_get to one result
+ use ir.model.data get_object_reference method for better performance (cached result)

opw-616616
2014-10-27 13:24:47 +01:00
Denis Ledoux 0790682296 [FIX] mail: read more show original message
Instead of html cleaned html, to allow display blockquotes

opw-614729
2014-10-27 13:24:47 +01:00
Martin Trigaux 8abd003ef0 [FIX] product: reference in test 2014-10-27 11:41:23 +01:00
Martin Trigaux 42bf0a5670 [FIX] product_visible_discount: discount with different unit of measures
The computation of the price without pricelist should take care of the unit of measure.
e.g. if computing discount for objects in dozen (on a product with price in unit), returned unit price should be (price*12) where 12 is the factor to go from dozen to unit.
Otherwise the compared prices (with and without pricelist) would not use the same unit of measure and the comparaison would be inconsistent. (opw 599727)
2014-10-24 17:21:42 +02:00
Martin Trigaux 79ebe1060d [FIX] product: pricelist, uom and price_surcharge
The price_surcharge attribute must be computed based on the reference unit of measure (divided by the factor).
This is to make sure than 12 units and 1 dozen have the same price after pricelist computation (opw 599727).

Added test checking the correctness of pricelist computation based on unit of measures.
2014-10-24 17:21:42 +02:00
Samus CTO d2fd05ef21 [IMP] config: Test that the config file is readable
Fixes #3237

cherry-pick of 8e72049
2014-10-24 16:48:27 +02:00
Christophe Simonis 472291b35c [FIX] When using "--stop-after-init", set the return code correctly. A non zero return code reflect the number of databases that fail to load/update
Backport of 2c4e370b76 and
33ce0e73db
2014-10-24 16:24:50 +02:00
Julien Legros 8e76938bec [FIX] web: correct display of dropdown arrows in ie11 2014-10-23 14:13:54 +02:00
Denis Ledoux b4d370173c [FIX] account_followup: use %s string formatting to avoid concat None values 2014-10-22 19:26:00 +02:00
Martin Trigaux 3a0af6af7b [FIX] product.uom: safer handling of factor/factor_inv in UI
Add readonly attribute to avoid sending both factor and factor_inv value to the backend when saving.
This was possible if the user switched between uom_type to fill the two fields.
2014-10-22 14:28:35 +02:00
Cedric Snauwaert fa2f7b86bf [FIX] product: remove digits_precision from uom factor fields
Remove the hardcoded precision of 12 on factor and factor_inv,
to use the complete natural precision of NUMERIC types,
preserving all significant digits.

e.g. a UoM with a factor_inv of 6.0 used to be computed as:
factor_inv: 6.0 -> factor: 0.166666666667 (1.0/6.0, rounded to 12 digits) -> factor_inv: 5.999999999988 (1.0/factor)
which could lead to errors such 12*0.166666666667 = 2.000000000004 instead of 2.0

Slightly changed the way the ORM handles float fields to allow setting `digits=0`
as a way to explicitly require a NUMERIC value but without enforcing/rounding
the values at the ORM level, i.e. a truly full-precision field.

NUMERIC type has unlimited precision but is less efficient so should not be
used as the default behaviour, which is why we keep float8 as an alternative.

Modified the view to display the product UOM factor with a 5 digits value by default.
This value is for usability purpose only, the field still accepts bigger precision, by
setting the `digits` option on the field in the form view.

This change is safe in a stable series, the `digits=0` alternative is
treated the same as the default `digits=None` everywhere in the framework,
except when creating the database field.
2014-10-22 14:28:34 +02:00
Martin Trigaux 7705f883d2 [FIX] base: support float rounding with rounding_method=UP (ceiling)
Add rounding_method parameter on float_round method to offer
HALF-UP (default, usual round) or UP (ceiling) rounding method.
Use the second method instead of math.ceil() for product
reservations.

For UP, the python math.ceil() method uses "torwards infinity"
rounding method while we want "away from zero".
Therefore we use the absolute value of normalized_value to make
sure than -1.8 is rounded to -2.0 and not -1.

Fixes #1125 #2793

This is a cherry-pick of d4972ff which was reverted at 333852e due
to remaining issue with negative values.
2014-10-22 14:28:22 +02:00
Martin Trigaux 354b82bee0 [FIX] report: page numbering rml reports
Save the NumberedCanvas state before doing a page reset.
The order of execution when rendering an rml report is the following:
1. init canevas (_pageNumber = 1)
2. render the page element
3. if still pages to render, afterPage method
4. if still pages to render, showPage method (_pageNumber += 1)
5. back to step 2 for each page
6. draw the ResetPage element (setting flag _doPageReset=True)
7. end the document build with afterPage & showPage method

The PageReset element should be executed at the end of the rendering of a story (subdocument) to reinitialize the page numbers to 0 (for new story) and insert the pageCount element for that story with the total number of pages (needed if want to use tag <pageCount/> in rml).

In case of NumberedCanvas (e.g. used in Trial Balance report), the numbering is generated at the end of the build using the _saved_page_states dict in the canevas.
To have an accurate _saved_page_states content, it needs to be saved before the pageReset.

Fixes #2225
2014-10-21 15:36:01 +02:00
Denis Ledoux 78a29b3738 [FIX] point_of_sale: no need to specify numeric digits
In the report pos order, average_price was set as a numeric(16,2), therefore, if the amount was too big, it led to a psql crash:
A field with precision 16, scale 2 must round to an absolute value less than 10^14.
2014-10-21 10:13:44 +02:00
Julien Legros b00122ad99 [FIX] res_partner: add parent_name related field
In some cases (e.g. with record rules), the name_get might not have access
to the parent name. Therefore a parent_name related field solves the
issue (as it read with as superuser).
2014-10-20 15:50:49 +02:00
Martin Trigaux b7d22d375c [FIX] l10n_fr_hr_payroll: bad copy-paste in 69c1333 2014-10-20 10:48:19 +02:00
rmu-odoo 69c1333766 [FIX] l10n_fr_hr_payroll: report "Fiche de paye"
Avoids getting False for the field end_date (Sortie) in case of no end date specified on the contract. opw 614624
2014-10-20 10:45:52 +02:00
dhr-odoo 7cc3e65b33 [FIX] account_followup: do no duplicate partner's account.move.line
Duplicating a partner should not duplicate the content of the unreconciled_aml_ids field.
2014-10-20 09:54:43 +02:00
Denis Ledoux 1d57a09112 [FIX] mail: set the parent_id to the first message of type email
And fallback of any type if there is none of type email

This fix allow the communication between two mail thread from two different Odoo servers having message creation subtypes, like project issue or crm lead
2014-10-16 14:07:38 +02:00
Simon Lejeune 9c0e8f10e0 [FIX] sale: translate advance message on advance invoice 2014-10-16 11:04:56 +02:00
Denis Ledoux 98c6e7c3d5 [FIX] web: cherry-pick of 893e426865 & 61207f3f4d 2014-10-15 09:43:26 +02:00
David Monjoie 75d3ea6208 [FIX] point_of_sale: fixed display of untaxed amount in sales lines report 2014-10-14 14:11:53 +02:00
Denis Ledoux 0b13f32868 [FIX] email_template: do not try to add user signature if none set
append_content_to_html expects two strings. If the user has no signature, it returns user.signature returns False
2014-10-14 13:41:52 +02:00
Denis Ledoux 5e1a5b7dbc [FIX] web: wait for deferreds when actualizing mode
In edit mode, in a *2many with many2many_tags, when adding a new tag when none was set, discarding the form let the new tags displayed while it shouldn't (only a display issue, the tag wasn't added in database)

Fixes #2926
2014-10-13 18:24:57 +02:00
Olivier Dony 1b49a87619 [FIX] ir.mail.server: restore parsing of multiple RFC2822 addresses including non-ASCII chars
Rev f2cf6ced1 modified RFC2822 parsing in order to better support
unicode characters inside the Name part of an address header.
However the patch broke handling of multiple addresses (comma
separated) - silently discarding all recipients except the
first one, as soon as any non-ASCII character was present.

This patch restores the functionality while preserving the
fix from f2cf6ced1, and simplifies the code using email.utils
utility functions.

Fixes (again) lp:1272610, OPW 607683
2014-10-10 18:32:00 +02:00
Denis Ledoux d38adf3d92 [FIX] account_invoice: using has_group to determine if user has group group_supplier_inv_check_total
has_group do not care about the fact res.groups is access restricted
2014-10-09 18:57:37 +02:00
Denis Ledoux eeb1f0355c [FIX] res.users: exactly match login when operator in ilike, equal 2014-10-09 18:57:37 +02:00
Martin Trigaux bd52298073 [IMP] mail: parsing emails with several html parts
If an email contains several text/html parts inside a multipart email, the previous code was only keeping the last content part.
The Content-Type: multipart/mixed allows several independent part (RFC1341 7.2.2), so two html is technically valid.
With this patch, the two parts are concatenated. (opw 614755)

Modify append_content_to_html regex to make sure the regex keeps the content of the html instead of removing it.
e.g.: "123 <html> 456 </html> 789" used to be stripped to "123  789" while we expect "123 456 789"
2014-10-09 13:53:23 +02:00
Denis Ledoux 03df412faf [FIX] account: precision_get returns a number of digits
In other words, it returnes a precision digits, not a precision rounding
2014-10-07 17:26:49 +02:00
Ferdinand Gassauer bc69e1812a [FIX] account: self typo 2014-10-06 17:10:50 +02:00
Laetitia Gangloff 668de5a31c [ADD] l10n_lu: abbreviated financial reports
Abbreviated version of the p&l and balance sheet reports
2014-10-06 16:30:10 +02:00
Lionel Sausin (Numérigraphe) 04bc91cb4e [FIX] stock: groups mixup in views
Use group_production_lot for serial options, group_stock_packaging for packaging, use group_tracking_lot for pallet/parcel
Groups are removed completly from the view for stock.tracking as they render the view useless.

Always display weights on the product form
They really have nothing to do with the logistic units and we don't have another group to restrict them to.

Fixes #1443
2014-10-06 14:43:11 +02:00
Martin Trigaux b3485fb59c [FIX] event: double context 2014-10-03 15:15:12 +02:00
Martin Trigaux e11d44eab4 [FIX] event: missing context
This fixes some translation issues (templates not translated at event confirmation)
2014-10-03 15:12:04 +02:00
Martin Trigaux 066fbb6613 [FIX] account_anglo_saxon: price difference, discount and taxes
When computing the price difference amount do not integrate the eventual discount and taxes included in the price.
Otherwise the total of the generated accounting enty would be higher than the total of the invoice. opw 611350
2014-10-03 12:19:01 +02:00
Denis Ledoux 9066da3369 [FIX] point_of_sale: do not display False as currency if symbol is not set 2014-10-03 12:10:16 +02:00
Denis Ledoux 7cbd524448 [FIX] ir_translation: apply tools.ustr on the trad itself
tools.ustr(None) returns u'None', res[0] can be None.
2014-10-03 12:08:49 +02:00
Denis Ledoux 6d4e1cc73e [FIX] ir_translation: remove control characters from translations
This is possible that control characters (such as line returns) are inserted wrongly in translations
These should not influence on the web interface
2014-10-03 11:20:19 +02:00
dhr-odoo b2cb31c0fb [FIX] account: return format of function field
When no result is found on the function field 'invoice' (account.move.line), instead of returning {move_id: (False, '')}, return {move_id: False} (expected for m2o fields)
Fixes #2138, opw 613096
2014-10-03 09:59:38 +02:00
Denis Ledoux eb9113c04d [FIX] ir_attachment: restrict access to orphan attachments to employees 2014-10-02 15:17:48 +02:00