Commit Graph
117281 Commits
Author SHA1 Message Date
David Beguin f20cd3db75 [FIX] hr_attendance : kiosk mode multi scanning
- Scan a barcode for employee 1 in kiosk mode
- At greetings message, scan a barcode for employee 2

2 attendance entries are created for employee 2 instead of 1.

When scanning the barcode for employee 2, the event listener
`_onBarcodeScanned` is still active on `KioskMode`. Therefore, the RPC
call to `attendance_scan` is performed twice.

We deactivate the event listener after scanning, and reactivate on
`KioskMode` only if there is an issue. This is sufficient since the call
to `do_action` in `GreetingMessage` will create another instance of the
client action. In `GreetingMessage`, we add back the redirection to
`KioskMode`.

Co-authored-by: Nicolas Martinelli <nim@odoo.com>

Linked to Task ID 1878251
opw-1878632
opw-1888402

closes odoo/odoo#28150
2018-10-31 14:35:27 +00:00
Nicolas Martinelli edb648f6a1 [FIX] website_sale_delivery: allow hook at price update
A hook is necessary for a price update when TaxCloud is used.

opw-1894511

closes odoo/odoo#28281
2018-10-30 09:29:53 +00:00
Christophe Simonis a587325ca7 [MERGE] forward port branch saas-15 up to 00829a0beb 2018-10-31 18:31:53 +01:00
Christophe Simonis 00829a0beb [MERGE] forward port branch saas-14 up to c552e368b3 2018-10-31 17:58:05 +01:00
Christophe Simonis c552e368b3 [MERGE] forward port branch 10.0 up to 93d69933ac 2018-10-31 17:23:32 +01:00
Goffin Simon e2db39e96b Revert "(FIX] account: Impossible to make a partial credit note"
This reverts commit bb939ffac0.

closes odoo/odoo#28321
2018-10-31 14:48:14 +00:00
len-odoo 180f528528 [FIX] web: reload many2one data if the context has changed
When a view is loaded, it checks which fields it has to load.
In the case of a many2one, it could be the case that a context key is present in
one view and not in the other; if it happens, we should reload the data, as a
name_get result could vary.

opw 1891295

closes odoo/odoo#28298
2018-10-31 12:52:36 +00:00
Goffin Simon 93d69933ac [FIX] stock: Wrong production/scrap/adjustment location used in multicompany
- When using perpetual inventory valuation, the accounts used for scrap, manufacturing,
and inventory adjustment operations are set on the corresponding locations .
- In a multicompany environment, you will have a separate chart of accounts for each company.
- Account fields on locations are not property fields.
- Therefore, in order to separate the accounting of manufacturing, scrap, and inventory
adjustment operations, you must use a location for each operation for each company.
- Set up one location for each company for scrap, production, and adjustment
locations, setting the company field on each.

Bug:
- When attempting to create a MO, inventory adjustment, or scrap order while signed
in to the second company, you will receive a permissions error on stock.location.

Fix:
- Now the right location is taken according to the company of the user.

Backport of this commit: c7526407ab

opw:1817339
2018-10-31 11:51:09 +01:00
Olivier Dony 9cc8a8d0a4 [FIX] reqs: bump up recommended requests version
In light of CVE-2018-18074, using python-requests 2.20.0 is recommended,
or any distribution-specific version that was patched.

See also https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-18074
2018-10-30 18:49:35 +01:00
Martin Trigaux 214975911b [FIX] l10n_ro: fix xml syntax 2018-10-30 18:28:00 +01:00
Duc Dao f978722503 [IMP] l10n_vn: fix syntax and allow reconcilation
for accounts 3341, 3348, 141, 1388, 3388
2018-10-30 18:24:15 +01:00
Olivier Colson d9448d7389 [IMP] l10n_ch: also detect postal account type when using the shorten form with -
This shorten form is aa-bbb-x. The a characters are the first two digits of the number, x is the mod10r verification digit, and b characters consist of all the intermediate digits, without the leading 0s. The chain of b characters' length can range between 1 and 6 characters.
2018-10-30 16:46:55 +01:00
Rémi Rahir a219bdb85e [FIX] web: consider correct viewtype when loading data
Before this commit, when loading the data and calling the prostprocess,
the viewType was not correctly passed which could lead to broken
behaviour. For example, if one was to load a record from a list view
embedded in a form view, the viewtype passed was the list which
prevented to load the data from the form view.

OPW 1891295

closes odoo/odoo#28279
2018-10-30 09:24:39 +00:00
Julien (juc) Castiaux 854208370c [FIX] web: creating a record in a grouped empty kanban view crash
When creating a record in a grouped kanban view, it tries to add
the record to the first column but if no column exist, it fails
to find the first one and raise an exception.

This PR correct that bevahior by checking it exists a column and
fallback to the view form when it does not.

opw-1902851

closes odoo/odoo#28262
2018-10-30 07:17:40 +00:00
Alexandre Kühn 91dfb15c3c [FIX] mail: mark as read only when accessing to chatter
Backport of 17bb0ca443

Before this commit, the user could not receive any notification
from the chatter of a document when having Notification Management
set to "Handle with Odoo".

This problem occurs when the user opens (or has opened) the document.
Any messages received from the document are automatically marked
as read, so it removes the notification right after receiving it.

In order to no longer have this issue, the user had to reload all
pages that have opened this document.

This commit slightly changes the behaviour of the chatter, so that
it automatically marks it as read only when accessing the document,
but not when the document is open (or has been opened). Consequently,
if the user has opened the document and then receives a notification
from this document, it won't automatically mark it as read.

Task-ID 1895359

opw-1890556

closes odoo/odoo#28113
2018-10-29 17:52:05 +00:00
Raphael Collet 1ca1918a45 [FIX] base: subscribe new API onchange methods for module fields
Adapt the code to use the new API for onchange methods.  This fixes onchanges
for version 11.0, since support of old-API onchange is actually gone.
2018-10-29 14:51:42 +01:00
Christophe Simonis 953dfe92c2 [MERGE] forward port branch saas-14 up to b4e310e7f6 2018-10-29 14:08:08 +01:00
len-odoo b4e310e7f6 [FIX] website_links: do not require flash to copy text to clipboard
The "copy link" to clipboard button ancestrally used a flash (.swf) dependency
(ZeroClipboard) to work.
Since Odoo honours its history, it was still there.
However on Firefox you are asked to activate flash to make it work,
and on Chrome nothing happens.
We get rid of this shibboleth, using instead clipboard.js that is already used
elswhere for the same purpose.

closes #27958
opw 1896509
2018-10-29 13:56:41 +01:00
Christophe Simonis d692f3b781 [MERGE] forward port branch saas-14 up to 1916fdc1d0 2018-10-29 13:46:47 +01:00
Christophe Simonis 1916fdc1d0 [MERGE] forward port branch 10.0 up to ac08e2ba53 2018-10-29 12:27:14 +01:00
Olivier Colson ac08e2ba53 [FIX] mail: display both tracking values and body of the messages in mail thread
Before that, the body of the message was never displayed if the message had tracking values. This was annoying for account_asset module, were we prompt the user for some justification when she modifies the depreciation data of an asset, and then call message_post with this text as body, and tracking values reflecting the change that was made.
2018-10-26 11:37:52 +02:00
Josse Colpaert 9647620a91 [FIX] mrp: workorders of sub-BOMs
- Create the following BOM structure:
```
  Prod 1 (Manufacture)
  |
  --- Prod 2
      Prod 3 (Kit)
      |
      --- Prod 4
	  Prod 5
```
- The BOMs for Prod 1 & 3 must have a routing set, to generate
  workorders
- Create a MO for 1 unit of Prod 1, process to the end

2 units of Prod 1 are created instead of 1.

This is due to the WO for Prod 3 not having a `next_work_order_id`.
Therefore, `record_production` adds an extra quantity at:
```
production_move.quantity_done += self.qty_producing
```

To prevent this, we set as `next_work_order_id` of the BOM of Prod 3 the
WO of Prod 1.

Closes #19527
opw-1817398
opw-1883693
2018-10-25 14:58:43 +02:00
Gert Pellin 299c6dd3b4 [FIX] point_of_sale: alignment note textarea
before fix:
in firefox the textarea of note modal has a overflow
textarea can be expanded outside borders modal in all browsers

closes #25199
closes #25215

issue 1895298
2018-10-25 13:22:02 +02:00
Martin Trigaux bfbaa09268 [FIX] hr_attendance: allow multiple attendances
If the search returns more than one result, the rendering of the message would
crash (SingletonError when accessing check_in field value).

Use the same order and limit as both search before and after

Courtesy of David Tran

Closes odoo/odoo#28055
2018-10-25 11:49:15 +02:00
Gert Pellin 8e63bcb47c [FIX] point_of_sale: IoT https in pos
before this fix it was not possible to connect to the pos/iot-box using
https on the pos. By checking if the pos is http or https this is now
possible after accepting the certificate.
if https scanning for proxy is disabled, the user should always give a
    ip in the configuration
2018-10-25 11:33:32 +02:00
xmo-odoo 71cb425d00 [FIX] doc: translator under Sphinx 1.5
In Sphinx 1.5 (fairly specifically), the warner thing takes a `type` kw,
and building the doc blows up if that parameter is not provided.
2018-10-25 11:08:35 +02:00
Luis Guzman d6a074b832 [CLA] signature for Ark74
Closes #28126
2018-10-25 08:46:48 +02:00
Anil Kesariya 5f44f9a843 [CLA] signature for AnilKesariya
Closes odoo/odoo#27024
2018-10-24 16:26:58 +02:00
Marius Žilėnas 3f89774ed0 [FIX] cli: fix broken link
The master file no longer exists

Closes odoo/odoo#26623
2018-10-24 16:15:02 +02:00
Christophe Simonis da08a9e986 [FIX] base: don't ignore new uninstallable modules
When updating the module list (`ir.module.module.update_list()`), new
modules that are not installable were ignored.
This behavior was not consistent with the database initialization [1]
which creates all modules.

[1] https://github.com/odoo/odoo/blob/5d932e5db164fe80fd7c011ddd53f3494ef89ef5/odoo/modules/db.py#L51-L54
2018-10-24 15:36:55 +02:00
Christophe Simonis bff43f0aa1 [MERGE] forward port branch saas-14 up to 29e36457b2 2018-10-24 14:19:44 +02:00
Christophe Simonis 29e36457b2 [FIX] account: don't enforce test journal currency
It was causing some tests failure due to 22f0da809e
2018-10-24 11:57:42 +02:00
Julien (juc) Castiaux 5d932e5db1 [FIX] delivery: wrong currency conversion
In a multi-currency company, the delivery price of a quotation was
wrongly converted when the currency used by the pricelist was not
the same as the currency used by the company.

This PR correct that behavior by correcly compute the delivery
price according to the pricelist currency.

To reproduce:
1) Install the accounting, sales and delivery modules
2) Set the company as a multi-currency company in the accounting
   settings
3) Change the currency rate so the one used by the company is 1
   and the other one (the one that will be used on the pricelist)
   is anything else than 1
4) Create a pricelist with that other currency
5) Create a quotation using the new pricelist, select a deliver
6) Click "Set Price", the delivery price shown on the form isn't
   the same as the price on the quotation.

opw-1894422
2018-10-24 11:55:32 +02:00
Pedro M. Baeza c0e35f84e2 [FIX] migration: use correct migration prefix in docstring
Migration files must contain `-` in its name for being executed
2018-10-23 18:43:59 +02:00
Christophe Simonis 416ed10b7b [MERGE] forward port branch saas-14 up to ce2eb8464b 2018-10-23 18:04:26 +02:00
Christophe Simonis ce2eb8464b [MERGE] forward port branch 10.0 up to d5cc05c994 2018-10-23 18:02:45 +02:00
Martin Trigaux d5cc05c994 [FIX] doc: correct reference to the line in the file
Introduced at 94e82753ac
2018-10-23 16:17:58 +02:00
Martin Trigaux a0050c323c [FIX] doc: backport of ac37ca39ea to 10.0
To be compatible with sphinx >= 1.8
2018-10-23 16:17:58 +02:00
Martin Trigaux 27cc2ae3a9 [FIX] doc: backport of 9a07a4599c to 10.0
To be compatible with sphinx >= 1.6
2018-10-23 16:17:58 +02:00
Romain Derie ef48b81ab1 [FIX] website_sale: prevent other sessions to crash after checkout
Before this commit:
If an user has multiple session on a database (eg: he is connected both on his
smartphone and his laptop on the ecommerce), and there is a cart in these
session, confirming the cart on one of the session will make other sessions
unable to use the checkout anymore.

This is because other sessions will still contains the Sale Order that is now
'sent' and updating the cart will raise an error:
`It is forbidden to modify a sales order which is not in draft status.`

Now:
If the SO to be updated is not in `draft` anymore, we create a new one.

Step to reproduce:
  - Login on ecommerce from device A
  - Add product in cart, the SO will be added on session
  - Login on ecommerce from device B
  - Pay the cart (it will retrieve the SO from device A)
  - At that point, the cart is paid and the SO is removed from session on
    device B but other devices won't be able to use the checkout anymore
    as they still have the SO in session which is in `sent` state.
    Thus, any action on cart will raise the error

Note:
1. We can't implement that behavior in `sale_get_order()` as it is supposed to
   return SO in `sent` state after checkout.
2. We can't implement that behavior in `_cart_update()` as it is inherited in
   some module. Thus, implementing that behavior in `cart_update()` would change
   `self = order` but inherited methods would still have initial `self`.
3. Implementing the behavior in the controller it is already done (differently)
   in `cart_update_json()`.

Fixes #27508, closes #27794
2018-10-23 15:58:48 +02:00
Martin Trigaux 1ee180ee0d [FIX] doc: do not duplicate header
And use tabs instead of spaces
Otherwise it looks for the file named "__manifest__.py 2014-..."
2018-10-23 15:47:12 +02:00
Julien (juc) Castiaux 3008f7d254 [FIX] point_of_sale: Button spamming create duplicates
Spamming the save button when creating a new custommer in point-
of-sale create duplicate users. This PR disable the button once
clicked and re-enable it when all the processing is done.

opw-1895302

close #23919
2018-10-23 12:56:44 +02:00
Akim Juillerat b4ca8d0bc6 [FIX] website: Add onchange language_ids on website model
On res.config.settings for website, when removing a language from language_ids, if this language is defined as default_lang_id, the default language will be updated by an onchange to prevent any inconsistency.
The same should happen when doing this directly on the form view of a website record.

closes odoo/odoo#27727
2018-10-19 13:58:42 +00:00
Rémi Rahir 9e5126d22f [IMP] iap: Update documentation with new functionalities
closes odoo/odoo#28282
2018-10-30 10:08:37 +00:00
Christophe Simonis ee0ff262f0 [MERGE] forward port branch saas-15 up to 953dfe92c2
closes odoo/odoo#28255
2018-10-29 14:16:45 +00:00
Julien (juc) Castiaux c5dc0b2f39 [FIX] mail: spam the send button create multiple messages
Spamming the "send" button on the chatter send multiple times the
same message. This PR simply disable the send button to fordib the
spam.

opw-1895511

closes #27233

closes odoo/odoo#28078
2018-10-26 09:29:57 +00:00
Goffin Simon bb939ffac0 (FIX] account: Impossible to make a partial credit note
Steps to reproduce the bug:

- Create a credit note for an amount of 100$
- Validate it and register a payment
- Let's pay an amount of 90$ and mark this credit note as fully paid

Bug:

An error message was raised saying: Wrong credit or debit value in accounting entry !

The field residual_company_signed must be positive for out_invoice and in_refund and
negative for in_invoice and out_refund. In this way, the correct writeoff amount
can be computed in function _create_payment_entry.

PS: In function _compute_payment_amount, the field residual_signed and residual_company_signed
are already signed, that's why it was wrong to multiply a second time on it with MAP_INVOICE_TYPE_PAYMENT_SIGN

opw:1893570

closes odoo/odoo#28148
2018-10-29 07:09:15 +00:00
Odoo Translation Bot 19d8adbce1 [I18N] Update translation terms from Transifex 2018-10-28 03:21:03 +01:00
Robot Odoo e18ed24c07 [MERGE][FIX] base_vat_autocomplete: add missing attrs
VAT number should be readonly when parent_id is set
This is already what is done in base.view_partner_form and
base.view_partner_short_form

closes odoo/odoo#28190
2018-10-26 19:52:23 +02:00
Cas Vissers ca52c6c3a0 [FIX] base_vat_autocomplete: add missing attrs
VAT number should be readonly when parent_id is set
This is already what is done in base.view_partner_form and
base.view_partner_short_form
2018-10-26 12:09:12 +00:00