Commit Graph

71958 Commits

Author SHA1 Message Date
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
Denis Ledoux f5cf5fd4eb [FIX] auth_oauth: fb and google oauth providers reset on general settings apply
- The res_config.xml file was missing in the manifest (so couldn't check the use of FB and Google OAuth from the general settings)
 - The default value for these oauth configuration were not set
2014-10-02 12:32:02 +02:00
Denis Ledoux 12df3fe5a0 [FIX] account_analytic_analysis: invoiced field takes customer invoices only
Besides, it subtracts customer invoices with customer refund invoices
2014-10-02 11:53:38 +02:00
Martin Trigaux 78144410a4 [IMP] product: name_get matching on commercial_partner_id for suppliers
The name_get of a product will use some information (e.g. default_code) based on the supplier.
The matching of the supplier should use the commercial_partner_id in case the supplier info are on the company and the partner_id in the context belongs to the company (e.g. creates quotation with a contact of the company).
Fixes #1219
2014-10-02 10:59:18 +02:00
Ravi Gohil e30a5a11a5 [FIX] account: avoid closing fiscalyear with unpost entries
As when closing fiscal periods, forbid to close a fiscal year with unposted entries.
Fixes #1194, opw 610784
2014-10-01 16:25:22 +02:00
Humberto Arocha 6d3855e9dc [FIX] account: remove orphan analytic lines
If the analytic account is not present on an entry, still removes the Analytic Journal Items linked to it.
Fixes #1194, opw 610784
2014-10-01 16:18:47 +02:00
Denis Ledoux 9cc54dcd2c [FIX] product: name_search handles negative operators 2014-10-01 12:39:59 +02:00
dhr-odoo 3c9df6a71f [FIX] purchase: minmum purchase quantity and float precision (opw 610557) 2014-09-30 17:04:04 +02:00
Martin Trigaux 7201bc0250 [FIX] hr_payroll_account: do not create entries with amount at 0
If the salary compuation gives a salary of zero, skip the creation of the account.move.line (not good to have lines at 0).
Fixes lp:1298116, opw 605816
2014-09-30 16:37:24 +02:00
Martin Trigaux 937fb4aa11 [FIX] hr_expense: computation of tax/base amount
When computing the amount for a tax (included) with children, accumulate the included taxes to avoid taking only the last one (opw 614867).
2014-09-30 16:06:07 +02:00
Denis Ledoux 419c439776 [FIX] account: sort partner ledger report by partner ref, name 2014-09-30 15:45:22 +02:00
Olivier Dony 9b1a9c9518 [FIX] tools: remove useless attributes 2014-09-29 17:39:01 +02:00
Denis Ledoux 333852e19d Revert "[FIX] product,float_utils: perform ceiling via float_round with new rounding_method UP"
This reverts commit d4972ffdb6.

Seems to break some cases, at least in _product_reserve from stock/stock.py

Actual use case:

SELECT product_uom, sum(product_qty) AS product_qty FROM stock_move WHERE location_dest_id=%s AND location_id<>%s AND product_id=3645 AND state='done' GROUP BY product_uom;
returning 1 | 6

SELECT product_uom,-sum(product_qty) AS product_qty FROM stock_move WHERE location_id=%s AND location_dest_id<>%s AND product_id=%s AND state in ('done', 'assigned') GROUP BY product_uom;
returning 1 | -6

results += cr.dictfetchall()
    total = 0.0
    results2 = 0.0
    for r in results:
        amount = uom_obj._compute_qty(cr, uid, r['product_uom'], r['product_qty'], context.get('uom', False))
        results2 += amount
        total += amount
Total = 1, amount = -5

It should actually be
Total = 0, amount = -6
2014-09-26 21:21:06 +02:00
Martin Trigaux ceff8ef899 [IMP] account: use float_compare for taxes
Avoiding some python float representation errors
2014-09-26 16:57:28 +02:00
Denis Ledoux cac6a261fe [FIX] project_mrp: task description duplicated + product name translation 2014-09-26 16:05:16 +02:00
Denis Ledoux af37b3022b [FIX] cron: doall false by default
As in most cases, we do not want this doall
2014-09-26 10:17:50 +02:00
Denis Ledoux 074c7b6c25 [FIX] res_users: do not copy login_date when duplicating users 2014-09-25 17:00:59 +02:00
Simon Lejeune 5f6d324db6 [FIX] crm: merge the phonecalls during an opportunities merge 2014-09-25 13:40:45 +02:00
Christophe Simonis 7b17133b53 [FIX] portal_sale: force empty context
The context was removed by 1933e926.
2014-09-25 11:51:15 +02:00
Cedric Snauwaert 311c77bb88 [FIX] product: _compute_qty: first round before ceiling, to avoid pathological cases
Fixes problem when we try to sell 12 units of a product and change it to 1 dozen,
the algorithm was then trying to recompute the original amount and was getting
12,0000048 as a result which was then passed to the ceiling method, getting 13.0!

See also previous commit and issue #1125, PR #1126
2014-09-24 17:11:26 +02:00
Cedric Snauwaert d4972ffdb6 [FIX] product,float_utils: perform ceiling via float_round with new rounding_method UP
Modified product ceiling() to use float_round() with special mode
for rounding UP (away from zero), avoiding pathological cases where
float representations errors were ceiling to the superior unit.

Also added correspding tests for rounding_method=UP

Fixes issue #1125, and replaces PR #1126.
2014-09-24 17:11:25 +02:00
Martin Trigaux 1933e926ff [INP] portal_sale: remove buggy context
Even if this should never be used in normal portal environment, if a user with enough access rights tries to create an invoice, this would crash. We don't need context here (opw 612591).
2014-09-24 17:00:24 +02:00
Guewen Baconnier b5c8ced8ec [IMP] stock: Optimize stock_move.setlast_tracking()
When setlast_tracking is called on a large number of moves in a picking
(e.g.  when splitting moves in a picking), the time to complete grows
exponentially.  The reason is that it loops over all the moves of
a picking, even if it keeps only the last tracking.

The method now uses a search() with a limit so it doesn't need to browse
all the moves.

Added test to check the behaviour of setlast_tracking
Fixes #2448
2014-09-24 16:41:29 +02:00
Ravi Gohil 126ba0a9a8 [FIX] crm: correct open lead or opportunity view from calls
When opening a lead/opportunity from the phonecalls view, we did not open the correct view (always the lead).
This will use the type of the crm.lead to determine which view should be used, opw 608493.
2014-09-24 15:54:44 +02:00
Martin Trigaux 933d098e7d [IMP] stock: do not generate empty backorders
If every line of a partial delivery is at zero, do not generate empty backorders (opw 608680)
2014-09-24 15:16:38 +02:00
Denis Ledoux 5c2fb121ca [FIX] web_calendar: reset dataset index if search result empty 2014-09-24 13:07:59 +02:00
Martin Trigaux 4a064b9374 [FIX] stock: error on stock.partial.move creation
The stock_partial_move wizard removes the required attribute for the field picking_id on a stock.partial.move. This means that we could get moves without picking_id and the previous line was failing ('NoneType' object has no attribute 'currency_id'). opw 614531
2014-09-24 10:30:44 +02:00
Denis Ledoux 9c77f794b4 [FIX] widget html: rendering issue in mail composer on Firefox
The cleditor width does not include the margins. Setting 100% will make the editable area too large (104%) on Firefox (opw 611700).
This issue was already fixed in newer releases, from commit 9247c37de7
Nevertheless, it introduced a new issue: while editing the form, the content of widgets html which were located in hidden notebook pages weren't displayed when displaying the page content.
opw-614448
2014-09-23 18:53:17 +02:00
Denis Ledoux faa04a43de [FIX] account_voucher: import invoices, sign according to transaction type 2014-09-22 15:58:55 +02:00