Commit Graph
103231 Commits
Author SHA1 Message Date
qsm-odoo d4f8096790 [FIX] web,base: m2o empty name results
M2O use the autocomplete lib to display its content. The problem is
that if a result is empty (or only composed of whitespaces), a
divider is displayed in the dropdown.

Commit 1d9f7d279a was fixing this by only displaying non-empty
name results... but it did not work as many models implement the
name_search method the wrong way.

The new solution is to add a default display for record values which
are empty strings, at the right places in the webclient components.
2016-05-23 17:08:50 +02:00
Thibault Delavallée dd3ee48b64 [FIX] base: partner: compute image before calling create 2016-05-23 16:12:30 +02:00
Thibault Delavallée 865ccfe636 [FIX] stock: typo in onchange 2016-05-23 15:44:44 +02:00
Martin Trigaux 17e144f51b [FIX] mail,website_forum: set SELF_WRITABLE_FIELDS on model's class
Otherwise it is not visible when set on an instance of the new API.
self is a recordset instead of the model `res.users`

Without this patch a low priviledge user was not able to modify its own value
of `notify_email` through the preference window.
2016-05-23 15:36:12 +02:00
Christophe Simonis 0de30f4013 [MERGE] forward port of branch 8.0 up to 0af32f3 2016-05-23 15:08:35 +02:00
Géry Debongnie 0eaaeb68bc [FIX] web: better blur handling in m2m in wizards
Before this commit, many2many list views in wizards did not
handle the blur event at all, which means that the last edited
line was ignored.  This is quite a large bug, but not really
visible in our standard install, because we had no many2many
in wizards.

This commit add naive support for blur events.  This is only
intended to help the MRP team.  A complete solution would
probably involve moving most of the code in One2ManyListView
to X2ManyListView.
2016-05-23 13:53:05 +02:00
Cody Kitterman 68c6a51bfe [FIX] doc: corrects spelling errors for cmdline
From #12028
2016-05-23 12:44:33 +02:00
Jainik Patel 90130744e0 [IMP] sale, sale_timesheet: explicit analytic account creation
Before this revision, a small function in sale was extended by
sale_timesheet to know when to (or not to) create an analytic
account for a SO.

This was nice, but since it was extended only in this module,
there's no real need for the added complexity (*reading
complexity*)
2016-05-23 12:24:39 +02:00
Jainik Patel 8149d1422d [IMP] sale: AA editable if not set
Allow manually creating an analytic account when needed even
when a SO is confirmed, but do not allow changing it once it's set.
2016-05-23 12:16:45 +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
Damien Bouvy d4b5a25451 [IMP] account_asset: use company dependent fields
Like for most of accounting, these fields should be company dependent
since they generates accounting entries in certain journal & accounts
that depend on the company, while your products usually don't.
2016-05-23 10:25:47 +02:00
Fabien Pinckaers aa0a8f02c3 [IMP] crm,project,website: improved welcome email content 2016-05-22 17:19:09 +02:00
Fabien Pinckaers 412df3e241 [IMP] sale,purchase: done -> lock usability improvement 2016-05-22 16:30:59 +02:00
Fabien Pinckaers d5d54c2780 [IMP] sale: SO Line not modifiable if it's a reinvoiceable expense 2016-05-22 16:08:10 +02:00
Fabien Pinckaers 48ea59d46e [IMP] sale,hr_expense: simplify invoice policy, 2 options instead of 3
The invoice_policy 'time & material' has been replaced by an
    expense_policy!='no', with invoice_policy='delivery'.
2016-05-22 15:57:33 +02:00
Fabien Pinckaers 26603b0877 [IMP] event_sale: move event_ok on product form to Sales tab 2016-05-22 10:52:05 +02:00
Fabien Pinckaers 7f97a64091 [IMP] event_sale: easier configuration of tickets, no more event_type_id on product as tickets define what you can sell 2016-05-22 10:42:53 +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
Martin Trigaux 06c49d19c3 [MERGE] Forwardport of 9.0 up to 3b234a23c 2016-05-20 09:04:38 +02:00
Martin Geubelle 91acf0ab51 [FIX] mail: typo
This `,` at the end creates a tuple and `if (False,)` will be evaluated to True.
This leads to invalid `Notification Email`.

Hum..
2016-05-19 15:35:34 +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
qsm-odoo e503fc80df [FIX] web, pos: Lato font assets
A fonts.less file which contains the definition of Lato was created
in saas-11 and placed in the backend assets. It should have replaced
the lato/stylesheet.css in the common assets.

Also adapt point_of_sale assets to use the same file.
2016-05-19 14:36:28 +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
Christophe Simonis f2230136bd [FIX] stock: correct (de)activation of internal picking types in config wizard 2016-05-19 13:00:58 +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
Tanguy Charlier 6a430678b5 [IMP] hr_timesheet: inline project and task creation
For the sake of consistency with other views and general usability, the user is allowed to create new tasks and projects from the timesheet lines list view.
2016-05-19 11:23:20 +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 Geubelle 640ac29f11 [FIX] website_forum: correct URL for comment deletion
When searching for the action of the form related to the button, the form is not necessarly the direct
parent of the button but could be upper in the architecture.
2016-05-19 11:16:25 +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
qdp-odoo 8cdde84028 [FIX] account: fixed error 'Nonetype has no attribute rounding' on some reconciliation involving secondary currencies but without being all the same 2016-05-18 16:40:41 +02:00
Christophe Simonis ca3418f6df [REL] master is version 10 alpha.
This reverts commit 14b910351f which have
wrongly been forward-ported.
2016-05-18 15:24:43 +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
Richard Mathot fbaf303745 [REF] stock_account: outdated documentation 2016-05-18 14:59:42 +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