Commit Graph
103218 Commits
Author SHA1 Message Date
Nicolas Martinelli 600d8b00be [FIX] stock: stock location name
The tree view of the stock locations displayes the field
`complete_name`, which is not translated. This is disturbing since
everywhere else, the `display_name` (translated) is used.

opw-693723
2016-12-23 13:22:17 +01:00
Denis Ledoux f5d7727e2b [FIX] mass_mailing: crash with Firefox with the breadcrumb
- When opening a mass mailing
 - Editing it and making a change (e.g. add a block)
 - Click on the breadcrumb
 - Click "OK" on the warning popup telling your changes will be discarded
 - Choose another mass mailing

A crash occured. This is basically the same case than in the revision
7bf80d22dd
but for Firefox, for which `window` is still there
`!window` returns False
but is `closed`

opw-702211
2016-12-23 12:10:09 +01:00
Nicolas Martinelli 10a9287f2e [FIX] sale: expense price unit
The company currency is EUR, and GBP rates are:
- 0.8414 at day 1
- 0.8389 at day 2

Then:
- Create a SO in GBP at day 1 and confirm
- Create an expense in GBP at day 2 and choose the analytic account of
  the SO
- Validate the expense and post the journal entries

Problem:
- The amount of the expense is 93 GBP
- The amount of the sale order line is 93.28 GBP

opw-696375
2016-12-22 16:13:25 +01:00
Denis Ledoux 798a10082c [FIX] google_calendar: fix allday timezone synchronisation
When syncrhonizing an allday event while being in a negative timezone
e.g. Dec 22 in US/Eastner (-5:00)

The event was synchronized the day before
e.g. Dec 21

because `context_timestamp` of `start date-time-` was used,
and then the time was removed to have the date of the all day event
e.g. 2016-12-22 00:00:00 converted to 2016-12-21 19:00:00 and then the time
removed 2016-12-21.

Instead of using the `start_datetime`, we now use the start
date which stores only the date, without timezone information
(and this is what you would like in the case of an all day event).

opw-697202
2016-12-22 14:48:11 +01:00
Jason Wu 7004dc827e [CLA] signature for jaronemo
Signature done at #13100
2016-12-22 13:34:06 +01:00
Noureddine LOUAHEDJ 68a0e9c518 [CLA] Signature for noureddineme
Closes #13122
2016-12-22 13:28:26 +01:00
Martin Malorni b67e002234 [CLA] Update Microcom contributors
Addition of two and removal of one

Signature done at #13524
2016-12-22 13:26:00 +01:00
Damien Crier 34e342f324 [CLA] add damdam-s to C2C signature
Closes #13500
2016-12-22 13:24:36 +01:00
Denis Ledoux 09066fbbd5 [FIX] calendar: fix allday onchange user tz
While choosing a start/stop datetime in a timezone hour
were the UTC value is within the next day,
e.g.
Start time Dec 22 20:00 in US/Eastner (UTC -5:00)
Therefore, start time Dec 23 01:00 in UTC
Checking the "all day" box made the start time set to
Dec 23 instead of what the user expected, Dec 22.

This is because the onchange simply took the UTC datetime
(Dec 23 01:00) from which it removed the time (Dec 23).

This revision make sure to remove the time from the
user timezoned datetime instead, so the day set
remain the same day than what was set in the datetime.

opw-702065
2016-12-22 11:23:39 +01:00
Daniel M c480ec46cc [CLA] signature for damendieta
Signed at #13659
2016-12-22 11:16:03 +01:00
rigo1985 c0889a0763 [CLA] signature for rigo1985
Signed at #14553
2016-12-22 10:51:06 +01:00
jclopezar f96a872047 [CLA] signature for jclopezar
Signed at #14707
2016-12-22 10:50:15 +01:00
Goffin Simon 804ef6f6c0 [FIX] account_asset: Wrong account set in Vendor Bill
When adding a product with an asset type in a vendor bill, the account
set on the line must be the asset account.
Inspired from 11e834a4c1

opw:697557
2016-12-21 16:32:09 +01:00
Denis Ledoux a98d60cb11 [FIX] website: search pages in the menu creation dialog
The revision
8f48baeda6

broke the ability to search pages in the dialog
allowing to add a menu to the website from the website
(From the website, Content > Edit menu)
as `request.website` was not defined in this case

opw-702020
2016-12-21 14:59:29 +01:00
Pedro M. Baeza 88a9ee2565 [FIX] mail: customers should not follow default internal subtypes
Currently when someone is added as follow to a document default subtypes
are computed if no specific subtypes are given to the subscription. However
if internal subtypes are set as default those are added to all new
followers. It should take into account customers and shared users and avoid
adding them internal subtypes.

Customers and shared users are not notified of messages using an internal
subtype. So currently there is no information leak. However with this fix
we ensure internal subtypes are not followed by external people even if
no notification is created.

From #14704, backport of 03ac47b9
2016-12-21 10:42:49 +01:00
Goffin Simon a3ee4d1914 [FIX] account: Printing Account Tax
Steps to reproduce:

-open Accounting / Configuration / Taxes / Tax Codes
-open any Tax Code
-press Print / Account Tax

Bug: QWebException: "chart_tax_id" while evaluating
"get_lines(data['form']['based_on'], data['form']['company_id'], data['form']['chart_tax_id'])"

Closes: #8923

opw:697423
2016-12-21 10:05:12 +01:00
Nicolas Lempereur 2fc0ad8e0e [FIX] mail: can't send notification in spanish
Line return are missing before mako declarations  causing errors
when rendering the template.

opw-702070
opw-701959
2016-12-21 10:01:33 +01:00
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
Nicolas Martinelli a9a9f624e4 [FIX] purchase: update of PO line
DO NOT FORWARDPORT!!!

An issue occurs when a PO line is updated following a reordering rule or
a MTO rule.
As an example, a product is configured as follow:
- UoM: Units
- Purchase UoM: Box of 25 Units

To reproduce:
- Sell one unit of product, then run the scheduler
  => it creates a procurement for one unit, but since the product is
  purchased by box of 25, it creates a PO with a box of 25.
- Sell one unit of product, then run the scheduler
  => it creates a procurement for one unit, find the existing PO line,
  round in the purchase UoM (so it gives one box of 25), then add it to
  the PO line.

The solution is to recomputed the necessary quantity at the very end of
the process. For a given PO line, list all procurements and adjust the
quantity.

This is a partial fix, since it doesn't take into account the potential
new price of the seller. However, that would require a major rewrite of
this part of the code, since it was originally written for v8 which
handles the PO line quantity recomputation sequentially instead of
batch.

opw-688916
2016-12-20 18:29:16 +01:00
Nicolas Martinelli 13c7865680 [FIX] website_sale: price separator
Complement of commit
https://github.com/odoo/odoo/commit/fee60159640206558e98d5103c8a883412419f5a

On the first load of the product page, the separators are not set
correctly, due to the fact that the RPC call to
`/web/webclient/translations` might not yet be done.
2016-12-20 16:49:39 +01:00
Goffin Simon 660d2e0c75 [FIX] account: _create_writeoff with excluded taxes
The amount (=credit - debit) of the first line must be equal to the total included
to reconcile balanced entries.

Before the fix, it just worked with included taxes because the amount of
the first line was already equal to the total included.
But with excluded taxes, it didn't work because in this case the amount was equal
to the total excluded. Then it raised: "Cannot create unbalanced journal entry"
due to the second line which includes all the taxes.

opw:697129
2016-12-20 15:44:25 +01:00
Alexis de Lattre 4203360528 [FIX] product: correct forwardport
Introduced at f772303 during forward port
2016-12-20 13:24:16 +01:00
Yenthe V.G c2150623ba [IMP] website_blog: Add subtitle in blog view
Only the name was present but it has 2 fields

Closes #14747
2016-12-20 13:07:59 +01:00
Akim Juillerat 4fdd70fc16 [I18N] l10n_ch: add German translations
For account.tax descriptions
cf #14737
2016-12-20 12:13:47 +01:00
Akim Juillerat fa4e76a9c7 [ADD] l10n_multilang: translate account.tax.template description
In addition to the tax name
Closes #14737
2016-12-20 12:13:17 +01:00
Akim Juillerat 146aa411e6 [CLA] Added Akim Juillerat in C2C
Closes #14779
2016-12-20 11:48:27 +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
Martin Trigaux 551bbc88a1 [FIX] product: evaluate at runtime
The default value for the optional parameter `date` was evaluated at server
launch while it should have been at method execution.

The bug was not detected as it is always called with a date value in standard
modules.

Noticed at #11413
2016-12-20 10:19:20 +01:00
Yu Lin dde0d5b89f [FIX] sale_stock: use correct record
With this context, self is the model and has no value.
Replace it with procurement in the parameter which has the real value.

Closes #10507
2016-12-19 18:45:49 +01:00
Yu Lin 4224911b68 [CLA] Signature for uynil
cf #10507
Changed the signature to the `@me.com` address as it was already signed for
elico corp at #10010
2016-12-19 18:45:48 +01:00
Torvald Baade Bringsvor c9b745f642 [FIX] l10n_no: increased tax rates from 8% to 10%
Norwegian authorities have increased the middle tax rate from 8% to 10% from January 1st 2016. Updated the rates accordingly.

Closes #10731
2016-12-19 18:32:06 +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
César Castillo 4e8a88a3bd [CLA] signature for ceaucari
Closes #11503
2016-12-19 18:15:21 +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
Denis Ledoux a4836a81b2 [FIX] hr_payroll: wrong context in revision cfb850cd77 2016-12-19 16:38:09 +01:00
Denis Ledoux cfb850cd77 [FIX] hr_payroll: month name in the user language
In the payslip name, the month name was set
within the server locale, rather than the
user language.

Therefore, if you had your server default locale
in English but your user in French, the
month name was displayed in English anyway.

opw-692590
2016-12-19 15:54:12 +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
Denis Ledoux f616b2d20d [FIX] web_editor: do not focus or set an empty image
When editing the website, adding a gallery, choosing the grid mode
and then adding images, an extra, empty, image was
added to the grid, in the first position, making it looking weird
or at least not aligned.

This was due to the `start` method of the widget, which
is trying to focus the image in the images browser when
you double click on an image (in the big image building block
for instance) and set an image without url in the case
where `o.url` was undefined, and the url of one of the records
was also undefined.

opw-692205
2016-12-19 13:56:38 +01:00
Goffin Simon 4e60d28d00 [FIX]project_timesheet, sale: SO line not updated after timesheet is deleted
-Deleting some timesheets linked to a task created on a SO didn't update the delivred
quantity.

opw:697317
2016-12-19 11:46:23 +01:00
Nicolas Lempereur 13063dd177 [IMP] purchase: some l10n taxes could break test
For example l10n_ch has default included purchase tax on products. This
would impact the valuation of the product and fail the tests.

This commit removes these taxes in the purchase test (they are tested
elsewhere anyway) and also use python to change the company currency
(since the current way didn't seem to work).

opw-691996
2016-12-19 08:31:12 +01:00
Odoo Translation Bot 4227082869 [I18N] Update translation terms from Transifex 2016-12-18 02:58:16 +01:00
Christophe Simonis 1246a470df [FIX] mail: correct MailComposer wizard
Oversight of previous forward-port.
2016-12-16 15:16:56 +01:00
Denis Ledoux cee2e62b6f [FIX] account: add comment for the previous revision
It has been done outside of the previous commit
to give the possibility to point the comment
to the according revision, as this is a really tricky
case.

opw-687201
2016-12-16 14:59:02 +01:00
Denis Ledoux 20935462a0 [FIX] account: register payment with change gain with currency rate > 100
On an invoice, when registering a payment in a foreign currency
for which the payment pays entirely the invoice,
and even more thanks to the change gain(write off),
but for which the foreign currency rate to the company currency is higher than 100,
(higher than the currency decimal precision of 2 digts),
e.g. Invoice in CDF, Payment in USD (1 USD = 948 CDF),
and choosing the option "Mark invoice as fully paid" for the difference handling,

the invoice could not be marked as paid, according to the result
of the currency rate rounding.

This is because the debit or credit of the writeoff was computed
from the payment difference, in the foreign currency,
to the company currency, which lead to two currency rate computation,
one in each way,
company currency to foreign currency,
then foreign currency to company currency,
and some precision was lost in the process.

Instead of computing the debit or credit of the writeoff from
the payment difference, we now compute it from the
payment amount in the company currency minus the
invoice residual amount in the company currency,
to avoid the double currency computation rate,
so the precision is not lost in the process,
and the invoice move is finally fully reconciled

e.g.:
Invoice of 247590.40 FC
Payment of 267 USD (1 USD = 948 FC)
Payment difference: (247590,40 / 948) - 267 = -5.83 (Gain of 5.83 USD)

Before the revision, the credit of the writeoff was computed as:
`((247590,40 FC / 948) - 267 USD) * 948 = 5526,84`
After the revision, the credit of the writeoff is computed:
`247590.40 - (267 * 948) = 5525.6`

Notice in the first formula that the rate computation is performed two
times, once in each way (`/948` then `*948`), while only once
in the second, and this avoid the loss of 1.24 FC in the process.

Without this precise debit/credit of the writeoff, the invoice
could not be marked as fully paid, as the move was not fully
reconciled.

opw-687201
2016-12-16 14:55:51 +01:00