Commit Graph
100395 Commits
Author SHA1 Message Date
Denis Ledoux b52467afb2 [FIX] product: pricelist applied on product categories
This is related to revision 2ebbcba33a

The above revision introduces a regression: the ability
to configure pricelist items applied on product categories.

If you configured a pricelist with items applied
on products categories, then the first item with a product
category matched all products, even if the products were
not in the according category.

This is because the condition checking that the product
is within the pricelist item product category has been
completely removed, by the above commit.

opw-666059
2016-01-19 12:14:32 +01:00
Christophe Matthieu 365e298fb1 [FIX] web_editor: inliner don't apply color when background-color 2016-01-18 17:09:02 +01:00
Christophe Matthieu 57fe8147f3 [FIX] web_editor: don't add double p tag at the begin of the document 2016-01-18 17:09:02 +01:00
Christophe Matthieu 958656d7e6 [FIX] web_editor: inliner take in care the '!important' attributes 2016-01-18 17:09:01 +01:00
Christophe Matthieu b27d24bfe9 [FIX] web_editor: don't limit the css inliner to the class but for all tag
(can reduce the performances)
2016-01-18 17:09:01 +01:00
Christophe Matthieu da880a48db [FIX] web_editor: don't insert css inline for readonly html frame
The preview is not equal to the real email rendering because inline.css is present.
2016-01-18 17:09:01 +01:00
Christophe Matthieu 4e0e376b0a [FIX] web_editor: use iframe instead of direct content for preview
The preview is not equal to the real email rendering because the backend css is present.
2016-01-18 17:09:01 +01:00
Géry Debongnie 990597ba1c [FIX] web_kanban: use default_order if defined in view
in saas6, the kanban view used the default_order parameter if defined in
the view, but this was lost in the kanban view rewrite last year

Now, this commit makes it work. As an added bonus, it should also now
work for grouped kanban view (unlike before)
2016-01-18 16:30:19 +01:00
Géry Debongnie d2cb04c7a5 [FIX] web_kanban: fix race conditions on do_search
The do_search method was clearly written by someone who doesn't
understand how asynchronous code works.  If several do_search are
quickly called in succession, there is no guarantee that the do_load
calls will return in the chronological order, so it could happen that
the kanban view render an inconsistent state.

This commit makes sure that only the last search entered is rendered.
2016-01-18 16:30:19 +01:00
Olivier Dony 24c41e3d31 [FIX] website_event_sale: test updated for pricelist fix
Rev. f9ee454d42 fixed the pricelist
application in website_event_sale in 8.0, but the 9.0 test
contained a hardcoded price matching the old computation.
The test failed when the fix was forward-ported to 9.0.
2016-01-18 16:18:03 +01:00
Raphael Collet d5fbf9a1e8 [FIX] ir_translation: avoid introducing duplicate translations
The commit d6b26c68 introduced this duplication to deal with missing
translations in qweb views (with name="website").  Those translations are now
gone in favor of translations of the field `ir.ui.view,arch_db`.
2016-01-18 15:58:04 +01:00
qdp-odoo 5393638610 [FIX] account: when changing the number of digits for the account on the company settings, change all accounts. Was PR #10334
Previously we only changed the accounts of type liquidity and that had the prefix/suffix defined on the company settings.
We added to that the other accounts with the following heuristic:
    if #digits > len(account.code):
        add 0 after account.code,
    if #digits < len(account.code):
        remove 0 from end of account.code (if possible).

Behaviour for the accounts of type liquidity that start with prefix/suffix defined on the company settings does not change,
except for a bug correction that did not remove 0 when we set a smaller number of digits.
2016-01-18 15:12:06 +01:00
Aaron Bohy fc8a4b5ede [FIX] web: view manager: overlapping switches between views
The problem occured when the user quickly clicked several times on the view
switcher or the breadcrumbs. The function switch_mode() of the view manager
was called once per click. This function's role is to prepare the requested
view, and once it is ready, to remove the former one from the DOM and insert
the new one instead. It is thus asynchronous as it waits for the
fields_view_get and search_read RPCs' response.

Unfortunately, when those calls to switch_mode() overlapped, the former view
reference was lost and it was thus never removed, producing a weird situation
where two views were displayed one above the other. This may happen when a
view takes a while to load, or simply when the user double-clicks on the
breadcrumbs or view switcher.

This rev. makes sure that calls to switch_mode() can never overlap by refusing
any other call when there is still one processing.
We also added a protection against breadcrumbs and view switcher double-clicks.

opw 658924
2016-01-18 14:01:21 +01:00
Aaron Bohy 206cc91a63 [FIX] web: view_manager: restore internal state on switch view failure
When an error occured when switching from a view to another (e.g. switching
to a form view for an id that doesn't exist, by editing the url), active_view
and view_stack were updated even though the switch failed. The view manager
thus lost the reference to the real current active view, which couldn't be
detached anymore. This resulted in two views being displayed at the same time
if the user kept navigating through this view manager.

This is a backport of odoo/enterprise@0b1aafa6b and odoo/enterprise@8e691be.
2016-01-18 14:01:21 +01:00
Damien Bouvy 93075b6b4b [FIX] sale_service: show complete SO view when coming from task
To view the complete SO form view (including delivered quantities),
you need to specifiy the "show_sale" key in the context.
2016-01-18 13:53:53 +01:00
pvy ab800b4ea2 [FIX] account: internal_type should be read_only so that it's not in the 'create' vals and does not trigger the _compute_matched_percentage() function 2016-01-18 13:35:16 +01:00
Damien Bouvy 40f298726a [FIX] sale_service: add missing link between task and SO 2016-01-18 11:36:48 +01:00
Christophe Simonis 0a2300318a [MERGE] forward port of branch saas-6 up to 12d9a34 2016-01-18 10:44:50 +01:00
Christophe Simonis 12d9a34cf4 [MERGE] forward port of branch 8.0 up to 1812b8f 2016-01-18 10:40:09 +01:00
Christophe Combelles 1812b8f337 [FIX] sale: copy of possibly None context
closes #10488
2016-01-18 09:46:25 +01:00
Géry Debongnie 992222a24a [FIX] web: fix autosize small bugs
- better width handling
- disable css vertical resize
- correctly copy css classes to the 'shadow' textarea
2016-01-18 09:45:58 +01:00
Odoo Translation Bot 2efa359e41 [I18N] Update translation terms from Transifex 2016-01-17 03:01:54 +01:00
Odoo Translation Bot fb7064bf3f [I18N] Update translation terms from Transifex 2016-01-17 01:29:24 +01:00
Denis Ledoux 9f7200a2f6 [FIX] purchase: origin concatenation
This is related to revision 44eeb38

The origin concatenation was not working
when `procurement.origin` was `False`

opw-666933
2016-01-15 17:51:31 +01:00
Olivier Dony b8bb81b1b6 [FIX] event: config view: reset inherit_id (extension -> primary)
Commit 74f3cbc6a6 converted the
view and should have forced  `inherit_id` to False, to fix
ugraded databases.
2016-01-15 17:07:23 +01:00
Raphael Collet 18f3de2f19 [FIX] bus: delay the postgres notification until the transaction is committed
This is much better than committing the current transaction without notice.
2016-01-15 17:04:45 +01:00
Raphael Collet 20cfdc4604 [IMP] sql_db: add event handlers for post-commit and post-rollback 2016-01-15 17:04:45 +01:00
Raphael Collet c4494b9868 [FIX] sql_db: do not handle errors when releasing savepoint
If you commit the transaction inside the context manager `cr.savepoint()`, the
savepoint is lost.  In that case, releasing the savepoint fails.  That failure
should not be handled by rolling back to the savepoint...
2016-01-15 17:04:45 +01:00
Goffin Simon 8c3eb91e57 [FIX] mail: display block for message body
The message body must be inside a tag div because when the message was short
with a @author, there was no tag div around the body and it was displayed
inine.

opw:666840
2016-01-15 16:51:51 +01:00
Olivier Dony 3c12a59bff [FIX] account: _get_fpos_by_region should return wildcard position as fallback
Simplify the API and make it possible to detect fiscal positions based
only on geo information, without having to call `get_fiscal_position()`
which requires a specific partner record.

This commit simply moves the logic related to the global 'world' fiscal
position fallback (no country, no country group) into the low-level
method `_get_fpos_by_region()`, so that callers do not have to do it
themselves.
2016-01-15 16:44:25 +01:00
Denis Ledoux ddd3e08fbc [FIX] im_livecat: HttpRequest.render returns a Response
This revision is related to 100d604cb0

The above revision aimed to add the correct `content-type` headers,
the according route returning Javascript and not simple html.

HttpRequest.render` returns a Response,
and `make_response` doesn't expect a Response as first argument.

In other words, this is not possible to make Reponse from a Response.

`HttpRequest.render` accepts kwargs, including `headers`.

opw-666898
2016-01-15 16:37:30 +01:00
Géry Debongnie 59ce9a0ed9 [FIX] mail: composer fixes
- chatter composer did incorrectly send messages when enter is pressed
- add a div around the textareas to prevent rendering issues because of
  flex
2016-01-15 16:33:33 +01:00
Denis Ledoux f9ee454d42 [FIX] website_event_sale: pay the displayed price
The price displayed on the event page is the
`event.ticket`.`price_reduce` field,
which is basically the ticket price(`event.ticket`.`price`)
minus the possible discount applied by the pricelist

Nevertheless, the price asked when ordering the ticket,
in the cart/checkout, was the `ticket.price`,
without the possible discount from the pricelist, therefore.

The price asked for the ticket was therefore different than the price displayed.

To reproduce:
 1. Settings > Sales > Use pricelist
 2. Sales > Configuration > Pricelist > Public Pricelist > Apply a 20% discount (-0.2)
 3. Go to /event, -> Conference on Business Applications
 4. Order 1 of each
 5. Notice that the price asked is 800€ and 1200€ instead of 1000€ and 1500€ respectively
 6. Hit Order now -> Notice that the price in the cart are the price without the discount

opw-665540
2016-01-15 16:12:50 +01:00
qsm-odoo 5a76586ede [IMP] web,point_of_sale: debug mode
Keep debug mode status when going on another location url (backend,
frontend, pos, ...).
2016-01-15 15:24:09 +01:00
Christophe Matthieu b9768c7022 [FIX] hr_holidays: show leave tag on employee kanban view
issue: the current leave is not display in kanban view.
_get_leave_status select the leave only if the leave finish after the end of the current day.

opw-666453
2016-01-15 14:43:59 +01:00
Martin Trigaux fba324fe5e [FIX] web: untranslatable string in FieldCharDomain 2016-01-15 14:31:27 +01:00
Raphael Collet b4debe9539 [FIX] test_inherit: wrong model passed to default function on field 2016-01-15 13:54:29 +01:00
Josse Colpaert 4bd64dc91b [IMP] stock: avoid deletion of quants by user
Quants should never be changed or deleted by a user.
We make it not possible anymore in the views.
And also in the code we avoid to unlink without
passing a specific key in the context.
(as we still need to be able to delete quants in case of
negative quants reconciliation)
2016-01-15 13:40:09 +01:00
Denis Ledoux d54644fcd4 [FIX] mass_mailing: set theme without changing template content
When opening a mail template,
and choosing a theme,
then directly saving, without changing anything within the template,
the chosen template wasn't saved in the template.

Therefore, when re-editing the same template, the theme selection
re-appeared, while you had already chosen in the previous steps.

opw-665537
2016-01-15 13:31:31 +01:00
Joren Van Onder 870c0ca59d [FIX] pos_restaurant: stop ghost clicks on iOS
On iOS (at least version 8.3 and up), both Chrome (at least 47 and up)
and Safari emit ghost clicks [1] that added the product normally
rendered under the table widget to the order. So when selecting a table
without any orders you would end up with the table selected, and the
product under the table in the order after just tapping the table.

The issue is that on the table selection screen we listen to touchend
events. On the product selection screen we listen to click
events. Mobile browsers will usually emit both, first the touchend
event, then a small delay, and then the click event. The small delay is
platform dependent. Also, depending on a bunch of circumstances,
browsers adjust this delay time (see [1] for more info).

On Android this never caused issues because there the click is fired
pretty fast after the touchend and more importantly, the click event
still has the table widget as it's target. We don't listen to click on
the table widget so it gets correctly ignored.

On iOS there is a longer delay, and the click event is emitted with
whatever target is currently under the coordinates of the click.

In order to stop this from happening we'll just bind to click when not
editing. When we are editing the floor layout we'll do what we did
before.

We also bind to dragend because on touch devices it is sometimes not
easy to click, especially on small elements. You have to touch and
release the screen without moving your finger. Because the table
selection screen hides overflow there are no downsides to doing this,
and it makes selecting a table much easier and less likely to fail due
to accidental dragging.

Calling preventDefault on the touchend event is another option but did
not work on Android running Firefox 43.

[1] http://ariatemplates.com/blog/2014/05/ghost-clicks-in-mobile-browsers/
2016-01-15 13:23:50 +01:00
Aaron Bohy e5e31a0519 [FIX] mail: heart emoji not correctly replaced
Fixes #10445
2016-01-15 13:18:13 +01:00
Aaron Bohy 7e3c6bd366 [FIX] mail: composer: emojis not displayed in basic composer
Two composers are appended to the client action: a basic composer and an
extended one used in mass mailing channels. Emojis are rendered in a container,
and when the user clicks on the emojis button, this container is shown.

The problem came from the fact that this container has the same classname in
both composers, so for both composers, the emojis were rendered in the same
container, producing an empty container for one of the two composers
(in this case, the basic one).
2016-01-15 13:18:13 +01:00
Aaron Bohy 617968c61b [FIX] mail: don't mark as unread messages we wrote
in the client action (bold channel name in the sidebar)
in chat windows (number of unread messages written in header)
2016-01-15 13:18:13 +01:00
Nicolas Lempereur 759f98e6ce [FIX] board: don't add default filter on dashboards
When displaying a dashboard, if a custom default filter was set on a
view it would be concatenated to a given dashboard filter.

Since it is never wanted and dashboard are embodied by fixed saved
filters, thus not needing custom filter, this fix simply disable them
when viewing the dashboards.

closes #10477

opw-660140
2016-01-15 12:43:25 +01:00
Martin Trigaux 4dd7187a7a [FIX] mail: translated mailing_model
_mail_mass_mailing attribute is evaluated at server launch (with no context) so
the attribute is never translated.
Create a new method in mail_thread to translate again the term at evaluation but
with a correct context.
Thanks to the _(...) in the attribute definition, the proper term is exported
and present in .pot file.
2016-01-15 12:00:42 +01:00
Martin Trigaux e610971ed3 [I18N] account_assets,hr: missing terms 2016-01-15 12:00:42 +01:00
Goffin Simon 754d3b608d [FIX] product: volume field in product.template.common.form
The 'volume' field was deleted from product.template.common.form with
this commit af9d21b

opw:666663
2016-01-15 09:54:40 +01:00
Alexandre Fayolle 67ab5b776c [FIX] all: Lucica -> Lucida
Has been changed at d8e5cdec in the source but wasn't in the translations.
Replace also is .po files combined with a tx push to be able to add the new one.

Closes #10461
2016-01-15 09:06:34 +01:00
Odoo Translation Bot c7b01fea24 [I18N] Update translation terms from Transifex 2016-01-15 08:54:52 +01:00
Denis Ledoux 698c0c557d [FIX] website_sale: default pricelist
The default pricelist set for visitors
in the ecommerce must be part of the available
pricelists (available according to the country)

The pricelist of the public user may
not amongs the available pricelists.

opw-665536
2016-01-14 16:20:32 +01:00