Commit Graph
103218 Commits
Author SHA1 Message Date
Nicolas Martinelli feb2ede0d6 [FIX] sale: recalculate price if quantity changed
The price might depend on the quantity, therefore it is necessary to
recalculate it anytime the quantity is changed.

opw-653615
2015-11-17 10:22:42 +01:00
Aaron Bohy eae08d39d6 [FIX] mail: mark as read: notify correct partner
When calling 'set_message_done' on a message which is a needaction for several
partners, the method was executed as root. This was an issue for the triggered
notification, as it was thus always sent to the admin.

For example, when Demo user marked such a message as read, he never received
the notification, but the Admin did, and its notification counter weirdly
decreased, while the one of Demo user remained the same.
2015-11-17 10:06:18 +01:00
Aaron Bohy a537a8466c [FIX] mail: close livechat conversations without unsubscribing
The problem occured when the user in the backend (client action) closed the
livechat before the user in the frontend, because we performed the wrong RPC,
and the backend user was removed from the partners following the discussion.
Thus, the messages sent from that point by the frontend user were never
received.

When closing a DM or livechat, we should call 'channel_pin', when unsubscribing
from a channel, we should call 'action_unfollow'.
2015-11-17 10:06:18 +01:00
Aaron Bohy 4ce2d6f7c3 [FIX] im_livechat: MailChannel inheritance
Commit 2bb55ec adds argument extra_info to the signature of channel_info() in
mail addon. However, this method is inherited from the im_livechat addon, and
its signature hadn't been adapted, causing tracebacks when im_livechat was
installed and channel_info() was called with an extra_info.
2015-11-17 10:06:18 +01:00
Aaron Bohy c51af45384 [FIX] mail: various UI improvements
- vertically center date and messages separators in threads
- remove notifications in DM and livechat
- order mail demo data so that messages appear ordered (they are ordered by id)
- make sure that DM are pinned (they weren't on the receiver side)
- don't display DM until a message has been sent
- validate message body
- undo snackbar fine tuning
- fix Firefox scroll bug on sidebar rendering (the scroll position was often
  lost when the sidebar was re-rendered, seemingly because the width of the
  thread changed for a brief moment)
2015-11-17 10:06:18 +01:00
Nicolas Martinelli 0f5a146182 [FIX] l10n_ch: missing included taxes
Both included and excluded taxes should be defined.

opw-654141
2015-11-17 08:21:17 +01:00
Denis Ledoux 9c5961bc8a [FIX] account: improve performances for reconciliations
This rev. is related to 3dd79b3d65.

Both `journal_id` and `date` on `account.move.line` are
related from the `move_id` of the line.

Besides, the move associated to these move lines is
created with the same values, in
`_prepare_reconciliation_move`:
 - The move `date` is set with `self.date`,
   exactly the same than what was set in the `aml_dict`
 - The move `journal_id` is set with `self.statement_id.journal_id.id`,
   which is the origin field of the related field `self.journal_id.id`
   used in the `aml_dict`

opw-656463
2015-11-16 17:58:15 +01:00
Denis Ledoux c2a6aeb244 [FIX] mail: internal subtypes with special characters
The fields options in the form are evaluated with
a `py_eval`, see:
https://github.com/odoo/odoo/blob/3c2e48423b4f9706216cada549d0a725f2dd07d2/addons/web/static/src/js/views/form_common.js#L664,
not as a JSON.

This was changed in October 2012, with rev.
c538db258a

Therefore, the field options must not be passed as a JSON, but
as a Python dict.

This had as side-effect to uncorrectly load the internal
subtypes for the "log a note" feature. For instance,
French translations with accents were displayed incorrectly.

opw-656409
2015-11-16 16:38:54 +01:00
qsm-odoo 3c2e48423b [FIX] website: nested container width
Add !important flag to the width:auto rule for a container inside a
fixed width parent. Notice that there should not be any container
inside another container (this would allow to remove this rule) but
this makes sense for the "readable" class.

This fix is made to solve website themes issues.
2015-11-16 16:07:43 +01:00
Nicolas Lempereur b820faed66 [FIX] web_editor: don't think HTML comment are visible
Summernote sometimes doesn't take into account HTML comment could be
embedded in the edited content, this can lead to issue since this
situation can happen in Odoo.

This commit patch the "isVisiblePoint" summernote's function to take
care of this issue.

opw-656332
2015-11-16 16:02:45 +01:00
Denis Ledoux 3dd79b3d65 [FIX] account: improve performances for reconciliations
The field `company_id` on `account.move.line`
is a related to the `company_id` field of the
`account_id` field on this move line.

Therefore:
 - Forcing the company of the `account.move.line` to the
   company of the `account.bank.statement.line` is pointless,
   as this field is supposed to be a related from the `account_id`
   of the move line. It's the `account_id` that must be set correctly,
   to an `account.account` of the right company. This is the case, btw.
 - Forcing the company of the `account.move.line` triggers the
   write of the `company_id` on the related `account.account`, which
   triggers the write of the `company_id` on all `account.move.line`
   records having as `account_id` this `account.account`.

Therefore, the more you had move lines on an `account.account`,
the more the reconciliation was slow for move lines with this `account_id`.

opw-656463
2015-11-16 15:17:07 +01:00
Nicolas Lempereur 3510ff3921 [FIX] web: update form view image after reload
6baf611d updated the image when showing the view form the first time,
but when reloading (e.g after a write) there was a difference which
would not cause the update.

second half of:
opw-654279

(follow-up of a8ae944)
2015-11-16 12:17:03 +01:00
Géry Debongnie e1727c98fe [FIX] mail: prevent race conditions when joining channels
it should now be impossible to join a channel several times when loading
a browser tab
2015-11-16 09:51:09 +01:00
Géry Debongnie 856743fd06 [FIX] mail: automatically join a channel if a message is received
before, messages were ignored if we were not already in the channel.
2015-11-16 09:51:09 +01:00
Géry Debongnie 1378dc130c [FIX] bus: prevent duplicate messages on browser refresh
On browser refresh, the bus sends the last notifications for the last
50secs.  This is really annoying to deal with, especially in the chat
applicatiion.  This commits ensure that duplicate notifications are
ignored.  This is done by saving the id of the last notif in the local
storage.

Note: it is also necessary to clear the last message id in the local
storage to prevent problems when a developer resets his db, and will not
receive any notifications.
2015-11-16 09:51:08 +01:00
Aaron Bohy 2c60b1bc2d [FIX] bus: correctly detect master tabs
The problem was that the tab_manager compared its last heartbeat value with an
old value stored in the local storage (when being elicted master, the tab
writes a new heartbeat in the locat storage).

This solution makes sure to compare the actual value in the local storage with
the heartbeat value stored in the tab_manager.
2015-11-16 09:51:08 +01:00
Aaron Bohy 196e1322f2 [FIX] mail: needactions: mark as (un)read
Marking a message as read in the inbox doesn't remove needactions on all
channels anymore.

When joining a channel (other than the inbox) in which there are needactions,
those needactions are automatically marked as read and removed from the inbox.
When the user clicked on Undo in the snackbar, the messages weren't correctly
re-inserted in the inbox (in the JS cache).
2015-11-16 09:51:08 +01:00
Nicolas Martinelli 48942f1242 [FIX] web: display Warning if "Save & Close"
When a warning is triggered by an onchange, clicking on "Save & Close"
will cause the warning to be closed as soon as it is shown. This fix
prevents the saving and closing if a warning message is detected.

opw-653503
2015-11-16 08:53:04 +01:00
Odoo Translation Bot 3d7ae73305 [I18N] Update translation terms from Transifex 2015-11-15 01:35:06 +01:00
Keyur Gajjar db6b92879a [FIX] survey: answers prefill was broken 2015-11-13 16:38:43 +01:00
Denis Ledoux 217c4842e9 [FIX] sale_mrp: stock transfer with BoM using variants
`_bom_explode` expects a `product.product`,
not a `product.template`

```
@param product: Select a particular variant of the BoM.
If False use BoM without variants.
```

This `product` attribute is used in the method `_skip_bom_line`,
which get the `attribute_value_ids` of this `product`.
This field `attribute_value_ids` is available on
`product.product` only, not on `product.template`

opw-656061
2015-11-13 15:02:55 +01:00
Denis Ledoux 432f199fd3 [FIX] project_timesheet: timesheets on tasks editable bottom.
The policy regarding the editable lists is:
 - In a one2many list, editable bottom
 - In a list, editable top.

So, when you hit the add an item (one2many list) / create (list),
you do not have to scroll a lot if there are a lot of lines.

opw-656363
2015-11-13 14:02:13 +01:00
Nicolas Lempereur 32ce414a65 [FIX] website_sale: breadcrumbs label not visible
The code was hiding two labels in the breadcrumb (extra info and
payment) but that should not be.

opw-654274
2015-11-13 13:29:50 +01:00
Nicolas Lempereur 5f30aaf9f4 [FIX] website_sale_options: override overriding Add Cart
fixing issue originated from 13a3f8e
2015-11-13 07:57:43 +01:00
Aaron Bohy 77e54d2987 [FIX] mail: chatter: follower subtype: check checkbox on unfollow cancel
When unfollowing the last followed subtype, a confirm dialog is shown to the
user to confirm that it will unfollow the document. If he clicked on 'Cancel',
the unchecked subtype wasn't correctly re-checked.
2015-11-12 12:02:46 +01:00
Goffin Simon 13a3f8e732 [FIX] website_sale, website_sale_options: optional_product_ids
The field optional_product_ids is not in the model "product.template" if
the module website_sale_options is not installed.

opw:654273
2015-11-12 11:59:46 +01:00
Goffin Simon 1db1446c60 [FIX] web_kanban: creation of a "team.user"
When creating a team.user record, there was an error to generate an url
for the image because the attribute "__last_update" didn't exist
on the record.

opw:653725
2015-11-12 10:39:04 +01:00
Géry Debongnie 6a5dadd291 [FIX] mail: sometimes the chatter displays no messages
It is due to the fact that the thread was not rendered in the dom before
the render_value method was called
2015-11-12 08:51:56 +01:00
Géry Debongnie bac5a19451 [FIX] mail: various small UI tweaks/fixes
- put the mentionned partners and the attachment above the composer
  instead of below
- debounce some links in thread.js to prevent double loading views when
  double-clicking
- readd the # in front of the channelname of the title of the client action
- give the channel_id to the thread in a chat window, so it does not
  display the channel name everytime it displays a message
- correctly close dm chat window when the dm channel is closed in the
  main sidebar
- simplify the help messages when a channel is empty
2015-11-12 08:51:56 +01:00
Aaron Bohy 5264ccf0d0 [IMP] mail: needactions and messages read
Mainly concern the client action:
	- Display needactions per channels
	- For all channels except Inbox, clear needactions when opening the channel
	- Add snackbar to undo needactions clearing
	- Display a separator between read and unread messages in threads
	- Fix active channel (for Inbox and Starred) display in sidebar

Various minor changes in chat_manager:
	- Code refactoring of bus notification handler
	- get_channel() don't fallback anymore on first channel
2015-11-12 08:51:56 +01:00
Aaron Bohy dbc1061854 [FIX] mail: load more messages: correct search domain
The problem was that the load more feature didn't return directly preceeding
messages in the thread but rather older messages.
2015-11-12 08:51:56 +01:00
Josse Colpaert a0b8829798 [FIX] stock: when moving lots it should also take into account pack operation info
When moving lots, we should also take into account the information on the
pack operation: specific location, package to take it from and owner.

Also, in the get_preferred_domain for the pack operations, when not giving any pack,
we should check the quant is not in a pack.  It is also better to copy the list
to avoid that the constraints added to the list would get into the next call.
2015-11-10 17:08:46 +01:00
Nicolas Martinelli a4194005be [FIX] stock: unreserve quants before assignment
Make sure to unreserve all quants before assignment. Indeed, the method
makes this assumption and does not take into account any existing
reserved quants. Therefore, without this fix, there is a possibility to
reserve more than needed.

opw-653904
2015-11-10 17:08:46 +01:00
Nicolas Martinelli 43e8e92c81 [FIX] account_asset: remove onchange
Changing the asset account should not change the depreciation account,
since they will be most likely different.

opw-654335
2015-11-10 15:18:24 +01:00
Nicolas Martinelli 8064cba8e5 [FIX] website_sale: display sale note
The method get_salenote does not exist anymore. It is not necessary
anymore since the note is already translated in the appropriate language
on the SO.

opw-653600
2015-11-10 15:04:28 +01:00
Simon Lejeune 038949f395 [REF] packaging: debian: don't require ofxparse
because it's available in debian stable but not in ubuntu 14.04 (lts)
2015-11-10 14:43:41 +01:00
Joren Van Onder fc21b00144 [FIX] pos_mercury: make forcing validation work again
The POS will asks the user to confirm certain things that could be a
user error. Examples of this are attempting to validate an order with a
very big payment compared to the amount to pay on the order. Another
example is paying an amount of 0 for an order with a total amount to pay
that is negative (manual refund).

The issue was that pos_mercury overwrote validate_order(), and didn't
call _super() correctly, losing the user confirmation for these type of
actions.
2015-11-10 12:50:51 +01:00
Olivier Dony aae980b458 [FIX] auth_signup: initial invitation link should not expire 2015-11-10 10:35:41 +01:00
Nicolas Lempereur 8bb5b867db [FIX] base: remove ir.actions.wizard from ir_ui_menu action
ir.actions.wizard were removed in 8.0 with a32bf72 (oct. 2013), but
they were still present in the interface to add a menu.

This fix removes them for good, and is only done in 9.0 since the
remains of existing ir.ui.menu with an ir.actions.wizard action should
be minimal.

opw-654215
2015-11-10 10:26:14 +01:00
Géry Debongnie 622bd038e4 [FIX] mail: various ui improvements
- display star/mark as read icon next to the message title instead on
  the far right
- display unstar all message in channel starred
- enable/disable the 'unstar all' and 'mark read' buttons depending on
  the number of messages in the corresponding channels
- display star on the left sidebar in 'squashed messages'
- tweaks to padding in client action
- display hash in channel name in lighter tone
- light opacity in sidebar
- star icon in message sidebar is clickable + small less refactoring
- message sidebar is aligned with the message now
- messages are not squashed in inbox/starred
2015-11-09 16:36:52 +01:00
Géry Debongnie 2bb55ecb04 [FIX] mail: issue when leaving channel and refreshing
When we refresh, the bus will send the last notifications since the last
50s, so, the browser will receive notifications from a channel that we
already left.  This commits tries to fix the issue by sending
explicitely the information that a channel was unsubscribed.

Also, and this is touchy, it ignores messages received in a channel that
it is not subscribed to (before, it joined the channel)

Also, it will synchronize channels opened and closed in various
tabs/browsers.
2015-11-09 16:36:29 +01:00
Géry Debongnie fb013ce292 [FIX] mail: prevent race condition in client action
The issue was that the chat_manager was an async js module, so it could
be loaded quite late.  Then the client action was loaded only after the
chat_manager was ready, and possibly before the action_manager read the
value in the action registry.

This commits prevent this problem from happening by turning the chat
manager into a sync module, so the chatter and the client action needs
to wait for him to be ready before doing their magic.
2015-11-09 16:28:06 +01:00
Géry Debongnie 9f6f5fe512 [FIX] bus: allow bus to self-correct
The bus is somewhat tricky. (at least, the crosstab version).  It needs
to elect a leader, and to communicate with the server through it.

However, several tabs have a different event loop, so, we need to be
careful to avoid race conditions.  The current version was not
race-condition-proof, and this commits improves on this.

The idea is to allow the bus to detect if some other tab is also
considering himself master.  In that case, it is allowed to unelect
himself.

This should allow the bus to self correct those situations in a short
time.
2015-11-09 16:24:59 +01:00
Nicolas Martinelli 1e64c660f5 [IMP] crm, website_customer, base : tag names
Rename "Tags" with more explicit names.

opw-653084
2015-11-09 15:33:54 +01:00
Nicolas Lempereur f847701c5a [FIX] website_sale: attribute conflict with m2m tags color
The color field of a product.attribute.value enable users to choose a
color with its HTML color value (hexa, named, rgb, rgba).

In the many2many tags the color field on the model has a magic feature
which color the tag in several instances. But these color are numbered
from 0 to 10 and are incompatible with HTML color values.

So with with the model product.attribute.value, the many2many tags
widget would use the color system (since a field name color exists), and
when setting a color with it, it would be invalid and erase the wanted
named or HTML value color.

This fix ignore the setting of the tag color for this particular model,
a following fix (in master) should rename the column to properly fix
this.

opw-653124
2015-11-09 15:14:44 +01:00
Martin Trigaux 345809b993 [I18N] Update french translation terms from Transifex
Mostly to fix the '%.' in mail breaking the rendering of Odoo in French
2015-11-09 14:58:50 +01:00
Nicolas Martinelli d2247b7e66 [IMP] purchase: do not propose same PO if already added
When adding a PO to a vendor bill, a PO is proposed only if at least one
of its line is not already added.

opw-653911
2015-11-09 12:16:53 +01:00
Odoo Translation Bot 14799a9006 [I18N] Update translation terms from Transifex 2015-11-08 01:32:40 +01:00
Thibault Delavallée 582b16e4d4 [FIX] sale: salesman and analytic tags
Salesman can create analytic account. However they cannot choose any tags to apply
to this account because they miss a read access on tags.
2015-11-06 17:28:17 +01:00
Thibault Delavallée 33c78f1621 [FIX] stock: stock user should be able to create products
Stock user should be able to create products. Indeed when targetting small
businesses, restricting the right to create products limitates the use of
the inventory app. It is possible to further restrict access to the product
model using record rules for big companies that have a lot of users and
managers, and where creating product should be limited.
2015-11-06 17:28:17 +01:00