Commit Graph

94586 Commits

Author SHA1 Message Date
Denis Ledoux e2d16ea04a [FIX] account_voucher: unreconcile with deleted journal items
This is possible to unreconcile and then remove journal
items associated to `account.voucher.line`.

When it's done, the voucher is within a corrupted state,
with debits and credits lines without journal item, which
is required.

Because the journal item of this line is empty,
while required, this is no longer possible to use
the "Unreconcile" button, because the form is invalid.

In order to allow to unreconcile a posted customer/supplier
payments with missing journal items, we set
the journal items as required only when the payment
is within the `draft` stage.

opw-667232
2016-01-27 16:36:26 +01:00
Joren Van Onder 634c62610e [FIX] purchase: only search in requested model
Because otherwise a user who has access to a view displaying
supplier_invoice_count will get an access error if he doesn't also have
access to purchase.order, even if that wouldn't have been displayed.

opw-666935
2016-01-27 13:13:03 +01:00
Christophe Simonis 43a4ffe6b6 [MERGE] forward port of branch 7.0 up to 098c084 2016-01-26 18:09:05 +01:00
Nicolas Lempereur e95b01db3e [IMP] web_graph: XLS export fail if more than 256 columns
When creating a XLS file with more than 256 columns, the library used
(xlwt) fail since it is targetted to support MS Excel 97 up to
Excel 2003.

But Odoo doesn't has no check and in this given instance (an error
happening in a controller generating a binary filte) the real error
message is lost.

This commit check if the to-be exported data has more than 256 columns,
and if this is the case display an error message without even trying
the export.

closes #10630

opw-660474
2016-01-26 17:38:52 +01:00
Yuriy A. Apollov 098c084eae [FIX] orm: iteration on `browse_null` object lasts forever 2016-01-26 17:34:39 +01:00
Stefan Rijnhart 014a1294b2 [FIX] Context argument may be immutable 2016-01-26 17:18:35 +01:00
Raphael Collet d0c18d7a85 Merge pull request #10228 from hbrunn/8.0-search_computed_in_path_odoo
[FIX] search with computed fields in path
2016-01-26 15:59:01 +01:00
Holger Brunn 6fd57c2188 [FIX] allow searching for new style function
fields in a search path
2016-01-26 14:15:22 +01:00
Denis Ledoux ab245fcaa2 [FIX] stock_account: stock valuation at date total
When performing a stock valuation at date,
the stock valuation total wasn't equal
to the sum of each line of the report.

This is because the domain forcing the
date wasn't passed to the `search` call
when no group by was applied.

Indeed, when calling
`read_group` with a group by, the lines in the results
contains the domain used for each line, but when
there is no group by applied, this is not the case, the domain
is not included in the line dict returned by `read_group`.

In such a case, therefore, we must use the domain that was passed to
the `read_group` call.

opw-667761
2016-01-25 18:29:28 +01:00
David Monjoie 11fe2d5b6d [FIX] mass_mailing: added missing models in form view
Backport of fda5021e6b6b81c1f7d5de60dffc5821e521b484 that I
erroneously did in 9.0, thinking it was reported on 9.0.
2016-01-25 13:42:37 +01:00
Denis Ledoux 7ad309e015 [FIX] survey: matrix results after row deletion
In a survey question of type `matrix`,
nothing prevents to remove a row from the matrix,
even if there are already answers for this line.

If the case happens, the row is deleted, but
not the answers. The answers are therefore orphan.
The answers should probably be deleted when the
row is removed from the survey, but this is a risky
change, and, even, users might want to keep track
of the answers given even if the line doesn't exist
anymore in the survey.

Therefore, we just handle the case when displaying
the survey results,
we ignore matrix answers for which the row no longer
exists.

opw-666393
2016-01-25 11:32:31 +01:00
Odoo Translation Bot dc48744bf7 [I18N] Update translation terms from Transifex 2016-01-24 03:00:37 +01:00
Raphael Collet 70fdb5a26e [FIX] calendar: in method write(), process all records and not the last one only 2016-01-22 17:12:09 +01:00
Raphael Collet 748a719fd9 [FIX] fields: make `related_sudo` work for draft records (used by onchange)
Accessing a related field with `related_sudo=True` on a draft record should
effectively traverse the fields as the admin user.

This fixes #5121, #7138.
2016-01-22 16:06:27 +01:00
Goffin Simon ec0e413099 [FIX] website_sale: Suggested alternatives
Suggested alternative descriptions spill out of the boxes if the
description is too long.

PS: same fix as in saas-6 with f7110b46bef2d84cd2ce864f5bdd747457099e1e.
This fix doesn't have to be forwrad ported.

opw:667343
2016-01-22 15:41:54 +01:00
Goffin Simon 5009944410 [FIX] stock: action_cancel
When writing several times on the same record in the same transaction,
the orm raise a Missing error because the rowcount only gives one
difference.

opw:666470
2016-01-21 14:51:56 +01:00
Goffin Simon c790464fd6 [FIX] hr_payroll_account: onchange_contract_id
If there is no contract then the default journal_id must be set.
PS: The field "journal_id" in "hr.contract" model is not required.

opw:667093
2016-01-21 10:12:43 +01:00
Denis Ledoux d349584f9d [FIX] stock: state change tracking
The `stock.picking`.`state` field is set
to track the change of values
(`track_visibility='onchange'`)

It's supposed to write the state changes
within the picking thread.

It does not work properly for function fields,
as the onchange tracking is designed to work
only with direct user changes, direct
`write` operations on the record, while,
here, the state value changes according to the
picking moves changes, for instance.

To solve this, the tracking changes have to be
hooked within the `create` & `write` methods
of the model on which this function depends on.

Therefore, from now, when changes are
performed in the moves, on the fields that
could lead to the picking state change, we
force the tracking of the picking state.

In addition, we had the `mail_notrack` key
in the context when creating back orders,
to avoid displaying the back and forths
in the state
e.g. when transferring 9 units on 10, the
changes were displayed as below:
Draft -> Waiting availability
Waiting Availability -> Ready to Transfer
Ready to Transfer -> Draft
Draft -> Partially available
Partially Available -> Waiting availability
Waiting Availability -> Transferred

opw-666317
2016-01-20 15:10:00 +01:00
Goffin Simon c0571d4066 [FIX] base: by default a company is not a customer
When creating a company, a new partner is created with his field
'customer' = True. But by default a company doesn't have to be
a customer.

opw:667130
2016-01-19 17:02:32 +01:00
Nicolas Lempereur 6f28b70171 [FIX] google_drive: use new spreadsheet id
When doing a copy of a google drive spreadsheet (in google_drive.py's
copy_doc method, using the following google API call
https://developers.google.com/drive/v2/reference/files/copy). Google
server return an error if we used the old spreadsheet KeyId.

The new FileId is available in the AlternateLink and this commit updates
it.

similar-to: 00c2a99

opw-647222
2016-01-19 13:50:53 +01:00
Christophe Combelles 1812b8f337 [FIX] sale: copy of possibly None context
closes #10488
2016-01-18 09:46:25 +01:00
Odoo Translation Bot 2efa359e41 [I18N] Update translation terms from Transifex 2016-01-17 03:01:54 +01:00
Denis Ledoux 9f7200a2f6 [FIX] purchase: origin concatenation
This is related to revision 44eeb38

The origin concatenation was not working
when `procurement.origin` was `False`

opw-666933
2016-01-15 17:51:31 +01:00
Denis Ledoux f9ee454d42 [FIX] website_event_sale: pay the displayed price
The price displayed on the event page is the
`event.ticket`.`price_reduce` field,
which is basically the ticket price(`event.ticket`.`price`)
minus the possible discount applied by the pricelist

Nevertheless, the price asked when ordering the ticket,
in the cart/checkout, was the `ticket.price`,
without the possible discount from the pricelist, therefore.

The price asked for the ticket was therefore different than the price displayed.

To reproduce:
 1. Settings > Sales > Use pricelist
 2. Sales > Configuration > Pricelist > Public Pricelist > Apply a 20% discount (-0.2)
 3. Go to /event, -> Conference on Business Applications
 4. Order 1 of each
 5. Notice that the price asked is 800€ and 1200€ instead of 1000€ and 1500€ respectively
 6. Hit Order now -> Notice that the price in the cart are the price without the discount

opw-665540
2016-01-15 16:12:50 +01:00
Raphael Collet b4debe9539 [FIX] test_inherit: wrong model passed to default function on field 2016-01-15 13:54:29 +01:00
Josse Colpaert 4bd64dc91b [IMP] stock: avoid deletion of quants by user
Quants should never be changed or deleted by a user.
We make it not possible anymore in the views.
And also in the code we avoid to unlink without
passing a specific key in the context.
(as we still need to be able to delete quants in case of
negative quants reconciliation)
2016-01-15 13:40:09 +01:00
Alexis de Lattre bd4e6ff3bf [FIX] stock: consistent label of field
Field virtual_available on product.product is called Forecast Quantity but was
not on product.template.

This is not an issue to modify in stable as the term is already translated and
the translation of the string of the field is not based on the source (meaning
that, without reloading the translations, people will still see the translation
for 'Quantity Available').

Closes #10443
2016-01-14 14:45:40 +01:00
Nicolas Lempereur 7ad626f8b6 [FIX] website_quote: fix menu link typo from 37ed5ce 2016-01-12 20:08:24 +01:00
Nicolas Lempereur 37ed5ce844 [FIX] website_quote: don't unescape menu title
If we take content with $().text(), to insert it in another node we have to
used $().text(value) also. If like before this commit, we would use $().html()
the content would be unescaped one time too much.
2016-01-12 13:33:44 +01:00
Jérome Maes a1d8eccc7e [FIX] auth_oauth : propagate the context in signin process 2016-01-11 15:08:39 +01:00
Joren Van Onder 963edc634f [FIX] point_of_sale: remove references to self-checkout in docs
Version 7 (and saas-3) had a self-checkout mode that was removed in
8. There are still some fields that reference the feature in
point_of_sale.py but they're obsolete and unused in the
frontend.

Both README.md and static/description/index.html (and thus
odoo.com/apps) still referenced these features.

opw-666328
2016-01-11 15:04:23 +01:00
Jeremy Kersten 33e84a6622 [FIX] website: fix sitemap to avoid to get post route inside
Route with method="['POST']" should not appear in sitemap

This code had never works.

rule.method is not the list of methods declared on the endpoint but "the HTTP
method for the rule if there are different URLs for different methods on
the same endpoint" (src http://werkzeug.pocoo.org/docs/0.11/routing/)

The new code uses the method declared on endpoint and so will avoid to add
endpoint with method declared and wich doesn't support GET.
2016-01-11 12:49:34 +01:00
Thibault Delavallée 148c1ed51c [FIX] mail: html issue in invite email
Thanks Vitor Fernandes <vmlf01@gmail.com> for pointing it out.
2016-01-11 12:48:09 +01:00
Thibault Delavallée a35d2d5548 [FIX] mail: context propagation
Thanks michaelhwalther <michaelhwalther@gmail.com> for pointing it out.
2016-01-11 12:48:09 +01:00
Sathors 903cde0522 [IMP] doc: dotted names not supported in @constrains
or in @onchange for that matter. They should already generate a warning,
but only the first time they're used.

This is done lazily because it introspects the instance/class which can
be costly when performed during the repeated setup of registry setup.

closes #5595
2016-01-11 10:59:56 +01:00
Odoo Translation Bot 1c33197828 [I18N] Update translation terms from Transifex 2016-01-10 03:04:15 +01:00
Denis Ledoux 11c312182f [FIX] google_calendar: sync when chenging the recurrency only
When changing anything regarding the recurrence,
e.g. the number of repetitions, the weekdays, ...
the event require an update by Google side

As the `rrule` is a computed field, we need to mark
the event as needing an update by Google side as soon
as one of the fields on which depend the `rrule` field
is updated.

opw-659963
2016-01-08 18:13:11 +01:00
Christophe Simonis 7041b2589a [MERGE] forward port of branch 7.0 up to 152d9de 2016-01-08 17:01:53 +01:00
Raphael Collet 152d9de6cf [FIX] fields: in many2many fields, command `5` removes accessible records only 2016-01-08 16:56:02 +01:00
Raphael Collet ece592dbf7 [FIX] fields: in many2many fields, avoid inserting duplicate entries in table 2016-01-08 16:55:43 +01:00
Raphael Collet 22d125fe96 [FIX] fields: in many2many fields, command `5` removes accessible records only 2016-01-08 16:53:18 +01:00
Raphael Collet 51e66711a9 [FIX] fields: in many2many fields, avoid inserting duplicate entries in table 2016-01-08 16:53:18 +01:00
Raphael Collet 40be041ae7 [ADD] test_access_rights: add test writing on many2many field with access rules 2016-01-08 11:58:34 +01:00
Christophe Matthieu 231e026936 [FIX] product: write active value on all product variants from product template
Issue: When writing active on many products, only change the active value for the last product variants
2016-01-07 17:12:07 +01:00
Julien Laloux 96352ae515 [Fix] Remove an unwanted ">" sign in the print 2016-01-07 16:11:18 +01:00
Jeremy Kersten 9e6528f77d [FIX] email_template: allow to format date in the right language
Format_tz allow to format a date, but if the format was '%B', it was always January regardless lang in context
Now, it possible to use babel, to get the date in the customer language.

So:
    format_tz(object.date_order, format='short', context={'use_babel':1, 'lang': 'fr_BE'})
        will return '5/01/16 22:20'

    format_tz(object.date_order, format='short', context={'use_babel':1, 'lang': 'en_US'})
        will return '1/5/16, 10:20 PM'

    format_tz(object.date_order, context={'use_babel':1, 'lang': 'en_US})
        will return 'Jan 5, 2016, 10:20:31 PM'

    format_tz(object.date_order, context={'use_babel':1, 'lang': 'fr_BE'})
        will return '5 janv. 2016 22:20:31'
2016-01-07 14:42:57 +01:00
Denis Ledoux 7473f4a3c7 [FIX] payment_buckaroo: return url, payment validation
This revision is related to 6efc371291

The return URL parameter key has changed: The capital letters
are not the same than before.

Besides, send a dict in the `ADD_RETURNDATA` doesn't seem
to be supported by Buckaroo. We therefore no
longer uses a dict but a string to avoid problems.

opw-665697
2016-01-07 13:20:13 +01:00
Jairo Llopis 7f230a540e Remove the right backdrop.
If anybody adds a new modal in the `then()` part of the promise, without
this code, all `.modal-backdrop` elements will be deleted, and further
dialogs will not be modal; with this, only the current modal's backdrop
will be deleted.
2016-01-07 11:40:39 +01:00
Jeremy Kersten e9fc7353d2 [FIX] website_hr_recruitment: recruitment form customization
This commit is related to the PR #9515 and the continuation of 67b1be7f57
2016-01-06 15:43:26 +01:00
Eric Antones 1d97ddfd81 [FIX] Collateral effect merging query params
The keep_query() function has to **keep** all or selected query parameters
or add new ones but not change them by merging those with the same name.

That unnecessary parameter merge breaks the *Change language* feature in the
website_sale module when *Website -> Customize -> Product Attribute's filters*
is enabled and there's 2 or more select type attributes created and at least
one of them is selected.

Merging params was added in:
* 8.0: commit 7759af7c4c
* 9.0: commit daf8bdf688
2016-01-05 17:21:01 +01:00