Commit Graph
123626 Commits
Author SHA1 Message Date
Yannick Tivisse 219c19f5f7 [FIX] hr_payroll: Batch some calls to create and methods 2019-02-18 15:28:15 +00:00
Yannick Tivisse 507e098d5a [FIX] hr_payroll: Unlink all benefits at once
unlink() invalidates the whole cache, it's an anti-pattern
to use it in a loop! Accumulate the records to unlink and
do it at the very end.
2019-02-18 15:28:15 +00:00
Yannick Tivisse cffe008351 [FIX] hr_payroll: Make method api.model 2019-02-18 15:28:15 +00:00
Yannick Tivisse 1f39611fcc [FIX] hr_payroll: Generate all benefits at once without SQL
It's easier, shorter, more logical to verify that a conflict will happen,
rather than combining multiple hacks to hide errors.

On the other hand, the method will now be called only once when generating
benefits on leaves/attendances for several employees
2019-02-18 15:28:15 +00:00
Yannick Tivisse 4ea60907f1 [FIX] hr_payroll: Fix linting issues 2019-02-18 15:28:15 +00:00
Yannick Tivisse 2a4b883b17 [FIX] hr_payroll: Make some methods private 2019-02-18 15:28:15 +00:00
Yannick Tivisse 3af4e24721 [FIX] hr_payroll: Replace constraints methods by sql constraints
It's a one-liner instead of 6 lines of Python with extra ORM overhead
2019-02-18 15:28:15 +00:00
Alexandre Kühn e3714eeea6 [FIX] im_livechat: instantly receive messages from new livechat
Before this commit, when new messages were posted in a new
livechat, the operator received them after a delay. This
may take up to a minute before receiving the notification.

This behaviour was causing a bigger issue: those notifications
may never be received by the operator. This case happened when
the operator was receiving more recent notifications while
notifications from new livechats were pending.

The delay was caused by the operator not yet subscribed to
notifications on the newly created livechat. It is only on
the next poll of longpolling that the subscription occurred,
then followed by dispatching the notifications to the operator.

This commit fixes the issue by dispatching new messages of new
livechats directly to the operator. This is done by enforcing
the operator to make another polling when a new livechat is created,
so that he is always subscribed to those livechats. As a result,
new messages are received instantaneously.

opw-1933951

closes odoo/odoo#31199
2019-02-18 13:16:04 +00:00
Arnaud Baes dba97a2689 [FIX] stock: Scrap button.
The 'scrap button' should be visible only if:
- The picking is a done receipt
- The picking is a not done delivery
- The picking is internal

TaskID: 1930221

closes odoo/odoo#30466
2019-02-18 08:37:36 +00:00
Odoo Translation Bot 5a3d4e4c80 [I18N] Update translation terms from Transifex 2019-02-17 06:02:37 +01:00
qdp-odoo 10551f25ab [FIX] account: don't mess the invoice status
Since the invoice validation is well separated from the account entries creation (and made before), the chatter was showing too much status change upon an invoice validation.
This commit makes sure we never consider an invoice paid when its move hasn't been created yet.

closes odoo/odoo#31100
2019-02-14 10:13:38 +00:00
Mathieu Duckerts-Antoine 01c159fd9f [FIX] web: quotes and backslashes in search view
The commit 6d3ada178f
aimed to solve problems occuring whith (single or
double) quotes when creating new custom filters.
Unfortunately, the point was missed and bugs were
still present. The present commit solves the
orginial problem satisfactorily.
There was also a problem in the management of
backslashes. Type '\\' in the search bar would
lead to a domain like
[('...', 'ilike', '\\\\\\\\\\\\\\\\')].
This has also been fixed. Note that it is
necessary to input "\\" if one is looking for a
backslash in db (as before).

A remark on the _formatAST function (py_utils.js):

We deescape only the chars `'`, `"`, and `\`
because it does not seem possible to produce a
string in the search view that would intend a
search for a line return or a tab for example.

A general remark:

Domains should always be in normalized form.
In that way they could be manipulated and combined
together without a tokenization/parsing!

closes odoo/odoo#29756
2019-02-12 12:45:51 +00:00
Lucas Perais (lpe) 6d5a993cf7 [FIX] web: control panel load/save filter sort param
Before this commit, the wrong semantics was implemented in the webclient
concerning the "sort" char field in ir.filter
Loading a filter with a sort with negative order made the webclient crash

This field holds a JSON string, representing a list of field names
If the order of the field is inverse, there should be a "-" before it
for legacy purposes

After this commit, the semantics have changed for consistency
that is, at save time the sql notation is preferred
We support the legacy notation too for backward compatibility

closes odoo/odoo#31102
2019-02-15 09:58:47 +00:00
Robot Odoo b923ef6c3f [MERGE] mail: fix performance issues with channel seen feature
Revision on https://github.com/odoo/odoo/commit/844fb2b51ea7cfa557b19466c0a53dde19433e7a

There were some performance issue with this newly added feature.
This was particularly the case on channels with multiple users, therefore
we have decided to only enable it on direct chats for the moment.

Also, we avoid unnecessary writing in DB and sending notification on longpoll
if the seen information of a user is already up-to-date.

closes odoo/odoo#31074
2019-02-15 09:25:06 +01:00
Toufik Ben Jaa 9cd8410f69 [FIX] website_sale: avoid to consider quotations as eCommerce carts
- An eCommerce cart is a quotation linked to a website.
- The feature to consider a cart as abandonned wasn't correctly checking
  if the quotation is linked to a website and flag regular quotation as
  abandonned carts.

  This causes issues since Sales may wish to send the quotation by mail,
  but the button is hidden and replaced by the button "send recovery
  mail" which send an email with a specific email template.

closes odoo/odoo#31103
2019-02-14 16:12:08 +00:00
Alexandre Kühn 8ee218aa5c [FIX] mail: notify channel_fetched/channel_seen only when changes
Revision on https://github.com/odoo/odoo/commit/844fb2b51ea7cfa557b19466c0a53dde19433e7a

With the commit above, when the JS notified on `channel_fetched` and
`channel_seen`, it was always writing in DB and sending notifications
on the longpoll.

This is useless if the information on last fetched/seen message
of the conversation remains unchanged, which is what this commit
solves.

Also prevent `channel_fetched` from seding notifications on
the longpoll if this is called on a non-chat channel.
2019-02-14 12:55:24 +00:00
Alexandre Kühn 62294921b8 [FIX] mail: enable seen feature only on direct chats
Revision on https://github.com/odoo/odoo/commit/844fb2b51ea7cfa557b19466c0a53dde19433e7a

There were performance issue with the seen feature in multi-
user channnels, therefore it has been disabled for them.
As a result, only direct chats have this feature.
2019-02-14 12:55:24 +00:00
Toufik Ben Jaa 4a4101c09c [FIX] oe: allow to add attachments on bank statements
- It was impossible to add attachments on the `account.bank.statement`
  form view due to the chatter not being displayed.

  This commit add the chatter widget to the Bank Statements form view.

closes odoo/odoo#31098
2019-02-14 09:48:18 +00:00
Christophe Simonis 1cc285ee30 [FIX] project: count tasks of child contacts
Allow to have the count to match the one you will get when clicking on
statbutton (behavior changed by #27118).

closes odoo/odoo#31081
2019-02-13 17:22:38 +00:00
Toufik Ben Jaa e8b28c02a0 [FIX] website: server images for website_published records
- When a record has `website_published` field set at True the method
  `binary_content` on `ir.http` should bypass the access rules and
  always deserve the content.

  This wasn't the case due to a mistake on the code. The code is
  checking the access rules and may in some cases not return the
  content.

closes odoo/odoo#31068
2019-02-13 13:48:33 +00:00
Alexandre Kühn 98e3ca4e67 [FIX] mail: throttle batched channel_fetched RPCs
Revision on https://github.com/odoo/odoo/commit/844fb2b51ea7cfa557b19466c0a53dde19433e7a

The commit above added the seen icon on messages in a channel.
However, since this feature, there was a performance issue
when opening the systray messaging menu with several pinned
channels: lots of RPCs are made, almost 1 for each preview
in the messaging menu.

The RPCs comes from the reception of the last message in the
channel, to let the current user notify that he has received
the messages in the channel.
Those RPCs were made for each channel, thus the more pinned
channels the more RPCs were made when opening the messaging
menu.

This commit fixes the issue by throttling and batching the RPCs.
To do so, instead of letting the channel model handle the RPC
`channel_fetched`, the mail service now handles it. This has
the advantage to throttle the RPC globally and to batch the
requests to notify that messages have been received on channels.

closes odoo/odoo#31026
2019-02-12 14:38:32 +00:00
Jeremy Kersten 055ca53c20 [FIX] website_forum: fix traceback where answer is not set
+ add button Comment lost during forum conversion to bs4
+ fix typo t/a
2019-02-12 16:46:31 +01:00
Nicolas Seinlet b90fcdb162 [FIX] sale: avoid false positives in reconciliation match
- ILIKE and other regex operators are not appropriate for the
  comparison, as we need an exact substring match.
  Using POSITION() and looking for position != 0 gives the expected behavior.
- Addiionally, regex operator ~  is not available in PostgreSQL 9.x
- Add regression tests

Closes #30720
2019-02-12 15:56:59 +01:00
Nicolas Martinelli f45609d76b [FIX] hr_expense: multi-currency
- Set your company to USD
- Create an expense in EUR:
  Amount: 100
  Tax: 15% Excluded
- Validate, post the journal entries

It crashes because of a missing `.id`, but on top of that... not a
single AML is correct.

opw-1938570

Fwd-port of ab06e9cad36d7398de709d6a6c994cbbeb7737f4
2019-02-12 15:50:01 +01:00
Christophe Simonis 93d736e905 [MERGE] forward port branch 12.0 up to 6e8dff1952 2019-02-11 16:17:02 +01:00
Christophe Simonis 6e8dff1952 [FIX] purchase: correctly extract date from datetime
Oversight of previous forward-port
2019-02-11 14:23:33 +01:00
Christophe Simonis 75eec26da3 [MERGE] forward port branch saas-11.3 up to 728bb2a28e 2019-02-11 12:47:52 +01:00
Pierre Masereel 4de183a966 [FIX] iap: logo svg text
The IAP logo is an svg file, and contains a text tags with font
specified in it. It leads to wrong display in some browser and/or
operating systems when the font is not installed.

To avoid this wrong display we changed the text into a path in the svg.

closes odoo/odoo#30995
2019-02-11 08:44:38 +00:00
Odoo Translation Bot 56c39dd784 [I18N] Update translation terms from Transifex 2019-02-10 06:03:40 +01:00
Christophe Simonis 728bb2a28e [MERGE] forward port branch 11.0 up to 9553240adc 2019-02-08 19:19:57 +01:00
Christophe Simonis 9553240adc [MERGE] forward port branch saas-15 up to 9773be345e 2019-02-08 16:53:11 +01:00
Florent de Labarre d260c53d12 [FIX] l10n_fr_fec: wrong formatting
The exported CSV contains unexpected `b` characters.

opw-1937282

closes odoo/odoo#30838
2019-02-08 13:33:03 +00:00
Thibault Delavallée cc3ca63544 [FIX] sale: fix wording of link when sending a quotation by email
Since commit 34c47eecd3 wording of link when
sending a quotation by email is broken. Indeed has document in draft is
not correctly considered as having to be signed and/or paid the link is
not labelled correctly.

This commit fixes it. Parameter is also renamed to be more understandable.
This commit is linked to task ID 1910532 and PR #29849 .

closes odoo/odoo#30953
2019-02-08 12:49:03 +00:00
Hetal Dhanak ef61713418 [IMP] sales: make sign and pay in portal a continuous flow
Purpose of this commit is to make a single flow to sign and pay in the
customer portal. When having signed its document popup for payment is
automatically opened.

This is much better for usability and avoid to have orders being signed
and not paid because the customer did not see it was still to be paid.

This commit is related to task ID 1910532 and PR #29849 .
2019-02-08 12:48:54 +00:00
Christophe Simonis 9773be345e [MERGE] forward port branch saas-14 up to 18228f9c4e 2019-02-08 13:28:46 +01:00
Christophe Simonis 18228f9c4e [MERGE] forward port branch 10.0 up to be689c53c1 2019-02-08 11:40:01 +01:00
Martin Trigaux b6d62f8ce3 [FIX] mail: translate activity name
This commit fixes two untranslated terms in the activity view.
From the cohort view, when clicking on a cell to see details, the title was not
translated (missing _t call).

The content was not translated either as the language was not present in the
context.
36d45175b0 was a first step to fix it but while self.record contained data,
self.record.getContext() returns an empty dictionnary (no context is set in the
cohort view).

When computing the context, check that it is not empty, otherwise, fallback on
the session context.

opw-1936855

closes odoo/odoo#30942
2019-02-08 05:34:44 +00:00
Humberto Arocha 785e5f149c [FIX] account: Reconciling multi-currency lines with fx difference
journal items does not create Tax Cash Basis Journal Entries.
[IMP] Test Case for Fully reconciling multi-currency lines and one or
more are Exchange Rate Differences which are not creating Tax Cash
Basis Journal Entries if there were any Taxed line.

Main
-

Tax Cash Basis Journal Entry creation shall not be prompted by the
reconciliation of exchange rate difference journal items.

Explanation
-

    Company's Currency EUR

    Having issued an invoice at date Nov-21-2018 as:

    Accounts         Amount Currency         Debit(EUR)       Credit(EUR)
    ---------------------------------------------------------------------
    Expenses            5,301.00 USD         106,841.65              0.00
    Taxes                 848.16 USD          17,094.66              0.00
        Payables       -6,149.16 USD               0.00        123,936.31

    On Dec-20-2018 user issues an FX Journal Entry as:

    Accounts         Amount Currency         Debit(EUR)       Credit(EUR)
    ---------------------------------------------------------------------
    Payables                0.00 USD             167.86             0.00
        FX Gains            0.00 USD               0.00           167.86

    On Same day user records a payment for:

    Accounts         Amount Currency         Debit(EUR)       Credit(EUR)
    ---------------------------------------------------------------------
    Payables            6,149.16 USD         123,768.45              0.00
        Bank           -6,149.16 USD               0.00        123,768.45

    And then reconciles the Payables Items which shall render only one Tax
    Cash Basis Journal Entry because of the actual payment, i.e.
    amount_currency != 0:

    Accounts         Amount Currency         Debit(EUR)       Credit(EUR)
    ---------------------------------------------------------------------
    Tax Base Acc.           0.00 USD         106,841.65              0.00
        Tax Base Acc.       0.00 USD               0.00        106,841.65
    Creditable Taxes      848.16 USD          17,094.66              0.00
        Taxes            -848.16 USD               0.00         17,094.66

closes odoo/odoo#30130
2019-02-08 18:24:39 +00:00
Odoo Translation Bot 1bec017c15 [I18N] Update translation terms from Transifex 2019-02-10 01:32:20 +01:00
Nans Lefebvre 8d5c76cc95 [FIX] purchase: use the vendor currency as default currency for vendor bills
Create a new vendor bill.
Choose a vendor with a "supplier currency" different from the company default.
The currency on the vendor bill does not change to the currency of the vendor,
unlike when a purchase order is created.

We set the currency in the partner_id onchange.

opw 1932683

closes odoo/odoo#30961
2019-02-08 15:30:58 +00:00
Nans Lefebvre 3da19480b2 [FIX] calendar: do not try to read virtual ids from database
Try to access a recurring event.
The _search function defined in mail_message tries to read records,
building a list of ids.
They are given to the _search of calendar, which builds its custom SQL query
using the data it received.
Since it got recurring ids instead of real ones, we get:
SELECT id, ("calendar_event"."id" in (101,'101-2019011118000...
Bug introduced in f74f5edc77.

If we get such a request, we convert the virtual ids back to real ids.
Note that a similar conversion was done in calendar's override of "mail.message"
_search method, 'in the case it was asked on virtual ids'.

Note that as of this commit making messages on virtual_ids doesn't even work,
so it is possible that this mess was introduced for the chatter feature,
which has been broken before, and so all of it is useless.

closes #27474
closes #28288
closes #28621
opw 1928562
opw 1930763
opw 1935148

closes odoo/odoo#30827
2019-02-08 13:45:02 +00:00
Nicolas Martinelli afc5ec8bdf [FIX] mrp: cost and attributes
When retrieving the BOM lines in `_get_bom_lines`, we check the product
attribute values to know if the BOM line should be taken into account or
not. However, we do not do such a check when we retrieve the price in
`_get_price`.

It can lead to an inconsistency between the sub-lines displayed and the
total price.

We need to apply the same filtering logic when getting the price.

opw-1932437

closes odoo/odoo#30917
2019-02-08 13:49:49 +00:00
Martin Trigaux 288b5e3a41 [FIX] website_theme: translate website themes
Inspired by l10n_multilang
When a theme is installed, the theme.* records are used to generate actual records.
The same was as we use account.account.template to create account.account, the
translations of  the theme records should be propagated to the new records.

opw-1918120

closes odoo/odoo#29748
2019-02-08 12:27:15 +00:00
Hetashree Chauhan 6c099e9d21 [IMP] l10n_cr: switch account.account.template creation in csv
data creation is faster when done through a CSV file compared to an XML file. Hence doing it through a CSV

This commit is related to task_id : 1909961.

closes odoo/odoo#28900
2019-02-08 08:10:49 +00:00
Hetashree Chauhan 5ef7db8c3c [IMP] l10n_hk: switch account.account.template creation in csv
data creation is faster when done through a CSV file compared to an XML file. Hence doing it through a CSV

This commit is related to task_id : 1909961.

closes odoo/odoo#28895
2019-02-08 07:25:46 +00:00
Lucas Perais (lpe) 79d8aef2a1 [FIX] calendar: notification widget new API
Before this commit, when having a calendar notification, the buttons to snooze/cancel
This was because the API of the widget notification changed with 07cd24b1ec
The widget "text" has been changed to "message"

After this commit, the buttons are present and work

OPW 1923132

closes odoo/odoo#30946
2019-02-08 09:52:47 +00:00
Alex Tuyls d9f9d32f4e [FIX] sale_mrp: incorrect search of BOM in multicompany
In following configuration:
- We have two companies: A and B
- We have a shared product X
- We set a BOM of type KIT for this product X for company B only (the field company on a BOM is mandatory)
- We set no BOM for product X for company A because in company A we sell the product as a regular product

When we sell product X in company A, as a normal stockable product, the invoicing behavior is the same as
when we would sell KIT products. This is because we don't check the SO company when searching the associated
BOM.

closes odoo/odoo#30927
2019-02-07 14:14:37 +00:00
Nans Lefebvre f5107b10f5 [FIX] mrp: fix singleton error in _update_raw_move
Commit bfb0f1e2a5
did a very good job not seeing that the lines only used move[0],
and called move.field directly.
This could result, for certain BoMs, in traceback.

opw 1928677

closes odoo/odoo#30938
2019-02-07 21:45:32 +00:00
Lucas Perais (lpe) b5c7099b95 [FIX] website_event[_track]: create menus on create
Before this commit, the website menus were created only on write on an event

After this commit, the menus are created at create time too

OPW 1914343

closes odoo/odoo#30919
2019-02-07 13:43:00 +00:00
Hetashree Chauhan bb0eccd263 [IMP] l10n_generic_coa: switch account.account.template creation in csv
data creation is faster when done through a CSV file compared to an XML file. Hence doing it through a CSV

This commit is related to task_id : 1909961.

closes odoo/odoo#28909
2019-02-08 08:19:33 +00:00