Commit Graph
103913 Commits
Author SHA1 Message Date
Denis Ledoux 58bc4842e0 [FIX] portal_sale: Portal users can read taxes groups
If a portal can read an `account.tax`,
there is no reason he cannot read an `account.tax.group`.

Without this read access on the tax groups, a portal
user cannot print the invoice report from the
portal, due to the `o._get_tax_amount_by_group()` call
in the invoice report.

opw-668973
2016-02-08 17:25:10 +01:00
rap-odoo 7f9e51283b [IMP] stock: expiration dates settings displayed only when tracking lots
Also changed string 'Do not use Expiration Date' into 'Do not use Expiration Date on serial numbers'.
2016-02-08 17:14:00 +01:00
Denis Ledoux ff915dd96e [FIX] import: import new records without xml_ids
This is related to revision 80b373f.

The above revision leads to the inability
to import new records without any `xml_id` set

Technically speaking, this is because
you cannot concatenate `False` with `'_'`, in
`xml_id + '_'`

opw-668962
2016-02-08 16:54:24 +01:00
Denis Ledoux eb2346ba46 [MERGE] forward port of branch 9.0 up to 0b7990c 2016-02-08 16:08:32 +01:00
Yannick Tivisse 0b7990cbce [FIX] mail: put only employees into the group_data 'user'
Before, every user was set into this group. It means that a portal
user received elements in his mail context, like the buttons to
open a document or to follow it. Now, only the employees will
receive this kind of information
2016-02-08 15:40:24 +01:00
Yannick Tivisse 243d207ad6 [FIX] mail: Use standard signature to be recognized by services like Google 2016-02-08 15:40:24 +01:00
Yannick Tivisse 071aa38b4e [FIX] web: avoid infinite pending state in case of RPC call fail
If the RPC fails, the deferred is never resolved nor rejected,
so the deferred given by willStart will stay in a 'pending' state

As the deferred is expected to be resolved or rejected to launch the
systray to continue, we have to catch this case too.
2016-02-08 15:04:01 +01:00
Aaron Bohy 52f55ed493 [FIX] Packaging: deb: include missing font files in builds 2016-02-08 14:44:08 +01:00
Nicolas Lempereur dde97416b9 [FIX] web: pivot click keep view references
When clicking on a pivot view cell, the gotten view were default views.

For example when on the opportunity pivot view, after clicking on a cell
we we would get to the crm.lead default view instead of the opportunity
one.

This commit keep references to current action views when clicking on the
cell.

closes #10768
opw-668472
2016-02-08 14:33:44 +01:00
Jeremy Kersten 5fe84da278 [FIX] website_forum: use placeholder for controller /avatar 2016-02-08 13:57:37 +01:00
Jeremy Kersten 1e54a8f6ab [FIX] website_forum: don't index forum_post if deleted
update can view, to remove deleted post from sitemap and make controller unavailable for lambda user.
Only Admin, and users with enough karams can continue to see them and undelete them.
2016-02-08 13:57:37 +01:00
Jeremy Kersten 503824184c [FIX] website_mail_channel: Impossible to subscribe to forum_post
This code should be only executed when mail_channel snippet is used...

Fix #10005 #9980
2016-02-08 13:57:37 +01:00
Denis Ledoux 04b2d910ac [MERGE] forward port of branch saas-6 up to fead627 2016-02-08 13:39:28 +01:00
Denis Ledoux fead627dd5 [MERGE] forward port of branch 8.0 up to 3ff4dae 2016-02-08 13:31:27 +01:00
Christophe Matthieu 55c7d2d5b0 [FIX] web_editor: don't convert style into class by default. Only if use style-inline (because very poor performance for sale.order form view because contains very crappy dom in website_description field) 2016-02-08 12:20:10 +01:00
Thibault Delavallée 82e60a9648 [FIX] mail: automatic subscription of responsible
Do not erase existing subscription with void subtypes.
2016-02-08 12:16:58 +01:00
Christophe Simonis 05f44e597c [FIX] purchase: avoid comparing Records with ids 2016-02-08 11:15:51 +01:00
Goffin Simon a594356fe4 [FIX] stock_account: "Set standard price" button
When Costing methods="Standard Price" and Inventory Valuation="Perpetual (automated)",
the button to set the price in "product.template" view form must be called
"Set standard price".

opw:668709
2016-02-08 11:10:19 +01:00
Yannick Tivisse 46e925aa9f [FIX] web: Load SystrayMenu even if a systray's deferred is rejected 2016-02-08 11:08:34 +01:00
Yannick Tivisse 09659cca30 [ADD] web: Company swicher button on systray
If the user has multicompany rights and more than one allowed
companies, the full company name is displayed in the  topbar. When you
click on it, there is a dropdown with the name of the other companies.

Clicking on another company name makes you switch on it and reload the page
2016-02-08 09:08:11 +01:00
Aaron Bohy 4010c09e68 [FIX] mail: automatically open DM and livechat on new message
When a new message arrives in a DM or a livechat, the channel is automatically
open in a chat window if we aren't currently in Discuss.

Don't apply this behavior in mobile and we probably don't want to see a full
screen chat window everytime someone sends us a message.
2016-02-08 08:47:10 +01:00
Aaron Bohy ad02d23bf3 [FIX] mail: hide chat windows in discuss
Thus also remove the 'Detach' button in Discuss's control panel as we can now
directly detach channels with the messaging menu.

Also removed unused handler on 'messages_read' since rev. 30c26d7.
2016-02-08 08:29:53 +01:00
Aaron Bohy 5ba53f3b11 [FIX] mail: display user status in chat windows 2016-02-08 08:29:53 +01:00
Aaron Bohy 79a8eeb17d [FIX] mail: unread counter on new message in non pinned DM
When a new message arrived in a non pinned DM, the unread counter was
incremented twice ; once because the channel info (along with its unread
counter) was fetched from the server as the channel wasn't in the JS cache yet,
and once when adding the message in the JS.

With this rev., we only increment the unread counter when a new message arrives
if its channel is already in the JS cache.
2016-02-08 08:29:53 +01:00
Aaron Bohy bc2d86e00f [FIX] mail: correctly compute unread messages
Two problems occured:
 - when the user hadn't seen any messages of a channel, the seen_message_id
   was null and doing seen_message_id < msg.id to retrieve all messages
   received after the last one seen didn't return any message (null < x is
   always false)

 - messages sent by visitor on the livechat doesn't have any author_id, so,
   again, doing msg.author_id != partner_id is always false, and as a
   consequence, server-side, the messages sent by visitors were always
   considered as read
2016-02-08 08:29:52 +01:00
Aaron Bohy 2b43624666 [FIX] mail: don't display subject of messages written in a chatter
This was working fine until rev. 4bab99bd which accidentaly changes the
condition.
2016-02-08 08:29:52 +01:00
Aaron Bohy 377bcd202f [FIX] mail: overlapping calls to get_channel_preview
Problem occured when the first call to get_channel_preview was directly
followed by others, before the channels_preview_def was resolved. In that case,
the other calls all returned an empty array, as only the channels_preview
array was only filled with the RPC result for the first call to
get_channel_preview (the one which initiated the RPC).
2016-02-08 08:29:52 +01:00
Aaron Bohy 021f9aeec7 [FIX] mail: systray items must wait for chat_manager
Those items might have been rendered and inserted into the DOM before the chat
manager initialization was completed. As those items rely on chat manager's
data, they should wait for it before executing their action (inbox redirection
and channels preview display).
2016-02-08 08:29:52 +01:00
Odoo Translation Bot 3ff4dae5b0 [I18N] Update translation terms from Transifex 2016-02-07 02:58:52 +01:00
Odoo Translation Bot f2146d360d [I18N] Update translation terms from Transifex 2016-02-07 00:33:44 +01:00
Goffin Simon dda8e2211a [FIX] calendar: order of calendar contacts
When displaying calendar contacts in calendar view, the contacts
have to be ordered by name.

opw:666397
2016-02-05 16:17:53 +01:00
Olivier Dony bc26a49194 [MERGE] Forward-port 7.0 up to 4de3f4c4ba 2016-02-05 15:42:12 +01:00
Joren Van Onder ca3f3552f8 [FIX] pos_cache: take into account language of the compute user
Otherwise you'll always end up with untranslated product names.

Fixes #10736
2016-02-05 15:29:14 +01:00
Géry Debongnie bc03c915d4 [FIX] mail: various UI fixes
- correct template for undo snackbar
- better padding for chat windows
- recent messages now display 'now' instead of 'a few seconds ago'
2016-02-05 15:23:27 +01:00
Géry Debongnie 9e31b5de2a [FIX] mail: discuss notifications small fixes
- discuss notifications are always sent natively if possible
- clicking on native notifications focus the tab
- clicking on native notifications closes them
- granting notification permissions will display a confirmation
  notification
2016-02-05 14:09:19 +01:00
Mansi Trivedi 9931234e83 [FIX] product: wrong target on computed method
As in an api.multi call, should target template, not self.
Fixes traceback prone computed field
2016-02-05 13:47:49 +01:00
qdp-odoo ce784ae933 [FIX] account: default value of refund_sequence boolean on journal is False, as the most common practice seems to share the same numbering for invoices and refunds 2016-02-05 12:32:26 +01:00
qdp-odoo f7b1466f7e [FIX] account: starting amount of bank statement was considering only closed statements which is wrong (+ made small refactoring for the default_value and the onchange) 2016-02-05 12:27:32 +01:00
Thibault Delavallée 8aff53733b [FIX] tools: mail: sanitizer email escape
The sanitizer escapes email addresses contained in its source html to
avoid having it being discarded. Indeed the lxml cleaner considers them
as invalid tags and remove them.

However this escaping does not take into account email-like patterns
contained in cite attribute present on blockquote, del, ins or q.

This could lead to blockquote tags being escaped and therefore wrongly
displayed. This is now fixed.
2016-02-05 11:51:18 +01:00
Goffin Simon a5b3c6e748 [FIX] account_asset: label of account_asset_id field
The rigth label for this field account_asset_id is in fact
"Expense Account".

opw:667575
2016-02-05 11:35:26 +01:00
Thomas Groutars 7c432c8b65 [FIX] Fix get_default_ method decorator and definition
In sale.config.settings, the method get_default_sale_config has api.multi decorator.
However, the method definition should be def get_default_sale_config(self, cr, uid, fields, context)
(see https://github.com/odoo/odoo/blob/9.0/openerp/addons/base/res/res_config.py#L534 ).
The api.multi decorator results in the model being browsed with fields as ids, which results in that kind of queries:

select * from sale_config_settings where id in ('generate_sales_team_alias')

This change corrects the method definition to fix that.
2016-02-05 11:24:06 +01:00
Raphael Collet 35bcd2c2a4 [MERGE] branch 'master-models_inheritance-rco'
Modify the implementation of inheritance (with `_inherit`) between models, in
such a way that extensions to a given model are visible to all its children
models.

Inheriting model A to extend it adds the current class to A's model class.
This works like before, except we do not recreate the model class.

Inheriting from A in B adds A's model class as a parent of B's model class, so
that all modifications in A's model class are visible in B's model class.

Moreover, the `BaseModel` class has been introduced as an abstract model
`base`, and is implicitly inherited by all other models.  That model may be
extended to add a feature on all models, or override a method on all models.
2016-02-04 17:29:15 +01:00
Cedric Snauwaert 4de3f4c4ba [FIX] expression: fix search for o2m with non existing id
The result of searching on a o2m field for a missing ID was
the whole set of records which do not have any lines in the
o2m fields. This is definitely not the desired behavior,
and could lead to disatrous performance, because the
returned set could be extremely large.

One example of such behavior is for recomputing fields
in the env cache in 8.0+. When a o2m line gets deleted,
it triggers the recompute of any dependent fields.

In order to locate the records to recompute, the ORM
searches for the 'parent' records in the comodel table.
When this operation is done by 2 users concurrently
the o2m line may not exist anymore, and the bug
is triggered: dependent fields are recomputed on a possibly
very large set of records that did not need any recompute!
2016-02-04 17:10:08 +01:00
Nicolas Lempereur 7c11d4e70f [FIX] web_editor: minor tweaks IE11
In IE11 the values can be not string (for example a number and so not
have .indexOf method), but then there will no be !important bits and we
can just ignore this feature (which check if an overriding rule has an
!important flag).

There was another edge case when getting a "" set style, we get undefined.

opw-667917
2016-02-04 16:50:22 +01:00
Denis Ledoux 9c594cb3cd [FIX] website: optimize SEO in other languages than the default one
When connected as a website manager,
in another language than the default
website language,
it was not possible to use the optimize
SEO feature, because it needed
variables that were not available if the website
was considered as translatable only,
not editable. This is the case
when you are in any other language
than the default website language,
`editable` is `False`
and
`translable` is `True`.

This is a change of behavior compared to Odoo 8.0,
where `editable` was considered to `True`
even if you were only editing the website translations.

opw-668632
2016-02-04 16:35:34 +01:00
Raphael Collet d273415beb [FIX] models: track correctly which module introduced a given constraint
If a module adds a constraint on a given model, deinstalling that module must
remove the constraint from all the models that inherited it.
2016-02-04 15:52:06 +01:00
Raphael Collet 408330a655 [FIX] fields: track correctly which module introduced a given field
If a module adds a field on a given model, deinstalling that module must remove
the field from all the models that inherited the given field.
2016-02-04 15:52:06 +01:00
Raphael Collet dd0a3ea92f [FIX] base: in upgrade wizard, commit transaction before reloading registry
Not committing the current transaction may block the deinstallation of a
module.  Specifically, if a module adds a field on model `ir.module.module`,
its deinstallation will block when trying to remove the column, because the
wizard's pending transaction made a query on the table `ir_module_module`.
2016-02-04 15:52:06 +01:00
Raphael Collet 34cba4e0e5 [FIX] fields: reset attributes for columns that override fields
In particular, reset `compute`, `inverse`, `search` and `related`.  This is
necessary because all models implicitly inherits from model 'base', and the
latter defines `display_name` as a computed field.
2016-02-04 15:52:06 +01:00
Raphael Collet 53572ba4c6 [IMP] models: add the base model as an abstract model in the registry
The model `base` is implicitly inherited by all models, and can be extended as
any other model.
2016-02-04 15:52:06 +01:00