Commit Graph
103497 Commits
Author SHA1 Message Date
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
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
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
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
Carlos Dauden 40d4cdd39f [FIX] account: Field total_invoiced in res.partner doesn't include archived children 2017-10-12 13:20:57 +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
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
Christophe Simonis 2d8e6ff05e [FIX] mail: handle empty recordset when computing unread message count 2017-10-10 15:56:22 +02:00
xmo-odoo c725745d14 [FIX] sale: action methods with no return values
Returns apparently lost during salepocalypse, leads to errors when
calling them over XML-RPC (cannot marshal None).

Fixes #19889
2017-10-09 10:56:37 +02:00
Odoo Translation Bot a846813b96 [I18N] Update translation terms from Transifex 2017-10-08 01:44:15 +02:00
qsm-odoo aba5402d5e [FIX] web: allow to group on more groupable fields with the searchview
Some fields are groupable even though they are not stored (e.g. an inherited
field, by example the 'date' field of 'fleet.vehicle.log.fuel').
2017-10-03 10:42:47 +02:00
Olivier Colson 55925d88b4 [IMP] lunch: "recurrence" instead of "recurrency" in field labels, templates and comments 2017-10-02 10:53:35 +02:00
Odoo Translation Bot 97de7c7c48 [I18N] Update translation terms from Transifex 2017-10-01 01:44:20 +02:00
qsm-odoo 14bd6dd277 [FIX] web: traceback on line graphs with only one data
Graph tooltip destruction was fixed with commit https://github.com/odoo/odoo/commit/86252428846607cd5f4b18cef8de49a8cd0b151a#diff-5de06eee7a2eeae066aa1348a1528fe9L100.
Unfortunately, the commit supposed that the 'display_' methods always
returned a graph, which is wrong.

opw-773759
2017-09-29 12:42:20 +02:00
qsm-odoo e10a3ceb6f [FIX] website_slides: restore drive video embedding
The google 'video.google.com/get_player' URL seems to be deprecated so
the URL used by website_slides had to be updated.

Also when switching a slide URL from a drive URL to a youtube URL, odoo
still kept thinking it was a drive URL.

opw-773984
2017-09-29 12:32:29 +02:00
Christophe Simonis b7940c317b [MERGE] forward port branch saas-6 up to 81605180bf 2017-09-27 16:30:36 +02:00
Christophe Simonis 81605180bf [MERGE] forward port branch 8.0 up to cf8577b9d0 2017-09-27 16:01:47 +02:00
Christophe Simonis cf8577b9d0 [FIX] crm_partner_assign: safer geolocalization test
Backport & adapt commits afd4b68acc & 27787265dd

As google starts to refuse to answer to our geocode requests, we need
to mock results in tests.
2017-09-27 15:53:30 +02:00
qsm-odoo 4c046a759c [FIX] web: fix translate icon position on chrome
On chrome only, the translate icon was over the <input/> element but
below the <input/> text... this commit fixes this by forcing
relative positioning on the icon so that it is always rendered after
the <input/> (which seems to solve the chrome bug).
2017-09-27 13:58:14 +02:00
Christophe Simonis 1970761554 [MERGE] forward port branch saas-6 up to 57868ca195 2017-09-27 13:16:37 +02:00
Christophe Simonis 57868ca195 [MERGE] forward port branch 8.0 up to 8a187c5b1d 2017-09-27 13:15:55 +02:00
qsm-odoo e520aabc43 [FIX] website_slides: allow upload of >20MB files (as limit is 25MB)
There is a double-check (on client and on server) to prevent the user to
upload a >25 MB document. The client checks the actual file size while
the server guesses it from the total received payload. This server guess
is wrong as the extra payload is quite huge (5-10MB). Now the server
checks the real file size as it should have from the beginning.
2017-09-26 14:04:55 +02:00
Odoo Translation Bot 8a187c5b1d [I18N] Update translation terms from Transifex 2017-09-26 11:47:00 +02:00
qsm-odoo 0b4f190b0f [FIX] website_event_track: allow to edit tracks' info in frontend
Before this commit, the track description and partner biography were
not able to be edited after proposal.
2017-09-25 11:55:17 +02:00
Yasser Kaddour 4365ebc19c [FIX] Correct Algerian currency symbol
While the currency code of the Algerian Dinar is DZD, (latin) currency symbol is DA.
2017-09-25 09:53:45 +02:00
Odoo Translation Bot 740ddf81b0 [I18N] Update translation terms from Transifex 2017-09-24 01:44:27 +02:00
Christophe Simonis d53a201987 [MERGE] forward port branch saas-6 up to 43a47dbc93 2017-09-21 13:51:19 +02:00
Christophe Simonis 43a47dbc93 [MERGE] forward port branch 8.0 up to 35441cfd62 2017-09-21 13:25:42 +02:00
Jairo Llopis 35441cfd62 [IMP] doc: add test classes documentation
Closes #13902
2017-09-19 17:00:59 +02:00
Odoo Translation Bot c14eb9ae9e [I18N] Update translation terms from Transifex 2017-09-17 00:29:20 +02:00
Nicolas Martinelli 4e799fed8e [FIX] crm: expected closing
Backport of commit abea8d3513

opw-771843
2017-09-14 14:49:18 +02:00
Lucas Perais (lpe) be3b0069fb [FIX] account_extra_reports: empty partner name in sales/purchase journal
Before this commit, since a partner's name can be empty, a traceback was thrown while opening the report in such a case.
Now, if the partner's name is falsy we don't try to do operations on it

OPW 769835

closes #19400
2017-09-14 09:48:12 +02:00
Nicolas Martinelli 7eb7e9fd6e [FIX] account_tax_python: empty code
If the user somewhat removes the 'Applicable Code' text, the call to
`safe_eval` will crash.

opw-769267
2017-09-12 12:01:57 +02:00
Christophe Simonis 46e3e739c5 [MERGE] forward port branch saas-6 up to ddbc2da847 2017-09-11 11:24:25 +02:00
Christophe Simonis ddbc2da847 [MERGE] forward port branch 8.0 up to 7805cf5fef 2017-09-11 11:22:33 +02:00
Odoo Translation Bot 6740879407 [I18N] Update translation terms from Transifex 2017-09-10 00:30:05 +02:00
Lucas Perais (lpe) 7805cf5fef [FIX] tools: fix amount to text in fr and nl
Correct rendering of 70 and 90 in french
And manage inversion [unit]-en-[tens] in nl

opw 757048

closes #19297
2017-09-08 09:40:56 +02:00
Nicolas Martinelli d522a796d3 [FIX] calendar: all day event
- Set the TZ as 'America/Martinique'
- In the calendar (month view), click on a date D.
- Fill in the topic, then click on "Edit"

The date is set to D-1.

Commit 09066fbbd5 makes the date consistent when the user sets an
event as an all day event by taking into account the appropriate
timezone.

However, in the case of an event created from the month view, this TZ
modification should not be applied.

opw-766638
2017-09-05 16:33:04 +02:00
Christophe Simonis e300a587b3 [MERGE] forward port branch saas-6 up to 0099074ab2 2017-09-05 11:27:58 +02:00