Commit Graph
119226 Commits
Author SHA1 Message Date
Odoo Translation Bot 62ab7eb88b [I18N] Update translation terms from Transifex 2018-09-30 07:02:39 +02:00
eco-odoo feb792d1cf [FIX] account_budget: allow saving multiple budget lines
The constraint did not take into account the possibility of adding
multiple budget lines at the same time.
2018-09-28 15:31:35 +02:00
Demaret Rivarola Johan 5dd187c566 [FIX] payment, payment_sips: compute reference correctly and encode return url
Sips does not accept special characters as a transaction reference.
Replacing '-' solve this issue.

Parsing Sips response was failing when the return url had query parameters.
This was due to the split on '='. Encoding the url solve this issue.
2018-09-25 10:04:36 +02:00
Odoo Translation Bot 2521b9990e [I18N] Update translation terms from Transifex 2018-09-23 07:02:35 +02:00
Yannick Tivisse b3fef6a72a [IMP] base: Order user's type groups by id
Purpose
=======

Traceback when following these steps:
- Install MRP
- Load French translations
- Set language to French
- Activate 'work orders' on MRP configuration

Error: The field 'sel_groups_9_10_1' doesn't exist.

This is because the only selection groups field on the res_users view
that doesn't have a transitive closure (the user's type Internal/Portal/Public)
is ordered by name.

1: Internal User
9: Portal
10: Public

becomes

9: Portail
10: Public
1: Utilisateur Interne

which lead to the traceback.

We should retrieve these groups ordered by 'id' to avoid the issue.
2018-09-20 16:19:24 +02:00
Toufik Benjaa 8a1030e162 [FIX] hr_holidays: overlap constraint
- Allow to request a leave that starts exactly when another leave ends.

  OPW-1887257
2018-09-20 15:26:37 +02:00
Olivier Dony 84af9382e2 [IMP] mail: avoid costly queries on messages
The combined domain for moderated messages used to trigger a complex
database query with two OR conditions on the mail_message table.
Unfortunately PostgreSQL seems to be unable to optimize this with
indexes, or to detect that one of the conditions is void (included `AND
FALSE`). On large mail_message tables, this significantly slows down
calls to message_fetch, e.g. 6s instead of ~70ms, while returning the
same results.

As a workaround, move the logic for generating the moderation domain to
the server side, where it can be:
 - optimized out when the user is not a moderator
 - split into 2 distinct DB queries in order to avoid the pathological
   case

After this change, calls to message_fetch with and without messages
to moderate execute in respectively ~50ms and ~150ms, instead of 6s, in
a test database with 25 million messages.

The modified message_fetch signature is backwards-compatible.

+ modified mock server used for the tests, which unfortunately
duplicates most of the business logic.
2018-09-20 12:41:03 +02:00
Olivier Dony ec4f7bc215 [FIX] mail: block negative search for need_moderation
Other operators can only cause nonsensical results, while causing
useless slow queries. This is only really meant as a shortcut for
getting messages to moderate.
2018-09-19 23:50:20 +02:00
XavierDo 97dbdc418d [FIX] mail: keep update of subtypes in dropdown
Since saas-11.4 the subtype dropdown don't keep changes of subtype.

Before saas-11.4 the update was relying on the fact that the follower id
changes on each subtype edition. This is no longer the case.
The test is addapted to remove the hack simulating this behaviour.

The read_followers route is not called if no there is no changes
in the follower ids
https://github.com/odoo/odoo/blob/905e01921f3c3ef43ace6fc537d1d8c0d280002c/addons/mail/static/src/js/followers.js#L195
Leading to the follower list not being update

Note that the subtype update in dropdown was working fine after adding a
new follower: the read_followers will return a None as suptype when called
for a list of partner not containing the current user. Since the subtypes
was falsy, the render was not rendering the dropdown again, keeping
the value of the checkboxes. We can still create some inconsistency by
editing the subtype from the follower list. To avoid that a check is made
when updating subtypes after calling read_followers.

The chosen solution here is to keep the update on subtypes in memory.
This will avoid a call on read_followers to fetch information that we
already know, using the assumption that the operation was successfull
whish should be the case when a user edit subtypes on a record
he has access to.

Others solutions:
-force the call to read_followers with the current user, maybe by removing
it from this.follower after editing subtypes.
-call read_subscription_data explicitely

Obviously follower.js should be refactored to fix this a better way.

Task: #1886982
PR: #27093
2018-09-19 14:10:19 +02:00
Toufik Benjaa d30fa83114 [FIX] payment: crash when validating a payment.transaction
- If a payment.transaction is already linked to an account.payment, the
  transaction validation crashes.
2018-09-19 14:08:00 +02:00
Toufik Benjaa 968f16dd30 [FIX] payment_ogone: set payment done with 3ds in pending mode
- When receiving a 3DS payment notification from Ingenico the payment
  transaction should be set to "pending" and not in "done".

  Then a second notification is send by Ingenico to set the
  payment.transaction to "done".
  This is the reason for accepting "pending" as a valid state on the
  feedback validation.
2018-09-18 18:14:10 +02:00
Martin Trigaux 1421949c67 [FIX] tools: import translation file without pot
Due to fccfd36 and 4ba7fbb the translations were only imported, considering the
.pot as the reference.

During import or a manual csv or po file, there is no pot file.

Add tests with Klingon and Dothraki

Fixes #27044
2018-09-18 18:02:19 +02:00
Christophe Simonis a1b384d66b [MERGE] forward port branch saas-11.3 up to 2de573440e 2018-09-17 19:40:47 +02:00
Christophe Simonis 2de573440e [FIX] stock_dropshipping: call existing method in test 2018-09-17 18:48:53 +02:00
Christophe Simonis 0942a57b5a [MERGE] forward port branch 11.0 up to f2b8caff07 2018-09-17 18:03:41 +02:00
Christophe Simonis f2b8caff07 [MERGE] forward port branch saas-15 up to 03b83abb7f 2018-09-17 17:02:40 +02:00
Joseph Caburnay 5da419a4fe [FIX] point_of_sale: toggle the checkbox correctly.
Clicking the config labels don't toggle the checkboxes, instead show
dropbox menus (at the upper left screen) for the hidden field when
the checkbox is inactive. This modification toggles checkboxes correctly.

OPW 1884452
2018-09-17 16:14:49 +02:00
Alexandre Kühn a6516c3533 [FIX] web, website: root.widget defined even without website
Revision on https://github.com/odoo/odoo/commit/0de5c1f076d7e7d0e5361e08c810c727bd41d9e0

With the commit above, the following error was shown in the devtools
when accessing a frontend page without website that is installed:

  missing module "[root.widget]"

This is caused by the fact that there is no root widget in the frontend
bundle without website installed. This may prevent executing tours
in some cases, because the tour manager needs a root widget to run.

This commit solves this issue by ensuring a root widget in the frontend
even when website is not installed, so that tour manager can run.
2018-09-17 15:22:30 +02:00
Christophe Simonis 03b83abb7f [MERGE] forward port branch saas-14 up to b28f705b64 2018-09-17 14:51:13 +02:00
Christophe Simonis b28f705b64 [MERGE] forward port branch 10.0 up to 69af1df70a 2018-09-17 14:15:46 +02:00
Gert Pellin - GPE 5dba2b6e09 [FIX] point_of_sale: deactivate price change on switch from admin on price control (#26994)
Usecase:
* Activate price control on point of sale.
* In pos session, as administrator, activate pricechange modus.
* switch to normal user.

Before fix normal user can change the price.
After fix the modus will automatically switch to quantity.
2018-09-17 14:07:22 +02:00
Christophe Simonis 69af1df70a [MERGE] forward port branch 9.0 up to 7dc13e237c 2018-09-17 14:06:21 +02:00
Nicolas Martinelli 034e1d37d9 [FIX] report_intrastat: delivery address
Complement of commit d5b46020c3, applied to the generic
Intrastat report.

opw-1878590
2018-09-17 13:38:28 +02:00
Martin Trigaux 2c7db14261 [FIX] sale_timesheet: translate correctly labels
Introduced at 7081a55cb4

opw-1884812
2018-09-17 12:00:21 +02:00
Goffin Simon a9670cfce5 [FIX] account: Reconcile a statement with move line from partner
Steps to reproduce the bug:

- Create a journal "Temporary" with default account
(don't care about the names) with Fixed asset type and reconcile = True
- Create a vendor bill
- Create a payment from this vendor bill in the temporary journal
- Create a bank statement and with a line where you specify the vendor
- Try to reconcile the temporary account with the bank account

Bug:

Impossible because the temporary account item was not displayed

opw:1884376
2018-09-17 09:53:25 +02:00
Nicolas Martinelli a8950a9e8f [FIX] google_drive: google_drive_refresh_token
When saving the settings, the `google_drive_refresh_token` is never set.

This is due to the `ir.config_parameter` which was retrieved after being
saved.

opw-1882068
2018-09-17 08:28:38 +02:00
Nicolas Martinelli de1b97f493 [FIX] base: set_value
By default, the `set_value` method doesn't do anything, and is expected
to be overridden. However, `ir.default`, groups and
`ir.config_parameter` are set BEFORE `set_value` is actually called.

This is an issue when it is necessary to retrieve one of these values
before the save, for example in order to compare the value before and
after.

We move the setting of the various values directly in the `set_value`.
This way, it becomes possible to interact with the values before any
modification is performed. On the other hand, the existing logic remains
unchanged.

opw-1882068
2018-09-17 08:28:38 +02:00
Nicolas Martinelli d5b46020c3 [FIX] l10n_be_intrastat: shipping country
- Create a partner in Germany
- Set an invoice address for this partner in Poland
- Create an invoice for the Poland address, but the delivery to Germany
- Validate invoice

The Intrastat reports the transaction in Poland, while it should be
Germany.

opw-1878590
2018-09-17 07:57:43 +02:00
Odoo Translation Bot 7fdbc66861 [I18N] Update translation terms from Transifex 2018-09-16 07:08:38 +02:00
Odoo Translation Bot 2bf3c29b0c [I18N] Update translation terms from Transifex 2018-09-16 04:10:49 +02:00
Odoo Translation Bot 548f8dba82 [I18N] Update translation terms from Transifex 2018-09-16 00:29:05 +02:00
Turkesh Patel f5070048d6 [FIX] l10n_in_hr_payroll: use correct parameter
bank_id field of hr.payroll.advice expects a res.bank record
not a res.partner.bank

Fixes #26690
Closes #26692
2018-09-14 16:42:55 +02:00
Turkesh Patel 5825f8b666 [CLA] signature for tpa-odoo
Done at #26692
2018-09-14 16:42:55 +02:00
RomainLibert 5eae8f7110 [FIX] crm,sale_crm: split action_mark_won
Since https://github.com/odoo/odoo/commit/4330ea02676a4afd88707bb463a007e7de3c8686, action_mark_won was
not api.multi anymore, which made it impossible to mark leads as won in
batch.
The problem is that we do exactly this in the demo data.

As we need to keep the rainbowman in the interface the decision has been
taken to split the method in two parts, one for the interface which
returns the rainbowman (and uses ensure_one) and the second which is a
true api.multi method.

Thanks to @tde-banana-odoo for his advice on the matter
2018-09-14 16:16:46 +02:00
Martin Trigaux 14a9b988f4 [FIX] web: graph_renderer: check graph data before rendering
cherry pick of 634de21b76
Before this commit, we had two different errors when data was
unavailable:
The first one is generated by Odoo: "No data to display, try to[...]"
The second one is generated by nvd3: "No Data Available".

We always want the same message.
So now, we always make some checks before rendering
the graph by calling _render.

opw-1874349
2018-09-14 16:15:43 +02:00
MOENS Alexandre b83db27135 [FIX] web: JournalDashboardGraph widget crash Mk.II
Hardening of commit:995610c065bf0242cb5023cfad2940234395739e

The JournalDashboardGraph requires nv, which is lazyloaded.
However it requires nvd3.js which is loaded after nv.d3.js.
A function called in destroy is defined by nv.d3.js,
which can make the crashhappen with the right (wrong) timing.

opw 1873749
2018-09-14 16:13:35 +02:00
Christophe Simonis 6c103589c1 [MERGE] forward port branch saas-11.3 up to ea0b3d600d 2018-09-14 14:56:51 +02:00
Raphael Collet 70ed882088 [FIX] base: optimize the reading of many2one property fields 2018-09-14 14:25:00 +02:00
Raphael Collet d39d583b21 [FIX] product: partner property_pricelist load in batch for pos
Reimplement the compute method of the field to make it work in batch.
2018-09-14 14:25:00 +02:00
Moises Lopez a87d5a2b28 [ADD] sale: add menu to product categories
It was already present in the accounting and purchase application but not in
sale menus.
Apply the same logic as in purchase and use a group_no_one

Closes #22862
2018-09-14 14:06:27 +02:00
Christophe Simonis ea0b3d600d [FIX] mail: declare services used in forward-ported test
Only broke test with enterprise overwrite.
2018-09-14 14:05:24 +02:00
len-odoo 8179960172 [FIX] web: lock handle when sorting on a different field
The resequence mechanism works if the sequence is sorted by its handle field.
Therefore sorting on another field should lock the handle, while sorting on the
handle field should unlock the handle.

opw 1867049
2018-09-14 14:00:52 +02:00
Nicolas Martinelli 6e0afe864b [FIX] website: AccessError
The AccessError made sense when it was introduced back in v10, but
doesn't make sense anymore since there is only one setting wizard.
2018-09-14 12:40:06 +02:00
Martin Trigaux a307d4fc80 [FIX] account_asset: use the last day of fiscal year for depreciation date
The depreciation was hardcoded as starting the first of January.
If a user changed the configuration to set a different value than 31/12 it had
no impact.

In saas-11.3, this was improved to allow to configure the behaviour at 805f3a610

opw-1878927
2018-09-14 12:03:21 +02:00
Yannick Tivisse eb11665bfc [FIX] rating: Send rating if no override of rating_get_parent
Purpose
=======

Currently if the method rating_get_parent is not overriden, then
sending a rating on a record of the model leads to a traceback.
2018-09-14 11:43:15 +02:00
Martin Trigaux a47f7ee0e4 [FIX] product: do not translate at code import
Defined as this, the label of the selection field were translated during code
import, when building the python model, not when a user access the field values
as it should (and is already the case thanks to the ORM).

Trying to translate a string when no user-context is available is not only
useless but may cause bug on services with multiple databases (e.g. a SaaS).

In a multi-worker environment, when the code is imported, the _ method will use
multiple scenarios to detect the language and get a cursor.

As we have no available cursor in the frame (method _get_cr from GettextAlias),
the fallback is made on the cursor of the request.
In a multi-worker environment, this could be a cursor linked to a database in
another language than English.
In such scenario, the selections would be translated in the language of the
other database instead of displaying it in English

opw-1881956
2018-09-14 11:20:38 +02:00
Nicolas Martinelli 2e6c1aa5d1 [FIX] stock_account: return dropship
- Set a product with real-time valuation
- Create a SO, select the Drop Ship route
- Validate the SO, the PO, and receive the picking
  => an accounting entry is created
- Return the picking

The reversed accounting entry is not created.

This is because the return of a drop ship picking is not recognized as
some kind of dropshipping.

opw-1879117
2018-09-14 10:35:33 +02:00
Lucas Perais (lpe) 9511cb2bb0 [FIX] point_of_sale: param for reconcile orders and payment
It has been argued that a regression took place because of e2efec8e54
Before that commit, everything was reconciled together
After, only payments and orders with a partner set were

While that commit improved performances (there are much less move lines to reconcile),
it introduced an inconvenience business wise because of the noise created
by the unreconciled lines

This commit proposes to cut the pear in half by introducing an ir parameter
to choose between the two options

OPW 1883594
closes #26971
2018-09-14 10:10:38 +02:00
Ankit Joshi b8cb25d052 [FIX] stock: views wrong groups on location
Show the source and destination location in the detailed operation view
if the multilocation is active. Also hide locations if only the delivery
package settings.

Issue: 1882695
2018-09-14 10:06:24 +02:00
Lucas Perais (lpe) 148182bf91 [FIX] website: seo add words no freeze
On a website page, click on promote and add the keyword "DS1517"

before this commit, the javascript froze

after this commit, it doesn't freeze

OPW 1880341
closes #26771
2018-09-14 09:58:57 +02:00