Commit Graph
127612 Commits
Author SHA1 Message Date
Nicolas Martinelli 17ac11d5aa [FIX] stock: add operation in mobile view
Since it is possible to create an operation in the regular list view, it
should also be possible to do it in the kanban mobile view.

opw-1963527

closes odoo/odoo#32907

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-24 09:52:26 +00:00
Hardik Prajapati cc641b3e2d [IMP] l10n_it: added missing taxes
added 5% tax rate for sale and purchase which was missing

was task# 1915454

closes odoo/odoo#33400

Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2019-04-22 08:49:28 +00:00
Julien Castiaux 70e2636e1b [FIX] sale_timesheet: duplicate project from Sale Order
1) In the settings of project, enable sub-tasks.
2) Create a new project with a sub-task.
3) Create a new product (type service).
4) In the "Sales" tab of the product check the "Create a new project
but no task" in the service tracking options and select the created
project as project template.
5) Create an invoice for that service and confirm it.
The sale order is set on the tasks of the duplicated project but not on
the sub-tasks.

The `write` mechanic is override in project.task to apply modifications
done on the parent task to its sub-tasks. The method
`_subtask_write_values` is used to gather `{field: value}` pairs and
update the sub-tasks. That method is override in `sale_timesheet` in
order to force the `sale_line_id` to `False` when the project is
duplicated because the duplicated project is not attached to the sale
order of the original model.

The fix has been re-write the `sale_line_id` value on sub-tasks.

opw-1985484

closes odoo/odoo#33416

Signed-off-by: Jérome Maes (jem) <jem@openerp.com>
2019-05-16 08:36:03 +00:00
Goffin Simon 2c3451de12 [FIX] portal, website_mail: Wrong dependance
The field website_published is not ensured when module portal
is installed because the module portal doesn't depend on module
website_mail.

PS:The module website_mail depends on the module portal because
website_mail depends on website and website depends on portal.

opw:1997478

closes odoo/odoo#33452

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-05-17 03:18:08 +00:00
Nicolas Lempereur 838d557eaf [FIX] website: rte_translator ok in manual & debug
The rte_translator tour that test translation on the frontend could not
be started from the "[debug menu]" > "Start Tour" for two reasons:

- the start URL is not specified, so the test was started on current
backend page wich is wrong (in python the start url is "/")

- the backend original state (params after #) does not work with ?k=v
inside argument value, so `#return_url=/?debug=true`.

To solve this issue, we encode the return_url value and add a start url
when rte_translator is started manually.

opw-1998623
closes #33443

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2019-05-16 14:37:20 +00:00
Nicolas Martinelli d5b8215b24 [FIX] web_tour: no step
- Create a tour with only one step for Community
`edition: 'community'`
- Install a database in Enterprise

`tip.in_modal` in `_check_for_tooltip` cashes since `tip` is undefined.

opw-1998603

closes odoo/odoo#33430

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-16 12:21:08 +00:00
Julien Castiaux 9c369a4485 [FIX] google_account: log error message on screen
Include the Google Error message in the error message showed on screen.

Fine tuning of da13c70484 : missing transiflex translations, empty body,
wrong string format.

opw-1966309

closes odoo/odoo#33216

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-05-16 09:51:41 +00:00
Pierre Rousseau 7aa74c0f22 FIX] snailmail, snailmail_account: do not make RPC call to compute the price
Since c2b55f3, a letter = 1 stamp, so we do not need to make RPC call anymore.

closes odoo/odoo#33423

Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
2019-05-16 09:52:22 +00:00
Nicolas Lempereur 444b14779f [FIX] website_blog: blog snippets no column options
The snippets "Latest Posts - List" and "Latest Posts - Big Images" have
a "Number of columns" options but:

- these snippets are not taking the option into account and are
specifically size (in large "list" => 100% width, "big image" => 50%)

- the snippet content is dynamically generated, so the column sizing
set on preview when saving is lost when content is displayed

- the option "Number of posts" contradicts the option
"Number of columns" and can leads to have several lines that are not
taken into account in "Number of columns" (the column number is the
number of child)

Thus, this changeset disable the option for these snippets.

opw-1984899
closes #33393

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-05-15 11:58:11 +00:00
Goffin Simon f67200fe9f [FIX] web: Invalid Date warning
Fine tuning of 5ef86ef6c874ab4dc78402493d05b2460c69e7f6

Steps to reproduce:
Set a custom language settings for date by switching the %m and %d.
Create a sales order

Current behavior:
Invalid date error boxes was raised two times

fixes #33408

opw:1998971

closes odoo/odoo#33415

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-05-16 07:26:28 +00:00
Jorge Pinna Puissant 5648bbada8 [FIX] hr_holidays: request leave with leave type in hours
When a leave type is in hours, before this commit:
- in the leaves request list the request duration is shown in days.
- the name of the leave shown duration in days.
- the rounding after the conversion from hours to days, generates some
misunderstandings. If you have a day of 7.5 hours, and you take a leave
of 2 hours, it would be round it to 0.25 days, and not to 0.27 days as
it should be. This occurs because we round to the 1/16 of the day.

Now:
- in the leave request list, the request is shown either with days or
hours depending on the leave type.
- the name of the leave shown duration either with days or hours
depending on the leave type.
- the leaves are shown in the correct unit, there is not more
misunderstandings occurring because of the rounding.

related to commit : 5c33ebef5f and 2c366acbf0

opw-1974691

closes #29804
closes #33290

closes odoo/odoo#33369

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-15 13:20:25 +00:00
Nicolas Martinelli 04dd6fbe50 [FIX] account_payment: success url
- Activate online payment of invoices
- Activate and configure Stripe
- Create an invoice, access it through the portal
- Pay it with Stripe

The user is redirected to `/my` instead of `/my/invoices/<id>`.

The root cause is because Stripe creates 2 transactions, the second
being created at:

https://github.com/odoo/odoo/blob/43295c2a3741fb98f9c5d1a506652442efed0a82/addons/payment_stripe/static/src/js/stripe.js#L108

This second transaction, which is used to record the payment, doesn't
contain the appropriate `success_url`.

The best fix would probably be to either:
- prevent the creation of the second transaction by refactoring
`stripe.js`
- pass the appropriate `success_url` to the `stripe_form` template
- reuse existing draft transactions instead of creating a new one

None of these solutions is really suitable for stable since it might
require some heavy modification. However, a simple workaround is to
change the fallback `success_url`since we have all the necessary information
to build it.

opw-1997283

closes odoo/odoo#33404

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-15 13:50:17 +00:00
Nicolas Martinelli 89683994ac [FIX] website_sale_delivery: delivery amount
- Go to the website settings and activate the option 'Tax-Included' for
the pricing in the website.
- Go to Sales > Configuration > Delivery methods and create a new method
based on rules. For example:
Price is 10.0 when the weight <= 100
Attach a product (with taxes) to it.
- Publish on website
- Buy a product on the eCommerce
- Checkout, go up to payment step and choose the delivery method created

The 'Delivery:' field on the left shows the delivery price with taxes
excluded although they are included. Funny thing: going back to the
'Address' step show the correct price.

This is because the `delivery_price` field does not take into account
the tax configuration.

We can use the `amount_delivery` field (hum hum) which does it
correctly.

opw-1981808

closes odoo/odoo#33394

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-15 11:54:27 +00:00
Julien Castiaux 43295c2a37 [FIX] web: mark as read trigger notification
Install discuss, change the general setting in dev mode to disable the
"Show Effect" checkbox. Change the preferences of the user to let odoo
handle notifications. Ask another user to ping you on a chatter then go
to discuss and click the "Mark as Read" button. Traceback.

The `notification_manager` agent has been replaced by another agent in
07cd24b1ec, the code has been updated to use the new agent.

opw-1986844

closes odoo/odoo#33363

Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
2019-05-15 07:35:36 +00:00
Nicolas Martinelli 83b52e3a97 [FIX] account: faster reconciliation
This reverts commit dbaef7de17 since it
causes issues (unbalanced moves). Temporary revert so we have time to
analyze the issue.

opw-1997794

closes odoo/odoo#33380

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-15 09:00:01 +00:00
Goffin Simon 9ed9710b2b [FIX] web: Error on invalid date format on date field input
Steps to reproduce the bug:

- Go to any field Date
- Enter wrong date

Bug:
A traceback was raised.

Now a warning is raised and the wrong value is removed.

opw:1974747

closes odoo/odoo#33362

Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-05-15 06:36:08 +00:00
Romain Derie c3a81c6c7e [FIX] website_forum, website_slides: correctly check if is admin
Before this commit and since 2f7c03d9ca, the admin user has not ID=1
anymore.

Thus, some old condition were not doing what they were expected to.

Firstly, the admin was not considered as such on the forum, and if its karma
points were not high enough, it would not be possible to do anything for the
admin. Note that it was fixed in saas-12.1 with 1dac413130

Secondly, some _search functions would not return a truthy value anymore.

closes odoo/odoo#33359

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-05-14 11:17:45 +00:00
Nicolas Martinelli c92b0ce303 [FIX] stock_account: COGS and reconciliation
Commit 98ee15977a made the Stock Interim accounts reconciliable,
and introduced auto-reconciliation of related entries. This has the
advantage to clean-up entries in these accounts. However, since these
accounts are reconciliable, the entries will show up in the manual
reconciliation widget (expected) and the bank reconciliation widget (not
expected).

There are 2 cases where it causes issues:
- after migration from v11, the entries were not reconciliced. Although
this will be fixed in the near future, it is too late for already
migrated databases
- using MRP. A list of components i costing Xi might be used to create a
finished product of cost Y != sum(Xi). Indeed, the routing cost has to
be taken into account. In this case, the entries are not fully
reconcilied.

The result is that the bank reconciliation widget ends up with an
growing number of unreconcilied lines, and in the end making it
impossible to use.

In order to work around the issue, we prevent any account used as a
stock interim account to be included in the bank reconciliation widget.
For performance reasons, we directly search the `ir.property` table for
the corresponding accounts instead of filtering AML thanks to
`excluded_ids`.

Closes #32611

opw-1963025
opw-1967462

closes odoo/odoo#32957

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-14 06:55:04 +00:00
Andrius Laukavičius 476a53bbf0 [FIX] sales_team: ignore inactive team
When using `sales_team.team_sales_department` as fall back default
team, last condition that checks if such team can be default was
incorrect, because `active` value check was mixed with lead type check.

In other words: True or False and False => True
But intention is: (True or False) and False => False

opw 1997715

closes odoo/odoo#33316

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-05-14 10:09:24 +00:00
Damien Bouvy 99a12a94c2 [FIX] point_of_sale: useless field can degrade perfs
The field session_ids is fetched from the server for what seems to be no
good reason at all; for database with a lot of sessions (test case with
40k+ sessions), this can lead to an extremely slow dashboard.

closes odoo/odoo#33303

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-05-10 14:53:28 +00:00
Nicolas Martinelli 77c708c516 [FIX] website: sign-up in multi-website
- Create 2 companies A & B
- For each company, create a website linked to a different URL and
  activate 'Free sign up' and 'Specific User Account'.
- As a public user, go to website of company B
- Go to 'Sign in > Don't have an account?' and create an account

The user is created in company A (the company of the user template)
instead of company B (the company of the website).

We set the company of the user based on the company of the website.

opw-1962197

closes odoo/odoo#32823

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-19 08:54:22 +00:00
Nicolas Martinelli 3a0f05f334 [FIX] website_sale: multi-website
- Create 2 companies A & B
- For each company, create a website linked to a specific URL
- As a public user, visit website of B
- Buy a product, register your address

The partner is in company A (the company of the superuser) instead of
company B (the company of the website).

opw-1962197

closes odoo/odoo#32822

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-19 08:00:25 +00:00
Swapnesh Shah c423e5fe04 [FIX] doc: fix a typo
closes odoo/odoo#32746

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-04-24 06:53:51 +00:00
Nans Lefebvre 0cce154794 [FIX] stock: use float comparison to assign moves
We remove the remaining comparisons to use the precision rounding of the UoM.

opw 1969888
closes #32707
closes #32745

closes odoo/odoo#32844

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-04-23 08:08:58 +00:00
Toufik Ben Jaa 30e7a64cbd [FIX] hr_holidays: fix logic of a onchange on leave allocation
- When changing the `holiday_type` of a leave allocation while having an
  employee set and if this `holiday_type` has as its value `employee`
  the field `employee_id` is set to False.

  This is not the intended behavior. We want the field `employee_id`
  to be filled if the `holiday_type` is set to `employee`.

closes odoo/odoo#32886

Signed-off-by: Denis Ledoux <beledouxdenis@users.noreply.github.com>
2019-04-23 15:22:16 +00:00
Katherine Zaoral 9617e79e58 [FIX] base: set ARS currency symbol position
Should be before the amount

closes odoo/odoo#32846

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-04-23 08:21:25 +00:00
Aaron Bohy 3c40d732bf [FIX] web: crash in editable lists with date field
Backport of 7bc53ac30e.

Assume an editable list view with a date(time) widget, click to
edit a line, focus the date field (the datepicker opens), press
ESC: there is a crash in the lib, and the datepicker remains open
forever.

This fix is twofold:
 - we added a check in the lib to prevent it from crashing (it is
 easily reproducible: it crashes when an opened datepicker is
 removed from the DOM).
 - we added an event handler of ESC keydown event to hide the
 datepicker before the field is removed from the DOM.

closes odoo/odoo#32647

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>
2019-04-23 06:58:16 +00:00
Nans Lefebvre d6ad22227c [FIX] sale_timesheet: update delivered quantities when changing the sale_line_id
Create a SO with two lines (sol_1, sol_2) selling a given service.
On the corresponding Project/Task, set the partner so that the sale_line_id
can be chosen to one of the lines.
Add an AAL with x hours, save.
This updates the delivered quantity (x) on sol_1.
Edit, change the sale_line_id to the second one:
it updates the delivered quantity on sol_2 (to x) but not on sol_1.
Has a result, the delivered quantity has been doubled.

The issue is that the quantities are only recomputed on the SOL that we write;
instead they should be recomputed on the old one and the new one.

We base ourselves on 371a92fb which solved a similar bug to add the recompute on
both lines.

opw 1959509

11.0-opw1959509-sltmsht-len

closes odoo/odoo#32820

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-04-19 07:56:17 +00:00
Nicolas Martinelli fccf4f3ca4 [FIX] event_sale: canceled registrations
Fine tuning of ac31252d54

Do not pre-filter on canceled entries since they are used a few lines
below.

opw-1964459

closes odoo/odoo#32835

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-19 12:40:17 +00:00
Lucas Perais (lpe) 4730a884b4 [FIX] website_quote: portal optional products qty change
Have a SO with a quotation template and some optional products set
Display it on the portal
On an optional product, click on the cart icon
to add it to the SO

Modify the quantity of the optional product

Before this commit, the feature was barely working:
- the total price of the optional product did not change
- negative quantities were allowed
- there was no reaction when directly putting a number in the input
- when decrementing the quantity, it crashed
- untaxed and tax amounts were not dynamic

After this commit:
- the total price of the optional product changes as a function of the quantity input
- negative quantities are not allowed
- it is not possible to manually input the quantity with a keyboard
  only +/- buttons are used to change the quantity
- decrementing the quantity works
- untaxed and tax amounts are dynamic

OPW 1947769

closes odoo/odoo#32715

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-04-19 07:41:40 +00:00
Adrian Torres 3b3a14cb8d [FIX] sale: allow the uninstallation of sale
Commit 1da63f0ab0 removed the
uninstall_hook defined in sale/__init__.py but forgot to remove it from
the __manifest__.py, resulting in a traceback when uninstalling the
`sale` module.

closes odoo/odoo#32804

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-04-18 13:12:18 +00:00
Simon Lejeune aac14d23da [FIX] stock: cache invalidation in _action_assign
`reserved_availability` is a computed field of a move depending on its
move lines. We access this field at each iteration of the loop over the
moves to assign and then we create a new move line for it. This triggers
an invalidation of this field, The next iteration will again access this
field and prefetch it for all the next records.

We read the field out of the loop and don't access it again to prevent
these prefetch/invalidation issues.

Confirmation of a PO of ~800 lines goes from 5 minutes to 1 minute.

opw-1953398

closes odoo/odoo#32774

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>

closes odoo/odoo#32805

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-18 12:55:33 +00:00
Odoo Translation Bot e07ecf298f [I18N] Update translation terms from Transifex 2019-04-21 03:09:35 +02:00
Lucas Perais (lpe) b130b35f04 [FIX] purchase: locked purchase orders are billable
Before this commit, when the PO was locked:
- the button create bill did not appear on the form view
- on the invoice form view, the field autocomplete did not mention the PO

After this commit, the button create bill is present, and the PO appears in
the auto-complete field of the Vendor bill

OPW 1970537

closes odoo/odoo#32794

Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2019-04-18 10:57:39 +00:00
Odoo Translation Bot a73206c0b1 [I18N] Update translation terms from Transifex 2019-04-21 01:20:56 +02:00
Nans Lefebvre 3539221364 [FIX] resource: give admin rights to edit global leaves
Commit 27d41ccb introduced record rules on resource.calendar.leaves.
However it gave no way to create, edit or delete a global rule.
We grant this right to the group_erp_manager, so that an admin can do it.

opw 1968376

closes odoo/odoo#32832

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-04-19 12:25:36 +00:00
Xavier Morel 3f681b208c [IMP] mrp: batch-create moves during MO creation
OPW-1967543 on non-trivial multi-level test BOM, MO creation goes from
30s to 13 on my system.

closes odoo/odoo#32819

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-04-19 07:52:22 +00:00
Nicolas Martinelli 6c702172ec [FIX] mrp: mrp_workorder uninstall
- Install 'quality_mrp_workorder' without demo data
- Go to the General Settings

A warning is raised regarding the uninstallation of 'mrp_workorder'.

This is due to `_onchange_group_mrp_routings`, which assumes that the
installation of 'mrp_workorder' is only linked to the group
`group_mrp_routings`.

This is incorrect: `group_mrp_routings` might not be activated, but it
might be in the dependencies of another module. Therefore, we change the
logic: if we activate `group_mrp_routings`, we install 'mrp_workorder'.
If we deactivate `group_mrp_routings` we do not uninstall
'mrp_workorder' if it is already installed, since it might be required
by a dependancy.

opw-1970910

closes odoo/odoo#32811

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-19 07:22:16 +00:00
Martin Trigaux a7c774849c [FIX] base_setup: do not create deleted parameter
The base_setup.show_effect parameter is created at module installation (with
an external id) and is removed (and its external id) when the option
"Show Effect" is unchecked from the general setting.

When this option is checked again, the ir.config.parameter entry is recreated
but without an external id (as it is user-provided data, not from a data file).

When the module base_setup is updated, the record base_setup.show_effect is
recreated and the unicity constraint on ir.config.parameter is raised.

Set the record as forcecreate="False" to avoid recreating it when the module
is updated.
Anyway, if somebody uncheck the option, it is not expected to get it back when
the module is upgraded.

Fixes odoo/odoo#32806

closes odoo/odoo#32808

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-04-18 13:53:09 +00:00
Nicolas Martinelli 2785b04586 [FIX] purchase_stock: tax included in multi-currency
- Set the company currency to USD, activate multi-currency
- Create a rate of 0.5 for EUR
- Create a purchase tax T:
  Percentage: 10 %
  Included in price
- Create a PO in EUR with the followind line
  Quantity: 10.0
  Price Unit: 1.0
  Tax: T
- Validate the PO, receive the product

The journal entry is composed of 2 lines:
- debit:  18.18; amount currency:  10.0
- credit: 18.18; amount currency: -10.0

This is not correct: the amount currency should not include the tax.

In order to prevent this, we use the subtotal, and divide by the
normalized quantity (yeah, because it was also failing in case of multi
UoM, as one could have expected).

opw-1958287

closes odoo/odoo#32797

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-18 11:44:41 +00:00
Nans Lefebvre e7ce0b43a6 [FIX] stock_dropshipping: do not merge PO lines coming from a SO
Fine tuning of commit b9e3c153, for the same use-case.
The route may not be passed in values, in which case the bug is still present.
There are two ways to go around that.
We could add the stock.rule in values, which contains the route.
The solution we adopt here is to use the sale_line_id field on the purchase line
If it is present, it was added through _prepare_purchase_order_line,
and thus we want to keep track of the origin.

opw 1957701

closes odoo/odoo#32683

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-04-18 09:46:22 +00:00
Jairo Llopis ab1bd93dde [FIX] web: Trim spaces when selecting option by text
It's quite common that the `$().text()` method returns lots of random whitespaces at the beginning and end of the string. They're pretty unpredictable (extension views can add or remove them) and invisible to the end user.

This code chunk should allow to select an `<option>` based on its raw text content, but most of them will just fail without this patch. And most chances are that current ones just work equally with this patch.

This will make frontend tours more pleasant to write.

closes odoo/odoo#32791

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2019-04-18 09:45:52 +00:00
Pierre Masereel 0f532c3dbf [FIX] delivery: picking weight computation
The depends value on picking weight and package_ids of picking are only
set on the move_line_ids, which lead to compute the value of the picking
weight only when move lines are created or deleted and not when a
package is set on a line, quantity done changed and/or unit of measure
changed.

To fix this issue, we've changed the depends, of thos computed fields.

closes odoo/odoo#33114

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-05-02 13:07:33 +00:00
Nicolas Martinelli bc6d051fca [FIX] account: multi-currency payment matching
- Set the company currency in USD, activate multi-curency
- Create an invoice in EUR
- Create a payment in EUR for less than the invoice
- Open the payment matching => all amounts are in USD
- Create a write-off, reconcile

The write-off amount is incorrectly converted.

The write-off amount is sent in USD, but considered in EUR in the
server since the currency considered is the one of the line. However,
the currency in the widget is computed based on the account currency:

https://github.com/odoo/odoo/blob/b6f55dac5633d8ccb16568e0c85a5c32072e8846/addons/account/models/account_move.py#L654

Note that this is the opposite of commit 1806ea1859,
introduced in v9. Since the widget was refactored in v11, many changes
have been introduced, and we assume that this change is now justified.

opw-1907332

closes odoo/odoo#32723

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-18 08:10:24 +00:00
Nans Lefebvre 500d42ffec [FIX] l10n_in_hr_payroll: fix view inheritance after refactor
Commit d7a3f39d refactored hr views.
This broke the inheritance of the view in that module.

opw 1971570

closes odoo/odoo#32972

Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
2019-04-30 09:23:29 +00:00
Nicolas Martinelli 7b5b41ee88 [FIX] stock: onchange performance on picking
The use case is similar to 084dbf9b8f, but
applied to pickings.

When the picking contains many stock move, the manual edition of the
quantitites is quite slow due to the `onchange` call. In the example of
the OPW with 300 stock moves, the modification of the done quantity
triggers an `onchange` which lasts about 1 second.

The reason is the same than in the mentioned commit: the `onchange` is
triggered on all lines in the case of an inline tree view, and there is
not much we can do to optimize the business logic.

Therefore, the solution is the same: add a stat button to access the
stock moves directly in a tree view instead, to avoid this `onchange`.

opw-1965248

closes odoo/odoo#33004

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-29 08:53:49 +00:00
Nicolas Martinelli d9e76c66fe [FIX] account: payment receipt
- Create 2 invoices for a customer:
  Inv 1: 100
  Inv 2: 200
- Register a partial payment of 80 on Inv 1
- Select both invoices and pay the remaining amount (220)
- Print the 'Payment Receipt'

The 'Amount Paid' for Inv 1 is 100, while it should be 20.

This is because the report doesn't take into account which part of the
payment was used in the corresponding invoice.

Closes #32755
opw-1970401

closes odoo/odoo#33012

Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2019-04-29 12:37:46 +00:00
mreficent c6d718f211 [FIX] In new records *2many, enable to handle multiple RPC inputs
closes odoo/odoo#24458

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2019-04-26 13:54:20 +00:00
Odoo Translation Bot 631abaf689 [I18N] Update translation terms from Transifex 2019-04-28 03:09:59 +02:00
Sébastien Theys af02d1da58 [FIX] website_forum: remove unnecessary slow code
Since commit 56645335b7
the subtype `gamification.mt_badge_granted` is not used anymore. Therefore
this method will never return anything.

However, it is very costly on performance, and it is run on every page of the
forum! The problematic performance point is that `needaction` is a computed
field, which implies all existing `mail.message` having the target subtype have
to be fetched to compute this field, which obviously does not scale well at all.

closes odoo/odoo#32861

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-04-23 07:07:57 +00:00