Commit Graph
108410 Commits
Author SHA1 Message Date
Adrien Dieudonne 7a1d2d1c4c [FIX] *: reports: check required values for 'render_html'
Some reports require additional information to render. When
accessed in Odoo, the user has to fill a wizard to provide those
information. However, when these reports were opened in Studio,
it crashed as those information were missing (we don't pass
through the configuration wizard in this case).

This fix checks if all the required information are given before
trying to render those reports, and it displays a warning in
the logs in they are missing, which is better than a traceback.

backported in v10 for opw-753036
2017-07-20 14:21:57 +02:00
Christophe Simonis 11270336fa [MERGE] forward port branch saas-11 up to f07ca36b9b 2017-07-19 16:18:40 +02:00
Christophe Simonis f07ca36b9b [MERGE] forward port branch 9.0 up to 41433debdb 2017-07-19 16:16:57 +02:00
Xavier Morel b656eda22d [FIX] ir_qweb: decoding of attachment assets
For uploaded modules (e.g. saas), uploaded assets are stored in
attachments.

When the asset content is retrieved, static "filesystem" files are
assumed to be UTF8 and properly decoded, but attachment data is not
and is thus interpreted as ASCII further down the line, leading to a
UnicodeDecodeError (and a broken page/template/...) if the asset data
is not actually ASCII (e.g. if it's UTF-8).

Fix by treating attachment assets as UTF8 encoded, same as filesystem
assets.

OPW-752858
2017-07-19 15:41:37 +02:00
Nicolas Martinelli 21fbb9776a [FIX] sale, sale_timesheet: unnecessary complex domain
The use case was not supported anyway.

This reverts a0fed3b845
2017-07-19 14:32:55 +02:00
Nicolas Martinelli e909533e30 [IMP] sale, sale_timesheet: unnecessary search
Check if there is any sale line before compute analytic.

opw-752100
Closes #18173
2017-07-19 14:32:55 +02:00
Goffin Simon b2fb17f3c4 [FIX] hr_expense: Domain on field account_id in model hr.expense
It was possible to set a payable account for an expense.
So it raised a UserError when reconciling the lines in
function expense_post_payment because two different accounts
were used as payable account.

A expense account is expected as account for an expense.

opw:752695
2017-07-19 13:51:37 +02:00
Nicolas Martinelli 41433debdb [FIX] account: leap year
If the end of the accounting period is set to the 28-29th of February,
crashes may occur in date computation.

opw-752939
2017-07-19 12:58:05 +02:00
Timo Talvitie c0dbbe6320 [CLA] signature for timotalvitie
Done at #18314
2017-07-19 11:58:12 +02:00
xmo-odoo 27127b73c1 [FIX] Close POS session with amount 0 on statement lines
When trying to close a POS session (which confirms the bank statements
which reconciles the statement lines) if one of the statement lines
has an amount of 0 no payment object is
created (addons/account/models/account_bank_statement.py:905) and thus
``payment`` remains set to ``False``. In the past this was not an
issue but since b17e4a0f6b at the end of
the method (line addons/account/models/account_bank_statement.py:1003)
we unconditionally write to ``payment`` which blows up when it's
``False`` rather than a recordset.

This can happen if e.g. a POS order is composed only of free
products (don't ask...)

Fix by using an empty recordset instead of a boolean for a
non-payment, making payment.write a no-op.

OPW-752922
2017-07-19 11:43:32 +02:00
qsm-odoo 9494161e23 [FIX] website_quote: increase robustess of menu generation
On online quotations, a left menu is automatically generated on page
load by searching for the <h1/> and <h2/> elements in the page. This
also considered the empty ones which do not make sense and were
breaking the menu's layout. Ideally, there should not be any empty
title in the page.

opw-752764
2017-07-19 09:25:11 +02:00
Nicolas Martinelli 1cf12a9ae4 [FIX] sale: keep Salesperson
When creating an advance from a SO, the Salesperson is not kept.

opw-752490
2017-07-19 09:12:32 +02:00
Christophe Simonis 044ab92270 [MERGE] forward port branch saas-11 up to f081f19fb8 2017-07-18 20:09:37 +02:00
Christophe Simonis f081f19fb8 [MERGE] forward port branch 9.0 up to ba294a397e 2017-07-18 19:45:42 +02:00
Christophe Simonis ba294a397e [MERGE] forward port branch saas-6 up to 3228694bdd 2017-07-18 19:18:59 +02:00
Christophe Simonis 12fdf46a5b [FIX] mass_mailing: avoid creating mass mailing for messages posts
In case a default value is set for the field `mass_mailing_name` of the
mail composer, the automatic messages sent via message_post_with_* are
considered as a mass mailing. It may also create an AccessError if the
current user is not a mass mailing user.

In the case of the "assign user" email (for auto-subscribed users), the
url wasn't shorten, which resulted in invalid links (opw-752941) (fixed
by 3228694bdd)
2017-07-18 19:00:08 +02:00
Christophe Simonis 3228694bdd [FIX] mass_mailing: only track shorten links
It may happen that some mails attached to a mailing contains non
shorten links.
2017-07-18 18:36:21 +02:00
pashute b237c3e25e [IMP] doc: move demonstration path
To show forward slash in paths are needed and to use path guidelines

Closes #17989
2017-07-18 17:25:16 +02:00
Jarmo Kortetjärvi 2550cc08c3 [CLA] signature Oy Tawasta OS Technologies Ltd.
Done at #18301
2017-07-18 16:40:40 +02:00
Martin Trigaux 01b8f6be99 [I18N] website_sale: export source terms
To include 6d7648e9f0
2017-07-18 16:29:20 +02:00
Rakesh Sindhav 6d7648e9f0 [FIX] website_sale: don't transalte CSS classes
Closes #18000
2017-07-18 16:27:36 +02:00
Rakesh Sindhav f0c9275e35 [CLA] Signature for sindhav
Done at #18000
2017-07-18 16:27:36 +02:00
Nicolas Martinelli 957d57eaf7 [FIX] hr_expense: mail to manager
When an employee submits an expense, no mail is sent to the manager.
This should be the case, since it works this way on holidays.

The trick, however, is that the expense is created as submitted, but the
followers are only added afterwards. We need to make sure to add the
followers at creation.

opw-751085
2017-07-18 13:53:13 +02:00
Josse Colpaert 274432ecac [FIX] stock: force orderpoint deactivation
Deactivating product should not be working when you still have active
orderpoints.

Closes #16954
2017-07-18 09:48:02 +02:00
Goffin Simon 61304087e7 [FIX] point_of_sale: Creating pos order line with qty=0
Steps to reproduce:

1.Create pos order with two products.
2.One of the products, must be type="Stockable Product" and quantity=0.
3.Pay order.
4.Check order --> extra info --> picking

Bug:
picking state = Waiting Availability

In 9.0, the picking state is equal to "Done".

Fixes #18089
opw:751565
2017-07-18 09:40:34 +02:00
Alexis de Lattre ad14be036c [FIX] l10n_fr: allow to reconcile on 511xxx accounts
Closes #18152
2017-07-17 16:30:31 +02:00
Martin Trigaux f0a03da2b2 [I18N] Update translation terms from Transifex
Not sure why it did not fetched
2017-07-17 13:33:29 +02:00
Goffin Simon fea5057425 [FIX] account: Unlinking payment term
When unlinking payment terms, the ir.property records linked to
the fields "property_payment_term_id" and "property_supplier_payment_term_id"
were not deleted.

opw:749459
2017-07-17 12:56:57 +02:00
Nicolas Martinelli 74e4130f5f [FIX] account: accounting date vs invoice date
The accounting date is an hidden field, which is by default the invoice
date. However, a user can make it available in the interface, and modify
it.

When the accounting date is different from the invoice date, we must
make sure to make the accounting date prevail when it comes to currency
conversion. Otherwise, the account move created will use a currency
exchange rate which is not in line with its date.

opw-751848
2017-07-17 10:28:34 +02:00
Nicolas Martinelli 9b56c6d42d [FIX] account_bank_statement_import: decimal type
Ofxparse v0.16 returns decimal type for amounts, making `+=` crash in
case of a float.

opw-752172
2017-07-14 16:40:50 +02:00
Nicolas Martinelli ab094e5a80 [FIX] payment_authorize: acquier reference
The field `acquirer_reference` is not a mandatory field. If not
retrieved from the provider, it will have a NULL value in the DB, and
therefore will be `False` in Python.

The `capture` and `void` method will crash in this case, because of:
`etree.SubElement(tx, "refTransId").text = transaction_id`

opw-751231
2017-07-14 16:05:35 +02:00
Nicolas Martinelli 6331cd1ff5 [FIX] base: QWeb monetary format
- Set the currency precision to 0.05
- Print any QWeb report displaying amounts, e.g. the GL

The amounts are displayed with 1 digit precision instead of 2.

The formula used to compute the decimal places is actually wrong. The
correct one can be found in method `_decimal_places`. Anyway, we can use
directly the field.

opw-752283
2017-07-14 15:27:48 +02:00
Antoine Huvelle 0df22ebb60 [FIX] maintenance: show real time taken for a maintenance
Previously, the calendar view only shown a 1h item whatever the duration of the
maintenance, which was wrong every time the maintenance took more or less than
exactly one hour.
Adding this parameter allows showing a calendar view reflecting the real time
taken by the maintenance operation.

Closes #18072
2017-07-14 15:03:31 +02:00
Darko Nikolovski 6d1314367c [FIX] mrp_repair: group multiple repairs into one invoice
While `action_repair_invoice_create` is called on active_ids, it was working
only on one record at a time

Closes #18158
2017-07-14 14:58:31 +02:00
Yenthe V.G 13a3e76a48 [FIX] web_planner: remove second URL reference
Introduced at 77e18a48

Closes #17327
2017-07-14 13:42:46 +02:00
Christophe Simonis 9150d4c552 [MERGE] forward port branch saas-11 up to 8d1ad402a4 2017-07-14 12:13:33 +02:00
Christophe Simonis 8d1ad402a4 [MERGE] forward port branch 9.0 up to 3e8ba4905c 2017-07-14 12:10:25 +02:00
Nicolas Martinelli ba5608a5af [FIX] resource: efficiency factor
Backport of 45e7389a1e

opw-752226
2017-07-14 11:14:47 +02:00
Moisés López bb7fef79a6 [IMP] doc: Add 'report' dependency
To be able to correctly use report features.
It is auto-install but a good idea to make sure it is present and to show the
report module

Closes #18220
2017-07-14 10:55:30 +02:00
Martin Trigaux 0323b7154b [FIX] doc: correct diff
The attendee_ids line was highlighted instead of the session_ids
2017-07-14 10:48:13 +02:00
Nicolas Martinelli 2d155a35e1 [FIX] website_crm_partner_assign: # of Cases
The measure '# of Cases' gives a traceback when selected.

opw-752165
2017-07-14 09:01:28 +02:00
Nicolas Martinelli 69fa111e95 [FIX] stock_account: negative quant cost
- Set up a product with 'Real Price' costing method, in real time
  valuation
- Receive 1000 units at $0.10 each
- Create a landed cost of $456.70, validate => it creates a quants of
  999 units at cost $0.56 and 1 unit at cost $-2.74.
- Perform an inventory adjustment, and set the quantity to 0 instead of
  1000, post inventory.

An error arises due to the constrain debit + credit >= 0.

This is caused by the method `_prepare_account_move_line` from
`stock.move`, which cannot handle negative cost for quants.

opw-752063
Fixes #17707
2017-07-13 13:20:24 +02:00
Goffin Simon 37ff69d45e [FIX] mrp: Post inventory button without finished product"
This fix 2332df6bc7  has been done in stable and some customers
wants to keep the button "Post Inventory" available all the time.
Now the button is just visible in developper mode.

opw:748347
2017-07-13 11:23:42 +02:00
Nicolas Martinelli 3e8ba4905c [FIX] crm: expected closing
The "exp. closing" dashboard button takes into account the won
opportunities. It shouldn't.

Backport of 9d2f48dc7f

opw-751165
opw-744940
2017-07-13 08:35:40 +02:00
Nicolas Martinelli b1b8392591 [FIX] sales_team, crm: expected closing
On the CRM dashboard, the shortcut 'exp. closing' is the same than the
'overdue' shortcut. However, the number of opportunities in these
categories is computed differently (see method
`retrieve_sales_dashboard`).

We introduce a new filter "Overdue Opportunities" which reflects this
difference.

Backport of 9d2f48dc7f

opw-704173
opw-751165
2017-07-13 08:34:20 +02:00
Nicolas Martinelli 68934c6b87 [FIX] mass_mailing: access error when 'Retry'
A user without 'Administration/Settings' access rights cannot use the
'Retry' button on a mass-mailing.

This is because only this level of power is allowed to unlink
`mail.mail` records. However, this button is supposed to be used by
regular mass mailing users.

opw-744616
2017-07-12 15:33:38 +02:00
Cedric Snauwaert 999dc80e7c [FIX] base_import: when parsing date field, strip extra spaces 2017-07-12 13:48:22 +02:00
Christophe Matthieu e6e17cc5d6 [FIX] product: Error message when adding an item to a quote
When a user tries to add a product on an opportunity, the date_order of the
order is added into the context. This value can be False.

When "_compute_price_rule" is called without "date" arguments
(some onchange, compute...) the method method use the context date (in this
case the value is False) or the today date.
The date value is used in an sql request and raise a value exception.

opw-751700
2017-07-12 13:39:29 +02:00
Nicolas Martinelli 058cc22d2c [FIX] website_form: send email with subject
- Use the form builder to send an email
- Customize the snippet to include the subject and the body
- Send a mail

=> The subject is not included in the email

This is because the subject is filtered out and considered as a
blacklisted field.

It happens because `mail.mail` inherits from `mail.message`. The field
property `website_form_blacklisted` is set to:
- `True` for `mail.mail`
- `False` for `mail.message`

Since we go through all inherited models, the property on `mail.mail` is
overriden by the property on `mail.message`.

It is actually not necessary to go through all inherited models, since
in the case of `inherits`, we copy the fields of the inherited model to
the target model. The check is simplified by only checking the fields of
the current model.

Based on work of @nla-odoo

opw-748926
2017-07-12 11:56:23 +02:00
Moisés López 566968bf99 [FIX] doc: use new URI wkhtmltopdf releases
The old release of wkhtmltopdf are no longer published on the download page.
The developer explicitely asks to use the github link

cf: wkhtmltopdf/wkhtmltopdf#3524
    wkhtmltopdf/wkhtmltopdf#3521
    wkhtmltopdf/wkhtmltopdf#3518
    wkhtmltopdf/wkhtmltopdf#3508

Closes #18146
2017-07-12 10:13:32 +02:00