Commit Graph
103611 Commits
Author SHA1 Message Date
Odoo Translation Bot cbaecc5cbb [I18N] Update translation terms from Transifex 2018-02-01 02:40:21 +01:00
moutio 8c941cbfb1 [CLA] signature for MouTio
Done at #22605
2018-01-31 09:56:58 +01:00
Adrian Torres aae4d8a013 [FIX][IMP] doc: document manifest features (#22474)
Some manifest features, such as external_dependencies, hooks, etc. were
not previously documented, this commit documents these features.

Closes #22471
2018-01-29 10:59:32 +01:00
qsm-odoo 7c959e3fd5 [FIX] web_editor: properly show link alignment in toolbar
When clicking on a link in the editor, the "center" alignment button
was always marked as active whatever the real alignment of the link.
This was because it considered the alignment of the text inside the
link instead of the link's one inside its parent.
2018-01-26 16:17:19 +01:00
Christophe Simonis ea879956b1 [FIX] pad: allow to create records with unknown fields 2018-01-26 12:44:18 +01:00
Christophe Simonis 222cadda41 [FIX] base: sort ir.actions.act_window.view records deterministically 2018-01-25 20:20:09 +01:00
qsm-odoo 25849e9186 [FIX] web_editor: properly allow formatting text (normal/header 1/...)
Sometimes the formatting buttons had no effect or formatted more than
they should (like a whole column when triple clicking on a paragraph
only). This was because of the `listBetween` function implementation.
This is supposed to return all the nodes between one element and another
one... but the logic is wrong without saying from which *point* to start
and which *point* to end. For example, when asking the list between an
element and its parent, the result is very wrong as there is no way to
go from the beginning of an element to the beginning of its parent using
the `walkPoint` function as the `listBetween` function is doing.

Ideally, the function should be entirely fixed but this can be tricky.
For now, the function is just extended to allow to specify points
instead of nodes, and those are used by the `formatBlock` function to
solve the current problem.
2018-01-25 14:36:47 +01:00
qsm-odoo 2fad2e43b8 [FIX] web_editor: solve all triple-click issues
... hopefully.

This *must* be forward-ported.

Depending on the browser, the triple-click behavior is different. This
is especially problematic on Chrome, where blank characters at the start
of the neighbor of the clicked element are selected.

A weak attempt to solve that was made by commit https://github.com/odoo/odoo/commit/b85bd358234684974f9af63bc5f28cfabb527767

This commit hopes to solve all the issues once and for all by fully
reimplementing the triple-click for all browsers. The concept is simple:
when a triple-click occurs, select the whole *inner* content of the
deepest DOM *element* that was clicked.
2018-01-25 12:44:36 +01:00
qsm-odoo 78a556601e [FIX] web_editor: prevent crash when dropping snippets
For some unknown reasons, the editor sometimes crashes when dropping a
snippet. As a temporary fix, the non-critical line that causes the
problem is try/catch protected by this commit.
2018-01-25 11:11:34 +01:00
Lucas Perais (lpe) d29c2dbbdd [FIX] account: no payment terms on refund
In the case where:
create an invoice with payment terms that contains at least 2 term lines
Validate
create a refund by clicking cancel and reconcile

Before this commit, the refund move lines were wrongly created and reconciled with the invoice's move lines

After this commit, since payment terms are irrelevant on refunds, we set it to false and the problem doesn't raise

OPW 804752
2018-01-24 16:41:42 +01:00
Lucas Perais (lpe) adad192cc0 [FIX] account: reconciliation on payment terms
The case: create an invoice of 2000 euros. Payment terms have been configured as:
1) fixed amount 150, 0 days after invoice date.
2) fixed amount 200, 10 days after invoice date.
3) fixed amount 200, 20 days after invoice date.
4) balance, 30 days after invoice date

Before this commit, when issuing a payment of 150 at day 0, that payment got reconciled with the balance line.

After this commit, the payment is reconciled with the right payment term line

OPW 805006
2018-01-24 16:38:41 +01:00
Lucas Perais (lpe) 779afb7ac5 [FIX] point_of_sale: pos manager should have unlink rights 2018-01-23 09:21:42 +01:00
qsm-odoo 216edc206c [FIX] web_editor: properly evaluate if a range is an image
The previous implementation apparently came from an old version
of summernote (see https://github.com/odoo/odoo/commit/d33086c03fc1a0882be38ae62989b7f72df20d3b).

This commits should improve it to handle all known cases.

See https://github.com/odoo/odoo/issues/20877
2018-01-19 14:02:24 +01:00
qsm-odoo f314cf0bb3 [FIX] web_editor: deleteContents when no selection
Changing the `deleteContents` method of the editor is tricky. This
commit however dares to add a behavior: if the range does not
represent a selection but only the cursor position and is then asked
to delete its content... it should not do anything as nothing is
selected.
2018-01-18 15:19:16 +01:00
qsm-odoo cdb2cf744f [FIX] web_editor: DOMElement used as jQuery element
The function receives a jQuery element most of the time but it
may receive a DOMElement in some cases.
2018-01-18 15:17:48 +01:00
Yenthe V.G 40998a4ded [CLA] OdooExperts signs CCLA
Company renamed, was Bas Solutions
Closes #22324
2018-01-18 09:39:44 +01:00
Jeremy Kersten 74b564cf8d [FIX] website_slides: dont show upload button for public user
This commit closes #15369
2018-01-17 15:37:58 +01:00
Christophe Matthieu 128656f6ea [FIX] website: space symbol is missing when compress html is enabled
Issue: when the qWeb compress rendered HTML for a better Google PageSpeed
result, some text fields are missing spacebar between fa icons and text,
and between some fields.
2018-01-17 14:50:15 +01:00
Nicolas Lempereur 80f1d9ded6 [FIX] mail: reduce no sudo effect mark_all_as_read
The "Mark all read" button either set all messages as read, or if a
domain is given, filter messages on it.

But this filtering is also dependent on not doing sudo so odd
notification to which we would somehow not have any access would never
disappear in the unread number.

Adding a sudo is risky, so this changeset just modify the test on domain
since in most instance the domain is just an empty list (so: []).

The added test before this change would fail at the last assert ("mark
all read should conclude all needactions even inacessible ones").

opw-805185
closes #22277
2018-01-17 11:49:48 +01:00
Nicolas Lempereur 23a2bac3fa [FIX] hr_equipment: no technician subscribe in 9.0
In 9.0, an "Human Resources / Employee" see only hr.equipment for which
they are set as the "Employee".

But the code automatically subscribed the "Technician" because the field
name was named technically "user_id" which is automatically subscribed
by the system.

This led to a possible issue with read / unread message because of
feature that just happen by coincidence.

For 9.0 only (in 10.0 the field has been renamed technician_user_id and
access rules have been changed).

opw-805185
closes #22273
2018-01-16 15:09:45 +01:00
Joren Van Onder 11c73cd0aa [FIX] stock_landed_cost: round former_cost of valuations for total_cost
When computing the total_cost of a landed cost make sure to round the
individual costs of the valuation lines the same way as done by the
ORM (i.e. with the 'Product price' precision).

Otherwise the sum of the additional costs on the valuation lines will
not equal the price of the cost lines. This is wrong and leads to
errors during validation.

opw-804396
2018-01-12 11:14:09 -08:00
Guillaume Masson 26d3b77a1d [CLA] update CCLA for META IT
To add github username
Closes #22185
2018-01-12 15:17:17 +01:00
tbe-odoo d5e97eab8b [FIX] web: Kanban image not showing in some languages
- In some languages the kanban images are not displayed because of a bug in human_size method in JS.

This method translates the Unit Size for data and strip with the string with a comma as separator.
When the translatation contains spaces after the commas (like in the French translation), there is extra spaces in the final result.
This then cause an issue with the method is_bin_size that expects a unique space between the value and its unit.
Resulting in a bug in the method 'kanban_image'.

opw #804973 #804970 #804648
2018-01-12 12:05:56 +01:00
Martin Trigaux ea8cf1b7a2 [FIX] doc: escape code 2018-01-12 11:31:26 +01:00
qdp-odoo 330f84f211 [FIX] l10n_fr_fec: fix format of Debit/Credit columns
Numeric columns of fixed length should be left padded with '0' instead of ' ' (Article A47 A-1 Section III 2°)
2018-01-11 10:46:31 +01:00
Paul Catinean eded3cfda8 [FIX] website: check that website.user_id is not falsy
This field should be required.

This commits closes #21997

@kangol: diff in addons/website/models/ir_http.py is for existing db
It can be ignored in master because required will be apply
2018-01-10 13:09:32 +01:00
Yenthe V.G eeea6e8667 [FIX] website_blog: don't copy visitor count of blogpost
This commit closes #22107 and closes #22111
2018-01-10 12:25:50 +01:00
Yenthe V.G ad78f115c3 [ADD] doc: warning about function names in tests
Closes #22116
2018-01-09 18:07:29 +01:00
Aaron Bohy 35c829f12b [FIX] mail: Discuss: apply default filters
Before this rev., the default filters were ignored in Discuss. The
SearchView was instantiated and correctly retrieved the default
filters. However, a first manual 'do_search' needs to be done by
the client action for the search view to provide the domain, and
for Discuss to correctly filter the messages.

Steps to reproduce the issue:
  - In Discuss (e.g. in Inbox), add to Favorites a given search,
    and tick 'Use by default'
  - Leave Discuss, and then go back: the default filter correctly
    appears in the search view, but the messages aren't filtered.
2018-01-05 14:39:34 +01:00
Jeremy Kersten 7a31bc60fb [FIX] website_forum: fix tooltip user info
Before this commit, all tooltip users was showing website and parent_name from
the Main company and not the current focsed partner.

This commits closes #18430

@kangol: fwd-port company_name
2018-01-03 16:14:42 +01:00
Jeremy Kersten aaa8a87f36 [FIX] website_forum: check karma to allow to flag a post without rights to edit
If you set 200 kamra to allow to flag a post and 300 to edit all post, you was
not able to flag the post before this commit.

This commit closes #21274

@kangol: warning, fwd port need to add tag_ids into trusted_keys
2018-01-03 16:12:02 +01:00
Goffin Simon 0e943241fe [FIX] web: rotate graph label
When there are too many labels to display on the x-axis, they overlap
and it simply becomes unreadable. By slightly rotating them, this can be
avoided in most cases.

Back-port of this commit 388e258ce8

opw:802925
2018-01-03 09:40:23 +01:00
Odoo Translation Bot 62aa3be24c [I18N] Update translation terms from Transifex 2018-01-01 02:40:01 +01:00
Yannick Tivisse 9d25f63c9b [FIX] account_budget: Make the analytic account mandatory on budget form
Purpose
=======

When you create a budget, the field analytic account on the budget line is not mandatory but if you don't set one, it doesn't work, the practical amount always stays at 0 even if there are journal items in the accounts defined in the budgetary positions
2017-12-27 13:47:42 +01:00
Nicolas Martinelli 8aa1a493a0 [FIX] account: exchange rate of price_subtotal_signed
The field `price_subtotal_signed` contains the price converted in the
company currency. However, we should make sure to use the exchange rate
of the invoice date for its computation.

An use problematic use case is the creation of a deferred revenue from
an invoice (commit 7fe89d08b3).

opw-702352
2017-12-27 10:00:46 +01:00
Lucas Perais (lpe) 49cbeabe10 [FIX] point_of_sale: prevent taxes of another company to be loaded
As admin every tax is loaded, which is wrong anyway.
When the admin opens a session a change the cashier in the POS interface,
every order is made with every tax ever (on the product)
which could lead to major faulty records

See the case on OPW 786803 which is critical
2017-12-26 09:10:04 +01:00
Nicolas Lempereur be5950e429 [FIX] web_planner: use user language on frontend
The web planner specified no language for frontend so the website
planner on the frontend was never translated.

This commit add a specialized fallback for this use case so the planner
on the website is in the language of the current user.

The code is the same that get_context from web_editor.base but requiring
that would possibly adds delays (for dom_ready) that we don't want.

note: this is for 9.0 up to not including 11.0, in 11.0 another solution
is used and in master a bigger change is being worked on.

opw-781727
fixes #20829
closes #21004
2017-12-20 18:01:09 +01:00
qsm-odoo 16065f3ee2 [FIX] website_sale: hide checkout btn on emptied cart in all languages
When an user goes to its cart and removes all the items, the checkout
button is hidden so that the user cannot start an order with no product.
This behavior was not working in languages which are not the default
language of the website, as the button was found in JS relying on the
fact it started by "/shop/checkout", while it can be something like
"/fr_FR/shop/checkout".

Closes https://github.com/odoo/odoo/issues/21722
2017-12-20 12:25:53 +01:00
Guillaume Masson d8846e8e64 [FIX] l10n_fr_pos_cert: bad import
Closes #21735
2017-12-20 10:57:42 +01:00
Guillaume Masson 5651f28cd7 [CLA] add metaminux to TecLib CCLA
Done at #21735
2017-12-20 10:56:49 +01:00
Florent de Labarre 06ccccdb75 [FIX] account: check ACL and ir.rules upon account.move cancellation
Was PR #21732. Was OPW 800611. Courtesy of Florent de Labarre
2017-12-19 17:52:18 +01:00
Stéphane Bidoul (ACSONE) a8e444bea8 [FIX] l10n_lu: bad line breaks in CSV data
This was causing the creation of weird records when installing this module
2017-12-19 16:48:35 +01:00
Nicolas Martinelli ad8e1118c1 [FIX] web: action url never call on_close method
On a tree view:
- Add a button returning an `act_url` action; e.g.:
```
@api.multi
def open_google(self):
    return {
        'type': 'ir.actions.act_url',
        'url': 'https://google.fr/',
        'target': 'new',
    }

```
- Click on a button

The action call works only once because the button is never re-enabled.

The button is actually enabled only at view rendering. Therefore, we
call `on_close` in order to reload the view.

opw-784587
2017-12-19 11:18:12 +01:00
Olivier Dony f65f065901 [FIX] web tests: correct wrong route visibility 2017-12-19 10:12:34 +01:00
Nicolas Martinelli 9b83b1ba64 [FIX] point_of_sale: prevent scanning on receipt
- Sell a Product A
- From receipt screen, scan the barcode of Product B
- B will be in tab along with A
- Pay and validate
- Close the session

Only an order with Product A is recorded in the session (order 1).

When performing this set of actions, a new order is not created: the POS
simply reuses the current order. However, `create_from_ui` (called in
the receipt screen) discards an order if the reference already exists.
This means that the first order is correctly synchronized at validation,
while the second order is silently discarded.

Closes #16781
opw-766459
2017-12-18 14:40:19 +01:00
qdp-odoo 9bba7fea42 [FIX] l10n_ch: update taxes for 2018
- Added taxes for year 2018 of sales and purchase with percentage 3.7 and 7.7
- Added tags to show newly added tax in VAT report(enterprise branch) for Switzerland

Was PR #20851. Was task 39082.
2017-12-15 15:50:43 +01:00
qsm-odoo 69d4383d7b [FIX] web_editor: browser-unify alignment editor option
Summernote uses `document.execCommand` to apply most styles when
editing, leveraging the implementation to the browser.

Summernote is configured to use HTML styling (`'styleWithSpan': false`),
and in this case, browsers such as Firefox use HTML attributes for
styling text align, while Chrome still uses CSS for that. In fact,
`document.execCommand` is browser-inconsistent... but so is the
`styleWithSpan` option. Indeed, setting the option to `true` will make
Firefox use CSS property for alignment too... but not Internet Explorer.
So we might consider changing this option's value but this would not
solve the current problem.

Indeed, any CSS `text-align` style in Firefox takes precedence above
the element's `align` attribute, so when users were trying to align text
on stuff that was pre-aligned, they were unable to do so.

We can better explain the situation with this example:
A user tries to left-align in Firefox a `p.text-center` element, and
produces this:

```html
<p class="text-center" align="left"/>
```

(`align` attribute is ignored because of the `text-center` class)

On Chrome, this would be produced with the same steps:

```html
<p class="text-center" style="text-align:left"/>
```

With this patch, we actually make that HTML look like expected by the
user, no matter the browser he's using, by forcing the editor to use
the text-align CSS property. Note that the implementation is quite
ugly but had to take care of compatibility.

See https://github.com/odoo/odoo/pull/20900
(thanks to @Yajo for original PR)
2017-12-15 14:06:04 +01:00
Nicolas Lempereur c8df0333f5 [FIX] mrp: determine order of mrp.production
The order of production was first based on "priority DESC" and then
"date_planned ASC".

So for production with the same priority/date_planned the order is not
deterministic.

This commit make the order deterministic as it seems preferred.

opw-784243
closes #21644
2017-12-14 12:57:22 +01:00
Christophe Simonis 228f6086b1 [FIX] l10n_fr_pos_cert: correct dependency 2017-12-14 12:55:32 +01:00
Lucas Perais (lpe) b75927f9e3 [FIX] l10n_fr_certification: adapting to the new specs
Main resource document to be found at https://www.economie.gouv.fr/files/files/directions_services/dgfip/controle_fiscal/actualites_reponses/logiciels_de_caisse.pdf

    This document states that only business operations with partners not being subject to VAT should be inalterable and secure.
    We adpat the module by differentiating between b2c and b2b journals and apply hashing on the former's moves

    Protection against account_cancel is not necessary anymore

    By default, this module considers a sales journal being a b2c, thus activating hashing on its move.
    Since we can't afford to lose information, when a b2c journal contains hashed moves, its b2c characteristic cannot be changed

[ADD] l10n_fr_pos_cert: module to adapt the POS to the recent French regulation CGI art. 286, I. 3° bis.

    The module adds following features:

    - Inalterability: deactivation of all the ways to cancel or modify key data of POS orders, invoices and journal entries

    - Security: chaining algorithm to verify the inalterability

    - Access to download the mandatory Certificate of Conformity delivered by Odoo SA (only for Odoo Enterprise users)

[ADD] l10n_fr_sale_closing: module to store automatically the total of daily/monthly/annualy sales.

    (both of the period and cumulative).

    This fulfills another requirement brought by the recent French regulation CGI art. 286, I. 3° bis related to the storage of data

Was PR #20581. Was task 29922
2017-12-13 17:22:51 +01:00