Commit Graph
100331 Commits
Author SHA1 Message Date
Aaron Bohy 8397abd871 [IMP] mail: make chat windows somehow usable in mobile 2016-01-14 11:22:26 +01:00
Aaron Bohy 54396cfa41 [FIX] im_livechat,mail: don't automatically detach chat channels
This reverts commit a8239cd as the navbar dropdown recently introduced now
offers a quick access to channels without coming back in the Discuss App.

Moreover, this commit emphasizes the notifications navbar icon when there are
unread messages (or at least, it mutes it when there isn't).
2016-01-14 11:22:26 +01:00
Aaron Bohy 916d90af35 [IMP] mail: open dm shortcut from in navbar dropdown
Allows to directly open a dm channel from a chat window, without coming back
to Discuss.
2016-01-14 11:22:26 +01:00
Aaron Bohy b3868a613c [IMP] mail: needaction/unread messages counters
Some UI changes:
  - Unread messages in chat are now displayed as needactions in the Discuss's
sidebar (badge with counter of unread messages, instead of simply bolding the
channel name).
  - The counter displayed in the navbar is now the sum of needactions and total
of unread messages in chat.
  - The counter displayed next to Inbox is still the needaction counter.

For consistency between tabs/browsers/devices, the channel_seen info is now
broadcasted, meaning that every tab/browser/device will be noticed.

Also now correctly increment the unread counter of a channel if the received
message is a needaction.
2016-01-14 11:22:25 +01:00
Aaron Bohy d93231afe2 [IMP] mail: navbar: messaging menu
The navbar notification is now a dropdown containing a preview of all pinned
channels (except Inbox and Starred), channels with unread messages being on the
top.

It allows to quickly detach a channel without going back to Discuss.

The channels preview fetching is performed only once, and it is done in
background without blocking the whole UI (using shadow option or session.rpc()).

Also fixes a synchronization problem between server and client about the folded
state of channels (the info wasn't stored client side, so it produced weird
situations, e.g. unfolding a channel didn't actually unfold it).
2016-01-14 11:22:25 +01:00
Aaron Bohy 0301735354 [IMP] mail: move 'New message' button from navbar to Inbox 2016-01-14 11:22:25 +01:00
Aaron Bohy 18fccd9d6c [IMP] mail: put chat windows in a dropdown in case of overflow
Former algorithm to display chat windows was pretty basic: each window was
positionned 5 pixels to the left of the previous one, starting from the bottom
right corner of the screen. Thus, when there were too many chat windows to fit
in the screen, they overflowed to the left.

This rev. handles this case by hidding overflowing chat windows and making them
available in a dropdown positionned 5 pixels to the left of the last visible
chat window.
2016-01-14 11:22:25 +01:00
Aaron Bohy 37238d343a [FIX] mail: notifications: strip html tags
but keep jumps to line
2016-01-14 11:22:25 +01:00
Aaron Bohy 029c0d5567 [FIX] web: utils: backport of swap() for enterprise compatibility 2016-01-14 11:22:25 +01:00
Nicolas Lempereur 5c50ba322f [FIX] web_editor: title tag with translation
b24d759 changed the wrapping translation span tags, this commit take it
into account for the "translation" title tag.
2016-01-14 11:20:00 +01:00
Denis Ledoux 94920b43c9 [FIX] *: typo Important Messages -> Unread Messages
While this is important to read the replies
you get in the threads you follow, `Unread messages`
is more accurate to describe what these filters
displays.

opw-666739
2016-01-14 10:48:37 +01:00
Goffin Simon 60be34c3ee [FIX] account: _prepare_analytic_line
The field "amount" in 'account.analytic.line' must be in the currency
of the 'account.move.line' record because the "currency_id" field is over
written in "addons/account/models/account_analytic_line.py" and
this field is related to the currency of the move linked to the
analytic line.

opw:666538
2016-01-14 09:40:08 +01:00
Ajay Javiya 6006c0d72a [FIX] on website sale checkout once create address and confirm order , after that if user change it to ship to same address still ship address is set previousely create address 2016-01-13 19:34:36 +01:00
Martin Trigaux 3be9d911c0 [FIX] mass_mailing: translated stage in kanban view
Missing _ in read_group call
2016-01-13 16:49:00 +01:00
Nicolas Lempereur 060cff9be3 [FIX] web_editor: get unlink button working
f3f7bd9 improved some link editing behaviour by adding contenteditable
attribute on it.

But if contenteditable is set on a link, using command "unlink" on the
element for `document.execCommand` does not work.

Hence this commit adds a code so the first click outside the link remove
contenteditable.

closes #10436

second-part-of: opw-659772
2016-01-13 16:28:29 +01:00
Denis Ledoux d26c85dc0a [FIX] hr_expense: mark paid on reconciliation, precision
When comparing floats, `float_compare` must always
be used to avoid precision issues.

e.g., percentages like 1.0000000000000002
must be considered as equal to 1.

opw-666459
2016-01-13 16:10:09 +01:00
Christophe Matthieu 10efb0621f [FIX] website: editor: enable/disable save/undo/redo button when resize snippet 2016-01-13 16:05:22 +01:00
Nicolas Martinelli a6badd2559 Revert "[FIX] product: sort pricelist items by sequence"
This reverts commit 98e5673c90.

Sequence should not be taken into account since the default order is
clear enough for the user.
2016-01-13 16:02:51 +01:00
Martin Trigaux ce2d94207b [FIX] mail,web: : untranslated term in view
_t(...) in xml qweb views do not work, not exported, not evaluted.
No reason to use t-att-*, just using simple attribute is enough.
2016-01-13 15:48:09 +01:00
qsm-odoo dbd0255228 [FIX] website_theme_install: language dependant code
The module did only work in english because the themes were found
amongst the applications thanks to their categorie names.

Solution is to search categories thanks to their xml_id :
base.module_category_theme or base.module_category_theme_...
and not
base.module_category_hidden or base.module_category_theme_hidden
2016-01-13 15:10:02 +01:00
Martin Trigaux bb56e484b7 [FIX] all: construction of translations lookup
When evaluated, the translation function never finds a match if a variable is
integrated into the untranslated text.

SHAME! 🔔 🙋
2016-01-13 14:46:30 +01:00
Martin Trigaux 2ace8f0270 [FIX] forum: duplicated method
Identical method, written another way.
Properly check the translated error.
2016-01-13 13:48:03 +01:00
Martin Trigaux c287d38f5f [FIX] ...: untranslated selection
When using a method returning the list of selections, the labels needs to be
translated with a _ call
2016-01-13 12:13:46 +01:00
Martin Trigaux 780b36abe9 [FIX] hr_timesheet_sheet: missing terms
Action act_hr_timesheet_sheet_my_timesheets was not translated
2016-01-13 11:42:16 +01:00
Martin Trigaux f962f0ecc4 [FIX] stock: missing terms
Added a related field.
2016-01-13 11:15:53 +01:00
Christophe Matthieu 17424bd4c8 [FIX] web: reload view on fail after write/create with action button
Issue:
Invoicing -> Vendor bills
Create a record with reference=0 -> Register Payment
Create a second record with reference=0, at least one line with at least one tax -> Save
Edit -> change quantity in the line -> Register Payment -> the register fail
change the quantity again and change reference=1 -> Register Payment
The taxes is include twice
2016-01-13 11:09:54 +01:00
Thibault Delavallée fd57dd5713 [IMP] mail: chatter: hide notification buttons
Using some templates it is possible to have odoo buttons directly in the
mail_message body. Hide them in the chatter as this is more noisy than
usefull.
2016-01-13 10:34:09 +01:00
Thibault Delavallée 2bfb880503 [FIX] mail: auto delete
Correctly set the auto delete property coming from the template in the composer.
Set the mail_auto_delete context key for message_post, and directly set the
auto_delete field value in mass mailing mode.
2016-01-13 10:34:09 +01:00
Martin Trigaux bc5e51d6b0 [FIX] mail: missing terms
Please people, stop changing the terms every week...
2016-01-13 10:05:06 +01:00
Joren Van Onder f53eb4d2e6 [FIX] pos_mercury: load pos_mercury_config_id from account.journal
The introduction of df745c25fb made it so
that only the type and sequence field of account.journal get loaded in
the POS. Before that patch all fields of account.journal would get
loaded. pos_mercury depended on this behavior, because it needs the
pos_mercury_config_id.

This loads the field explicitly.

Because of the change the display_name field on the journal is also
unavailable, so we instead use the journal_id field on
account.bank.statement. This is probably even better than what we did
before, because this is what we also use when printing.
2016-01-13 10:02:59 +01:00
Martin Trigaux 3c86d74941 [FIX] product_email_template: untranslated label
String instead of string, was not exported.
Missing "Invoice Confirmation Email" term.
2016-01-13 09:32:35 +01:00
Xavier Morel 045b9019ef [FIX] base_import_module: CSRF handling
* disabled CSRF protection for login route
* return CSRF token from login and retransmit it during module upload

``deploy`` only sends CSRF token if given one by authenticate so that
the command can be used for non-updated modules.

Closes #9488
2016-01-12 19:05:43 +01:00
Christophe Simonis 33299fd689 [MERGE] forward port of branch saas-6 up to 5eee559 2016-01-12 18:46:23 +01:00
Denis Ledoux 85b342c3b1 [FIX] website_sale: my cart popover in other languages
When browsing the ecommerce in another language
than the default one,
the my cart popover, displayed when the mouse is over
the "My Cart" link in the menu, wasn't working.

This is because the Jquery selector was defined as
"the link must start with `/shop/cart`,
while, when browsing this link in another language,
this link is prefixed with the language code,
e.g. `/es_ES/shop/cart`.

The selector should therefore check that the links
ends by `/shop/cart`.

opw-666351
2016-01-12 18:35:52 +01:00
Christophe Simonis 5eee5591ab [MERGE] forward port of branch 8.0 up to 37ed5ce 2016-01-12 18:24:27 +01:00
Denis Ledoux 6a366b216b [FIX] models: order by translatable fields with multiple translations
When a model list is ordered on a translatable field,
a join on the `ir_translation` is done, so the order
is correctly done on the translation value rather
than the translation source (in English).

This join wasn't entirely correct: If there were
multiple translations for a same record field
(which should not happen, but which is not forbidden)
e.g. Two different translations for the name of a same product,
then this record appeared several times in the result of the query,
while this is expected to only have each record once
(Obviously, when you perform a search on products, you do not expect
to have multiple times the same products returned by the search query)

This had as side-effect, when searching records with a limit of 80
items, to return actually less than 80 items
(e.g. 72 products, with multiple translations),
and, as the limit of the search was not reached (e.g. 72 instead of 80),
the web client did not perform the `search_count`, as it does not do
it when the limit of the search is not reached (meaning there is no
more items than what has been returned by the search query), and therefore
the web client did not consider there was actually more results, more
pages of results.

In summary, the count of records of a model could be different
when performing the order on a translatable field from one
language to another.
(e.g. A database could return 150 products in English, but
only 72 in Spanish).

To solve this issue, we have required the use of the operator
`DISTINCT ON`, which provides the possibility to keep only
the first translation for each record according to a given
order (in this case, we keep the translation that has been
added the most recently)

From the PostgreSQL documentation:
DISTINCT ON ( expression [, ...] ) keeps only the first row
of each set of rows where the given expressions evaluate to equal.
The DISTINCT ON expressions are interpreted
using the same rules as for ORDER BY (see above).
Note that the "first row" of each set is unpredictable
unless ORDER BY is used to ensure that the desired row appears first

The performance of this new query is similar to the performance
of the former query.

opw-666071
2016-01-12 17:40:58 +01:00
Goffin Simon 1676f66ad3 [FIX] account: deprecated account
If an account is deprecated it should not be possible to use it anymore.

opw:665987
2016-01-12 16:51:54 +01:00
Goffin Simon 4142d6ed8e [FIX] purchase: unlink PO
A PO must be in state cancel to be canceled.
Before the fix, it was possible to cancel a draft PO
then if a PO linked to a procurement was deleted with being
canceled, the procurement stayed in running state.

opw:666311
2016-01-12 16:28:01 +01:00
Nicolas Lempereur b24d759036 [FIX] web_editor,base: transmit translation model
There is a logic on the front-end to escape translated text content when
saving them as ir.translation record.

This logic was in part base on html elements and if these element were
not coming from an html field other than "ir.ui.view" arch_db's field.

This logic was introduced in 8.0, and something similar was later
introduced in 9.0 with f5acea7, but in this instance, the information
[data-oe-model] on nodes was not available. Thus some html field from
other model than ui.ui.view would have their translation escaped
erroneously.

This commit adds a data-oe-model attribute on to-be-translated nodes
which will then be available to the frontend.

closes #10420

first-part-of: opw-659772
2016-01-12 15:14:07 +01:00
qsm-odoo cb79297a41 [FIX] web_editor: links edition (only website links)
Commit f3f7bd9f24 adds an improvement which allows the user to edit links in
an easier way. The problem is that it also allowed to edit... the edit
buttons (example: the discard button).

This commit moves the mentionned commit code below the code that checks
if the target can be edited or not.
2016-01-12 15:03:23 +01:00
Christophe Matthieu a830263992 [FIX] wesbite_sale: recompute taxes only when update checkout
Issue: We force to recompute the taxes on all lines in constrains. This forcing loose custom added taxes in the backend.
2016-01-12 15:01:08 +01:00
Nicolas Lempereur 37ed5ce844 [FIX] website_quote: don't unescape menu title
If we take content with $().text(), to insert it in another node we have to
used $().text(value) also. If like before this commit, we would use $().html()
the content would be unescaped one time too much.
2016-01-12 13:33:44 +01:00
Thibault Delavallée c3db39ee25 [FIX] res_partner: conditional colorize of avatar
colorize parameter was not taken into account when colorizing the image.
Thanks Wolfgang Taferner for pointing it out.
2016-01-12 10:29:59 +01:00
Martin Trigaux e636d98741 [FIX] website_sale: remove truplicated* code
I only blame kdiff3

* TM @rim-odoo
2016-01-12 10:14:43 +01:00
Mohammed Shekha 06a3609ac8 [FIX]calendar: use display_name instead of name, because of template change, now FieldMany2ManyTag uses display_name to show lable on tag 2016-01-12 10:13:43 +01:00
Nicolas Martinelli 8c51bb7476 [FIX] sale: unlink SO and procurement
When a SO is confirmed, cancelled then set to draft, the SO is still
linked to the pickings and the procurements which were created before
cancellation. This should not be the case, since a draft SO is not
supposed to be linked to any procurement.

The fix resets the procurement group of the SO, and resets the
procurements linked to a SO line.

Fixes #10277
2016-01-12 09:02:08 +01:00
Thibault Delavallée 929e060c07 [FIX][IMP] base: partner image
Do not compute the partner default image when being in testing or install mode.
For example when importing a huge list of contacts there is no need to compute
a default image for every contact.

Moreover the random colorize is more limited. There is no need to explore the
whole space of rgb. It is now limited by steps in the rgb random, leading to
less different images being possible. There are currently 512 possible
combinaisons.
2016-01-11 17:47:44 +01:00
Nicolas Martinelli db638d8b33 [FIX] account: currency in analytic line
Once accounting is installed, the currency of the amount must be the
currency of the company, while the amount currency contains amount in
the original currency.

opw-665821
2016-01-11 17:05:42 +01:00
David Monjoie e01dab102f [FIX] sale: unhide Sales button from product form view
Continuation of 4c1224f5ec.
2016-01-11 16:53:58 +01:00
Christophe Matthieu 0b2728d8b2 [FIX] web_editor: error when long delete keypress in mass_mailing html
issue: event does not a global var in firefox, and event is already prevented
2016-01-11 15:23:36 +01:00