Commit Graph
111303 Commits
Author SHA1 Message Date
Khoi Nguyen b6c3ee4e24 [FIX] web: discarding a new record in a modal closes the modal
Discarding a new record triggers the 'history_back' action.  This makes
sense if the record was discarded from a normal form view, but not so
much when in a modal, where the expected behaviour is to close the
dialog.

This commit overrides the function in the action manager which handles
the switch to the previous view. It checks whether a dialog window is
open, in which case it simply closes it.
2017-10-16 12:20:11 +02:00
Richard Mathot 8ee9024a4c [FIX] hr_org_chart: lambda employees are not allowed to read jobs
If we want to display job titles in this marvellous widget, we then have
to read them with higher access rights.
2017-10-13 09:11:57 +02:00
Christophe Simonis aeae519a65 [MERGE] forward port branch saas-15 up to 945dd32eb0 2017-10-12 21:44:28 +02:00
Christophe Simonis 945dd32eb0 [MERGE] forward port branch saas-14 up to 91e2264b28 2017-10-12 18:43:14 +02:00
Christophe Simonis 91e2264b28 [MERGE] forward port branch 10.0 up to ba519bde84 2017-10-12 17:30:01 +02:00
Christophe Simonis ba519bde84 [MERGE] forward port branch 9.0 up to 40d4cdd39f 2017-10-12 16:23:17 +02:00
Géry Debongnie d4cf4374d1 [FIX] web: allow widget many2many_tags to display more than 40 records
Before this commit, the widget many2many_tags only loaded the first 40
records. This was difficult to see, because there were not so many views
with a lot of tags.
2017-10-12 16:15:06 +02:00
Géry Debongnie 66b692a5eb [FIX] web: fix display issue with fieldSelection
When displaying a many2one values, in edit mode, the option did not
properly display some characters.
2017-10-12 16:14:49 +02:00
Géry Debongnie 7d448d57e3 [FIX] web: fix issue with default_get/onchange and one2many
Before this commit, there was a bug when creating a new record which
contains a one2many with an onchange.  The commands sent to the onchange
did not contain the full information.

Here is how you could reproduce the issue: install expense, go to the
expense list view, select the 2 lines, then, in the 'action' menu in the
control panel, choose 'Expense: submit to manager'.  In the new expense
sheet, you could see that there were two lines in the one2many
expense_line_ids.  However, these lines are empty.  The reason is that
the commands sent in the onchange were 2 commands 0, with {} as data.

So, in short, the BasicModel did generate the proper commands, but with
empty data, in the specific case when we have a non empty one2many in a
default_get, then an onchange.

To solve this issue, I had to fix 2 things: the internal data struture
was wrongly updated, and the commands should be generated with all the
data, and not only the changes.
2017-10-12 16:14:47 +02:00
Laurent Smet b44a482c53 [FIX] account: fix session.currencies in reconciliation js tests
In the JS tests environment for the reconciliation widget, session.currencies is missing.
Then, it causes some troubles for 2f3b469dee
2017-10-12 15:25:41 +02:00
Raphael Collet ebd8206555 [10.0][FIX] pos_cache: unable to refresh cache in a multi-company context 2017-10-12 14:51:49 +02:00
Martin Trigaux ae9ed02f38 [I18N] remove fuzzy Portuguese translations
Was leading to errors with missing %s
opw-776243
2017-10-12 14:09:12 +02:00
qdp-odoo 8c8af672dd [FIX] account: removed deprecated-and-broken menuitem 2017-10-12 13:59:42 +02:00
qsm-odoo 03ef19e40c [FIX] web, hr_timesheet_sheet: make m2o friendly-usable outside of views
Before this commit, m2o external button was always floating outside the
m2o main DOM element, on the right. This induced problems when using the
m2o outside of views (like in Odoo Studio). Now, the m2o design is made
so that this button is inside the m2o, except in form views where we
expect the button to overflow in the tables' right paddings.
2017-10-12 13:39:17 +02:00
Carlos Dauden 40d4cdd39f [FIX] account: Field total_invoiced in res.partner doesn't include archived children 2017-10-12 13:20:57 +02:00
Nicolas Martinelli 179de9b55f [FIX] sale: layout sequence
- Create 2 companies A & B (not linked)
- Create a user Demo allowed in both companies
- Create a Sale Layout Category ('TEST')
- In company A, create a SO and add 'TEST' to the line
- Switch to company B, create a SO and add 'TEST' to the line
- In the Sale Layout Category, change the sequence of 'TEST'

An access error appears.

On a SO, `layout_category_sequence` is a stored related. It means that
when we change the sequence of the layout, all SO are updated, including
the SO to which we don't have access (in this case, the SO of company A,
since our user has switched to company B).

While it seems that `layout_category_sequence` was intended to be used
in order to keep the historic value of the sequence, this is not the
actual behavior. Indeed, the method `order_lines_layouted` uses the SO
lines in their original order, which doesn't use
`layout_category_sequence`.

In summary, this related field causing an access error is never used.

opw-774787
2017-10-12 13:02:33 +02:00
Yenthe V.G df124080b6 [FIX] web_calendar: Instantiate moment correctly
Without instantiating the moment it will throw errors to some users.
Desired behavior after PR is merged: No longer undefined errors for end users
Fixes #18994
Fixes #18618
2017-10-12 12:33:11 +02:00
Yannick Tivisse eb7a098592 [FIX] website_hr_recruitment: Avoid exponential sitemap generation
Purpose
=======

Currently all the possible routes for /jobs are put in the sitemap.

Each time you create a job, you add at least 250 links in the sitmap (The country can be set on the route)

Specification
=============

This commit backports the behavior of this commit in v11.0 (https://github.com/odoo/odoo/commit/1b52b00d2aa96b9360d50a0f0960f1febb5e607e)

Don't generate sitemap entries for other routes than /jobs/
2017-10-12 12:10:52 +02:00
rgarnau b8dac2ff32 [FIX] web: integer not properly parsed
The parsing of the integers does not escape the thousands separator.

issue: Integers are currently not properly parsed. For example, create
a database in Spanish language, install product_expiry and in settings
activate Lots & Serial Numbers. Go to Products and create a new product.
Choose to track by lots and specify the use_time, life_time, etc.
When saving, all integers are set to 0
2017-10-12 10:34:40 +02:00
Christophe Matthieu acb4689827 [FIX] ir_qweb: t-esc escape the content only if don't use widget
trusts widgets who must return safe html content
2017-10-12 10:09:59 +02:00
Goffin Simon 20aaa69eef [FIX] account, hr_expense: registering a payment for a multiple lines expense sheet
When registering a payment for an expense sheet with several expense lines, only
the first line of the expense sheet was linked to the account move line of the payment.
So the payment was considered as partially reconciled.

Now when a payment is registered for an expense sheet with several expense lines,
the user is redirected to the manual reconciliation widget to link the move line of
the payment to all the expense lines. In this way, the payment will be considered as fully
reconciled.

DO NOT FORWARD-PORT! ONLY FOR v10

opw:772505
2017-10-12 09:49:29 +02:00
Martin Trigaux 74452f947f [I18N] web: fix bad translation
The languages are not on Transifex so manually correcting the files.
opw-776115
2017-10-12 09:32:36 +02:00
Goffin Simon 8aca743c6e [FIX] website_sale_delivery: Incorrect price displayed for Delivery Method
The price on a delivery.carrier is computed according to the currency of the SO
in function "get_price".

opw:771773
2017-10-12 09:29:27 +02:00
Jairo Llopis d329b946d6 [FIX] website_portal: improve mobile layout
This commit closes odoo/odoo#19267
2017-10-11 17:56:23 +02:00
Laurent Smet 2f3b469dee [FIX] account: fix unreconciled amount on reconciliation widget
Try to reconcile a bank statement of 1000 to an invoice of 650 amount.
The balance amount of 350 is missing on the resulting account.move and
the bank amount is 650 instead of 1000.

task: https://www.odoo.com/web#id=36342&view_type=form&model=project.task&action=333&active_id=967&menu_id=4720
2017-10-11 16:07:36 +02:00
David Vidal ee7cfba917 [FIX] website_sale: Avoid compute tax for every company
When a product has multiple company taxes and b2c prices is enabled, price is
not computed properly and adds to the base price every company tax present.

This patch filters the company set on the company so taxes are computed just
for that company.
2017-10-11 15:55:20 +02:00
qsm-odoo bc623461b3 [FIX] website_sale: allow to properly click on mobile checkout button
Part of the button was hidden by the (invisible) right column content
when using some particular themes.
This is because of a messy XML structure that cannot be safely repaired
in a stable version. This commit fixes the bug with CSS.

Note: this may need to be backported to 9.0 and the XML structure should
be improved in master.
2017-10-11 15:01:32 +02:00
Christophe Simonis 5a9f1539e1 [MERGE] forward port branch 9.0 up to 99703583d4 2017-10-11 13:59:22 +02:00
Raphael Collet 10412d351c [FIX] fields: prefetching of related fields (#20017)
Prefetching is underused when all fields are traversed one record at a time.
So instead, traverse all records one field at a time.  This guarantees batch
prefetching/computation on every field being accessed.
2017-10-11 13:39:02 +02:00
ougc27 f58e6351ee [CLA] update jarsa's CCLA contributors list
Closes #19983
2017-10-11 12:17:19 +02:00
Raphael Collet 0af8d4ffd2 [FIX] fields: performance optimization
Add a shortcut in `copy_cache`, to avoid iterating on all fields.
2017-10-11 11:55:02 +02:00
Richard Mathot 66f7d393d3 [FIX] web: debug mode tooltip
Display properly the content of context object instead of
[object Object].
2017-10-11 10:40:46 +02:00
Nicolas Martinelli 02dffa45ae [FIX] hr_expense: included tax and round globally
- Set 'Tax calculation rounding method' to 'Round Globally'
- Create a expense product with a tax of 20% included in the price
- Create a expense of 19.99
- Submit the expense in a expense sheet
- Validate the expense
- Post the expense
- Register a payment of 19.99

The expense is not set as paid.

The source of the issue is that the tax line is created without being
rounded. In the specific example, two lines are created with amounts:
- 16.658
- 3.33166667 (Tax)

This introduces rounding error in the computation of the matched
percentage, and the expense is not set as paid.

We force the rounding of the taxes since the 'Round Globally' option has
no impact on an expense report.

opw-773908
2017-10-11 09:56:59 +02:00
Jeremy Kersten c7e9a8f74f [FIX] website_sale: improve microdata
opw-774350
2017-10-10 21:45:24 +02:00
Nicolas Martinelli 99703583d4 [FIX] account: invoiced amount
- Create 2 companies: A is parent of B.
- Demo is in Company A
- Create 2 invoices for a partner: one in A, one in B (100 each)
- Validate the invoices

Connected as Demo, the 'Invoiced' amount on the partner form view (stat
button) is 100, while clicking on it shows both invoices (total of 200).

There is no need to manually add the company in the `where` clause since
the `_apply_ir_rules` will take care of adding the appropriate
multi-company rules.

opw-772479
2017-10-10 17:20:41 +02:00
Yannick Tivisse 39f83aa890 [FIX] res_lang: Use a non-breaking space as thousand separator in fr_FR 2017-10-10 16:18:20 +02:00
Christophe Simonis 2d8e6ff05e [FIX] mail: handle empty recordset when computing unread message count 2017-10-10 15:56:22 +02:00
Cédric Pigeon (ACSONE) 4206d1c2a2 [FIX] models: in create, add translations after setting x2many fields. (#19348)
Otherwise if a record rule is defined on a x2many field on the model, the creation will fail because
ir.translation creation check access rules on the model and in this case, the x2many relation are
not set yet.
2017-10-10 15:53:09 +02:00
Goffin Simon cae506f0ed [FIX] website_quote: quotation template with visible discount on pricelist
Steps to reproduce the bug:

Let's consider a product A with a price of 100
Let's consider a pricelist P with a visible discount of 50% on product A.
Let's consider a quotation template Q with one line with the product A with 50%
of discount.
Let's create a SO with pricelist P and set the quotation template Q on it.

Bug:

The unit price of A on SO is 50 instead of 100 and the visible discount is 50%
instead of 75%.

With the fix:

The unit price is 100 and the discount is 75%

opw:771996
2017-10-10 14:46:35 +02:00
Nicolas Lempereur 1c38486ed6 [FIX] mail: error if called in onchange of virtual
This field can be called on an hr.expense for onchange on an
hr.expense.sheet record, thus the recordset could be a virtual ID so
self.ids could be empty leading to an error.
2017-10-10 14:29:30 +02:00
amoyaux 64237aa3ab [FIX] stock: package transfer shows related pickings
Use case to reproduce:
- Create a picking with a package
- Go to the source or destination package
- Click on package transfers
-> It displays all the pickings

This happens because the package transfer button calls
the all picking tree view that display them.

This commit use an action instead that will add a domain
on it in order to only display the pickings that used the
selected package.

opw-774013
2017-10-10 14:26:35 +02:00
Christophe Simonis 88a9980b0c [MERGE] forward port branch saas-15 up to 66945d3427 2017-10-10 14:15:24 +02:00
Christophe Simonis 66945d3427 [MERGE] forward port branch saas-14 up to 68d1ad5b7a 2017-10-10 13:27:29 +02:00
Christophe Simonis 68d1ad5b7a [MERGE] forward port branch 10.0 up to b1ce2dd6c1 2017-10-10 13:00:48 +02:00
Nicolas Martinelli b1ce2dd6c1 [FIX] account: invoiced amount
- Create 2 companies: A is parent of B.
- Demo is in Company A
- Create 2 invoices for a partner: one in A, one in B (100 each)
- Validate the invoices

Connected as Demo, the 'Invoiced' amount on the partner form view (stat
button) is 100, while clicking on it shows both invoices (total of 200).

There is no need to manually add the company in the `where` clause since
the `_apply_ir_rules` will take care of adding the appropriate
multi-company rules.

opw-772479
2017-10-10 12:33:27 +02:00
Christophe Simonis daa2194677 [MERGE] forward port branch 10.0 up to 0e28db88d1 2017-10-10 12:32:50 +02:00
Nicolas Martinelli e890682656 [FIX] account: invoice analysis
- Create a customer invoice of 100, validate
- Refund the invoice
- Go to Accounting > Reports > Business Intelligence > Invoices
- A total of 200 is shown, while it should be 0.
- The same occurs with a vendor bill (-200 instead of 0)

The invoice lines have their sign modified at two places when used in
the report:
- in method `_compute_price` of `account.invoice.line`
- in method `_from` of `account.invoice.report`

The signs are computed with the following combination:

|Invoice type|`_compute_price`|`_from`|Report sign|
|------------|----------------|-------|-----------|
|out_invoice |              +1|     +1|         +1|
|in_invoice  |              +1|     -1|         -1|
|out_refund  |              -1|     -1|         +1|
|in_refund   |              -1|     +1|         -1|

This is not correct: out_invoice and out_refund should have opposite
signs. Same applies to in_invoice and in_refund.

opw-772479
Closes #19954
2017-10-10 12:31:25 +02:00
Christophe Matthieu 0e28db88d1 [FIX] stock: Decimal precision on weight can not be saved
odoo issue: 774361
https://github.com/odoo/odoo/issues/13784
2017-10-10 11:41:33 +02:00
Raphael Collet fcf6ef476c [FIX] fields: writing on a one2many with a domain should not remove all lines
Specifically, the command `(6, 0, ids)` should only unlink/detach the lines
that satisfy to the field's domain.

Test from #18440

opw-756983
2017-10-10 11:21:15 +02:00
Nicolas Martinelli 5a1e5aa429 [FIX] account: payment communication
- Set up a journal which only accepts SEPA payments
- Import a CAMT file which contains a statement containing:
  No "Ustrd" data
  A "AddtlNtryInf" description longer than 140 characters
- Reconcile the bank statement

A contrain is raised because the communication of the SEPA payment is
longer than 140 characters.

From commit https://github.com/odoo/enterprise/commit/ff84f8b7,
"AddtlNtryInf" is used if "Ustrd" is empty. However, "AddtlNtryInf" and
"Ustrd" do not have the same restrictions. "Ustrd" can have a maximum of
140 characters, while "AddtlNtryInf" can have a maximum of 500
characters.

opw-772009
2017-10-10 11:15:18 +02:00