Commit Graph
101650 Commits
Author SHA1 Message Date
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 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
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
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
Goffin Simon 0fc73a2067 [FIX] account: readonly bank statement line
Like in "view_bank_statement_form" when a line is linked to
a journal entry, this line must be in readonly.

opw:676344
2016-05-17 15:40:01 +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