Commit Graph
117156 Commits
Author SHA1 Message Date
hpr-odoo ce05f3b2e0 [FIX] base: iterate on each report
If tries to compute the report_rml value on multiple reports at the same time

Closes #21116
2018-03-21 11:01:16 +01:00
Nicolas Martinelli 65bad81b2c [FIX] stock: Delivery Slip
- Create a picking to deliver 10 units, save
- Edit and change to 12 units
- Print the Delivery Slip => the qty is 10
- Validate the picking with 12 units
- Print the Delivery Slip => the qty is still 10

The use of `ordered_qty` is misleading, since it corresponds to the qty
ordered at creation.

Backport of 0a2999cdd9

opw-1825396
2018-03-21 11:00:36 +01:00
Nicolas Martinelli b200f020ea [FIX] crm: create opportunity from kanban
- Create a customer, set an address
- Create an opportunity from the kanban view

The address fields are not filled in in the opportunity.

We add all fields filled in by `_onchange_partner_id_values`

Complement of commit e2bbee6df5

opw-1816438
opw-1826859
2018-03-21 10:46:03 +01:00
Rohan Patel 57e457c524 [IMP] hr: check employees only alias restriction independently of record existence
Commit 78ac6de52d refactored methods checking alias security on the
routing found for a given destination address. Indeed if a routing is found
linked to an alias a security check is performed according to the restriction
defined on the alias itself.

HR module adds the 'employees only' restriction. A bug has been introduced
in the mentioned commit concerning employees-based aliases. Indeed a condition
on having a recordset has been added (self.ids, changed to record.ids at
20d8025036). This condition is actually not necessary as checking the
email author is linked to an existing employee has nothing to do with the
alias being linked to a record or creating new record.

This may causes issues notably using employees-restricted aliases in
expense application. Indeed you could use aliases to create new expenses
for employees and you could have issues with this condition.

This commit is linked to task ID 1829860 and ID 35093. Closes #22960 .
2018-03-21 10:44:20 +01:00
Goffin Simon 60793a8a48 [FIX] stock_account: Cannot validate a Customer Credit
Steps to reproduce the bug:

- Create a customer credit note
- Add a new item
- Don't input Product, input Description and Unit of Measure
- Click on Validate

Bug:

A traceback was raised because no product was set on the invoice line.

opw:1825972
2018-03-21 09:30:04 +01:00
Nicolas Martinelli 6d195ee603 [FIX] account: unreconcile payment
- Create a SO for a customer of 100 $
- Create Invoice for the Sales Order and Register the payment
- Create a Refund Invoice, Validate it and keep it in "Open" state
- Create a second SO for 5 $
- Create an invoice for this order and validate it
- It will show you outstanding payments
- Apply the credit and the invoice will be fulfilled => Now you have a
  credit left for 95 $
- Create a third Sales order for the same customer for 5 $
- Create an Invoice for it
- It will show you outstanding credit (95 $)
- Apply the credits
- Now 90 $ are left
- In the same invoice, the credit which you applied, Unreconcile it
- It should have shown you 95 $, but it shows you 100 $ which means it
  removed the credit which we applied to second SO

The unreconcile process does not filter the partial reconciliations of
the selected invoice. All partial reconciliations on the AML are
removed instead.

opw-1819602
2018-03-21 08:37:23 +01:00
Adrien Dieudonne 3a74afd21e [FIX] barcodes: barcode scanning on Chrome mobile
Before this commit, the barcode value wasn't triggered on
some Android devices with Google Chrome and using the Odoo app.

In fact, the keypress event may not trigger with some devices.
This is probably due to the fact that this event is marked as
'Legacy'.
See: https://www.w3.org/TR/uievents/#legacy-keyboardevent-event-types

To fix this, we can use 'keydown' event but we have to handle an
other issue: there is no way to know which key is typed.
The auto-suggest feature on Android invalidate all the following
properties: Keycode, charCode, key, which, keyIdentifier, code.
This is a well-known issue:
https://bugs.chromium.org/p/chromium/issues/detail?id=118639

For more infos, please read this blog:
https://www.outsystems.com/blog/javascript-events-unmasked-how-to-create-input-mask-for-mobile.html

As a work around, we create a temporary input field that stores
the barcode value.
The focus is set on this input when a keydown is detected.
Note that when an input has the focus, the android virtual keyboard
will be opened. We can't avoid this behavior.
The only thing we can do is to automatically close it after 800 ms.
See: https://bugs.chromium.org/p/chromium/issues/detail?id=662386

As this fix is specific for Chrome only, it's not possible
to test it easily. Some tests will be added in master.
2018-03-20 16:21:20 +01:00
Adrien Dieudonne 5bc29744c9 [FIX] barcodes: skip undefined keys in barcode value
This fixes an issue occurring with Firefox.
Some events was buffered with an undefined value and it wasn't
possible to build the barcode value from these events.
See 'handle_buffered_keys' function.

So now, we simply skip this kind of event.
We consider this as 'special keys'.
2018-03-20 16:21:12 +01:00
Nikunj Ladava cbd395ec36 [IMP] payment, sale_payment: set invoice id in payment transaction form after payment being done from sale order.
Until now invoice_id is filled on the transaction only when we make
payments through invoice. However if we make payments through sale order
then invoice_id is not filled.

This commit fixes that issue. As there is no common point between
sale_payment and account_payment except payment, a void method is added
in payment and an override done in account_payment. That was when both
modules are installed code is correctly triggered.

This commit is related to task ID 1813602. Closes #22746 .
2018-03-20 16:16:27 +01:00
Christophe Simonis b6e0f1ad59 [FIX] sale,sale_payment: remove implicit dependency of sale on payment module
This worked by accident only because `payment` module is auto-installed
when `account` is installed.

opw-1829812
2018-03-20 15:28:24 +01:00
Romain Derie b77ff40e93 [FIX] website_sale(_delivery): show prices according to B2B/B2C mode
Before this commit:
1. The delivery price on checkout would always be shown without the taxes.
   This would make the cart total unclear since it is not indicated that this
   price is tax excluded. You could only assume that this was the price the
   delivery would cost you (and not just the untaxed delivery cost which you
   can't even find the full price anyway since taxes in subtotal is the sum of
   all products taxes).

2. The sale order line in payment step of checkout are always displayed with
   taxes.

Now:
We ensure that both 1. and 2. show the delivery price with or without taxes
according to which mode (B2C or B2B) is enabled.

This fixes #12872, closes #13592 and closes #23746
2018-03-20 14:29:59 +01:00
Martin Geubelle 75d9a2b4db [FIX] web: correctly display statusbar
Some status were shown in the statusbar even though they were not specified in
the `statusbar_visible` attribute. This happened when the value was a substring
of one specified value.

Example:
```
hello = fields.Selection([('hello', 'Hello'), ('hello_world', 'Hello World')])
<field name='hello' widget='statusbar' statusbar_visible='hello_world'/>
```
In this case, both status were shown ('hello' is a substring of 'hello_world').

Fixes #20034
2018-03-20 13:49:32 +01:00
Jairo Llopis 6bd3bae04e [FIX] mass_mailing: domain translation
As Admin:
- Set up 2 languages for the installation, e.g. English and French
- Admin language is English, Demo language is French
- Create a `res.partner.category` named 'Test English'
- Assign the category to a newly created partner
- Create a French translation for 'Test English', e.g. 'Test Francais'

As Demo:
- Create a Mass Mailing
- Select a custom domain: ('category_id', '=', 'Test Francais') => it
  should match one partner
- Save and validate

Now either:
- manually run the scheduled action "Process Mass Mailing Queue" as
  Admin
- wait for the cron to process the mass mailing

No mail will be sent since the domain will be evaluated in the Admin
language, i.e. English. Indeed, the domain
`('category_id', '=', 'Test Francais')` does not match any record in
English.

The solution/workaround is to use the language of the last user who wrote
on the mass mailing.

Closes #20906, Closes #15467, Closes #15445

opw-778922
2018-03-20 13:48:49 +01:00
Nicolas Lempereur 3f5663e995 [FIX] l10n_ch: ignore stylistic background
If user choose custom report type with background, we don't want the
background on the ISR report that is intended to be printed on
preprinted paper.

opw-1820123
closes #23743
2018-03-20 13:47:15 +01:00
jem-odoo 84db2dc9d4 [FIX] sale_timesheet: SO line of subtasks
When changing the so line of a task, we should update
the ones from its children too.
2018-03-20 13:32:19 +01:00
jem-odoo 45396f7966 [FIX] sale_timesheet: default so line for subtasks
When creating a task in a project generated from
an SO line, we want this to be linked to that
sale line too.
When creating a subtask, the sale line is forced
to be the one of the parent, in `create` method.
But we want to see it on the form view.
2018-03-20 13:32:19 +01:00
Goffin Simon f50a08bc3d [FIX] sale: Wrong display of taxes in PRO-FORMA
Steps to reproduce the bug:

-Create a tax of 21% tax included but don't select the "affect base" checkbox.
-Create another tax of 5.2% (no tax include)
-Create a sale order with a line that has a unit price of 121 and both taxes.
Notice that the total amount is: 126.2 (100 base amount + 21 from 21% tax + 5.2 from 5.2 tax)
-Click on "Print the proforma invoice"

Bug:

The total amount was still 126.2 and base=100, however taxes were wrong, there were 21 for the 21% tax
and 6.29 instead of 5.2 for the 5.2 tax.

opw:1819882
2018-03-20 13:27:50 +01:00
Christophe Matthieu c077ed8866 [FIX] account: reconcile all the balanced items (when there is a pager)
Error when using CTRL-Enter to reconcile

opw-1816574
2018-03-20 11:57:58 +01:00
Martin Trigaux f51d213f43 [FIX] mail: rendering of mail template in Chinese
Bad translation was causing the rendering to fail
Probably fixes #23430
2018-03-20 11:51:42 +01:00
Goffin Simon c3b49b3a5f [FIX] mass_mailing: domain translation
As Admin:
- Set up 2 languages for the installation, e.g. English and French
- Admin language is English, Demo language is French
- Create a `res.partner.category` named 'Test English'
- Assign the category to a newly created partner
- Create a French translation for 'Test English', e.g. 'Test Francais'

As Demo:
- Create a Mass Mailing
- Select a custom domain: ('category_id', '=', 'Test Francais') => it
  should match one partner
- Save and validate

Now either:
- manually run the scheduled action "Process Mass Mailing Queue" as
  Admin
- wait for the cron to process the mass mailing

No mail will be sent since the domain will be evaluated in the Admin
language, i.e. English. Indeed, the domain
`('category_id', '=', 'Test Francais')` does not match any record in
English.

The solution/workaround is to use the language of the last user who wrote
ont the mass mailing.

Closes #20906, Closes #15467, Closes #15445

opw-778922
2018-03-20 11:42:11 +01:00
Nicolas Martinelli 407b85e329 [FIX] product: default quantity on pricelist item
- Create a new pricelist for a new currency
- Set the 'Sale Price' option to 'A single sale price per product', so
  that the user cannot see the pricelist details
- Sell 0.5 unit of the product with the new pricelist

The pricelist is not correctly applied.

This is because the default minimum quantity is 1. Once the user is
selling less than 1 unit, the pricelist is not applied.

opw-1825353
2018-03-20 11:38:24 +01:00
Luis González 2835d29979 [FIX] web: Make top bar's menu items navigable when using the keyboard (#23732)
Sidebar's menu items are not currently reachable when using the
keyboard, because they are missing the attribute `href`, thus are not
indexed for tabbing navigation.

This change causes that attribute to be included, so the menu items are
reachable and navigable when using the keyboard.
2018-03-20 10:33:40 +01:00
Luis González baa1c515c5 [FIX] web: Add missing HTML attributes aria-* (#23752)
Some HTML attributes were missing, and are required to ensure good
compatibility with screen readers.

The following attributes are included:
- `aria-expanded`: this should be present in all dropdown menus
- `aria-label`: this should be present in all links and buttons which
  don't show text, but icons or images.
2018-03-20 10:29:17 +01:00
Christophe Matthieu ec199222c3 [FIX] web: ace: no duplicated char with composition (html/css editor)
Before this commit, there was an issue with input method using
composition in which typed characters were duplicated.
This was occuring until the composition ended.

This is a bug specific to Google Chrome v53+.
It has been fixed in the most recent version of ace.js [1],
and we just port the fix into our custom code.

Note that we do not simply import ace.js as a whole, because
we must update lots of custom code at the same time.
We plan to do so in the future.

Fixes #23629

[1] https://github.com/ajaxorg/ace/pull/3116
2018-03-20 09:44:10 +01:00
Nicolas Martinelli 4c692f1bb3 [FIX] website_project{_issue}: redirect from email
- Create a portal user
- Set an email address
- Create a project with tasks / issues
- Create a task / issue, set the portal user as follower => he should
  have access to the task from URL `/my/task/<id>`.
- On an email received (e.g. when the user is set as follower), click on
  'View Task'

The user is redirected to the chatter instead of `/my/task/<id>` or
`/my/issue/<id>`.

In method, `_redirect_to_record`, the record is browsed as `sudo`.
Therefore, in `get_access_action`, `self.env.user` is the admin.

We check the context to get the original user.

opw-1814577
2018-03-20 09:36:51 +01:00
Lucas Perais (lpe) d1dccd5130 [FIX] account_voucher: right domain on payment method
When creating a receipt with immediate payment:
Before this commit, the field payment method displayed all the journals bank or cash

After this commit, only journals made for receiving/sending payment (in function of the type of receipt)
are displayed

OPW 1819672

closes #23677
2018-03-20 09:06:11 +01:00
Nicolas Martinelli 2da8d41c02 [FIX] website_sale: required fields
- Go to eCommerce, add a product to the cart
- At address configuration, add a delivery address. Do not field the
  name or the phone

It is possible to save the address while the fields are mandatory.

opw-1827797
2018-03-20 08:57:52 +01:00
Christophe Simonis 672a275c7f [MERGE] forward port branch saas-15 up to 3d9a2340d9 2018-03-19 21:26:01 +01:00
Christophe Simonis 3d9a2340d9 [MERGE] forward port branch saas-14 up to e098276644 2018-03-19 19:51:33 +01:00
Christophe Simonis e098276644 [MERGE] forward port branch 10.0 up to da1f153d61 2018-03-19 19:32:55 +01:00
Christophe Simonis 4715d7e35a [MERGE] forward port branch saas-15 up to 0d55241185 2018-03-19 19:29:58 +01:00
Christophe Simonis 0d55241185 [MERGE] forward port branch saas-14 up to 82effcca83 2018-03-19 18:26:25 +01:00
Christophe Simonis 82effcca83 [MERGE] forward port branch 10.0 up to caf6b4a7c7 2018-03-19 18:25:41 +01:00
tbe-odoo da1f153d61 [IMP] http: Sessions implicit deactivation
- Store a token inside sessions to allow implicit session deactivation when needed.
2018-03-19 18:11:12 +01:00
Olivier Dony 284c5ba50d [FIX] account: make Journal Item company read-only
PR #16826 (rev fa3ff5b41a) added the
`company_id` field in the Journal Entry form.

Unfortunately that field was not marked read-only, so creating a move
would write to this field, triggering a useless and possibly very long
recomputation of many related fields based on the company of the
account. It must be read-only, its value solely driven by the value of
the account_id field.
2018-03-19 17:43:33 +01:00
jem-odoo 3ceae65669 [FIX] project_timesheet_holidays: fix tests due to DST
To avoid harcorded dates in this test, we use next
monday as starting date for leaves and timesheets.
But today (19/03/2018), next monday will be after
the daylight savings time, so resource module gives
one additionnal day with one hour to be worked, so
one more timesheet is generated and fails the test.
To avoid this, we are now hardcoded dates to a monday
(to avoid weekend and global leaves) and be sure the
number of working days will be 3.
2018-03-19 16:34:13 +00:00
Yoshi Tashiro caf6b4a7c7 [FIX] base: round JPY at unit's place
Rounding should be done at the unit's place for Japanese yen

Closes #23739
2018-03-19 17:08:08 +01:00
Andreas Perhab 444e2a4ed0 [FIX] doc: correct link to nodejs download
Closes #23733
2018-03-19 17:05:30 +01:00
Andreas Perhab 45faa90732 [CLA] signature for bigbear3001
Done at #23733
2018-03-19 17:05:29 +01:00
Martin Trigaux 1b5d0c3773 [FIX] account: hide Frenglish
Proper fix done in master at e81d922ef2
Workaround for stable version

Closes #22769
2018-03-19 16:59:18 +01:00
jem-odoo 622b70ee3e [FIX] purchase: wrong condition in mail template
Before checking the first element of
'partner_id.child_ids', rather check that
the partner and not the object has children,
to avoid crashes when the partner of the PO
is a company.
opw-1826359
2018-03-19 15:13:33 +00:00
Nicolas Martinelli d77d72092d [FIX] web_editor: fix typo
Closes #23738
2018-03-19 15:50:27 +01:00
Alexandre Kühn 71616e8d4f [FIX] web: pick correct menu item on hashchange
Before this commit, we had the following issue:

    1. install CRM and Sales
    2. Sales > Customers > (open any form)
    3. Click on browser's "back" button

We are redirected to the contact kanban view in CRM
instead of Sales.

This is due to the fact that both menu items share the
same action. When the user uses the browser's "back" button
(AKA. it triggers an hashchange event), the web_client opens
the first menu_item that matches the action.

This commit fixes the issue by allowing us to open an action
by providing a menu ID:

    1. If it matches the action, then it opens this menu
       instead of the first match.

    2. If we do not provide any menuID, or this menuID does
       not match with the action, it falls back to the first
       menu matching this action.

Fixes #23639
2018-03-19 15:17:56 +01:00
Alexandre Kühn e2dd31cd7b [FIX] web: set correct menu_id on menu action
Before this commit, the menu_id displayed in the url was incorrect
when we click on a menu item for the first time.

This is due to the fact that the web_client was mistakenly using the
previous menu_id as the action's menu_id: the JS widget menu is not
up-to-date with the value of the current menuID, and the web client
was relying on its internal state instead of the server's response.

With this commit, the web client uses the server's reponse to
register the correct menuID that has been clicked.
2018-03-19 15:17:10 +01:00
Nikunj Ladava 70f3d453b5 [FIX] payment_adyen: fix error while making payment with adyen
* in _adyen_generate_merchant_sig_sha256 no need to encode dict key as we
   have a normal dict. Because of this encoding it will search for byte
   string key but we have string key;
 * _adyen_generate_merchant_sig method requires the latest computed data
   from adyen_form_generate_values method. If we directly pass the dictionary
   while updating it, it will pass only business parameters and we don't need
   it. After updating values we have actual transaction data.

This commit is related to task ID 1815966.
2018-03-19 14:33:04 +01:00
Denis Ledoux 3869b080ae [FIX] survey: preserve the multiple choices question answers order
When configuring a survey with a
Multiple choice: only one answer
question,

the answers shown in the result may be in the wrong order
because of the use of a simple `Dict` instead
of an `OrderedDict`.

The behavior was increased when using Python 3.5,
as it randomizes on purpose dictionnaries.

opw-1818797
2018-03-19 12:17:46 +01:00
Mykhailo Panarin 71f56fd2fa [CLA] signature for mpanarin
Was already signed in 11.0 but not in 10
Closes #23715
2018-03-19 12:01:59 +01:00
Odoo House 0bcf5a6d8f [CLA] Odoo House ApS signs Odoo CCLA
Closes #23731
2018-03-19 11:58:49 +01:00
Thibault Delavallée 1d25b6b84b [FIX] mail: fix chatter document link 'on <doc name>' including the 'on'
Having the 'on' using the same styling of the document name that is a link
make us think the 'on' is part of the name. Let us fix this small issue
by getting the 'on' out of the link tag.
2018-03-19 11:52:46 +01:00
Martin Trigaux 6292600b85 [FIX] *: correct wrong %s translations
Changes reflected on Transifex but force the fix in the code to avoid having
to wait until next Sunday for synchronisation
2018-03-19 11:47:32 +01:00