Commit Graph
111378 Commits
Author SHA1 Message Date
Olivier Dony 78dcbdee6e [FIX] mail: correct typo in e5e549a4cf 2017-10-20 14:23:38 +02:00
Martin Geubelle 2455350c40 [FIX] web: deal with date widget on datetime
This use case was not correctly managed as the function evaluating if the
value has changed compares datetime and date.

This triggered an issue if the widget `date` was set on the field `date_order`
on a purchase order for example ; it was not possible to create a record as
the datapoint was set `dirty`.

This rev. ensures that a `field_changed` is not triggered if the day is the same
on a date widget.

This rev. also adds support of `datetime` fields on date widget, which appears
to be a valid use case.

Fixes https://github.com/odoo/odoo/issues/20311
2017-10-20 11:25:32 +02:00
Martin Geubelle 1312ee72cf [FIX] web: correctly render the field image
Before this commit, the image was directly built without using the corresponding
template, which set some properties on the image (class, width, etc.).
2017-10-20 11:04:08 +02:00
Olivier Dony 0fc6fe8653 [FIX] payment_stripe: fix multiple usability problems
- There was no feedback to the user when executing the Charge
  transaction in server-to-server mode, while it could take several
  seconds, with the normal UI/action buttons still available.

- Stripe integration was almost working along with `website_quote`
  payment, but entirely broken with `website_payment`, and partially
  broken with `website_sale`.
  Fixing it required:
  + More leniency in processing optional transaction parameters, which
    may or may not be present in the various payment flows.
  + It also required more precautions when locating the transaction for
    which the Stripe Charge was to be created, which passed in different
    manners in the session. The route now supports an explicit `tx_id`
    to allow forcing the transaction without risk of mixing different
    payment flows.
  + FIXME: There is still some amount of duplication and bad modularity
    in the handling of the various payment flows in relation with
    Stripe.

- We provided very little metadata to the Customer and Charge APIs of
  Stripe. We now pass more names and references to make Stripe payments
  easier to manage in the Stripe dashboard.

- In some cases, selecting Stripe as payment method caused a second
  inclusion of `stripe.js`, raising a JS error because of the
  duplication.

- Strip whitespace in emails: the Stripe API raises an error for
  transactions done with invalid emails, including with
  leading/trailing whitespace.
  Customers will have a hard time figuring out the problem
  by themselves, so we should at least strip whitespaces.
2017-10-19 18:14:15 +02:00
Christophe Matthieu 99e14b96b3 [IMP] account: reconciliation: improve search based on amount
FIX: amount_currency can allow negative searches
IMP: can search on positive or negative amount only if use '-' or '+'
IMP: search for move lines based on the amount by clicking on the balance
amount. Search in 2 currencies if possible.
2017-10-19 13:52:56 +02:00
Christophe Matthieu f495f68272 [FIX] account: reconciliation: balance amount in multi-currencies
Display the 'money' icon in the balance amount line when the user is in
multi-currencies and there is a currency different from the one used in
current line.
2017-10-19 13:52:56 +02:00
Christophe Matthieu ed79071293 [FIX] account: reconciliation: reset filter when validating a line
issue: in the 'match' part of a reconciliation line, if the user uses the
search without any line as result and validate the selected proposition,
the line is removed but the account or partner reconciliation is maybe
not finished.
2017-10-19 13:52:56 +02:00
Géry Debongnie d8f03e64fd [FIX] web: do not send id in update commands for m2m
When we generate commands for many2many, it could happen that the id was
in the list of changed fields (when we are in a new records, with a non
empty initial onchange).  When this happens, the server is not happy.

To reproduce this, open the uninstall wizard of a module in the 'App'
application.  This creates a new record with a non-empty many2many
field. Then click on 'Show technical modules', this will trigger an
onchange which should not send the id field.
2017-10-19 10:56:49 +02:00
qsm-odoo 841f41f95b [FIX] web: domain field should never be considered unset
Indeed, false was already considered as "[]" in edit mode.
2017-10-18 18:14:33 +02:00
Christophe Simonis 25e65d2bcb [MERGE] forward port branch saas-15 up to 8096162bee 2017-10-18 16:57:35 +02:00
Christophe Simonis 8096162bee [MERGE] forward port branch saas-14 up to 73822d4eaf 2017-10-18 16:06:07 +02:00
Christophe Simonis 73822d4eaf [MERGE] forward port branch 10.0 up to 388bf45853 2017-10-18 15:30:54 +02:00
Thibault Delavallée 388bf45853 [FIX] mail: indentation issue when forward-porting
Commit aab6bdd54a was incorrectly forward-ported to
10.0 at abb726d4df . Indeed share users could land
to a wrong backend or frontend page depending on the target app due to an
indentation issue.
2017-10-18 15:21:44 +02:00
Christophe Simonis de70646bc5 [FIX] website_sale: correct js syntax
Oversight of forward-port a01e76efa7
2017-10-18 15:17:40 +02:00
Christophe Simonis 00a14fd832 [MERGE] forward port branch 10.0 up to 2d46dbcbfd 2017-10-18 14:57:25 +02:00
Raphael Collet 2d46dbcbfd [FIX] ir_http: use meaningful ETag for images (#20283)
After setting the image on a product variant, the controller for `/web/image`
incorrectly returns the code 304 - Not Modified.  This bug occurs because
 1. the response ETag is a hash of the **last modified date** of the record;
 2. the record is actually **not** updated in that case, because
     - the image field is a non-stored computed field, and
     - its inverse method only modifies the variant's template.

Fix the issue by making the response ETag a hash of the **content**, which is
read by the controller anyway.

OPW 769302
2017-10-18 14:53:10 +02:00
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
Géry Debongnie d365a289d4 [FIX] web: generate proper x2many commands in some cases
When creating a new record with a non empty default value for a one2many
field, we did send the command 0 (for each one2many line) instead of the
command 1 (update).  This was a pretty big problem, because then the
server would try to create a line with possibly incomplete data.

For example, it was not possible to create expense sheets: go to expense
menu, select one expense in the list view, click on the action menu
'submit to manager', this opens a form view with a one2many with the
selected expense, then save.  Before this commit, this would lead to a
server error.
2017-10-17 18:21:47 +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
Nicolas Martinelli 6c8e6fb2e9 [FIX] stock: save settings
This reverts commit 0e28db88d1.
This commit should not be in saas-15.

opw-776890
2017-10-17 17:11:30 +02:00
Martin Trigaux 727a642f5c [FIX] crm: match count with result
Followup of 4ebb5efac
2017-10-17 16:53:17 +02:00
Nicolas Martinelli a13120c039 [FIX] resource: default TZ
If TZ is not set on a user, the creation of a `hr.leave` won't populate
the `tz` field of the associated `resource.calendar.leaves` record.
However, the method `_get_leave_intervals` assumes that field field is
always filled in.

Set the TZ to UTC as a fallback.

opw-777031
2017-10-17 16:38:45 +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
fda-odoo a1e15b9fce [FIX] web: use "get_formview_id" when opening record from calendar view
Opening a record in a calendar view always showed the default form view when it is not a popup.
Example in CRM: opening an opportunity will always show a lead view.

The fix aims to use the "get_formview_id" method to find the right id of the view that must be shown instead
of using a default id.

opw-774272
2017-10-17 15:34:29 +02:00
Christophe Simonis 868e718e09 [MERGE] forward port branch saas-15 up to 8d0942380b 2017-10-17 15:14:47 +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
Christophe Simonis 8d0942380b [MERGE] forward port branch saas-14 up to fbdda5437a 2017-10-17 13:22:25 +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
fwi-odoo 3993528bac [FIX] web: polyfill to make the list editable work in IE11
Internet Explorer doesn't implement 'contains' for document so we make a
polyfill for this method in order to be compatible.
2017-10-17 09:29:14 +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