Commit Graph
103218 Commits
Author SHA1 Message Date
Wolfgang Taferner 272c7b26fc [FIX] account: fix potential traceback
`all([]) = True`, therefore if there is no `matched_debit_ids` or
`matched_credit_ids` on a payment ==> boom when you access
`payment.matched_debit_ids[0]`

opw-677157
Closes #12232
Closes #12242
2016-05-31 14:47:37 +02:00
Jeremy Kersten f413d155df [FIX] openerp: force Odoo to serve svg with mimetype image/svg+xml
Odoo serves files based on the mimetype imported with python module Mimetype.
In some case, mimetype on windows for svg is undefined or misconfigured and
the svg is returned as text/plain (and so xml and not img).

This commit overrides the default mimetype to render .svg file with mimetype
'image/svg+xml'.

It is similar to add/override the key from windows registry with:
```
[HKEY_CLASSES_ROOT\.svg]
@="svgfile"
"Content Type"="image/svg+xml"
```
The advantage to override it in Odoo, is to be sure that even if this key has
been updated or deleted by a cleaner software or malware, Odoo continue to work

This closes odoo/odoo#12150, closes odoo/odoo#9061, closes odoo/odoo#9118
2016-05-31 14:14:30 +02:00
Joren Van Onder fe511f18e1 [FIX] account_asset: don't recompute depreciation board on state change
When a user goes through the trouble of manually modifying the
depreciation lines he will lose all his work when clicking on 'reset to
draft'. Furthermore, if he then goes through the trouble of repairing
the problem by once again manually changing the depreciation lines he
will again lose his work when pressing confirm.

opw-678678
2016-05-30 16:17:19 +02:00
Goffin Simon d5e478d4f0 [FIX] sale: Warning when Create invoice from SO
Used case:
Create a SO with invoicing policy based on delivery. Don't deliver
anything and Create invoice for all invoiceable lines.
Result:
There was no invoice created and no warning message.
After the fix:
A warning message is raised when after clicking "Create
invoice",for any reason it doesn't create an invoice.

opw:678567
2016-05-30 15:33:02 +02:00
Ronald Portier (Therp BV) d73648fe0d [FIX] crm,gamification: flexible reference to field
The field generation is most of the time following the pattern
`field_<table name>_<field name>`
but in case of name clash (e.g. res.partner.category - id and res.partner -
category_id), the id of ir.model.field is added at the end of the external id
during the field creation.

The more flexible way to link to an ir.model.field is to use the syntax
`search=[('model', '=', <model>), ('name', '=', <field name>)]`
to avoid errors as in #12192 when the "first" external id no longer exists.

Fixes #12192
Closes #12198
2016-05-30 15:02:20 +02:00
Goffin Simon 89c35b8c9c [FIX] account: correct message for lock dates
The sentence concerning the adviser should not be raised if the user is an adviser role.

opw:678458
2016-05-30 14:59:01 +02:00
Martin Trigaux e641ec7815 Revert "[FIX] website_forum: notification of comments like answers"
This reverts commit e32ba845de.

This commit is wrong as it had an undifined variable and was losing the content
of the comment anyway.

Fixes #12213
2016-05-30 12:05:49 +02:00
Nicolas Martinelli 63ca2d1b9f [FIX] purchase: wrong call to super
opw-675480
2016-05-30 11:24:10 +02:00
aetna-softwares 89d44e9c8a [CLA] Corporate signature for Aetna Softwares
Closes #12214
2016-05-30 10:23:16 +02:00
Olivier Dony cd3f52ba10 [FIX] account,*: preserve deactivated taxes
By default, when reading a m2m field, entries that are
deactivated in the destination table are not included.
This behavior is desirable in some cases (e.g. for
"tags" or "categories", but not for entries that
significantly impact other field values in the parent
record, such as taxes.

The problem is rather obvious: when displaying a
paid invoice that used taxes that are now deactivated,
the taxes are hidden while they still affect the
computed amount. And after cancelling + resetting
to draft, the tax is not taken into account anymore,
while still being linked.

Forcing the field-level (python) domain to include
both active and inactive entries solves the problem:
 - when reading, displaying and recomputing values,
   deactivated taxes will be included.
 - when trying to pick a tax, deactivated entries
   will still be ignored, as expected.

This commit applies the technique to all m2m
fields that refer to taxes.

Fixes #12066
opw-677751
2016-05-30 09:07:31 +02:00
David Arnold 270b2d0a78 [CLA] corporate signature for DevCo Colombia
Closes #11755
2016-05-30 08:40:40 +02:00
Ronald Portier (Therp BV) c038535446 [CLA] Update Therp BV's signature
To have consistent email in author and signer key.
Also update list of contributors as Stefan is no longer working for Therp BV.

Closes #12202
2016-05-30 08:40:02 +02:00
Odoo Translation Bot cb70a8ff98 [I18N] Update translation terms from Transifex 2016-05-29 02:58:42 +02:00
Odoo Translation Bot be91fa4c63 [I18N] Update translation terms from Transifex 2016-05-29 00:29:48 +02:00
Antoine Huvelle b08642c21c [FIX] pos_restaurant: remove floor_id from restaurant.table form view
There is no way to directly create restaurant.table records in the
backend. The only way is through adding it directly to the table_ids
one2many on restaurant.floor and when doing that floor_id is
automatically set.

Closes #8705
2016-05-28 13:23:32 +02:00
Jeremy Kersten 0413a4ab08 [FIX] sale: avoid division by zero in _get_price_reduce
close #11999
2016-05-27 17:06:32 +02:00
qdp-odoo 5f9ca1b89b [FIX] account: manual reconciliation through the wizard on journal items were giving weird results. OPW 678153.
Symptoms: running a full reconciliation manually with that wizard was resulting in not fully reconciled aml altough the total in company currency and in secondary currency were perfectly matched. Full use case described in added test test_manual_reconcile_wizard_opw678153.
Problems:
 - The system was processing by pair of aml and creating exchange rate entry/full reconciliation as soon as possible whereas in that case it needs to be postponed at the end of the manual reconciliation otherwise some entries would be excluded from processing.
 - Another problem was that because of this batch processing, we ended with unconsistent amount_residual_currency values for some entries that were fully reconciled in company currency but not in foreign currency (also negative amount_residual_currency for a debit line which should never happens)... To solve that, we now process the manual full reconciliation in two steps: only in company currency first, then in secondary currency if needed. A small adaptation in the payment widget of invoices was needed for that too.
2016-05-27 16:52:51 +02:00
Kinner Vachhani deef119d72 [FIX] account: substitution in aged partner report
'foo %s bar' % 'alice' if False else 'bob' returns 'bob', not 'foo bob bar'

The previous strings returns '>=' when the direction is future while it should
be 'COALESCE(l.date_maturity,l.date) >= %s'

Fixes #10654
Closes #10695
2016-05-27 15:00:59 +02:00
Joren Van Onder 9499b5d4d2 [FIX] account_asset: use newest depreciation date for new depreciations
The code uses self.depreciation_line_ids[0] and incorrectly assumes it
is always the latest (newest) depreciation line. This sorts the
recordset to guarantee that this is true.

opw-678678
2016-05-27 13:51:56 +02:00
Nicolas Martinelli ff38b370a1 [FIX] payment_ogone: missing key
The key 'PAYIDSUB' should be added in the list of SHA-OUT keys.,
otherwise the signature is wrong.

opw-678718
2016-05-27 13:35:09 +02:00
Nicolas Martinelli b06b2a3641 [FIX] product: pricelist item sorting
The issue occurs in the following case:
- Configure 2 product categories A and B such as A is the parent of B
- Create a pricelist
- Create a first pricelist item which applies to category A
- Create a second pricelist item which applies to category B (with the
  same configuration regarding the minimum quantity)
- Create a product for category B

Before this fix, we cannot ensure that the pricelist item related to
category B will be applied, since we do not order the pricelist items by
category.

Thanks to this fix, we make sure to select the category from the more
specific to the less specific.

opw-678633
2016-05-27 13:31:44 +02:00
Nicolas Martinelli 82b9d7d511 [FIX] web: minimum margin
Make sure to define a minimum margin large enough.

opw-678645
2016-05-27 12:29:29 +02:00
Nicolas Lempereur bc34fe481d [FIX] mail: don't reset subscriptions before adding one
When posting on a thread the user can be auto-subscribed to its default
types. But if the user has previously been subscribed to other subtypes,
those are lost.

With this commit, user mentionned (@{username} in message) or added as
follower for default subtypes are not subscribed if they were already
followers of the record.

So if default subtype is "Comment" and user was only following subtype
"Alarma!" (by checking it and then un-checking "Comment"), then if the
user comment:

-> before this commit, the user would then follow subtype "Comment" and
   not follow anymore "Alarma!"

-> after this commit, the user would follow the subtype "Alarma!"

closes #12008
opw-669127
opw-673766
2016-05-27 12:00:47 +02:00
Jeremy Kersten 2164383fe4 [FIX] website_sale: allow to override product order on shop
Close #11202
2016-05-27 11:56:35 +02:00
Martin Trigaux e32ba845de [FIX] website_forum: notification of comments like answers
Fixes #12096
2016-05-27 11:30:40 +02:00
Fabrice Henrion 5da59c248b [IMP] doc: wording
Closes #12159
2016-05-27 11:29:56 +02:00
Joren Van Onder 49b1742477 [FIX] point_of_sale: respect user timezone for all data in Sale Details
9f0120d73b solved this issue already, but
it was only applied to POS orderlines. There is other data on the
report (eg. payments, taxes, ...) that should also correctly respect the
user time zone as well.

opw-678748
2016-05-27 09:52:20 +02:00
Julien Legros 9bd223f50d [FIX] website: robust attribute checking
When installing website or one of its dependencies directly, the website
attribute is not defined on request. If the installation triggers qweb
rendering [1], we need to correctly check the presence of the website
attribute, which this commit does.

[1]: This is the case in website_blog since
4a132e2afb
2016-05-26 16:44:01 +02:00
Martin Trigaux a93b6e8de0 Revert "[FIX] translate: don't translate DOCTYPE tag"
This reverts commit 44e8b92beb.

The condition is wrong as a view starting with DOCTYPE as top element will be
excluded, including its child (the whole page them).

Re-add the translatable title that was excluded by the condition.
2016-05-26 14:08:35 +02:00
Christophe Simonis 24eebbd25c [MERGE] forward port of branch saas-6 up to 6c6a9f3 2016-05-26 13:56:16 +02:00
Nicolas Martinelli 344ff461e5 [FIX] web: graph numbers
Backport of commit 68b127797e

opw-678645
2016-05-26 13:54:39 +02:00
Martin Trigaux f92939e75c [I18N] im_livechat: export source terms 2016-05-26 13:34:11 +02:00
Christophe Simonis 6c6a9f3d60 [FIX] *: replace uses of except_osv with UserError that have been forgotten during previous forward-ports 2016-05-26 13:05:46 +02:00
Christophe Simonis aa220a5e03 [MERGE] forward port of branch 8.0 up to 6622196 2016-05-26 12:27:56 +02:00
Martin Trigaux 66221968b8 [FIX] crm_partner_assign: minimum access rights to employee
Give the same as access rights to the employee as for the public user.
This patch is needed to allow a user to access the partner form.
Same for portal.
The list of grades in not a confidential information.

Fixes #7719
2016-05-26 11:56:24 +02:00
Damien Bouvy 4ffd2fdd81 [FIX] sale: multi-company tax filtering
When the admin creates a SO, he has access to all taxes (since ir.rules
do not apply to him); therefore in some cases, the SO could be created
with SO lines that have taxes from other companies. This usually does
not make sense.

From this revision on, only taxes that are in the same company as the
SO are applied to the lines. If no company is set, then no filtering
is done.
2016-05-26 11:22:03 +02:00
Ondřej Kuzník dbdc8e1cef [FIX] server: Do not listen when --no-xmlrpc is set
This is a fix for f04f409943, which only
prevented the workers from being spawned in Prefork mode, while the
socket was still being bound to - this is a problem when starting a
worker-only server as it cannot coexist with the XMLRPC server on the
same machine.

Closes #1828
2016-05-26 11:01:42 +02:00
Martin Trigaux e07fa2601e [FIX] doc: update css file to reflect 8ce16c3 2016-05-26 10:24:28 +02:00
65HQqp5QTq8QwA3f 9c28b6fbfa [FIX] sale: propagate context
Closes #9521
2016-05-26 08:39:59 +02:00
rocksolidsolutions 6c129e9954 [CLA] Rock Solid Solutions signs corporate CLA.
Closes #12182
2016-05-26 08:37:58 +02:00
Martin Trigaux 37bbe87d57 [INP] gamification: skip check for not required fields
Could get a definition with a model only
2016-05-26 08:33:20 +02:00
Martin Trigaux a4687c6e42 [FIX] gamification: bad backport to 8.0
UserError was defined in version 9, not 8
2016-05-26 08:30:51 +02:00
Christophe Matthieu fe348e280d [FIX] report: some Wkhtmltopdf installation can return an empty version 2016-05-26 08:02:14 +02:00
Christophe Matthieu 30eb4e31f6 [FIX] im_livechat: don't translate livechat javascript template 2016-05-26 07:51:03 +02:00
Christophe Matthieu 44e8b92beb [FIX] translate: don't translate DOCTYPE tag 2016-05-26 07:50:48 +02:00
Jeremy Kersten 9772bbef07 [FIX] web: fix backport #4c7a9bd 2016-05-25 23:38:28 +02:00
Denis Ledoux 22f4aa1c43 [FIX] crm: merge leads in multi-company
When merging leads with a company set different
than the current user company,
it failed because the notification email (the message
written in the thread summarizing the merge) couldn't
read the company name (the `name_get` call on the company)
because of the multi-company record rule.

`name_get` can be safely called as `sudo`, as it does
nothing else than returning the name of the record. This is
already done for the many2one links in the web client anyway
(You can see leads from a company different than yours,
you can see the company name to which the leads belongs to,
but you can't click on the company many2one link)

opw-677986
2016-05-25 18:20:25 +02:00
Denis Ledoux 4176030cd3 [FIX] calandar: all day events email notification
When sending a notification email to an event attendee
for an all day event, the timezone must be ignored
as the `start` and `stop` datetime are stored as
the day date + '00:00:00'. If the timezone is applied,
for users being in a negative timezone (such as an American
timezone), the day displayed would be the day just before.

opw-677019
2016-05-25 18:11:08 +02:00
Goffin Simon 4c7a9bdac4 [FIX] web: raise a warning for bad domain
When a user wrote a wrong value in char_domain field it should raise a warning
message instead of a traceback.

Backport of b3a88b6ed8

opw:676783
2016-05-25 15:52:59 +02:00
Joren Van Onder 526c38cdb1 [FIX] point_of_sale: set callbacks for weight and price barcodes
c8732bea1e did not take into account that
we don't have specific callbacks for weight or price type
barcodes. Those where handled by the product callback.

opw-678556
2016-05-25 15:31:07 +02:00