Commit Graph
117156 Commits
Author SHA1 Message Date
Nicolas Martinelli 513fad42a0 [FIX] barcodes: delay between keys
In order to detect if a barcode scanner is being used, we detect the
delay between keypresses. The value is hardcoded to 55 ms. However, in
the case of a bluetooth scanner, this delay is often not enough,
resulting in an incorrect capture of the barcode.

We add the config parameter `barcode.max_time_between_keys_in_ms` which
allows the user to fine tune this delay for his hardware.

opw-806398
2018-01-31 13:47:17 +01:00
Nguyen Tan Phuc 00a10fdd00 [FIX] point_of_sale : wrong currency decimals
To have the same behavior as `_compute_decimal_places` in python
When setting rounding of currency > 10, POS will get negative decimals
instead value 0 and crash

Closes #22199
2018-01-31 11:45:31 +01:00
qsm-odoo d295b4360d [FIX] website_sale: properly switch images when selecting a variant
When using product variants, the product page shows:
- The product variant if different from the product image
- The product image
- Extra product images

The product variant image has to be switched dynamically when the user
choose another variant. This was broken with commit https://github.com/odoo/odoo/commit/f98bb2b86bb7c3ff0a549f24b31616c1539420a7
Indeed, it was switching the product image with the product image
variant instead.

This was because the variant/template order changed without switching
their classes. This commit changes their order again.

Also see opw-784737
2018-01-31 10:59:19 +01:00
adekock11 9dce2be273 [FIX] mail: display notification when explicitly grant it
Instead of looking for the "denied" permission, rather look for the "granted"
since there are three permissions: "default", "denied", "granted" - only
"granted" counts toward permission actually being granted

Closes #22633
2018-01-31 10:44:00 +01:00
moutio 8c941cbfb1 [CLA] signature for MouTio
Done at #22605
2018-01-31 09:56:58 +01:00
kaberer c07f78db17 [CLA] signature for kaberer
Done at #22641
2018-01-31 09:56:15 +01:00
Lucas Perais (lpe) 8b97a39907 [FIX] mail_template: replace local links except mailto
Before this commit, all the mailto:xx@ww.com in emails were transformed into
http://web.base.url/xx@ww.com

This was due to the url parsing of werkzeug urls.py, which definitely get the scheme
(mailto), but doesn't get the netloc of the url -- because it has no //

Ater this commit, we transform links to local ones, except if the scheme is mailto,
and the issue disappears.

OPW 807795
2018-01-31 09:20:13 +01:00
Nicolas Martinelli c52b18e65f [FIX] account_check_printing: multiple partners
- Create a bill for partner A of an amount X
- Create a bill for partner B of an amount Y
- Validate both bills
- Select both and register a payment by check.

Two payments are created with the same amount in words: X + Y.

In this specific case, we recompute the amount in words automatically.

opw-805842
2018-01-31 09:14:57 +01:00
RomainLibert a5cbf2105c [FIX] resource: _interval_and not working with disjoint intervals
When we pass two disjoint intervals the behaviour of _interval_and is a
little strange, it returns an interval wich begins after it finishes.
In order to fix that we return None when the intervals are disjoint.
2018-01-30 17:38:30 +01:00
Nicolas Martinelli 93c4c5cfb1 [FIX] mrp: multi-company bom find
- Create 2 companies A & B
- Create a product P with 2 phantom BOMs:
  Component C1 for company A, with sequence = 10
  Component C2 for company B, with sequence = 0
- Create a SO in company A for P, validate

The picking contains C2, while one would expect C1 since C2 is only for
company B.

opw-807640
2018-01-30 15:20:17 +01:00
Martin Trigaux ed54418d62 [FIX] maintenance: translate team name
If the name of a crm.team is translated, why not the one of a maintenance.team

opw-805838
2018-01-30 14:42:09 +01:00
Martin Trigaux 5ae494f2bb [FIX] stock: more flexible xpath
If you have stock installed before 0322f6e5 and try to install stock_account
today, the installation fails.

Should not rely on a field added after the stable freeze

Fixes #21823
opw-802767
2018-01-30 14:35:25 +01:00
Nicolas Lempereur 109ecd5205 [FIX] web_editor: firefox RTEWidget if hidden
It seems that firefox has some difference of behavior from other
browsers as said in:

- https://bugzilla.mozilla.org/show_bug.cgi?id=548397
- https://github.com/whatwg/html/issues/1813
- https://github.com/w3c/csswg-drafts/issues/571

It seems that at least in one instance (a html field hidden on the pos
configuration), firefox fails because of something similar:
window.getComputedStyle(element) returns `null` instead of the element
styles.

In my tests, using the parent window (possible if current frame and
parent have the same origin which should be the case) worked in this
instance, this is examplified by this jsfiddle:
 https://jsfiddle.net/Lpv898ve/2/

This work with window.parent and not using window directly.

So this commit adds fallback on doing getComputedStyle from the parent
window (when testing on chromium this gave exactly the same result that
before).

opw-813363
fixes #22211
closes #22610
2018-01-30 10:37:53 +01:00
Martin Trigaux 622b1d2370 [I18N] l10n_be_hr_payroll_fleet: export translation source terms
Will not be published on Transifex as for Belgium only

opw-805838
2018-01-30 09:39:08 +01:00
Nicolas Martinelli 14c6968224 [FIX] point_of_sale: data translation
- Create a product with name 'EN' in English and 'FR' in French
- Connect to the POS interface with a user having the French language
  set up.

The product name is loaded as 'EN' instead of 'FR'.

The language is missing from the context of the `search_read` calls.
Therefore, the product names (as well as categories, UOM...) are loaded
in the default language.

opw-805431
2018-01-30 08:53:58 +01:00
Martin Trigaux 76840643ad [I18N] sale: export source terms
Some where missing, followup of opw-805838
2018-01-29 16:30:47 +01:00
Martin Trigaux b0ce9ce8ca [FIX] hr: open in list view
This action was not working as the tree view has been removed
This feature was replaced by hr_org_chart module
Just display a list of the employee and subordinates

Fixes #20203
Fixes #22312
Fixes #22536
2018-01-29 16:26:21 +01:00
Goffin Simon 110613b2cc [FIX] l10n_in_hr_payroll: Error printing payslip details
Programming error

opw:803169
2018-01-29 15:14:50 +01:00
Olivier Colson 75857a2c34 [FIX] account: don't ignore default journal_id in payments' onchange on amount field
onchange function getting called when modifying the 'amount' field of account.payment always changed the journal of the payment when this amount was equal to zero. This caused a bug with batch deposits, when trying to create a new payment from the tree view contained in the form view of account.batch.deposit: passed default value for journal_id was ignored.
2018-01-29 14:42:36 +01:00
Nicolas Martinelli 5c5098f740 [FIX] stock: performance issue inventory at date
On a production database with ~10000 products and multiple stock
locations, uunning the 'Inventory at date' tales ~50 minutes. Most of
the time is spent in the loop populating `group_lines` thanks to
multiple search queries.

We get rid of this loop by selecting the stock history lines and making
the match between these lines and the `read_group` result manually. On
the reference database, the duration falls to ~30 seconds.

Based on preliminary work by amoyaux

opw-803460
2018-01-29 13:58:18 +01:00
Nicolas Martinelli 6a91ae0c18 [FIX] event: mail after event
Prevent sending emails that were scheduled before the event to be sent
after the end of the event.

opw-802973
2018-01-29 13:53:40 +01:00
Nicolas Lempereur 5b230c34cb [FIX] web: noshow list view aggregates w/ currency
In df69b5bb the aggregates of a column with currency was shown only if
records were of the same currency when a grouping was closed.

But when the list view is grouped, this would cause a number of issue:

- error if with first grouping is opened, another one is closed
- if the first grouping was closed aggregates were always shown
- the code only acts when closing a grouping
- aggregates could be shown when they should not
- aggregates could be not shown when they should

So this commit change things so this feature is ignored when the list
view is grouped.

There is also a fix so `currency_field` of the column is used instead of
just using `currency_id` that may be wrong.

note: only for saas-14 and saas-15 (feature is not present in saas-16)

opw-810835
closes #22598
2018-01-29 13:37:22 +01:00
Christophe Simonis 9af65a7efe [MERGE] forward port branch saas-16 up to 0b188b5804 2018-01-29 13:37:12 +01:00
Christophe Simonis 0b188b5804 [MERGE] forward port branch saas-15 up to 2629029d03 2018-01-29 13:29:14 +01:00
Christophe Simonis 2629029d03 [MERGE] forward port branch saas-14 up to 8b8f04e14c 2018-01-29 13:28:18 +01:00
Christophe Simonis 8b8f04e14c [MERGE] forward port branch 10.0 up to 6d682cea25 2018-01-29 13:27:28 +01:00
tbe-odoo 6d682cea25 [REV] http: Implicit session deactivation -> Explicit destruction
- This commit degrade the performance and introduce a bug for multiple database servers.

This reverts commit bc69b47073.
2018-01-29 13:25:21 +01:00
Nicolas Martinelli 8ed7570b1c [FIX] tools: float_round DOWN
The result of the following:
```
float_round(2.5, precision_rounding=0.05, rounding_method='DOWN')
```
is 2.45. Instead, 2.5 is expected.

In case of the `DOWN` method, epsilon should be added, not subtracted.
In the meantime, we introduce a slight reorganization of the method to
make it clearer.

opw-805008
2018-01-29 11:06:33 +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
Martin Trigaux 43bf9ff29d [IMP] sale: display which field was actually modified in the error message
Was previously displaying the whole list of fields
In error such as #22333 the error was not clear which field is nodified
2018-01-29 10:03:54 +01:00
Yenthe V.G 74c91f4afe [FIX] doc: typos
Closes #22341
2018-01-29 10:01:42 +01:00
Lucas Perais (lpe) af17cd76e4 [FIX] account: onchange payment type to internal displays all journals
on account.payment, when changing the payment type to Internal Transfer,
the result of the onchange was erroneous as inbound and outbound methods
lack relevance in that case
After this commit, We choose to display all bank and cash journals in this case

OPW 804214
2018-01-29 09:29:24 +01:00
Rémi Rahir 4669a4a91f [FIX] iap: account link not wworking in saas
Before this commit, the dashboard pill taht allows the user to consult
his iap accounts was hidden for saas users as it is grouped with the
app store and theme buttons which are not supposed to be shown since
they are not available in saas.

This commit ensures taht the button will be shown both on saas and premise instances.
2018-01-28 16:32:14 +01:00
Odoo Translation Bot 53c9858656 [I18N] Update translation terms from Transifex 2018-01-28 04:29:24 +01:00
Odoo Translation Bot e8d719e977 [I18N] Update translation terms from Transifex 2018-01-28 00:43: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 bcf6529755 [MERGE] forward port branch 10.0 up to 8e38a3d069 2018-01-26 16:06:51 +01:00
Martin Trigaux 843115ed8c [IMP] doc: rename page, add link 2018-01-26 15:58:28 +01:00
Pierre Rousseau 86adba1599 [FIX] sms: send sms in list view 2018-01-26 15:33:54 +01:00
Nicolas Lempereur 94ed561830 [FIX] website_sale: css ... alternative products
In the alternative products with 66994856 the thumbnail blocks were
restricted in size.

This is not very nice in the basic theme (the text of a product is cut
unexpectedly by the block border) but seems outright wrong on other
theme without border.

This commit forces the alternative product name to be on only one line
and be ellipsed. There was a lot of possible solution but for supported
browser compatibility and not breaking possible existing customization,
this one was choosen.

A better solution would probably use "flex" but we can't use it
currently (because of internet explorer support).

opw-806285
closes #22547
2018-01-26 14:37:54 +01:00
qsm-odoo 94c954121e [FIX] mass_mailing: lower the risk of messing with the mail wrapper
Mail content is wrapped in a table to properly allow centering the
layout in all mail clients. The problem was that this table was able
to be customized by the editor while it should not.
2018-01-26 13:31:36 +01:00
Christophe Simonis 8e38a3d069 [MERGE] forward port branch 9.0 up to ea879956b1 2018-01-26 13:17:23 +01:00
Christophe Simonis ea879956b1 [FIX] pad: allow to create records with unknown fields 2018-01-26 12:44:18 +01:00
Jairo Llopis 055bac5fcc [FIX] website: Form editor addon is enterprise
Introduced at f90290d1

Closes #22370
2018-01-26 11:09:46 +01:00
Nicolas Martinelli 927e13436a [FIX] account: duplicated field
`currency_exchange_journal_id` was duplicated due to forward port.

opw-807839
2018-01-26 09:11:49 +01:00
Christophe Simonis 9620989501 [MERGE] forward port branch 9.0 up to 222cadda41 2018-01-25 20:24:39 +01:00
Christophe Simonis 222cadda41 [FIX] base: sort ir.actions.act_window.view records deterministically 2018-01-25 20:20:09 +01:00
Nicolas Lempereur 3afe5b6508 [FIX] hr_timesheet: allow duplication of project
When duplicating a project, a command [(6, _, ids)] may be generated.

This fail with the commit aa8a39fc4f because all comodels records with
id not in `ids` will have their inverse field unset.

But eg. in the case of copy, this would trigger an error because this
would be done to an empty recordset and unexpectedly trigger an error.

opw-807655
closes #22525
2018-01-25 17:57:37 +01:00
Nicolas Martinelli 842e02020b [FIX] purchase: change invoice date
- Main currency: USD
- Create a PO in EUR
- Create an invoice from the PO
- The invoice is in USD and the exchange rate is applied
- Change the currency to EUR

The conversion is not applied anymore.

The original issue was that changing the date would overwrite any amount
modified in the invoice. Actually, the dependency on the date is not
really necessary. Indeed, this is supposed to help enconding invoices,
but it is likely that:
- If the PO is issued in a currency A, the bill received is in currency
  A.
  => no conversion necessary (solved from 11.1).
- If the PO is issued in a currency A and the bill received is in
  currency B, the exchange rate used by the vendor is different from
  ours.
  => manual corrections are necessary

Therefore, we remove the dependency on the date for the amount
recomputation. However, we still use it in the onchange. This way:
- the amount estimated should be close to the amount requested
- we avoid unexpected recomputation of amounts

Introduced with d8112b0238.

opw-805926
2018-01-25 17:04:33 +01:00
Géry Debongnie 21c1b1acd3 [FIX] web: add target=_blank to url field widgets
Url in the web client are supposed to open in a new tab.  This was the
way it worked in v10.0 and was lost with the refactoring of the new
views.

We just reintroduce that behaviour with this commit.

Closes github issue #22389
2018-01-25 16:31:06 +01:00