Commit Graph

95119 Commits

Author SHA1 Message Date
Jeremy Kersten e8019a23c2 [FIX] calendar: fix end recurrency date for yearly event
Event with interval > 1 was not correctly computed.
This patch doesn't fix existing event but only the new one created after this fix.

Event 1/1/2015 repeat every 3 months, 6 times
Before this commit : end recurrency = 1/1/2015 + 6 * 1 month
After this commit:   end recurrency = 1/1/2015 + 6 * 1 month * 3 (interval)

This commit closes #14332
2016-12-20 21:12:19 +01:00
Jeremy Kersten 659d68add5 [FIX] calendar: fix retrocompatibility between datetime module
Fix datetime where the return of rrule is sometime a list,
sometime a set according to the datetime version.
list(set) == list(list) and works in both cases.

Similar fix: #9f09c62
2016-12-20 21:12:10 +01:00
Alexis de Lattre 4203360528 [FIX] product: correct forwardport
Introduced at f772303 during forward port
2016-12-20 13:24:16 +01:00
Jeremy Kersten f36aba31e5 [FIX] website_Sale_options: fix regexp to redirect after the add to cart.
Previous regexp was done on the complete url and not the path name.
In the case of a domain with tld .shop, it didn't work.

This commit closes #14756
2016-12-20 10:32:04 +01:00
chafique-delli 352ab7c51b
[FIX] account: add missing context
Closes #10691
2016-12-19 18:31:00 +01:00
Damien Bouvy de45880eb3
[FIX] payment_paypal: html-decode PDT responses
Courtesy of DynApps
2016-12-19 18:15:49 +01:00
javierjcf 79975f008e
[FIX] mrp: returns a list of ids, no a list of lists
The super returns a list. Should not use append.
Introduced at 1ab007a

Closes #11708
2016-12-19 18:09:41 +01:00
javierjcf f609ff39db
[CLA] signature for javierjcf
cf #11708
2016-12-19 18:09:41 +01:00
Nicolas Mac Rouillon 202a2e6959 [FIX] account_voucher: filter suppliers in voucher selection
[FIX] account_voucher: filter suppliers in voucher selection

Closes #12440
2016-12-19 17:34:51 +01:00
Jairo Llopis 000d8eba12 [FIX] portal: allow to delete res.partner
Do these steps:

1. Create a partner.
2. Grant him portal access through *Actions > Portal Access Management*.
3. Delete the created user.
4. Delete the partner.

You will get this error:

```
Odoo Warning - Validation Error
The operation cannot be completed, probably due to the following:
- deletion: you may be trying to delete a record while other records still reference it
- creation/update: a mandatory field is not correctly set

[object with reference: Portal User Config - portal.wizard.user]
```

This happens because the wizard (which is a transient model) does not let the partner to be deleted.

With this patch, we avoid that bug.

Closes #12608
2016-12-19 17:26:31 +01:00
Alexis de Lattre 20ba16e777
[FIX] hr_holidays: compare correctly floats
As the number of holidays are float, we may get a flloating point error when
comparing and having -0.0000000001 instead of 0 for the number of remaining
leaves, making the test fail.

Closes #12809
Fixes #14643
2016-12-19 14:52:37 +01:00
Jairo Llopis 23ed2805b8
[FIX] event_type: allow to select typeless event
The requirement for somebody to choose a ticket product should be that it is an
event, not that it has an event type attached, mostly when `event_type_id` is
not a required field.

The event has been improved in upper version but as this field is only
informative, relaxing a bit the domain.

Closes #12475
2016-12-19 13:58:35 +01:00
Odoo Translation Bot 4227082869 [I18N] Update translation terms from Transifex 2016-12-18 02:58:16 +01:00
Hans Henrik Gabelgaard 638989b84e
[FIX] mail: keep recipients after saving a template
When sending an email via the mail.compose wizard, the selected partners are
stored in the context (`active_ids`).
If the composed message is saved (button "save template"), the context is lost
in the _reopen action.
The active_ids content of the new context is the id of the newly created mail
template and is used as the id of a res.partner (sending the email to a
different contact).

Keep the context during the reopen to avoid losing active_ids.

Closes #11947
2016-12-15 13:08:43 +01:00
Hans Henrik Gabelgaard c7fc8e1722
[CLA] signature for hhgabelgaard
cf #11947
2016-12-15 13:08:42 +01:00
Raphael Collet 64249936e8 [FIX] models: allow constraint methods triggered by function fields 2016-12-15 11:08:13 +01:00
Raphael Collet 8e3e7874ad [FIX] models: allow constraint methods triggered by function fields 2016-12-15 09:52:21 +01:00
Jordan Vrtanoski 450f7df00d
[FIX] web: transfer context to underlying many2one in reference field
Fixes #11955 (loss of context in many2one subwidget)
Closes #11957
2016-12-15 09:34:32 +01:00
Martin Trigaux 13ed92c6d8
[FIX] payment_transfer: untranslated string
Replaces and closes #12787
2016-12-14 15:53:03 +01:00
Jairo Llopis f6692139da
[FIX] event: add missing name attribute
This breaks nothing, but allows to enable this filter by default.

Closes #12997
2016-12-14 15:50:32 +01:00
Stefan Rijnhart 4f6e4bb28e
[FIX] account: use code from defaults dict if present
Do not force a ugly '... (copy)' code if provides one.
Closes #11260
2016-12-14 15:08:13 +01:00
Stefan Rijnhart 57788ddb67
[FIX] stock: add missing context
when creating procurement order

Closes #12858
2016-12-14 15:02:12 +01:00
Pere Albujer 73e5c82037 [FIX] point_of_sale: increase total's table size
Was taking the right half of the ticket only and may be too small to display the full amounts (currency symbol cropped in some languages)

Closes #14702
2016-12-14 11:07:56 +01:00
Julien Laloux d543bb3106 [FIX] account_test: add missing _
The translation function `_` was missing while it was present in the content (e.g. account_test_01)

Closes #10403
2016-12-13 16:15:20 +01:00
Moises Lopez - https://www.vauxoo.com/ c349e9a8f8 [FIX] stock: Add missing context to search
Closes #13636
2016-12-13 11:46:47 +01:00
Goffin Simon ea021ff17a [FIX] account: taxes with analytic account
The account move line created for a tax must have the right account_analytic_id
according CONDITION.

CONDITION(inspired from function compute defined on model "account.invoice.tax")

if the tax is for an "in_invoice" or an "out_invoice" => tax_code = 'tax_code_id'
=> the account_analytic_id of the tax must be set to 'account_analytic_collected_id'

if the tax is for an "out_refund" or an "in_refund" => tax_code = 'ref_tax_code_id'
=> the account_analytic_id of the tax must be set to 'account_analytic_paid_id'

note:forward-port upto saas-6

opw:694821
2016-12-13 10:10:35 +01:00
Odoo Translation Bot 72a4229130 [I18N] Update translation terms from Transifex 2016-12-11 02:58:13 +01:00
Cristian Moncho 5ece76b717
[FIX] project: remove redundant context declaration
Declaring the keyword argument `context` in an API v7 `orm.browse_record` can
lead to mixed API v7/v8 inheritance bugs (`context` will be treated as a
function parameter instead of being injected in `self.env.context`). As the
context is already propagated in line 953, we can safely remove it from line
971.

Closes #13115
2016-12-09 14:37:21 +01:00
sergiov 4792a669d3
[FIX] auth_signup: display full error message
When the user name entered hasn't an email specified the error message wasn't
displayed in the reset view.
The error message was in e.name, not e.message
2016-12-09 14:32:16 +01:00
sergiov 85dc060a06
[CLA] signature for Sergio2409
cf #13960
2016-12-09 14:28:15 +01:00
baimo d16d1c6d9f
[FIX] web_gantt: translate "Gantt View" term
Closes #13328
2016-12-08 10:43:28 +01:00
Denis Ledoux 82a07d1072 [FIX] sale: fix company_id assignment on order line creation
Due to the following revision:
456d7b38f1

The company on the order line was not assigned
when creating a new line in an existing sale order.

The company was correctly assigned when you created
the order line with the order, and when changing the company
of the order, but not when adding a new line on an existing order.

This new trigger repairs this regression.
2016-12-07 16:33:18 +01:00
Denis Ledoux 36c6edf4bc [FIX] product: fix company_id assignment on pricelist version & items creation
Due to the following revision:
295b96c0b3

The company on the version and items was not assigned
when creating a new pricelist version on an existing
pricelist.

They were if you changed the company of the pricelist,
thanks to the triggers added in the above revision,
but not when they have just been created in the pricelist.

These new triggers repairs this regression. It also handle
changing the `pricelist_id` of a version (this is doable through
the "Sales > Configuration > Pricelists > Pricelist Versions" menu).

Fixes #14631
2016-12-07 16:26:11 +01:00
Josse Colpaert 86718d98bd [FIX] stock: don't delete package when you would still use Unpack button as it can create problems on pickings, ... 2016-12-07 11:59:19 +01:00
Raphael Collet 4116ac2f1c [ADD] models: warning on non-stored @constrains parameter 2016-12-06 14:08:01 +01:00
Paul Catinean ee2f2f2229
[FIX] website_sale_options: untranslated term
Case sensitive term wrongly exported
Introduced at 414175c
2016-12-05 17:02:20 +01:00
Odoo Translation Bot efdeb6779f [I18N] Update translation terms from Transifex 2016-12-04 02:57:30 +01:00
Denis Ledoux 0105cbbcf9 [FIX] website: make website default language required
The website `default_lang_id` was not required,
while the algorithm choosing the website language
expects it to be required.

This solves the below issue, when your browser language is en_US:
 - add a second language to the website (e.g. fr_BE or es_VE),
 - in the website settings, remove English from the languages
 - in the website settings, unset the default language
 - try to go on the website

You will have a crash:
```
  File "/home/odoo/src/odoo/saas-11/addons/website/models/ir_http.py", line 193, in _dispatch
    resp.set_cookie('website_lang', request.lang)
  File "/usr/lib/python2.7/dist-packages/werkzeug/wrappers.py", line 992, in set_cookie
    self.charset))
  File "/usr/lib/python2.7/dist-packages/werkzeug/http.py", line 905, in dump_cookie
    value = to_bytes(value, charset)
  File "/usr/lib/python2.7/dist-packages/werkzeug/_compat.py", line 106, in to_bytes
    raise TypeError('Expected bytes')
TypeError: Expected bytes
```

This is because the `request.lang` is set to `False`
because of the below algorithm in `ir_http.py`:
```
    nearest_lang = not func and self.get_nearest_lang(path[1])
    url_lang = nearest_lang and path[1]
    preferred_lang = ((cook_lang if cook_lang in langs else False)
                      or self.get_nearest_lang(request.lang)
                      or request.website.default_lang_code)

    is_a_bot = self.is_a_bot()

    request.lang = request.context['lang'] = nearest_lang or preferred_lang
```
`nearest_lang` is `False`, because there is no nearest language
available for the browser lang (`en_US`)
`cook_lang` is `False` for users who never went on the website
`request.website.default_lang_code`, which is the last feedback,
is also `False` because you removed the default language
in the website settings.

opw-695621
2016-12-01 11:37:03 +01:00
Goffin Simon a433ae65cb [FIX] purchase: default picking_type_id with ir.values
The deleted code put the same picking_type_id for all companies.
The function _get_picking_in returns the right default picking_type_id
according to the company.

Steps to reproduce:
-stock.warehouse0 is on company A.
-Define another company B with its own warehouse.
-Update the purchase module -> a new default value for picking_type_id on purchase
order for company B is created wtih the value of company A
-Create a purchase order on company B, Odoo tries to get the picking_type_id from company A.
If user doesn't have any rights on company A, it occurs a security warning.
Otherwise the purchase order is linked to a picking operation of another company.

opw:694059
2016-12-01 10:04:30 +01:00
Antonio Espinosa aac0faafb8
[FIX] membership: remove date_cancel for draft invoices
In `action_cancel` method below, the date_cancel is set when the linked invoice
is canceled.
When the canceled invoiced was reset to draft, the date_cancel was not removed.
This change makes sense as the state of the membership line is changed from
`cancel` to `waiting` when the invoice is reset to draft.

Closes #14313
2016-11-30 14:33:16 +01:00
Martin Trigaux adb12f95ea
[IMP] sale: remove untranslated terms
Closes #14497
2016-11-30 08:37:57 +01:00
Jeremy Kersten 1f10ef8055 [FIX] website_sale: fix amount format display
Before this commit, amount updated from ajax request don't respect currency format.
Eg: 1.200,000 => 1200.00

Now we use the grouping/thousand separator/decimal separator from l10n,
and if class decimal_precision is defined in dom, we use it. (format=0.001)

This commits closes: #11553
This commits is related to #1103
2016-11-29 17:00:18 +01:00
Odoo Translation Bot 8d724924f7 [I18N] Update translation terms from Transifex 2016-11-27 02:57:09 +01:00
Nicolas Martinelli cd440312ce [FIX] account: partial payment reconciliation
When processing a partial reconciliation in a foreign currency, a
currency exchange difference might be generated during the
reconciliation process (see OPW for a detailed use case).

This prevents the user to process the reconciliation since he will get
the error: 'You have to provide an account for the write off/exchange
difference entry.'

The fix is to use the company-related foreign echange gain and loss
accounts automatically to book this difference.

opw-687975
2016-11-25 10:21:01 +01:00
Zambu 623d61872d
[CLA] Corporate signature for Diagram Software
Closes #14409
2016-11-24 16:31:46 +01:00
Denis Ledoux 456d7b38f1 [FIX] sale: store triggers for related stored `company_id` sale orders
When changing the company of a sales order,
the change was not propagated to the related, stored, company field
of its sale order lines

These triggers makes that happen.

opw-694683
2016-11-24 16:14:36 +01:00
Denis Ledoux 295b96c0b3 [FIX] product: store triggers for related stored `company_id` in pricelists
When changing the company of a pricelist,
the change was not propagated to the related, stored, company fields
of the `product.pricelist.version` and the `product.pricelist.item`

These triggers makes that happen.

opw-694683
2016-11-24 16:08:07 +01:00
Jairo Llopis fbdac9c853 [FIX] website: fix search in existing pages
Previous implementation did not allow the user to search for pages 'name'
but only on the slugified name.

Now we slugify the needles before to find a match.

1. Create a new page: 'The new'
2. add a link on your website and try to find this page...
    - Before this commit, the only ways was to type 'the-new'
    - After this commit 'the new', 'The new', 'The-new', ... will match

This commit closes #10771
2016-11-22 13:47:17 +01:00
Jairo Llopis 954fb6da3c [FIX] website_event_sale: Preserve context when updating cart
Without this patch, when a product was added to cart, if this addon
was installed, it always landed in English in the SO.

This happened because the context, containing the current language,
was being aborted here (`context=None` instead of `context=context`).

This commit closes #14340
2016-11-21 22:18:48 +01:00
Odoo Translation Bot f9f562339f [I18N] Update translation terms from Transifex 2016-11-20 02:58:43 +01:00