Commit Graph
109615 Commits
Author SHA1 Message Date
Christophe Simonis fbdda5437a [MERGE] forward port branch 10.0 up to cbca27d005 2017-10-17 12:09:58 +02:00
Christophe Simonis cbca27d005 [MERGE] forward port branch 9.0 up to d5c0cae60b 2017-10-17 11:42:05 +02:00
Lucas Perais d5c0cae60b [FIX] mass_mailing: background snippet option outlook compatible (#20137)
Origin of the fix: the snippet background image did not change the background image.
This was due to commit a14f89c which wraps the snippet's content into a table for outlook display compliance

This issue is fixed here, with the modificaion of the background snippet option.

OPW 772442
2017-10-17 09:37:08 +02:00
Cedric Snauwaert 757e9e586c [FIX] account: fix balance = 0 in dashboard
In some case, user set a currency on the journal which is the same as the company currency. In that case, the field taken was amount_currency which should not be the case.

OPW 775123
2017-10-16 17:55:26 +02:00
Jérome Maes 25725eae57 [FIX] hr_timesheet_sheet: set domain on action to see timesheet only
Analytic lines should not be included when
showing the timesheet line of a given
sheet. A domain is thus needed on the action.

opw-772517
2017-10-16 17:27:16 +02:00
Jérome Maes 3d5298aff9 [FIX] hr_timesheet_attendance: only include timesheet in attendance/timesheet report
Report mixed analytic line and timesheet, but
only timesheet should be included.
Since a timesheet is an analytic line with
a project, this fix do the job.

opw-772517
2017-10-16 17:27:16 +02:00
Denis Vermylen c477f0764e [FIX] sale: pricelist price base
When setting a pricelist to show the public price discount, it ignored
the pricelist item's base field (if not 'Other Pricelist') and set it
by default on the lst_price instead.

This did not work when you based your discount on the standard_price
(= cost price) with public price discount.

Now it does.

opw: 775275
2017-10-16 17:26:11 +02:00
Pierre Masereel d301d6391d [FIX] point_of_sale: rounding error when create picking
When a return picking is created from a POS order, the methods check
that the value rounded to the unit of measure is not null.

The problem is that a rounding is passed to the function 'float_is_zero'
in the parameter precision_digits instead of precision rounding.

This bug has been introduced in rev: https://github.com/odoo/odoo/commit/61304087e7f48c677837dabdc8f1f8aeb18fb52e

opw-771282
2017-10-16 17:07:43 +02:00
Raphael Collet 9882c93874 [FIX] website_slides: avoid NULL characters in text field
OPW 772560
2017-10-16 16:38:30 +02:00
Fabien Meghazi c822eb4809 [FIX] crm: mark(lost|won) routes calls removed crm.lead functions (opw: 773907)
crm.lead#case_mark_won and case_mark_lost have been removed in 1414b3e56e
merged in saas-12 but later commit 0b87f76628
reference those function and was merged in saas-11

This fix also improved logging in the controllers in order to log
unexpected exception.
2017-10-16 16:32:24 +02:00
qsm-odoo df8590e562 [FIX] web_editor: properly save multi-edited elements
When an element is placed multiple times in a page, it is saved only
once. Unfortunately, when a view was divided in multiple editable
parts (XML branding), only one of those parts were saved.
2017-10-16 16:02:00 +02:00
qsm-odoo eda976e63d [FIX] web_editor: do not break labels' texts into <p/>
When editing the content of a <label/> which has XML branding (first
DOM element which is editable in its hierarchy), a <p/> element was
added inside. This behavior is there to automatically add <p/> elements
in empty editable <div/> / <section/> elements on edition. This should
however not apply on <label/> elements.
2017-10-16 16:02:00 +02:00
qsm-odoo 296498fb58 [FIX] web_editor: do not break <p/> when pasting a <p/> element
This fixes a bug when pasting text in a paragraph, it was always
creating a new paragraph for no reason.
2017-10-16 14:14:47 +02:00
amoyaux 671c20555e [FIX] mrp: Unbuild multi serial number components
Use case to reproduce:
- Create a product with a BOM that use at least
twice the same component tracked by SN
- Build this product with SN 'A' and SN 'B'
- Unbuild it
-> Constraint error on duplicate SN

It happens because the unbuild order will create only
one stock.move.lots for SN A with a quantity of 2.

This commit create a stock.move.lots by quant used,
for example if the MO used 2 quants with a qty of 1
and one with lot 'A' and the other with lot 'B'. It will
create 2 stock.move.lots with lots 'A' and 'B'.

Still a know issue: If the user try to unbuild twice
the same MO it will reuse the same unbuilded componenets
than the first unbuild order.
2017-10-16 13:14:46 +02:00
amoyaux 0aefcdbad7 [FIX] stock: procurement generated by scheduler truncate datetime
When purchase order are created from a scheduler they always
have the same hours even if they were created at different
time. Also the procurement order that generate the purchase
order line have the same problem.

It happens because the transformation from datetime to string
use a date format and thus truncate the DEFAULT_SERVER_TIME_FORMAT

This commit use a datetime format instead the dateformat.

opw-775833
2017-10-16 13:14:21 +02:00
amoyaux fea667a243 [FIX] account_invoice: Wrong default uom
The UOM by default should be the purchase UOM

opw-775105
2017-10-16 13:14:02 +02:00
Laurent Smet 5afb5ecd04 [FIX] account: fix complex tax computations (multiple price included taxes, etc.)
Suppose the correct computation:

        seq | amount | incl | incl_base |  base  |  amount
        ----------------------------------------------------
          1 |    10% |    t |         t |  100.0 |     10.0
          2 |    10% |      |           |  110.0 |     11.0
          3 |    10% |    t |           |  110.0 |     11.0
          4 |    10% |      |           |  110.0 |     11.0
          5 |    10% |    t |           |  110.0 |     11.0
        ----------------------------------------------------

with an initial amount of 132. Without this commit, the base amount was computed by:

132 / 1.1 / 1.1 = 109.09

instead of:

132 / 1.2 = 110.0

see task: https://www.odoo.com/web#id=34471&view_type=form&model=project.task&action=333&active_id=967&menu_id=4720

Was PR #18275
2017-10-16 11:35:08 +02:00
Goffin Simon cd77219cbd [FIX] account: Duplicating journal entries
When duplictating a Journal Entry  that has been created from
a new payment (accounting/purchases/payments/create), the new copy
of the Journal Entry also duplicated the already existent relationship (link)
to the payment, causing possible future conflicts in functionalities
like reports, payments, reconciliations, among others.

opw:775151
2017-10-16 10:21:44 +02:00
Nicolas Lempereur f4332118d3 [FIX] mass_mailing: unsubscribe error if contacts
If the mass mailing was to mail contacts, this could cause an error if
the recipient unsubscribed. If the mass mailing was to mailing list,
unsubscribe would not work.

This change update unsubscribe to take into account changes in 765e752
and e15372c07 that allowed mailing list / mailing list contacts to be
used separately.

opw-770473
closes #20145
2017-10-13 17:16:13 +02:00
Richard Mathot 9866322a3d [FIX] base: bad translation 2017-10-13 16:22:37 +02:00
Yannick Tivisse 2651717251 [IMP] base_import: Defer parent computation after record creation/update
Currently when importing files, the parent left and right are recomputed on each record creation/update, which could lead to a lot a request.

This commit will defer the parent field recomputation to the end on the `load` function by recomputing the values from the MPTT and inserting directly the new values on the records.

Tested on a customer instance, this will reduce the execution time when importing a thousand stock.location from 15 minutes to several seconds.
2017-10-13 15:24:05 +02:00
Josse Colpaert 51861e889a [FIX] mrp: no propagation of stock moves when destination is a component of an mo
When you cancel or split a move, it will check the propagation setting
to see if it needs to cancel or split the next move too.  If this next
move is a raw material in a manufacturing order however, it does not
make sense to do this as a lot of logic is also on these moves related
to bill of material lines, workorders, ...

opw-770062
2017-10-13 13:49:10 +02:00
Raphael Collet 7fc6205419 [FIX] base_import_module: retrieve message from exception (#20101) 2017-10-13 12:13:50 +02:00
Jeremy Kersten dc5bb0d6b2 [FIX] website_forum: add missing karma_answer field in form view
This commit closes #19672
2017-10-13 11:46:23 +02:00
Jeremy Kersten c0a47980fc [FIX] base: change width by default for apps description 2017-10-13 11:04:45 +02:00
fda-odoo c68ad2e0cc [FIX] crm: remove duplicate filter in seach bar of pipeline report
The search bar of the pipeline report page had duplicate filters. For each, there was one with "selection" widget and one without the widget.

opw-771298
2017-10-13 10:50:51 +02:00
Martin Trigaux 8f1d889e50 [FIX] tools: correctly export the non-module translations
8ac39287 introdcude a way to export the source terms not located inside an
addons module (e.g. error messages in openerp/service/models.py)

0529a7f9 fixed a bug in the get_module_from_path with addons path with similar
names.

The above commit introduced a regression making files located outside of an
addons path to be wrongly considered as a module
e.g. openerp/service/models.py used not to match any module and was considered
correctly as belonging to base module
After, 0529a7f9, '~/openerp/service' being different than '~/openerp/service/'
the module was considered as 'models.py' (which is incorrect).

Compare correctly both parent path to have a correct match

Fixes # 19907
2017-10-13 10:35:57 +02:00
amoyaux e1769cbea9 [FIX] base_import: parse date and float for relational fields
Use case to reproduce:
-> Import a file with a float using a coma related to the model
(for example the product.supplierinfo/price)

It happens because the method that parse the date and float field
only compare them to the main imported model.

This commit complete the method by using a recursion on relational
model in order to also parse the relational subfields.
2017-10-13 09:43:11 +02:00
Christophe Simonis 91e2264b28 [MERGE] forward port branch 10.0 up to ba519bde84 2017-10-12 17:30:01 +02:00
Christophe Simonis ba519bde84 [MERGE] forward port branch 9.0 up to 40d4cdd39f 2017-10-12 16:23:17 +02:00
Raphael Collet ebd8206555 [10.0][FIX] pos_cache: unable to refresh cache in a multi-company context 2017-10-12 14:51:49 +02:00
Carlos Dauden 40d4cdd39f [FIX] account: Field total_invoiced in res.partner doesn't include archived children 2017-10-12 13:20:57 +02:00
Nicolas Martinelli 179de9b55f [FIX] sale: layout sequence
- Create 2 companies A & B (not linked)
- Create a user Demo allowed in both companies
- Create a Sale Layout Category ('TEST')
- In company A, create a SO and add 'TEST' to the line
- Switch to company B, create a SO and add 'TEST' to the line
- In the Sale Layout Category, change the sequence of 'TEST'

An access error appears.

On a SO, `layout_category_sequence` is a stored related. It means that
when we change the sequence of the layout, all SO are updated, including
the SO to which we don't have access (in this case, the SO of company A,
since our user has switched to company B).

While it seems that `layout_category_sequence` was intended to be used
in order to keep the historic value of the sequence, this is not the
actual behavior. Indeed, the method `order_lines_layouted` uses the SO
lines in their original order, which doesn't use
`layout_category_sequence`.

In summary, this related field causing an access error is never used.

opw-774787
2017-10-12 13:02:33 +02:00
Yenthe V.G df124080b6 [FIX] web_calendar: Instantiate moment correctly
Without instantiating the moment it will throw errors to some users.
Desired behavior after PR is merged: No longer undefined errors for end users
Fixes #18994
Fixes #18618
2017-10-12 12:33:11 +02:00
Yannick Tivisse eb7a098592 [FIX] website_hr_recruitment: Avoid exponential sitemap generation
Purpose
=======

Currently all the possible routes for /jobs are put in the sitemap.

Each time you create a job, you add at least 250 links in the sitmap (The country can be set on the route)

Specification
=============

This commit backports the behavior of this commit in v11.0 (https://github.com/odoo/odoo/commit/1b52b00d2aa96b9360d50a0f0960f1febb5e607e)

Don't generate sitemap entries for other routes than /jobs/
2017-10-12 12:10:52 +02:00
Christophe Matthieu acb4689827 [FIX] ir_qweb: t-esc escape the content only if don't use widget
trusts widgets who must return safe html content
2017-10-12 10:09:59 +02:00
Goffin Simon 20aaa69eef [FIX] account, hr_expense: registering a payment for a multiple lines expense sheet
When registering a payment for an expense sheet with several expense lines, only
the first line of the expense sheet was linked to the account move line of the payment.
So the payment was considered as partially reconciled.

Now when a payment is registered for an expense sheet with several expense lines,
the user is redirected to the manual reconciliation widget to link the move line of
the payment to all the expense lines. In this way, the payment will be considered as fully
reconciled.

DO NOT FORWARD-PORT! ONLY FOR v10

opw:772505
2017-10-12 09:49:29 +02:00
Martin Trigaux 74452f947f [I18N] web: fix bad translation
The languages are not on Transifex so manually correcting the files.
opw-776115
2017-10-12 09:32:36 +02:00
Jairo Llopis d329b946d6 [FIX] website_portal: improve mobile layout
This commit closes odoo/odoo#19267
2017-10-11 17:56:23 +02:00
David Vidal ee7cfba917 [FIX] website_sale: Avoid compute tax for every company
When a product has multiple company taxes and b2c prices is enabled, price is
not computed properly and adds to the base price every company tax present.

This patch filters the company set on the company so taxes are computed just
for that company.
2017-10-11 15:55:20 +02:00
qsm-odoo bc623461b3 [FIX] website_sale: allow to properly click on mobile checkout button
Part of the button was hidden by the (invisible) right column content
when using some particular themes.
This is because of a messy XML structure that cannot be safely repaired
in a stable version. This commit fixes the bug with CSS.

Note: this may need to be backported to 9.0 and the XML structure should
be improved in master.
2017-10-11 15:01:32 +02:00
Christophe Simonis 5a9f1539e1 [MERGE] forward port branch 9.0 up to 99703583d4 2017-10-11 13:59:22 +02:00
Raphael Collet 10412d351c [FIX] fields: prefetching of related fields (#20017)
Prefetching is underused when all fields are traversed one record at a time.
So instead, traverse all records one field at a time.  This guarantees batch
prefetching/computation on every field being accessed.
2017-10-11 13:39:02 +02:00
ougc27 f58e6351ee [CLA] update jarsa's CCLA contributors list
Closes #19983
2017-10-11 12:17:19 +02:00
Raphael Collet 0af8d4ffd2 [FIX] fields: performance optimization
Add a shortcut in `copy_cache`, to avoid iterating on all fields.
2017-10-11 11:55:02 +02:00
Nicolas Martinelli 02dffa45ae [FIX] hr_expense: included tax and round globally
- Set 'Tax calculation rounding method' to 'Round Globally'
- Create a expense product with a tax of 20% included in the price
- Create a expense of 19.99
- Submit the expense in a expense sheet
- Validate the expense
- Post the expense
- Register a payment of 19.99

The expense is not set as paid.

The source of the issue is that the tax line is created without being
rounded. In the specific example, two lines are created with amounts:
- 16.658
- 3.33166667 (Tax)

This introduces rounding error in the computation of the matched
percentage, and the expense is not set as paid.

We force the rounding of the taxes since the 'Round Globally' option has
no impact on an expense report.

opw-773908
2017-10-11 09:56:59 +02:00
Jeremy Kersten c7e9a8f74f [FIX] website_sale: improve microdata
opw-774350
2017-10-10 21:45:24 +02:00
Nicolas Martinelli 99703583d4 [FIX] account: invoiced amount
- Create 2 companies: A is parent of B.
- Demo is in Company A
- Create 2 invoices for a partner: one in A, one in B (100 each)
- Validate the invoices

Connected as Demo, the 'Invoiced' amount on the partner form view (stat
button) is 100, while clicking on it shows both invoices (total of 200).

There is no need to manually add the company in the `where` clause since
the `_apply_ir_rules` will take care of adding the appropriate
multi-company rules.

opw-772479
2017-10-10 17:20:41 +02:00
Yannick Tivisse 39f83aa890 [FIX] res_lang: Use a non-breaking space as thousand separator in fr_FR 2017-10-10 16:18:20 +02:00
Christophe Simonis 2d8e6ff05e [FIX] mail: handle empty recordset when computing unread message count 2017-10-10 15:56:22 +02:00