Commit Graph
103218 Commits
Author SHA1 Message Date
Goffin Simon 8cdba8c5aa [FIX] account: get_formview_id
For a type 'in_refund', the supplier account invoice form must be
taken.

opw:678498
2016-05-25 15:14:54 +02:00
Martin Trigaux 97492a12a9 [IMP] gamification: prevent misconfiguration
Prevent selecting wrong field or models or computed fields

Fixes #8545
2016-05-25 14:58:55 +02:00
Jeremy Kersten bfb2263565 [FIX] website_forum: typo in translation 2016-05-25 14:39:38 +02:00
Jeremy Kersten 3ed55c540f [FIX] web: chardomain, don't allow to edit the input when not in edit mode. 2016-05-25 14:39:38 +02:00
Goffin Simon 21e56e487e [FIX] product_visible_discount: product without company_id
When computing the real price of a product, a currency of reference is
needed, first the currency of the product's company is privileged and
if no company is set on the product then the currency of the user's company
is taken.

opw:678159
2016-05-25 14:25:48 +02:00
Yannick Tivisse 0ac4a55132 [IMP] website_mail: Display the message.atttachment_ids on message_thread 2016-05-25 12:38:14 +02:00
Yannick Tivisse a8248f2328 [IMP] website_project_issue: my/issues/id form improvements
1/ Display a button for the project_user to come back in backend and
   edit the issue if they want
2016-05-25 12:38:14 +02:00
Nicolas Martinelli 1c58c67df2 [FIX] web_settings_dashboard: access error
When a user has the access rights "Configuration" or "Access Rights"
regarding the "Administration" module category, the click on the
"Settings" menu leads to an access error.

This is because the dashboard fetches data about the number of installed
modules ("installed_apps"), which requires access to "ir.module.module".
Since it is not easily possible to hide a parts of the dashboard (the
static templates do not recognize the "groups" attribute), we simply
hide the dashboard for these users.

opw-678531
2016-05-25 11:40:39 +02:00
qdp-odoo 9516bad3cb [FIX] account: don't write the foreign currency on writeoff when several secondary currencies are involved 2016-05-25 11:06:35 +02:00
Richard deMeester 31f50efe0a [FIX] stock_account: average cost with foreign currency
Quants are created, and stock moves are updated, with the purchase
value converted at current rates.  However, the product average
was calculated before that value was retrieved.  This ensures
the correct value is retrieved for the average cost calculation
and will match the actual quants.

Fixes #12163
Closes #12164
opw-678511
2016-05-25 10:54:09 +02:00
Goffin Simon 5b299a2094 [FIX] calendar: editing an existing recurrent event
It is not possible to edit the start_date, end_date, start_datetime,
end_datetime and duration for a recurrent event due to the raesons
explained in https://github.com/odoo/odoo/issues/10278 or see
opw:665700

opw:677139
2016-05-25 10:06:27 +02:00
Joren Van Onder be48a1402c [FIX] hr_payroll: avoid infinite recursion
The get_recursive_parent function seemingly depended on the ordering of
the rule_categories recordset which happens to work fine in most cases
because all data first defines the parent before defining the children
rule categories. But if you happen to do it the other way around it
won't work and it will infinitely call itself because:

if rule_categories[0].parent_id:
    rule_categories = rule_categories[0].parent_id | rule_categories

won't change the value of rule_categories[0].

opw-673222 (loosely related)
2016-05-25 09:57:37 +02:00
Nicolas Martinelli e69d9b8b7d [FIX] account_asset: fiscal year date
The fiscal year start date should be taken into account when calculating
the depreciation amount in case of prorata temporis.

opw-678072
2016-05-24 15:36:54 +02:00
Martin Trigaux bb51431653 [FIX] website_mail: publications of internal notes
On the font-end view of project.issue, only the messages of type `note` were
display. This excluded the messages recieved via email which makes hard to
understand a conversation (e.g. a customer does not sees his own answers).

Instead, only filter out the notifications (change of states, responsible...)

opw-677426
2016-05-24 15:26:22 +02:00
Nicolas Lempereur d4e7da6133 [IMP] im_livechat: don't auto-open on mobile
Currently on mobile, the livechat window would take all the viewport of
a small screen mobile browser. This combined with the "auto open"
feature can be desorienting: users could have only seen the "hello, how
may I help you ?" window and not know what to do or what is happening.

So this commit remove the "auto open" feature if user is on a too small
device (the user would thus have to click on "Have a Question").

closes #12148
opw-678012
2016-05-24 14:34:36 +02:00
Cedric Snauwaert 784cdf9724 [FIX] account: fix error in aged partner balance, variable at_least_one_amount referenced before assignment 2016-05-24 14:21:25 +02:00
Goffin Simon fea0fef7a2 [FIX] project_issue: number of issues for a customer
When counting the number of issues for a customer, all the the contacts
of this customer must be taken into account.

opw:676985
2016-05-24 12:51:10 +02:00
Christophe Simonis 4c07fafe70 [MERGE] forward port of branch saas-6 up to 0de30f4 2016-05-24 10:25:20 +02:00
Goffin Simon 08416b2335 [FIX] account: partner_id set on a bank fee
Used case:

-Create several customer invoices and validate them
-Register a payment without any partner_id and in a bank statement for an amount
a bit lower than the total of the invoice (the difference is the paypal fees)
-Reconcile the invoices with the payment and create a write-off for the paypal fees
-When you close the bank statement, check the journal items, the paypal fees are
automatically assigned with a partner.

Fix:

-When creating the account move line for the fee, if all the account move lines
linked to the move are for different partners then you cannot determine the partner
of the fee.

opw:674822
2016-05-24 09:55:32 +02:00
Goffin Simon 509ce61836 [FIX] account: unlink account journal
The bank account linked to a journal cannot be systematicaly deleted
with its journal because this bank account can be linked to several
journals.

opw:676374
2016-05-24 09:37:24 +02:00
Denis Ledoux 0d929dc8fa [FIX] account: invoice import with only partner and lines
When creating a new invoice through the web interface,
a bunch of "default" values are loaded once the partner
chosen, thanks to an onchange on this field,
such as the `account_id`, the fiscal position, etc.

It was not when importing an invoice, making it
more difficult to import an invoice.

In addition, the taxes lines were not computed at all
when importing an invoice with taxes within its
invoice lines, while it should be the case
if the tax lines are not forced during the import.

opw-678155
2016-05-23 17:11:17 +02:00
Christophe Simonis 0de30f4013 [MERGE] forward port of branch 8.0 up to 0af32f3 2016-05-23 15:08:35 +02:00
Cody Kitterman 68c6a51bfe [FIX] doc: corrects spelling errors for cmdline
From #12028
2016-05-23 12:44:33 +02:00
Nicolas Martinelli ed2badcd72 [FIX] account: sort taxes
In the case of grouped taxes, the taxes would not be applied anymore
after commit 0a5b943d19

opw-678158
opw-678219
2016-05-23 12:01:57 +02:00
Nicolas Martinelli 1139da2884 [FIX] account_asset: depreciation start date
If 'Prorata Temporis' is not set, depreciation_date should be the 1st of
January of purchase year.

opw-677534
2016-05-23 10:44:34 +02:00
Martin Trigaux 0af32f3f84 Revert "[FIX] res.currency: allow duplication"
This reverts commit d780f9476d.

Did not work due to the size=3 on name field that strips the code to the first
three letters only (removing the " (copy)" part).
Copying a currency has a few business cases as the rates are not copied.
As can not increase the size of a field in stable, remove the method that had no
effect.

Fixes #11036
2016-05-23 10:39:15 +02:00
Odoo Translation Bot 95c9036aef [I18N] Update translation terms from Transifex 2016-05-22 02:57:09 +02:00
Odoo Translation Bot ebc0206ab5 [I18N] Update translation terms from Transifex 2016-05-22 00:28:27 +02:00
Damien Bouvy b9bca7909a [FIX] hr: trigger job count computation on employee archive
opw-676542
2016-05-20 13:43:32 +02:00
Martin Trigaux d9073a7773 [IMP] calendar: avoid parsing for models that do not have virtual ids
And avoid bug with negative ids to happens in the first place
2016-05-20 11:16:30 +02:00
Martin Trigaux ae1c0e8b23 [FIX] calendar: fetching images of negative ids
The mimetime fetching in /web/image/... may fail if:
- calendar is installed
- `id` is a string (using ?id=42 in the URI)
- `id` is a negative number (company partners on odoo.com)

The `search` override of `ir.attachment` in calendar detects if a number is a
virtual ID when it contains a '-' and is a string.

While it is not optimal to allow both int and str format for paramter `id`, make
the verification of virtual ID in calendar more strict to only match the format
`<real>-<virtual>` and not `-<real>`
2016-05-20 11:16:29 +02:00
Nicolas Lempereur 7f9942c1a4 [FIX] l10n_be_intrastat: traceback change new api
642fea4 updated some models to new API but this was not taken into
account into the part of the code this commit fix.

opw-677497
2016-05-20 10:41:27 +02:00
Leandro Ezequiel Baldi 566e6db547 [CLA] signature for Baldi Leandro (lbaldi)
Closes #12110
2016-05-20 10:36:21 +02:00
Nicolas Lempereur 3b234a23cb [FIX] web: download file and editor firefox bug
When we download a file (as can be done with attachments in Odoo),
firefox is opening the link in current window but cancel the action once
it is aware the resource is to be downloaded.

But this get firefox into a corrupt state for some contenteditable
features, for example document.queryCommandState which is needed for the
editor will after downloading a file throw an error consistently instead
of working as expected.

It can be reproduced on firefox (at least from version 32 to 46) with
the following snippet:
 https://jsfiddle.net/s246u3ay/3/

The issue is probably linked to the following reported issue since 2005:
 https://bugzilla.mozilla.org/show_bug.cgi?id=297494

This commit avoid the bug by opening attachments download links in a new
window instead of the current one.

closes #12109
opw-676918
2016-05-19 14:49:52 +02:00
Jérome Maes dfcbcb02ce [IMP] doc : add python idioms and odoo specific coding guidelines
- add python idioms
- odoo specific guidelines (for ORM, translations, ...) inspired from old guidelines v6.0
- some other best pratices
2016-05-19 14:39:52 +02:00
Jérome Maes b04d6e0ac3 [IMP] doc : expand the coding guidelines
- correct typos
- clarify some points, according to the community comments
- precise the xml notation : record tag vs act_window/menuitem/... tags
- add organization of report, wizard, data/demo, ... (directories and naming conventions)
- new conventions for 'symbols'
- ...

Thanks to @rim-odoo for its grammar extremist review, and @tde-banana-odoo for our long debates about wizard conventions.
2016-05-19 14:39:52 +02:00
Nicolas Martinelli 03c032ecb9 [FIX] web: company logo file extension
The company logo file extension is always '.png', even if the logo is of
another type such as 'jpg' or 'gif'. This is not an issue for decent
browsers, but IE might not display the image under specific
circumstancies, e.g. in combination with nginx.

opw-676836
2016-05-19 13:52:08 +02:00
Martin Trigaux e3523113e0 [FIX] hr_holidays: missing context
Closes #9386, opw-677958
2016-05-19 13:19:35 +02:00
Martin Trigaux 1def9911df [FIX] account: duplicate journal should not use the same bank account
There is several override of create and write that assumes that a bank account
is present on only one account (see 4530e5d).
It is very hard to change or remove the account bank once linked to a journal
(see 4a65bc38) so it should not be set in the first place when duplicating a
journal.

opw-676374
2016-05-19 12:14:58 +02:00
Goffin Simon 7c5275b6a1 [FIX] mail: to prevent infinite loop
Introduced by fac04424ca
2016-05-19 12:03:59 +02:00
Nicolas Martinelli 80200333fc [FIX] account: statement line amount rounding
See comment in code.

opw-676924
2016-05-19 11:16:55 +02:00
Nicolas Martinelli 9365482df0 [FIX] account: sequence of statement
The sequence used in the bank statement lines is not reliable. Indeed,
several lines might have the same sequence.

opw-676924
2016-05-19 11:16:55 +02:00
Martin Trigaux 7f02fc9e4f [FIX] l10n_be: allow more than 120 periods
The widget selection only shows the first 120 results.
The selection was most likely set to avoid creating new entries but it can be
done with an option tag. This allows to use the search on many2one fields.

opw-677908
2016-05-19 11:06:45 +02:00
Goffin Simon c286e2d5b2 [FIX] project_issue: number of issues
When no stage has been defined for a project, the new issues are
set in an undefined stage(stage_id = False). Then these issues must
be counted.

opw:676985
2016-05-19 09:30:31 +02:00
Nicolas Lempereur ae9d57bc1e [IMP] web: multi-click on save on view form (no fp)
When clicking on save several time when editing a view form it can be
saved several times which can be an issue for one to many.

The normal happenstance when saving should be as follow:

-> save (click)
-> wait write result
-> received write result
-> reload the form with updated data and updates buttons

But when clicking several time, it could become:

-> save (click)
-> wait write result
-> received write result
-> save (click)
-> wait write result
-> received write result
-> reload the form with updated data and updates buttons

This commit only reinstate the saving feature once the form is reloaded.

related to opw-671793
backport of 8.0's dd714ac

note: no need to forward-port
2016-05-18 17:37:14 +02:00
vbh-odoo 8acfb0d72d [FIX] website_gengo: fixed button click and translations
- Fixed linking issue after click on 'Translate' button.
- Controller added to post terms in gengo

opw-648546
2016-05-18 15:15:41 +02:00
Martin Trigaux 216d328a11 [FIX] web_editor: serialise translations of html_translate fields
The html_translate fields (e.g. website_descripton on product.product) were not
serialised and the raw value from the web_editor was saved as a translation.

This was an issue in case of special characters that may be present in the
translation. A translation containing non-breaking space was sent in html
(`foo&nbsp;bar`) while lxml converts such characters to unicode (`foo\xa0bar`).

When writing a translation, the value is checked against incorrect format using
```
value0 = field.translate(lambda term: None, record[fname])
value1 = field.translate({trans.src: trans.value}.get, value0)
value2 = field.translate({trans.value: trans.src}.get, value1)
if value2 != value0:
    raise ValidationError(_("Translation is not valid:\n%s") % trans.value)
```

As value1 is the unicode version of the translation and `trans.value` is the
html version of the translation, the last substitution in the callback method
was never made and the ValidationError was raised.

This commit forces the serialisation through lxml to be sure the compared
strings are using the same parser instead of comparing value from summernote and
lxml that may be both valid but still different.

opw-675767
2016-05-18 15:01:29 +02:00
Goffin Simon fac04424ca [FIX] mail: receiving a notification without notifying the parent message.
Used case:

If you add a user which has no acces on a model(ex:purchase.order)
as follower on a record of this model. When someone responded by email on
this record, and when a message is sent on this record, an exception is raised
at the connection of the user added as a follower.

Fix:

To have the rights to read the message, a read notification for this follower must
be added to all parents of this message.

Closes #11902

opw:676699
2016-05-18 14:07:54 +02:00
Richard Mathot 6c66365b7b [FIX] website_sale_delivery: reset carrier on cart update
It makes no sense to recompute delivery costs at each update of the cart;
furthermore, it prevents users that already selected a carrier to remove
the last products of their carts

This fix is additional to e4e1e571c2
2016-05-18 12:27:14 +02:00
Martin Trigaux 8ce16c3abe [FIX] doc: white h2 title
Cherry-pick from odoo/documentation-user@d193f7c0
2016-05-18 10:54:32 +02:00