Commit Graph
103218 Commits
Author SHA1 Message Date
Christophe Matthieu 33baebd139 [FIX] website_sale: can display video and iframe in website description
Sanitize remove the iframe generate to add a youtube video for html field like product description on website.
2015-10-14 16:25:56 +02:00
Arthur Maniet 8283e5f640 [FIX] stock: locations barcodes report CSS
Adapt style injection to changes from 2fa34fcfef
2015-10-14 15:45:29 +02:00
qdp-odoo ab26b7cec2 [FIX] account: no gap in invoice numbering when doing 'cancel-reset to draft-revalidation' use case. Fixes #9003 2015-10-14 13:36:15 +02:00
qdp-odoo 64a6a84073 [FIX] purchase: stock valuation with taxes has to use the quantity 1 for computation of unit price 2015-10-14 13:36:15 +02:00
Denis Ledoux 101bb927a0 [FIX] payment: fees computation depending on country
The computed fees can depend on the country.
There was a typo about it:
there is no `country_id` field on the `payment.transaction` model,
it's `partner_country_id`.

Therefore, the computed fees according to the country
were not always correctly computed.

e.g. for Paypal, where the domestic fees
are lower than the international fees, it always
computed the fees as international.

opw-651778
2015-10-14 13:29:36 +02:00
Denis Ledoux a0c64bebe6 [MERGE] forward port of branch 8.0 up to 8209368 2015-10-14 12:28:22 +02:00
David Monjoie fa48e6f485 [IMP] website_sale: sale_get_order avoid useless sql request
Avoid an sql request when sale_order_id is None.
Improvement of 6b6d7310c0.
Closes PR #8974.
2015-10-14 11:59:54 +02:00
Nicolas Martinelli d1e6ba6d9e [FIX] web_editor: forcedReload of the page
On Firefox, the website page is not completely reloaded after saving or
cancelling. Because of this behavior, the Edit button is kept disabled,
forcing the user to completely refresh the page in order to activate the
Edit button.
2015-10-14 11:24:11 +02:00
Mohammed Barsi 600bfbdc43 [CLA] Signed CLA for Mohammed Barsi (barsi) 2015-10-14 11:03:14 +02:00
Aaron Bohy 7730a8deae [FIX] calendar: reminder notifications: event's handlers
By extending the Notification widget to create the CalendarNotification one,
we override the events key of Notification defining the handler when clicking
on the close cross. So when clicking on the cross, it doesn't close the
notification, and it even toggle the app switcher since the preventDefault
isn't performed.

Note that this should be directly handled by the webclient itself, and its
mechanism of extending widgets. This should be done in current master.
2015-10-14 10:49:17 +02:00
Géry Debongnie 1a4b24586d [FIX] mail: disable message_last_post to prevent race conditions
The message_last_post mechanism was introduced to have a trigger for
automated actions, but for some reason we do not use it.  Moreover, it
interacts badly with the bus.

Because of the message_last_post update, concurrent transactions can
fail and be rollbacked.  This is an issue because the bus commit the
transaction after writing the messages.  This means that some messages
can be duplicated, and the more users are chatting, the more frequent
this will happen.

Since we don't use this field, it could be removed from the models, but
we are in a stable release, so we need to keep it for now.
2015-10-14 09:17:04 +02:00
Nicolas Martinelli 7661a7402b [FIX] web_editor: trigger mouseup at start
When we initialize the web editor, the font size in the toolbar is
initialized to NaN.

What is done:
- Initialize the Summernote editor in initialize_content
- Render the content of the node in render_value
- Append the node to the DOM

Since the Summernote editor is initialized in initialize_content, the
node is still hidden. Since the node is hidden, Summernote won't be able
to determine the style info of the text (see method fromNode from
Style.js). Indeed, when jQueryCss is called, $node.is(':hidden') is true
which will lead to styleInfo['font-size'] = NaN.

To avoid patching Summernote, we take advantage of an existing trigger
which reloads the button content upon mouseup. This is also safer than
initializing Summernote after appending the node to the DOM.

opw-652041
2015-10-13 17:58:33 +02:00
Denis Ledoux 8209368b02 [FIX] web: current transaction is aborted
This reverts commit bd9cbdfc41.

The above revision solved the SQL constraints not being
translated when raised. They were not translated because
the context, containing the lang, was not located as expected
in the `kwargs` dict.

While it solved this issue, it had as side-effect to raise
`current transaction is aborted,
commands ignored until end of transaction block` errors more
often when using the web client.

This can be explained by the double check, when the first
check raised this error
- which can happen, e.g. when the cursor is closed,
there is a retry mechanism in such cases -
and by the fact the transaction was not rollbacked.

This issue could have been solved as well by rollbacking
the transaction, but it is regarded as not-so-clean.

Therefore, to solve this issue, while still having
the SQL constraints translated, we apply the
second patch proposed in bd9cbdfc41
commit message, which is not-so-clean as well, but
which is a proper solution.

opw-651393
2015-10-13 17:12:34 +02:00
Martin Geubelle b240d0000b [FIX] account: incorrect sentence
* Revenue recognition is not in account_asset anymore but in another module
* Will be fixed in master, creating en_US translation for stable
2015-10-13 16:41:30 +02:00
Nicolas Lempereur a14f89c866 [FIX] website_mail,mass_mailing: better support for outlook
This fix is about several issue of office oulook:

- a fixed table width must be in pixel, using 100% of parent div width
  doesn't work,

- a background-color on a div is not used, the background color should
  be on the table inside this div using the attribute "bgcolor",

- the only way to center a table is to have a `<center>` tag arround it,
  or have an element arround it with "text-align: center",

- having a background image doesn't seem to be possible.

The two first are straightforward, but for the third:

- in non-outlook: all the snippet are centered (since they all have
  "margin: auto" which is valid outside outlook),
- in outlook: only a small part of the snippet with text-align:center
  or `<center>` arround them are centered.

To escape a bigger code change, this commit unify the outlook
behaviour by having all of the snippet left aligned in outlook (they are
still middle centered in other application).

For the background image, we need a fallback bgcolor and thus we need to
have the background on the table element. There was also an issue
between relative and absolute url for gmail.

closes #9019
opw-650217
2015-10-13 16:11:18 +02:00
Raphael Collet ac98af1e9f [IMP] models: recompute fields following a topological order on their dependencies
The goal is to avoid recomputing field several times.  Consider, for instance,
two fields F and G, such that G depends on F.  Suppose that G is recomputed
before F.  Saving G to database proceeds well, but when F is saved to database,
G is invalidated and marked for recomputation.  Field G is possibly recomputed
twice on some records.

Avoid this situation by chosing a field such that none of its dependencies must
be recomputed; use a topological sort based on field dependencies for that
purpose.  In the example above, G will never be recomputed before F.
2015-10-13 14:49:57 +02:00
Aaron Bohy e82deb5ae1 [FIX] web: action_manager: restore internal state on rejected action
When an error occured while executing an action (e.g. access rights), the
action manager's state was inconsistent as inner_action, inner_widget and
action_stack were all updated before trying to execute the action. Then, if the
user tried to open another action, the screen was split into two because the
reference of the previous action was lost, and thus it couldn't be detached.

We now restore inner_action, inner_widget and action_stack to their previous
state in the case of a rejected deferred.

A better fix would be to update all three variables once the deferred is
resolved, but it would require a refactoring of the way the action manager
and the view manager communicate to perform the do_push_state and to compute
the breadcrumbs. Indeed, those operations directly rely on the internal state
of the action manager, and they are performed before the callbacks in
push_state are called. Such a refactoring should probably not be done in
stable.

Partly fixes #8886.
2015-10-13 11:26:22 +02:00
Aaron Bohy 1cf83427da [FIX] web: view_manager: correctly return rejected deferred
The problem was that the action manager wasn't notified at all when something
went wrong with the view manager as the deferred returned by appendTo was in
that case never resolved nor rejected.
2015-10-13 11:26:22 +02:00
Raf Ven 38c9deeab4 [FIX] sale: Wrong filter definition
'state', 'in', ('draft') is an invalid definition, ('draft') is not a tuple
should have been ('draft',)

Replacing by simpler 'state', '=', 'draft'

Fixes #8115
Closes #9016
2015-10-13 10:47:48 +02:00
Nicolas Lempereur 906c1e52fb [FIX] base: don't add last separator if no add attribute
When using "remove" in a xml inheritance without "add" attribute, the
separator would be erronously appended at the end of the modified
attribute value.

e.g: we have "a,b" from which we remove "c", the end result would be
"a,b," which is an invalid jQuery selector.

This commit change this so empty tokens are not added to the attribute.
2015-10-13 10:25:58 +02:00
Nicolas Martinelli db68f9c4be [FIX] mail, project: define search method for message_is_follower
In order to be able to search on a non-stored computed field, a search
method must be defined.

This also reverts commit fd38fc0a02.

Fixes #8920
2015-10-13 10:15:21 +02:00
Cedric Snauwaert 1458575c68 [FIX] account: _compute_residual should returns 0 for line that have an account not reconciliable
+ add index on account_partial_reconcile to increase performances
2015-10-13 10:06:22 +02:00
Leonardo Pistone 3349187aab [FIX] stock: propagate owner to backorder moves
When delivering partially a picking in which the moves
had an owner (`restrict_partner_id`) set,
the owner were not kept in the backorder moves.

Closes #4693
2015-10-12 17:47:29 +02:00
Simon Lejeune afd187d3b1 [FIX] packaging: windows: bundle xlrd
xlrd allows to import xls files and is an optional dependency. Bundle
it in the exe release for convenience.
2015-10-12 17:33:38 +02:00
Raphael Collet e410d7d7e7 [FIX] orm: always save boolean function fields, even when they are false
Fixes #4292: searching for records when a related boolean field is `False`
always returns nothing.
2015-10-12 17:26:40 +02:00
Raphael Collet 15127d3390 [IMP] models: enlarge value of PREFETCH_MAX to match the one used in cursors
This improves the performance of prefetching fields for large recordsets.
2015-10-12 17:23:41 +02:00
Antoine Huvelle 19668013ad [FIX] stock_landed_cost: domain on expense account
In the landed cost types form view
(landed costs types being nothing else than `product.product`),
we force users to choose an account of type `other`,
in order to prevent them from entering wrong data,
other types of accounts,
or receive an error message when setting a view account type.

This domain is actually the domain already applied in the
regular `product.template` and `product.product` form
view, thanks to `account.product_template_form_view`

Closes #4719
2015-10-12 17:15:28 +02:00
Christophe Matthieu 2f842d1703 [FIX] web: assertion error when save after speed multi delete in one2many
To reproduce use a form view with a one2many editable list and create a lot of lines. Then click a few times quickly on the delete.
If the user click at least two times on delete of a same record, the dataset add the id in "to_delete" the virtual id because "to_create" doesn't contains the virtual id of the record deleted previously.

E.g.: create a "Customer Payments" and select a "Customer" and "Payment Method" who generate a lot of "Credits" lines.
2015-10-12 17:15:28 +02:00
Martin Trigaux b21d96ec2d [FIX] hr: incorrect sentense
Incomplete senstense "improving applications, such as the"
Will be fixed in master, creating en_US translation for stable
2015-10-12 16:43:31 +02:00
Raphael Collet 8ea17a8cc9 [FIX] orm: always save boolean function fields, even when they are false
Fixes #4292: searching for records when a related boolean field is `False`
always returns nothing.
2015-10-12 16:38:17 +02:00
Martin Trigaux 3fd6ac9385 [FIX] web: export terms of community
not enterprise + community

Fix typo in description string (was already done in enterprise)
2015-10-12 16:38:15 +02:00
Commandant Custo 1881a13699 [FIX] sale: report: find sales of subcategories
When searching for sales of a specific category,
display the products of the whole category subtree.
Consistent with:
* https://github.com/odoo/odoo/commit/633df8dc920028a1f8177fb99ef85e70c46da52c
* https://github.com/odoo/odoo/blob/8.0/addons/account/report/account_invoice_report_view.xml#L72

Closes #4631
2015-10-12 15:43:36 +02:00
Alexis de Lattre bc3666aed5 [FIX] point_of_sale: redundance in report.pos.order search view
Avoid double entry in search filters of POS reporting.
Replace by 2 other usefull filters.

Closes #4600
2015-10-12 15:38:28 +02:00
Goffin Simon 31cb27154a [FIX] board: creating a dashboard
Introduced by 72e94beeb5

opw:651811
2015-10-12 15:27:23 +02:00
Damien Bouvy 156b33c89a [IMP] website_quote: prevent double clicking on the confirm button
Double clicking on the confirm button was actually possible and could confirm the orders multiple times (which could be problematic if some action are linked to the so confirmation)
2015-10-12 14:39:41 +02:00
Christophe Matthieu 8e245904f5 [FIX] web: many2many_tags: blacklist selected ids in the dropdown
Issue: already selected ids are not filtered in the many2one and appear in the dropdown (but can't be select because the item are already selected)
2015-10-12 12:21:22 +02:00
Fabien Pinckaers 77e18a4800 [FIX] typo 2015-10-12 11:36:42 +02:00
Nicolas Martinelli fd38fc0a02 [FIX] project: filter "Followed by Me"
The filter "Followed by Me" depends on a calculated field is not stored.
Therefore, we need to redefine the search method.

Fixes #8920
2015-10-12 10:53:38 +02:00
Odoo Translation Bot a6999391d3 [I18N] Update translation terms from Transifex 2015-10-12 10:51:48 +02:00
Damien Bouvy 486cd33091 [FIX] website_quote: prevent modifying the quote state if it's already been processed
Before this fix, it was possible to validate then cancel a quote (or the other way around) simply by using two tabs in your browser. From now on, we only validate/cancel a quote if it's the 'sent' state and advise the customer of the situation if he tries to abuse the process.
2015-10-12 10:43:46 +02:00
Humberto Arocha 81418ec14e [FIX] stock_landed_costs: avoid useless multiple writes
Initialise quant_dict inside for loop as doing outside loops
renders to be a quadratic write of quant object due to the fact that
previous quants are kept each time a new valuation line is read.
In case of posting a Landed Cost record with a huge amount of cost_lines
and huge amount of stock_move having several quants would result in a
extra overhead.

Closes #9005
2015-10-12 10:40:26 +02:00
eLBati c862b2f37a [FIX] doc: web howto 2015-10-12 10:24:21 +02:00
Joren Van Onder 50c8b3d4ef [FIX] point_of_sale: set CSRF token
The introduction of the CSRF tokens in
8932c52e67 broke invoicing from the Point
of Sale. chrome.do_action('point_of_sale.pos_invoice_report') would
fail because no CSRF token is set in the POS. This fixes it using a
similar approach as in the website module.
2015-10-12 10:19:18 +02:00
Damien Bouvy 38db647534 Revert "[FIX] sale: when creating a refun from an invoice, the invoice lines must be linked to the original so lines to compute the invoiced quantity correctly"
This reverts commit a315487cea. Apparently it was 💩.
2015-10-12 09:55:18 +02:00
eLBati c9d5117a2d [FIX] l10n_it: account types.
Without this, balance sheet and profit & loss do not display parent accounts

Closes #8925
2015-10-12 09:53:01 +02:00
Nicolas Martinelli 2eade50d8e [FIX] purchase: missing depends
In case the product is a service, no move_ids are linked to it, and
the quantity delivered is never calculated.
2015-10-12 08:36:19 +02:00
Odoo Translation Bot 5dd33e8ca6 [I18N] Update translation terms from Transifex 2015-10-11 03:04:31 +02:00
Odoo Translation Bot ff9b997736 [I18N] Update translation terms from Transifex 2015-10-11 01:33:54 +02:00
Christophe Simonis 20dba161d0 [MERGE] forward port of branch 8.0 up to c484467 2015-10-10 14:46:23 +02:00
Christophe Simonis c4844675b8 [MERGE] forward port of branch saas-3 up to a6b11a1 2015-10-10 14:35:44 +02:00