Commit Graph
110137 Commits
Author SHA1 Message Date
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
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 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
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
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
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
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
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
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
Dharmraj Jhala 2643e851aa [FIX] website_sale: prevent update of cart qty in edit mode
/!\ Should not be forward-ported in *12.0* /!\

Because of the mechanism to bind change / click event in the 10.0
implementation, when we are in edit mode on a product page, the event
handlers that are in charge of updating the cart quantity can still be
triggered.

After this commit, click / change event while updating cart qty will
not be effective in edit mode.

task-1825889
Closes https://github.com/odoo/odoo/pull/24211

closes odoo/odoo#29224
2018-12-04 09:54:20 +00:00
Sylvain Van Hoof e467681cfd [FIX] delivery: consistent return type
The original method `put_in_pack` returns a `stock.quant.package`.
Therefore, the override should do so.

Fixes #27636
opw-1912671

closes odoo/odoo#29229
2018-12-04 08:35:10 +00:00
Nicolas Martinelli e9bc13fce9 [FIX] website_sale: price difference
- Create a product A with a sales price of 40
- Create a pricelist where product A costs a fixed price of 100
- Assign this pricelist to a customer
- Connect as the customer on the eCommerce

On the eCommerce, the price for A is displayed as: ~~40~~ 100.

We only display a price difference if the pricelist price is smaller
than the sales price.

opw-1885443

closes odoo/odoo#29141
2018-11-30 08:39:37 +00:00
Odoo Translation Bot 536cd8caea [I18N] Update translation terms from Transifex 2018-12-01 02:45:01 +01:00
Nicolas Martinelli ae4a4cf0a9 [FIX] report_intrastat: product weight
- Create a product with 2 variants A & B
- Set a weight on the variants (btw, the weight field is not available
  on the template in this case)
- Create an invoice for A, validate

On the intrastat report, the weight remains 0.0.

The report clearly takes into account the weight of the template, not of
the variant. We use the product weight, and fall back on the template
weight.

opw-1913305

closes odoo/odoo#29178
2018-11-30 09:55:38 +00: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
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
Martin Trigaux 5472bbded5 [FIX] mail: invite: use proper translation terms
Fix translation placeholders in invite wizard, to make them easier to
understand for translators. Also rework the message generation code
to ensure proper XML structure.
2018-11-03 16:47:43 +01:00
XavierDo 9043305fa0 [FIX] mail: verify attachment access early to avoid errors later 2018-11-02 11:23:10 +01: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
Denis Ledoux af476c6949 [FIX] report: support for wkhtmltopdf 0.12.5
This revision brings the compatibility for our reports
using wkhtmltopdf 0.12.5.

Up to now,
the supported wkhtmltopdf version was 0.12.1.

The goal of this revision is to add the compatibility
to wkhtmltopdf 0.12.5,
while keeping the same exact rendering than in 0.12.1.

There is a behavior change with the `--dpi` parameter,
which no longer has a "zoom" level effect as it did with 0.12.1.

To deal with it, we pass the `--zoom` parameter when
the detected version installed of wkhtmltopdf is after 0.12.2,
with a ratio 96:dpi. 96 being the default dpi of wkhtmltopdf.

This trick allows to render the reports with the exact same
zoom level, whatever the dpi value configured in the reports paperformat.
(at least with dpi values up to 149, after 150, included,
the dpi parameter with wkhtmltopdf 0.12.1 as a weird behavior,
it no longer zoom out)

opw-1907346

closes odoo/odoo#28864
2018-11-21 09:30:02 +00:00
Nicolas Lempereur 1f8788deef [FIX] purchase: es_AR translation typo
Fixing it directly by commit since there is no es_AR on transifex.

The issue of the ticket has been solved by transifex, this is for
another similar issue that has been found.

opw-1907924
closes #28923
2018-11-21 17:37:35 +01:00
Denis Roussel e81809b89d [FIX] mrp: Allow mrp user to delete stock_move_lot links
With an mrp user, add lots lines to mrp production order moves. Then,
try to delete one line, the dustbin icon does not appear.

opw-1908930
2018-11-21 14:08:47 +01:00
Denis Roussel 8a6162d00d [FIX] mrp: User with no products write access cannot create production order
As the product_tmpl_id field is related one but not readonly, the creation
of production order triggers a write on product.product model
2018-11-21 13:16:45 +01:00
Nicolas Lempereur 258eaa7a3c [FIX] web_editor: firefox `´ accent no break position
On firefox if we do for example:

ALT+GR + [ALT+GRable ´ key]

Firefox may send keys "AltGr" and "Dead" instead of just "AltGr".

This was possibly causing caret to go a position too low when writing
speedily with diacritical marks.

opw-1903865
closes #28739
2018-11-15 16:52:31 +01:00
mao-odoo 8a9569b31e [FIX] auth_signup: Error when sending quotation
Fine tuning of this commit:https://github.com/odoo/odoo/commit/7501691da9a9dae832b7d6e78c6a5f57fc983b5c
Fields signup_token, signup_type, signup_expiration are protected
When sending a quotation (mail template 'Sales Order - Send by Email'):
the token needs to be read (and sometimes written)

opw:1907157
2018-11-15 15:28:48 +01:00
RomainLibert 8cdfe1d8fe [FIX] product: use product.pricelist in report product_pricelist
We were using hr.contribution.register as a doc_model on the
product.pricelist report which makes no sense since it should show
pricelist informations
2018-11-14 13:06:58 +01:00