Commit Graph
109632 Commits
Author SHA1 Message Date
Christophe Simonis a01e76efa7 [MERGE] forward port branch 10.0 up to 2198220947 2017-10-18 14:34:32 +02:00
Christophe Simonis 2198220947 [MERGE] forward port branch 9.0 up to e0fbe7b5be 2017-10-18 14:05:42 +02:00
qsm-odoo c7f5ad87a4 [FIX] web_editor: odoo-made tables should not be layout: fixed 2017-10-18 13:37:33 +02:00
Goffin Simon 1108c150d9 [FIX]sale: pricelist price base
Fine tuning of c477f0764e

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-18 12:16:27 +02:00
Goffin Simon 130dc1b64f [FIX]sale: pricelist price base
Revert of c477f0764e

In some case product[pricelist_item.base] can be a product.product

opw:775275
2017-10-18 11:28:44 +02:00
Adrian Torres 333a2360d8 [FIX] website_quote: don't unlink website_description
This is a hotfix/hack for a conflict between website_quote and
website_sale, on the field website_description.
The conflict happens when both modules are installed.

Fixes #20118
2017-10-18 11:27:07 +02:00
Goffin Simon 0012eb4c97 [FIX] website_sale: included taxes considered as discount in the shop
Steps to reproduce the bug:

- In Sales settings, set "Tax display" as "Show line subtotals without taxes"
- Create an article A with a customer tax set as price-inclusive.
- associate on an other article B the  pricelist P with a discount_policy
  set as "without_discount"
- Ensure that the pricelist P is used in the shop.
-Go to the shop

Bug: The article A is considered as discounted but the price is full.
The prices with included taxes were considered as discounted because
lst_price - webstie_price were always greater than 0. When the
"Show line subtotals without taxes" is checked  for Tax display,
the field website_price never includes the taxes. That's why the
included taxes are substracted from the website_price.

opw:776526
2017-10-18 10:15:03 +02:00
Goffin Simon f971ed704c [FIX]sale: pricelist price base
Fine tuning of this commit: c477f0764e

opw:775275
2017-10-18 09:49:34 +02:00
rde e0fbe7b5be [FIX] website_sale: disable checkout btn if GTS unchecked at load
opw-774286

*Before this commit:
On checkout, you can enable a step to force user to have the General Terms of
Sale checked to continue the checkout. Checking/Unchecking will correctly
disabled/enabled the button.
The checkbox is already checked at page load (on the template).
BUT, if the template has been modified to set the checkbox as unchecked at load
(eg the user removed 'checked="checked"' from the template), the button will
still be enabled even if the checkbox is unchecked.

*Now:
No matter if it is checked or not on the template, the button will
correctly be enabled/disabled regarding the checkbox state at load.
2017-10-17 17:40:41 +02:00
Martin Trigaux 727a642f5c [FIX] crm: match count with result
Followup of 4ebb5efac
2017-10-17 16:53:17 +02:00
Martin Trigaux 4ebb5efac4 [FIX] crm: match filter result with count
At 9d2f48dc and abea8d35 the `not opp.date_closed` condtion was added when
counting the number of overdue opportunites.
The result filter was still considering the closed opportunities.

opw-774421
2017-10-17 16:23:07 +02:00
Laurent Smet 6e46ba7b46 [FIX] point_of_sale: fix taxes rounding in POS
Don't round the base amount at each step during compute_all of taxes.

-opw: 776986
2017-10-17 16:22:20 +02:00
Agathe Mollé 4d56e76d52 [FIX] Fix canadian province state_ca_NL name 2017-10-17 16:18:13 +02:00
alexkuhn a48b5c45aa [FIX] crm: stage auto-probability not taken into account when creating an opportunity from kanban view (#20209)
1. on CRM module -> Select Pipeline -> Create a column (e.g. 'Test')
2. Edit this Stage
3. Toggle on the field 'Change Probability Automatically'
4. Set a stage probability (e.g. 50%)
5. Create an opportunity on this stage, using the quick create widget of the kanban view
=> The probability of the newly created opportunity is not 50%, as it should be expected

It takes the default_probability, using a default_stage_id, which is the 'New' column having initially a probability of 10%. The stage_id is correctly assigned to the newly created opportunity thanks to environment variable 'default_stage_id', but not the probability.

We solved this bug by updating the probability of the opportunity, after creating the object. We cannot do it at the same time, because BaseObject.create parse the missing fields in an order where probability comes before stage_id.

This fix is limited to the quick creation of opportunity by means of its name only. In particular, it doesn't overwrite the input of the user in the form view.

opw-772310
2017-10-17 14:20:30 +02:00
Nicolas Martinelli 539a09a93c [FIX] stock: use method return
In case MRP is used with kits (phantom BOMs), the method
`action_explode` is called through the override of `action_confirm`.
However, `action_explode` modifies the recordset by deleting the move
with the original product since it is not relevant anymore.

We take this use case into account by reusing the return value of
`action_confirm`.

opw-772644
2017-10-17 13:53:00 +02:00
Raphael Collet 9ae78328ec [FIX] fields: writing on a one2many with a domain should not remove all lines
Specifically, the command `(6, 0, ids)` should only unlink/detach the lines
that satisfy to the field's domain.

Test from #18440

opw-756983
Closes #18438
Closes #18440
2017-10-17 13:50:00 +02:00
qsm-odoo b85bd35823 [FIX] web_editor: fixed issue of chrome triple click
Partial backport of 11.0 commit (https://github.com/odoo/odoo/commit/6ad2ae30354a77c0f898cb9cb5a859713061d71a)
to solve issue 774152. Note: it has to be forward-ported as
implementation has been improved to handle mass mailing cases.

When an user triple-clicked on a paragraph and then typed text, the
paragraph was removed instead of its content (so the new text was
added at the beginning of the next paragraph).

See: http://stackoverflow.com/questions/38467334/why-does-google-chrome-always-add-space-after-selected-text
2017-10-17 12:45:52 +02:00
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