Commit Graph
101634 Commits
Author SHA1 Message Date
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
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 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
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
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
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 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
Aaron Bohy 16d950f5ad [FIX] web_calendar: search date range when no date_stop field 2016-05-18 09:52:45 +02:00
Aaron Bohy 252bd47f94 [FIX] calendar: don't block UI on slow /calendar/notify
Safe imp for a stable version. Better fix could be to send notifications
through the bus, but this would be in master.
2016-05-18 09:52:41 +02:00
Goffin Simon 7f1d7c1cce [FIX] account: invoice has not the same currency as the purchase order
Used case:

-Configure company in EUR, and user in multi-currency
-Create a purchase order in USD and confirm it
-Click on the smart button "0 invoices" then click on "create"

Result before the fix:

The system created an invoice in EUR, currency of the company,
instead of in USD, currency of the purchase order.

Result after the fix:

The system created an invoice in USD, the currency of the related purchase order.

opw:677568
2016-05-18 09:46:01 +02:00
Denis Ledoux 96e085355d [FIX] account: partial reconcile unreconcile with deleted credit/debit move
`debit_move_id` and `credit_move_id` of
`account.partial.reconcile` must be required.

Not having one of them set on this model
does not make sense, you cannot have a reconciliation
with a debit move but without a credit move, for instance.

Databases already having the trouble,
having partial reconciliations without
either a debit or a credit move,
had issues for the computation of the
`payment_move_line_ids` compute field,
which relied on the fact these fields
were supposed to be required. This revision
makes a retro-compatibility patch for these
databases already having the issue.

opw-677709
2016-05-17 17:57:08 +02:00
Nicolas Martinelli 68b127797e [FIX] web: left margin of graph
The left margin of the graph doesn't take into account the width of the
maximum Y-axis value. In case the values are high (> 10^7), they are
cropped.

The fix is to adapt the left margin as a function of the size of the
maximum value.

opw-676538
2016-05-17 16:38:28 +02:00
Nicolas Martinelli cab2dce0d2 [FIX] web: Y-axis formatting
In case of a line graph, the values of the Y axis are not formatted as
numbers, although they are on the bar graph.
2016-05-17 16:38:28 +02:00
Denis Ledoux 449a160ef9 [FIX] account: usererror takes only one argument
opw-677589
2016-05-17 16:30:30 +02:00
Christophe Simonis 128d58f1c7 [MERGE] forward port of branch saas-6 up to b54fdaa 2016-05-17 14:00:49 +02:00
Christophe Simonis b54fdaa101 [MERGE] forward port of branch 8.0 up to 393c14d 2016-05-17 13:40:44 +02:00
Jeremy Kersten d9d84bb6fd [FIX] website: backport of 613ee31f9c 2016-05-17 13:31:35 +02:00
Christophe Simonis 393c14d31a [MERGE] forward port of branch 7.0 up to f4cb884 2016-05-17 13:16:50 +02:00
Damien Bouvy 903733a320 [IMP] web/database manager: admin login & country
Add inputs e-mail address and country
when creating a newdatabase

This will provide the installation of the correct
chart of accounts at the installation of Accounting

Use the provided login as the admin login,
and set the email on the partner
if the login set is an email

Set the country on the company (and its partner)
The countries are parsed from XML country list

We take the opportunity to repair the `label for`
which bind the label with the input only if
the `id` attribute of the input is set with
what is set in the `for` attribute of the label
2016-05-17 12:40:47 +02:00
Martin Trigaux 036e3cc253 [IMP] doc: uniform design with user documentation
Apply the same changes from functionnal documentation to dev doc:
odoo/documentation-user@4316470
2016-05-17 12:02:12 +02:00
qdp-odoo 640e851f4e [FIX] l10n_fr_fec: intial balance of accounts from the P&L should be summarized into a single line 2016-05-17 11:44:39 +02:00
Nicolas Martinelli dd92f9603c [FIX] point_of_sale: select correct journal
An issue occurs in the following situation. Several cash journal are
configured for a given PoS, and a user performs a refund (the
transaction contains only a refund). In this case, the wrong journal
might be selected. This is because a payment line of zero is not sent to
the backend, and therefore an arbitrary journal is selected.

opw-676229
2016-05-17 11:38:02 +02:00
Stanislav Sokolko 0632a40b80 [FIX] web: update compatibility layer
this commit adds better support in the compatibility layer of the
js framework.  This is necessary if one wants to follow the
official tutorial.
2016-05-17 10:47:26 +02:00
Stanislav Sokolko c71cb6a5fc [CLA] signature for s.sokolko 2016-05-17 10:47:06 +02:00
Sylvain GARANCHER f4cb884cdc [FIX] base: Add missing return values
The _auto_init method was overriden without keeping the return value of
the super on some models.
This break the new stored computed fields computation at field creation.

Closes #11985
opw-677232
2016-05-17 10:39:54 +02:00
Géry Debongnie 65192ea943 [FIX] web: remove useless line
the enable_button call should have been removed...
2016-05-17 10:26:24 +02:00
Géry Debongnie 95cbee6243 [FIX] web: fix duplicate changes in form view
Before this commit, in some cases, clicking on 'save' button, then on
other buttons (like 'validate' in invoices) had the unfortunate effect
of applying twice the changes in some cases.

More specifically the problem appears when:
1. an onchange is triggered (for example, taxes in invoices)
2. the user clicks on 'save', buttons are disabled
3. the 'save' actions is completed, the buttons are enabled, but
   the on_button_save still does some work: triggering event, and
   reloading the view
4. the user clicks on 'validate'
5. the onchange completes, this triggers some more work

Our only protection against such interactions is right now the fact that
buttons are disabled/enabled.  In my opinion, there should be a way
to guarantee that actions are properly serialized (that is actually what
a mutex is for... just saying). But the code of the form view/list view is
too coupled, and such changes are quite dangerous.  A real refactoring
of those is needed at some point in the future.
2016-05-17 10:24:47 +02:00
Damien Bouvy a5277bc106 [IMP] doc: Enterprise-compatible installation instructions
Before this revision, the installation instructions where
Community-centric, which led some customers to believe
that they had to install first Community then Enterprise.

This commit makes the instruction compatible for both editions.
2016-05-17 10:21:11 +02:00
Odoo Translation Bot 8f46a6fe73 [I18N] Update translation terms from Transifex 2016-05-15 02:56:59 +02:00
Odoo Translation Bot 610d462740 [I18N] Update translation terms from Transifex 2016-05-15 00:29:02 +02:00
Nicolas Lempereur 4cf9e4ca83 [FIX] l10n_be_intrastat: typo 2016-05-13 17:57:12 +02:00
Nicolas Lempereur 780e3fec10 [FIX] l10n_be_intrastat: get location_id from stock move
purchase.order have been rewritten with cb01be2

It was not taken into account for intrastat  who still used the now not
existing "location_id" on purchase order.

This commit use instead the method _get_destination_location which
should be equivalent.

opw-677497
2016-05-13 17:54:21 +02:00
Christophe Simonis 820f7e11c1 [FIX] core: correct fields.modified_draft for triggers on other models 2016-05-13 17:32:00 +02:00
Damien Bouvy 9b2d153302 [FIX] setup: atom doesn't want to use hard tabs even when told to
This is now the 2d stupidest commit I ever did
2016-05-13 17:08:28 +02:00
Nicolas Lempereur 9530a9f498 [IMP] website: share widget and multi language
The lang of the content of the "Share" widget was the one used when
inserting  it in the view. Thus if someone see a page with it in another
language the title and url for sharing is not translated.

This commit use the current page language to set the widget data.

opw-676062
2016-05-13 16:57:43 +02:00
Damien Bouvy 98bd6d4f4a [FIX] setup: use hard tabs
GTFO
2016-05-13 16:22:05 +02:00
qsm-odoo 068acf76da [FIX] web_kanban: quick redrag of kanban records
When dropping a record, it is updated and rerendered. The problem with
this behaviour is that if the record is redrag immediately after drop,
jquery-ui throws an error as the widget the user is trying to re-move
is being rerendered.

The solution provided by this commit is to block the draggable feature
while the record is being rerendered.
2016-05-13 16:03:04 +02:00
Damien Bouvy aee53a3695 [FIX] setup: missing dep for RHEL-based distros 2016-05-13 15:48:08 +02:00
Nicolas Martinelli ccb6f1c501 [IMP] document: indexation of MS documents
Commit 3ced0ff61 removed the support of Microsoft documents for
indexation. It makes sense for the old formats such as '.doc' since it
requires an external tool ('antiword'), which could lead to a security
issue. However, the new formats such '.docx' are simple xml files,
therefore they could be indexed with the usual XML parsing tools.

opw-677235
2016-05-13 13:32:06 +02:00
Christophe Simonis dcab356b38 Revert "[FIX] product: respect sequence when loading pricelist rules"
This reverts commit b0f02e31b2.

As pointed out by @nim-odoo [1], a similar patch has already been
uncommited few month ago [2].

Ref #11988
opw-676422

[1] https://git.io/vrYxY
[2] see a6badd2559
2016-05-13 13:28:41 +02:00