Commit Graph
111144 Commits
Author SHA1 Message Date
Christophe Simonis 28785f21e4 [MERGE] forward port branch 10.0 up to 6edfadbdd2 2019-01-15 10:48:11 +01:00
larisa 6edfadbdd2 [FIX] hr_payroll_account: correct account move lines creation
The super call of action_payslip_done executes the method compute_sheet.
Without this compute_sheet call, there is no salary lines and no accounting
move is created.

closes odoo/odoo#29737
2019-01-14 15:16:44 +00:00
Manuel Vázquez Acosta 9c6d969775 [CLA] Add Larisa to Merchise Autrement. 2019-01-14 15:05:40 +00:00
Jeremy Kersten 6e3661d53f [FIX] payment_sips: allow to customize key_version
Some sips provider don't use 2 as key_version.
E.g. mercanet uses '1' as production key.

Now we allow to override it in Ir Config Parameter for stable version.

Todo:
Need to make it customizable by end user into the configuration of acquirer.

Courtesy of BEK for reporting

opw-1916316

closes odoo/odoo#30185
2019-01-14 12:27:09 +00:00
Christophe Simonis a449b063b0 [MERGE] forward port branch 10.0 up to 5f12e244f6 2019-01-10 16:58:38 +01:00
Christophe Simonis 5f12e244f6 [IMP] base: compute implied groups in SQL
SQL improve the speed of the implied group
VS the orm version.

closes odoo/odoo#30108
2019-01-10 13:48:40 +00:00
Christophe Simonis 390d8594b0 [MERGE] forward port branch 10.0 up to b131658966 2019-01-10 11:33:40 +01:00
Jorge Pinna Puissant b131658966 [FIX] account: error in Base amount tax
opw-1917605

Before this commit, when accounting is set to global rounding, the base
amount per tax is not correctly calculated.

Now, the Base amount per tax is calculated adding the rounded lines.

To test this issue, you need to set to global rounding and create a
customer invoice with the following lines :
line 1 = Qty:40; unit price:2.27; tax:15%; discount: 10%
line 2 = Qty:21; unit price:2.77; tax:15%; discount: 10%
line 3 = Qty:21; unit price:2.77; tax:15%; discount: 10%

When the invoce is printed, you would notice that the amount is 186.43
and it should be 186.42.

closes odoo/odoo#30021
2019-01-08 13:13:36 +00:00
Christophe Simonis cdb0c08cb9 [MERGE] forward port branch 10.0 up to d4024a713c 2019-01-07 17:30:11 +01:00
Francisco Fernández d4024a713c [CLA] PlanetaTIC signs Odoo CCLA 2019-01-07 15:34:10 +01:00
Lucas Perais (lpe) 0e0c726805 [FIX] purchase: don't change status when writing a note through the composer
Have a RFQ in draft. Log a note or send a new message, but use the full composer to do it.

Before this commit, the RFQ was set to sent

After this commit, it stays rightfully in draft
It is mark as sent, only if the button SEND RFQ is used

OPW 1908094

closes odoo/odoo#29902
2019-01-04 13:18:14 +00:00
Jorge Pinna Puissant 9cf6662880 [FIX] account: compute_fiscalyear_dates non leap years
Before this commit, when the fiscal year was setting to 29/02.
The function that compute the fiscal year dates gives an error.
This occurs when the date passed as parameter wasn't a leap year.

Now, for the non leap years we use the 28/02.

opw-1917035

closes odoo/odoo#29932
2019-01-04 10:23:44 +00:00
Alexey Pelykh 1ffc485689 [FIX] hr_holidays: extra space in state check
The condition was never validated

closes odoo/odoo#29898
2019-01-04 10:18:30 +00:00
Alexey Pelykh 11e5688d0f [CLA] Brainbean Apps OU signs Odoo CCLA 2019-01-04 10:18:24 +00:00
Raphael Collet a07a076c45 [FIX] models: avoid prefetch hell when reading fields
The method `read()` may be very slow when reading relational fields and
computed fields, because the computed fields can be computed on a recordset
that is larger than expected.

The issue occurs on model 'res.partner' when reading fields 'child_ids' and
'purchase_order_count', for instance.  Suppose we read those two fields on a
partner with 1000 contacts.  First, the one2many field is read from the
database and stored to the cache; the latter adds the value ids to the
prefetching of 'res.partner'.  Then, the fields are fetched from the cache.
When 'purchase_order_count' is accessed on the partner, the field is computed
on all its children as well...

closes odoo/odoo#29867
2019-01-03 12:45:48 +00:00
Denis Vermylen e1767490e9 [FIX] purchase: loading time on partners with many children
When loading a partner form view, the ORM prefetches the computed fields
purchase_order_count and supplier_invoice_count for all the related
partners as well (parent, children, ..).

Instead of reading the orders and invoices once per partner, we group
them all together.

opw 1919933

closes odoo/odoo#29788
2019-01-02 16:08:55 +00:00
Raphael Collet 1b434ed8c3 [FIX] models: make prefetching more specific in read()
Commit a07a076c45 restricts the prefetching to
`self` when accessing the fields to return.  This is too restrictive, as it
cancels prefetching of secondary records in computed fields.  In this commit we
limit the scope of the restriction to `self`'s model only; this fixes the
original issue without impacting other models.

closes odoo/odoo#30133
2019-01-11 11:01:22 +00:00
Aurélien Warnon e2bdb65321 [FIX] website_slides: hide slide download button if not available
Task #1923443

Purpose
=======

The slides on the website showed the 'download' button regardless of the value of the 'download_security' field.
If the value is 'none', meaning that the slides are never downloadable, the button should be hidden.

closes #29904

closes odoo/odoo#30051
2019-01-10 14:52:15 +00:00
Christophe Simonis a80bde859c [FIX] base: correct res.partner name_search
Oversight of previous forward-port when adapting cc217569b7
2019-01-02 11:12:37 +01:00
Christophe Simonis 1d672b33a7 [MERGE] forward port branch 10.0 up to 9ef7802520 2019-01-02 10:49:56 +01:00
Nans Lefebvre 874425c69e [FIX] stock_account: fix default field value in wizard
Default time was set to default=fields.Datetime.now() instead of
default=lambda self: fields.Datetime.now(),
resulting in a discrepancy when printing the report.

opw 1917523
2018-12-28 15:19:15 +01:00
wan 9ef7802520 [ADD] l10n_nl: tax codes for 9%
closes issue #29352
The Dutch taxes will change the low tax 6% to 9% on 01/01/2019. Please add these tax code in the system and also change the affected fiscal positions. Both 6% and 9% needs to exist during the transition period.

closes odoo/odoo#29374
2018-12-18 09:48:41 +00:00
Odoo Translation Bot 076c835544 [I18N] Update translation terms from Transifex 2019-01-01 02:42:55 +01:00
Thibault Delavallée cc217569b7 [FIX] base: fix name_search on res_partner when searching on linked users
Currently name_search on res_partner holds code to be done by a customized SQL
query allowing to speedup the search [1]. However when dealing with given args
there may be a crash if there is a domain based on user_ids fields.

Indeed this field is defined as auto_join [2]. It means the result of get_sql
returns where parameters based on joined tables. Those tables are not available
in the from clause in the original query.

This commit fixes that issue by correctly taking the from_clause from get_sql.
That way joined tables are available. Small update of the query is necessary
as fields are now res_partner.{id/email/vat/reference} as there may be several
tables linked in the query.

A test has been added to avoid regression.

[1] See https://github.com/odoo/odoo/commit/05ec12692f99b69924765fd0ce384632547f03f9 for a recent modification
    and implementation of this query, even if it exists since a looooong time
[2] See https://github.com/odoo/odoo/commit/db8203c27a21acdbcad2cf1c394b6fea3cf13688 for the auto_join addition

closes odoo/odoo#29827
2018-12-21 15:40:32 +00:00
David Tran 6bf8b25b70 [IMP] base: Vietnam Dong should have 1.00 as rounding.
No decimal part in Vietnam Dong (đ - Việt Nam Đồng)

closes odoo/odoo#29650
2018-12-19 14:24:43 +00:00
Denis Ledoux 5856dab380 [IMP] product: name_get, use mapped to gain some memory
This revision is related to
12df3c6a98

The above revision serve its purpose as well,
but by avoiding to store the result in a variable,
and using the records cache instead,
we gain some memory, which is noticeable
when there are hundred of thousands products.

The sudo() is important, as it must be the
same environment then the above call to read
to use the same cache.
Otherwise the values won't be in the cache
of self (without sudo),
and it will go get it and prefetch other fields
in the database.
2018-12-19 18:49:14 +01:00
Denis Ledoux 12df3c6a98 [FIX] product: name_get, products can share the same template
Oversight in revision
a91ffcf1a7

Multiple products can have the same template.

Passing multiple times the same template id
to the search domain to get the sellers
works, but better avoid the repetition
for the performances.
2018-12-19 18:28:23 +01:00
Denis Ledoux a91ffcf1a7 [IMP] product: product & template name_get performance
By prefetching only the fields required for the `name_get`

`product.product` & `product.template`
have a huge number of fields,
and prefetching them just to compute
the name is overkill.

Especially, as the browse was done using
sudo, the prefetch was a bit useless as
it was stored in the sudo user cache,
which was most-likely not used afterwards
by the callee of name_get

For a database with 50.000 products,
this reduce the processing time
by 15 (from 60 seconds to 4 seconds measured)
2018-12-17 15:00:45 +01:00
Nicolas Martinelli 8373bafbc2 [FIX] account: missing translation
- Install a second language, e.g. French
- Set Parter A language to French
- Create an invoice for A with a date due in the past
- On the partner form view, print the 'Due Payments'

The body of the letter is not translated in French.

Something quite weird appears:
- The corresponding string is exported in the `stock` module
- It is linked to the demo data `stock.res_company_1`, which corresponds
  to 'My Company, Chicago'.

Therefore, the translation cannot be found by the corresponding query
generated in `_generate_translated_field` and `_read_from_database`:
```
SELECT "res_company"."id" as "id",COALESCE("res_company__overdue_msg"."value", "res_company"."overdue_msg") as "overdue_msg" FROM "res_company" LEFT JOIN
                (SELECT DISTINCT ON (res_id) res_id, value
                 FROM "ir_translation"
                 WHERE name='res.company,overdue_msg' AND lang='fr_BE' AND value!=''
                 ORDER BY res_id, id DESC)
             as "res_company__overdue_msg" ON ("res_company"."id" = "res_company__overdue_msg"."res_id")
                        WHERE "res_company".id = 1  ORDER BY "res_company"."sequence" ,"res_company"."name"
```

Indeed, `res_company.id` is 1, while `res_company__overdue_msg.res_id`
is 3.

The root cause has been solved in v11, to we only export the necessary
term.

opw-1908337

closes odoo/odoo#29525
2018-12-13 17:08:15 +00:00
Christophe Simonis 5a147acf1b [MERGE] forward port branch 10.0 up to f69c004795 2018-12-11 14:33:39 +01:00
Romain Derie f69c004795 [FIX] website_membership: correctly check if customize view is active
Commit 5804246e0f introduced some improvements to speed up performances.
One of them was to check if a customize_show view was active or not but the
condition was on view.customize_show instead of view.active.

Thus, as that view is always a customize_show, the condition would always be
met.

closes odoo/odoo#29414
2018-12-11 10:23:50 +00:00
Raphael Collet 54238c88e8 [FIX] mail: wrong many2many definition
The definition of `attachment_ids` on model `email_template.preview` is wrong,
because its table/columns refer to the model `mail.template`.  As the field is
only used to preview a result in a wizard form, it does not need to be stored.

closes odoo/odoo#29349
2018-12-07 12:28:58 +00:00
Julien (juc) Castiaux 23d9aeb22d [FIX] website_project: buggy pager
The pager wasn't taking care of the filter

opw-1912293

closes odoo/odoo#29360
2018-12-10 14:21:45 +00:00
Laurent Smet 379fc6b125 [FIX] account_accountant: Make transfer_account not required without chart template
required: [('chart_template_id','!=',False)] doesn't work because you need to fill the chart_template_id
to install a chart of accounts for your company. Then, the transfer_account becomes required before its installation
and then, you are not able to install a chart of accounts for your company.
2018-12-05 11:13:19 +01:00
Christophe Simonis 69d342f54c [MERGE] forward port branch 10.0 up to 4629a4fb0e 2018-12-04 14:29:52 +01:00
Jairo Llopis 81c26383b0 [FIX] auth_ldap: Avoid sending email for newly created user
If installed along with `auth_signup`, it sends an email when creating a missing user authenticated through LDAP.

It is a confusing message that makes no sense, because the user is, from his POV, not actually creating a new user, but just authenticating with a new app with his known company-wide credentials.

Besides, that invitation leads the user to change his password in Odoo, although he probably doesn't want to do that and have a password for Odoo and another in the LDAP server.

The best option is to disable that email completely, which is what this commit does.

closes odoo/odoo#29243
2018-12-04 12:13:39 +00:00
Nicolas Martinelli d160454226 [FIX] base_vat: Albania
The module `vatnumber` (which is not maintained anymore) uses an
incorrect validation method for Albanian VAT numbers. Therefore, we use
the library `stdnum`, on which `vatnumber` relies for most cases.

opw-1912680

closes odoo/odoo#29280
2018-12-05 13:56:52 +00:00
Julien (juc) Castiaux 3b39c31adc [FIX] website_forum_doc: Not possible to change ToC order
opw-1913300

closes odoo/odoo#29263
2018-12-05 09:41:48 +00:00
Julien (juc) Castiaux fb1ef15a5a [FIX] l10n_be: Account 451200 must be reconciliable
opw-1913108

closes odoo/odoo#29251
2018-12-05 08:48:20 +00:00
Christophe Simonis ba88252bc0 [MERGE] forward port branch 10.0 up to 80a11ca27d 2018-11-30 11:58:25 +01:00
Nicolas Martinelli 80a11ca27d [FIX] report_intrastat: discount on invoice
- Create an invoice with a discount
- Validate
- Open the Intrastat report

The discount is not taken into account.

opw-1913155

closes odoo/odoo#29161
2018-11-29 17:00:36 +00:00
Richard Mathot 1d553eea7b [FIX] models.py: log the full traceback when record import fails
Without the full stack trace, it is very hard for the developers to know
why and where the record creation has failed.

closes odoo/odoo#29143
2018-11-29 15:12:59 +00:00
Ravi Gohil 8a18ef0c5a [FIX] base: allow property field to be set to False
closes odoo/odoo#29147
2018-11-29 13:46:54 +00:00
Christophe Simonis 8ee67f2a19 [MERGE] forward port branch 10.0 up to 42c42832b3 2018-11-28 14:41:28 +01:00
Christophe Simonis f5dc49da89 [MERGE] forward port branch 10.0 up to 6639630de1 2018-11-27 17:08:00 +01:00
Raphael Collet 42c42832b3 [FIX] base: translations lost after synchronization
Modifying a source term in an XML/HTML translated field can lose translations
if the same term is translated in several languages.

closes odoo/odoo#29078
2018-11-27 16:07:46 +00:00
Denis Roussel 6639630de1 [FIX] base: make check_credentials more consistent with alternatives
The other methods do test password length before verifying it, so even
if check_credentials() is not meant to be called directly, it's better
to keep it consistent with the alternatives.

Closes #29023
2018-11-27 10:14:43 +01:00
Olivier Dony 3b85900faf [DOC] install: update info about wkhtmltopdf
We now support version 0.12.5(.1), which is available for all recent Debian and Ubuntu versions,
and contains quite a few bug fixes. An up-to-date version of Odoo 10 or later is required, for
pixel-perfect compatibility with the result of 0.12.1.3.
See also the wiki for more info: https://github.com/odoo/odoo/wiki/Wkhtmltopdf
2018-11-26 13:40:15 +01:00
Christophe Simonis a9752d3ad3 [MERGE] forward port branch 10.0 up to af476c6949 2018-11-22 14:39:08 +01:00
Gert Pellin 4629a4fb0e [FIX] point_of_sale: traceback on printing android
Firefox for android gives atraceback when clicking the print receipt
button. This traceback is caused becaus Firefox for Android does not
support printing.

This fix replaces the traceback by an explanation why it is not possible
to print.

Also  backport for safari-fix

closes odoo/odoo#28919
2018-11-21 15:35:39 +00:00