Commit Graph
103535 Commits
Author SHA1 Message Date
Lucas Perais (lpe) fee8b2b2d3 [FIX] point_of_sale: hardcode jessie in posbox scripts
Before this commit, the latest version of Raspbian was chosen.
It is not very helpful though as if something goes wrong, we don't on which part it is.

Also, fix python dependencies for the image
2017-11-21 08:29:52 +01:00
Lucas Perais (lpe) bab597bb47 [FIX] calendar: r_date must be defined before use
commit b4ec51021b forgot about the case where no domain was supplied
or when the conditions on it were not fulfilled.

before this commit, a traceback was thrown and no event was shown

After this commit, no errors and all the relevant events are shown

opw 782985
2017-11-20 09:16:16 +01:00
qsm-odoo 8d5c4cb30d [FIX] web: adapt JS boot logs to new Firefox version
When logging multiple elements in one log call in the new Firefox
version, all the elements are kept on one line. So if the second
element starts with a line feed, it will not go under the first
element but still be at the right of the first element, on a new
line.
2017-11-17 17:04:00 +01:00
Cedric Snauwaert 5b10f5dbc1 [FIX] account: reconciliation of payment with statement should not take lock date into account
If we have a payment in october and a statement in november and the lock date is 1st november, we can't reconcile both because we try to write statement_id on payment but there is the lockdate constraint. This is not correct and we should be able to reconcile both even after lock date as it is the case for other moves.
2017-11-16 12:23:48 +01:00
Lucas Perais (lpe) b4ec51021b [FIX][BACKPORT] calendar: correct search in recurrent event
backporting 76b724294a

OPW 779208

closes #20996

original commit message:

Add a 3 use cases with tests that were failing before.

datetime filters were not working correctly on stop filters
The `_get_recurrent_date_by_event` was only computing recurrency on the start
field of an event which can make a difference. A recurring event
  start=2017-01-01 09:00:00; stop=2017-01-01 10:00:0
was not matched in a search ('stop', '>', '2017-01-01 09:30:00')

The filter != was not handled in the recurring use cases.
e.g. making the search 'start is set' in the web client is equal to
  ('start', '!=', False)

Searching with only a start filter matching recurring events but not the
first ("real") occurence, was returning no result if no stop filter was present.
  start=2017-01-01 09:00:00; count=5
had no result in a search ('start', '>', '2017-01-02')
2017-11-16 10:39:32 +01:00
Laurent Smet 9785f8bbed [FIX] account: fix migrate_tags_on_taxes not working on multi-company
-opw: see PR https://github.com/odoo/odoo/pull/20792
2017-11-16 09:11:03 +01:00
Romain Derie 5297321207 [FIX] website_sale: 0.00 total is showing in empty cart if logged in
Before this commit, if you go on /shop/cart and your cart is empty, it will
show the total (Subtotal, Taxes, Total) as $ 0.00.
Indeed, the code is retrieving a 'sale.order' if you are connected and you
already have a draft sale order on DB (eg: you just add something to cart and
 emptied it afterward).

  - Add product to your cart and proceed to checkout
  - On checkout cart, remove the product, your cart is now empty
  - Reload the page (you should still be on /shop/cart) or go to /shop/cart
  - You now see the zero prices (Subtotal, Taxes, Total)

Now, we will hide this if you have an order but no line on that order.

This closes #20896
2017-11-15 12:45:41 +01:00
Nicolas Martinelli b152c5be4f [FIX] im_livechat: Creation date (hour)
Go to Report -> Operator Analysis -> Apply group_by 'Creation date
(hour)' => traceback.

`start_date_hour` is implemented for Livechat Support Report on
Channels, but not on Operators.

opw-782255
2017-11-14 15:36:58 +01:00
Nicolas Martinelli 73f0c6da6d [FIX] l10n_fr_fec: Receivable/Payable
In the FEC report, opening entries on receivable and payable accounts
should be split by partner.

opw-781321
2017-11-14 14:24:53 +01:00
mehdi-ghezal d07f9c5ef5 [CLA] signature for mehdi-ghezal
Backported to 9.0 cf comment
Closes #20850
2017-11-14 10:56:00 +01:00
Manuel Vázquez Acosta d6c2906d44 [FIX] mail: access the super of TestMailGroup
Instead of the parent of TestMail class

Closes #20728
2017-11-13 16:41:03 +01:00
Aaron Bohy 9bea735145 [FIX] web: search view: autocomplete on datetime fields
... gives wrong values due to the timezone.

For instance, let's assume that the browser timezone of the user
is UTC+2, and the user types 10/09/2017 10:00:00 in a searchview
with a datetime field in its arch (i.e. which autocompletes on a
datatime field). Before this rev., the suggested value was
10/09/2017 08:00:00, i.e. the timezone offset was substracted from
the value.
2017-11-13 14:07:40 +01:00
Olivier Dony fa5ee6ed26 [FIX] ir_sequence: add support for PG 10
PostgreSQL 10 move sequences' metadata fields into a new `pg_sequence`
system catalog. As a result, selecting from a sequence relation now
only return three fields, and does not include the `increment_by`
metadata field anymore.

This patch obtains the `increment_by` value from the new system catalog
for PostgreSQL server versions >= 10.

Fixes #20269
2017-11-11 01:01:48 +01:00
Laurent Smet ce818f1f8f [REVERT] account, point_of_sale: revert complex taxes computation
Reverts:
f85c8843c9
6c996723b2
455b5aaff8
c6a9bab074
6366150484
33d20a2241
47c0cfc6e7
6e46ba7b46
5afb5ecd04
2017-11-10 15:22:45 +01:00
Lucas Perais (lpe) bb38c7047e [FIX] im_livechat, mail: visitor to portal_user should keep livechat channel
Before this commit, when starting a livechat session as a public user and continuing as a portal user, the conversation was lost
(the poral user couldn't see previous messages posted as a public user)

After this commit, the conversation is kept and security insured by the uuid in the cookie

OPW 775568

closes #20279
2017-11-09 10:42:36 +01:00
Jeremy Kersten 35aa2a977f [FIX] website_slide: fix traceback when slide is a google doc or youtube link
In case we are not uploading a file but add a slide based on google doc url
or youtube link, post['datas'] is not set and the code will crash.

Javascript don't check the onError, so the user never see the error and wait
 that nothing happend.
2017-11-08 13:00:07 +01:00
Odoo Translation Bot 43e5f5a67f [I18N] Update translation terms from Transifex 2017-11-08 11:08:53 +01:00
Thibault Delavallée f8c974cf6e [FIX] mail: speedup tracking values computation when reading messages 2017-11-08 10:00:47 +01:00
Jeremy Kersten 15715e822c [FIX] hr_timesheet_sheet: avoid ambigous field action in sql.
ERROR: column reference "action" is ambiguous

This commit closes #13839
2017-11-07 16:32:09 +01:00
Nicolas Seinlet 6488682cd6 Backport 2d66d9a63e
[FIX] *: do not use groups when extending an asset bundle
Using groups when declaring an extension of an asset bundle leads to a
different generated asset bundle according to the user's group. This
is not something we want because a dynamic asset bundle's content
means that it could (and it does) trigger unwanted cache invalidation.

website_event, website_blog, website_forum and website_sale add
functions to . These functions are bound to
server side qweb nodes protected by groups. We can always add the
functions; if a user tries to use the routes he should receive a
traceback because of lack of access rules

website_blog adds a  module, but is guarded by
the presence of a node in the DOM. We use the same logic to guard the
module added by website_sale with the  node.

website_gengo is working as expected.
2017-11-07 10:57:06 +01:00
Nicolas Martinelli 6c996723b2 [FIX] point_of_sale: wrong variable name
`tax_amount` is not defined here, making it impossible to remove an
order line...
2017-11-03 13:16:15 +01:00
Nicolas Martinelli f85c8843c9 [FIX] account, point_of_sale: tax with fixed amount
- Create a tax:
  Fixed amount: 10
  Price included
- Add it by default to a product costing 100
- In a SO/PO/Invoice, add 2 units of the product

The total price is 210 instead of 200.

opw-779696
2017-11-03 12:57:34 +01:00
Laurent Smet 455b5aaff8 [FIX] account, point_of_sale: fix rounding issues with taxes computation (#20573)
Suppose a tax of 20% with price_included = True and apply this tax on 399.99:
- base = 399.99 / 1.2 = 333.32500000000005
- tax_amount = base * 0.2 = 66.665
- round(base) + round(tax_amount) = 333.33 + 66.67 = 400.0 (!= 399.99: WRONG)

-opw: 777925
2017-11-02 14:02:04 +01:00
Richard Mathot b9b6deff8e [FIX] l10n_br: wrong & pointless field redefinition
Fields `amount_type` on `account.tax` and `account.tax.template` are
already defined in the `account` module.
Redefining them here (with the same parameters) breaks every other
module that would have used `selection_add=` on those fields.

Actually, it is the case in `account_tax_python`, and thus, all the
localizations/customizations that depend on it were broken by this one.

~ Old API backport of 5d0d80afa5 ~
2017-10-31 13:21:16 +01:00
Lucas Perais (lpe) f41690538d [FIX] point_of_sale: date string ECMA 5.1 in Date()
Before this commit, when opening the POS in IE11, then the customer list, the list was empty.
This was due to condition that was wrongly evaluated as false due to the fact that IE11 apparently only wants ECMA5.1 to deal with constructing Date() from a string.

After this commit, we construct the Date() object with the right string, and the list of customers doesn't disappear.

OPW 776463

For reference:
http://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.15

closes #20468
2017-10-30 09:25:29 +01:00
Nicolas Lempereur 6e1e350e51 [FIX] l10n_no: typo missing comma in c44024b50 2017-10-27 14:57:33 +02:00
Laurent Smet c44024b50b [FIX] account, l10n_*: preserve existing tags on upgrade
Taxes tags for some localization have been rewrote in order to improve the taxes report.
However, these changes delete the existing account.tags on stable version.

These "[l10n_*] one tag per grid in tax reports" should target master instead of 9.0.

-opw: 777464
2017-10-27 13:54:31 +02:00
Christophe Monniez e47e78e2e9 [FIX] website_slides: pdf slide viewer slug
When trying to get the pdf content in an IFrame, the url based on
ID was not found and then redirected to a rewritten URL eventually
with  wrong protocol (https became http). This causes a bug in
modern browser that doesn't allow mixed content if the base website
is in https. By using the slug in the URL, there is no redirection
and we avoid changing the protocol.
Thanks @Gorash and @nim-odoo

opw-777950
2017-10-27 08:39:01 +02:00
Jeremy Kersten 809aaf9e7b [FIX] website_event: avoid double subscription
Before this commit, you was able to double click on the button when
are in registration flow. In this case, you subscribe 2 times and so
take 2x more seats, what can be annoying when you have a limited room.

In the same time, we fix the form in the form that generate
strange behaviour like some events not bubbled correctly.

The attendee form (into the modal) was inside the registration form.
$'attendee_form).on('submit') obviously failed due to this bad dom.

This commit closes opw-778191
2017-10-26 17:52:21 +02:00
Denis Ledoux ab9b5a13e4 [FIX] l10n_ca: default stock input account for products categories
Since Odoo 8.0,
the default stock input account for product categories
in the Canadian localization is set to
`214100 CANADA REVENUE AGENCY`

This is the case since this commit:
https://github.com/odoo/odoo/commit/13dacd11c10dac853def763432829b8976604a7d#diff-2e65e26a4efc4ab95e72dbe2033141ecL294
In which the account with the XML ID 2141_en
214100 Stock Received But Not Billed
has been renamed
214100 CANADA REVENUE AGENCY

In this very same commit, the account "Stock Received But Not Billed" has been moved to the account 217100,
under the XML ID chart2171_en:
https://github.com/odoo/odoo/commit/13dacd11c10dac853def763432829b8976604a7d#diff-2e65e26a4efc4ab95e72dbe2033141ecR447

While the default value for the products categories stock input account remained the same, the account with as code 2141:
https://github.com/odoo/odoo/blob/8.0/addons/l10n_ca/account_chart_template_en.xml#L8

This is an oversight. It was not meant that way. The default stock input account for products
should well be "Stock Received But Not Billed".

In addition, a stock account is supposed to be of type assets, and not of type liabilities.

I contacted @max3903, who was a contributor of the l10n_ca localization,
and who is therefore a better expert than me regarding the Canadian localization.
He confirmed me all the above findings.

opw-775413
2017-10-26 17:31:25 +02:00
Pierre Rousseau b80b13a572 [FIX] l10n_fr_fec: change EcritureNum
opw-777652
2017-10-26 15:54:04 +02:00
Jeremy Kersten 4a3801bc58 [FIX] google_calendar: allow to use the function number_of_week for synchro
get_param return string, but timedelta wait a integer
2017-10-26 11:10:13 +02:00
Nicolas Martinelli 6366150484 [FIX] point_of_sale: apply fiscal position
Commit https://github.com/odoo/odoo/commit/5afb5ecd04cf49be6bedb655b187b19a65e1e02d#diff-1c14accbe350f7a177b3e81e5846861bL1363
removed the call to `_map_tax_fiscal_position`. Fiscal positions are not
applied anymore...

Instead of applying the fiscal position in the `compute_all` method as
it used to be, we apply it just before the call. This mimics the
behavior of SO/PO/Invoices, where the taxes are changed directly on the
order line.
2017-10-25 09:37:32 +02:00
Leonardo Donelli 37003c89ef [FIX] sql_db: typo in exception message
Closes #20315
2017-10-24 13:31:29 +02:00
qsm-odoo 7bd8f9a5b2 [FIX] web_editor: replacing selected text in a hierarchy on Firefox
When following these steps on Firefox:
- Select all text in a bold link (triple click)
- Type some text

The typed text did not replace the selected text but was instead put
at the front of it.
2017-10-24 10:50:18 +02:00
Joren Van Onder 33d20a2241 [FIX] point_of_sale: allow negative prices again
5afb5ecd04 rewrote the tax computation
in both account and point_of_sale to fix complex tax computations but
it no longer allowed negative prices in the point of sale.

opw-778013
2017-10-23 14:57:17 -07:00
Joren Van Onder 47c0cfc6e7 [FIX] point_of_sale: don't redeclare sign
var is function-scope (not block-scope) so this happens to work, but
it's confusing.
2017-10-23 14:57:08 -07:00
rde 31c1be1fac [IMP] auth_oauth: prevent portal users to land on /web after login
Before this commit, a portal user would land on /web after login in with oauth.
He would then just see the "Website" app.
He should then click on it to land on website instead of landing directly on it
after login in, which is not convenient, especially since theses users doesn't
know Odoo (in case of sale customers manually created for instance).

Now, if users has no 'base.group_user' right, it will be redirected to the
website directly instead of /web.
2017-10-20 15:25:28 +02:00
Nicolas Martinelli c6a9bab074 [FIX] account: tax included
- Create a tax included of 21 %
- Create a product sold 7.00, set the 21 % tax
- Add the product in a SO

Amount w/o tax: 5.79
Amount tax: 1.22
Total: 7.01

We defer the base rounding to the end of the method so that the rounding
doesn't impact the tax computation of included taxes.

Complement of 6e46ba7b46

opw-777221
2017-10-20 14:36:58 +02:00
Fabien Meghazi 3be3c6f532 [FIX] qweb2.js: fix erratic object type detection in foreach (Fixes #15655)
Could not add a test as the qweb js testsuite is broken and it's xml
test files have been modified in order to test qweb.py specific cases.
2017-10-20 14:04:46 +02:00
Goffin Simon 2deb95b852 [FIX] base_vat, website_sale: Verification of vat number in EU country
We have problems when trying to validate our EU VAT report because some vat number are wrongly encoded in Odoo.
    There are 2 problems:

    1) We use vatnumber library to check the validity of the VAT number entered by the user on website.
       That library removes the following characters '.' and '-' in order to perform the check and
       thus can return True for a number like 123.123.123.13 or -123-3454-34
       And those VAT number are then saved in our database but are rejected by the state
       as VAT number should only contains alphanumeric character
    -> Solution: prevent entering vat number with other characters than alphanumeric for users that are located in EUROPE!

    2) Usually VAT is prefixed by country code, however some people in europe managed to bypass the system
       by prefixing their VAT number with CC instead of their country code, CC is consider valid in odoo
       (it means Country Code) but is not a valid European country code in general, which means that those
       people that should have pay some tax have not. Which is a huge problem.
    -> Solution: prevent the use of CC as country code by the user when entering a vatnumber only if the user country is in EUROPE!

    source: https://en.wikipedia.org/wiki/VAT_identification_number

opw:772621
2017-10-19 14:18:14 +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
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
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
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
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