Commit Graph
103218 Commits
Author SHA1 Message Date
Jeremy Kersten 33e84a6622 [FIX] website: fix sitemap to avoid to get post route inside
Route with method="['POST']" should not appear in sitemap

This code had never works.

rule.method is not the list of methods declared on the endpoint but "the HTTP
method for the rule if there are different URLs for different methods on
the same endpoint" (src http://werkzeug.pocoo.org/docs/0.11/routing/)

The new code uses the method declared on endpoint and so will avoid to add
endpoint with method declared and wich doesn't support GET.
2016-01-11 12:49:34 +01:00
Thibault Delavallée 148c1ed51c [FIX] mail: html issue in invite email
Thanks Vitor Fernandes <vmlf01@gmail.com> for pointing it out.
2016-01-11 12:48:09 +01:00
Thibault Delavallée a35d2d5548 [FIX] mail: context propagation
Thanks michaelhwalther <michaelhwalther@gmail.com> for pointing it out.
2016-01-11 12:48:09 +01:00
Goffin Simon bb2549f531 [FIX] stock: location_id and location_dest_id
In "stock.move" model the fields location_id and location_dest_id
are required. But when disabling "Manage Multiple Locations and Warehouses"
in Technical Settings, these fields became hidden in stock.move.form and
then it was impossible to add an new product to consume in mrp.production.form.

In 8.0, to be in group_stock_user implies to be in stock.group_locations.

Introduced by e58b16a

opw:660032
2016-01-11 12:19:23 +01:00
Ludovic LAFFINEUR 5ce0cf7e96 Merge pull request #10395 from odoo-dev/saas-6-scheduler-performance-lla
[FIX] Improve performance of the scheduler.
2016-01-11 11:43:13 +01:00
Géry Debongnie cf294f723f [FIX] mail: prevent double scrollbar with notification bar
when the bar asking for notification permission appears, it can cause
two scrollbars to appear in the client action.  This commit moves the
notification bar inside the chat content, which solves the issue.
2016-01-11 11:00:18 +01:00
Sathors 903cde0522 [IMP] doc: dotted names not supported in @constrains
or in @onchange for that matter. They should already generate a warning,
but only the first time they're used.

This is done lazily because it introspects the instance/class which can
be costly when performed during the repeated setup of registry setup.

closes #5595
2016-01-11 10:59:56 +01:00
Ludovic Laffineur lla f975cefcb8 [FIX] Improve performance of the scheduler.
This commit improves performances of the scheduler when the database
is big (lots of products with lots of fields). This avoids prefetching
all the fields for every 1000 products while we only use 2 of them.
2016-01-11 10:49:45 +01:00
Thibault Delavallée b38cd437e4 [FIX] hr_holidays: year filter
This filter shows the leaves of the current year and allocation linked to
active types. However this does not make sense anytime you have allocation
overlapping a year.

It now shows leaves and allocations linked to active types. It is easier
and more consistent.
2016-01-11 10:29:46 +01:00
Christophe Matthieu 12f97e5242 [FIX] base: add mimetype for url attachment 2016-01-11 10:17:19 +01:00
Christophe Matthieu fa1e30394e [FIX] base: remove unnecessary code (td.oe-actions does not exist) 2016-01-11 10:12:05 +01:00
Jared Kipe 20a8c210fd [FIX] sale: A new 'task' line should not generate (and overwrite) the sales order analytic account
(A or B and not C) => (A or (B and not C)) which means that
A will always cause the creation of a new analytic account
regardless of C (which is checking if the sales order already
has a 'project_id').

The 'poject_id' check should always prevent the call
to `_create_analytic_account()`.
2016-01-11 09:49:29 +01:00
Odoo Translation Bot 1c33197828 [I18N] Update translation terms from Transifex 2016-01-10 03:04:15 +01:00
Odoo Translation Bot 9c911d0364 [I18N] Update translation terms from Transifex 2016-01-10 01:28:32 +01:00
Jeremy Kersten 91aa450533 [FIX] website_slide: add domain on controller pdf_content for SEO
Add domain on route to avoid sitemap to index this route if
nothing to display.

Return empty data if route called for a slide without datas.
2016-01-08 23:55:44 +01:00
Jeremy Kersten ce3f797068 [FIX] website_event: avoid traceback when page doesn't exists
The controller /event/<event_id>/page/<page> raise exception if page is not existing.

Allow to pass the template reference when user are creating a new page.
Without it, it is impossible for the end user to create a website_event page without
change manually the xml id because the xml id is based on the module from the template.

This fix is retro compatible, because from_template will be ignored until next update
of website. And during update from website, website_event will be updated because it's a
dependance and so the default_page template created.
2016-01-08 23:19:29 +01:00
Jeremy Kersten 2afadfe444 [FIX] website_sale: force to get a pricelist to avoid traceback
If a user or a bot arrive on /checkout, /cart or other routes which
call sale_get_order without browse other ecommerce page.
None pricelist was selected by default

Avoid crash when standard workflow of ecommerce is not followed.
2016-01-08 19:18:34 +01:00
Jeremy Kersten e2925909b2 [FIX] website_forum: escape search by tag, quote char to search, don't create empty tag, only display alphanum first char in pager of tags, ... 2016-01-08 19:14:31 +01:00
Jeremy Kersten 774879a69c [ADD] tools: add escape_psql function
By default, Odoo support _ and % in domain to search like in pgsql.
But if you want to search something starting by _ or containing %
the developper need to escape these character.
2016-01-08 19:14:31 +01:00
Jeremy Kersten aabe0cb8fe [FIX] website_forum: be sure to have a tag name before to substract the first letter
If a tag with an empty name was existing in database, the controller /forum/forum_id/tag
return a server 500 because tag.name[0] from an empty string raise a traceback.
2016-01-08 19:14:31 +01:00
Christophe Simonis 499c2b8da5 [MERGE] forward port of branch saas-6 up to 580389a 2016-01-08 18:26:59 +01:00
Denis Ledoux 11c312182f [FIX] google_calendar: sync when chenging the recurrency only
When changing anything regarding the recurrence,
e.g. the number of repetitions, the weekdays, ...
the event require an update by Google side

As the `rrule` is a computed field, we need to mark
the event as needing an update by Google side as soon
as one of the fields on which depend the `rrule` field
is updated.

opw-659963
2016-01-08 18:13:11 +01:00
Christophe Simonis 580389add8 [MERGE] forward port of branch 8.0 up to 7041b25 2016-01-08 17:05:38 +01:00
Christophe Simonis 7041b2589a [MERGE] forward port of branch 7.0 up to 152d9de 2016-01-08 17:01:53 +01:00
Cedric Snauwaert 4bb147b0f5 [FIX] account: in dashboard split menu invoices&refund in two distinct menu 2016-01-08 17:01:01 +01:00
Raphael Collet 152d9de6cf [FIX] fields: in many2many fields, command 5 removes accessible records only 2016-01-08 16:56:02 +01:00
Raphael Collet ece592dbf7 [FIX] fields: in many2many fields, avoid inserting duplicate entries in table 2016-01-08 16:55:43 +01:00
Raphael Collet 22d125fe96 [FIX] fields: in many2many fields, command 5 removes accessible records only 2016-01-08 16:53:18 +01:00
Raphael Collet 51e66711a9 [FIX] fields: in many2many fields, avoid inserting duplicate entries in table 2016-01-08 16:53:18 +01:00
Denis Ledoux d6b9c21c16 [FIX] crm: lost filters
From f255aa7,
the lost semantic is `probability = 0, active = False`

The existing filters "Lost" in the leads/opp search views
have not been updated with this change of semantic.

opw-666186
2016-01-08 16:49:46 +01:00
Thibault Delavallée a69c2bab0a [FIX] mail, mail_channel: recipients of channels
Mailing lists (mail.channel) should not send specific notification emails.
Indeed there can be a lot of recipients and customizing each email can
take time to compute. This leads to posting a message on a mail.channel
being very slow.

It is now possible for a model to customize the notification email
recipients computation. The first use is to ensure that mail.channel
encodes recipients using email_to instead of recipients_ids. This way
less processing is performed on notification emails.

This is a manual cherry-pick of commit d4a1eb4435
that was not forard ported. Mail has indeed evolved since 8.0 and its
forward port was not an easy task.

This commit also includes the fix of mail.channel recipients. All are now
considered as equal and receive a simple notification email. No distinction
is done between partners and users. The notification emails for channels
should be as simple as possible.
2016-01-08 16:40:40 +01:00
Géry Debongnie 0336f109f1 [FIX] web_planner: hidden by default
The web planner should be hidden by default.  Now, it is displayed,
then hidden in js after a while (but it can be seen by the user), then
displayed again if necessary
2016-01-08 15:57:21 +01:00
Simon Lejeune 9a8153ee55 [FIX] web_planner: show the planner when the state is 0% 2016-01-08 15:50:55 +01:00
Géry Debongnie 739301be09 [FIX] mail: add link to urls clientside, not serverside
the server should avoid as much as possible modifying emails.  Adding
links is a presentation concern, so this commit moves this logic client
side.
2016-01-08 15:02:22 +01:00
Aaron Bohy dfdd38e3b2 [FIX] mail: Discuss: don't suggest to join private channels
Problem was that administrators have access to every channels, even private
channels they are not registered to, because when trying to join an existing
channel, the autocomplete proposed every channels accessible for the user, but
didn't filter private ones.

This rev. makes sure to only suggest non-private channels.

Also prevent '|' domain injection to disable filters (odoo/odoo@44e65e72d3)
by using expression.py to build domain.
2016-01-08 14:32:51 +01:00
Aaron Bohy 0fbc128033 [FIX] mail: followers: subtypes: correctly notify channels
Except for messages, activities on a document like internal notes posted
trigger notifications to partners and channels following the corresponding
activity's subtype.

Rev. 69ed801 rightly re-introduces a filter on followers to prevent notifying
more partners than necessary. Unfortunately, this filter doesn't take into
account channels, which are thus automatically removed from followers to
notify, whatever the subtypes they follow, e.g. internal notes on a document
don't appear in channels following the 'Note' subtype of this document.

This commit makes sure that channels always pass through that filter, but warns
users that public channels should probably not following internal subtypes.

Also makes the edit subtypes dialog html valid (li's must be inside, e.g., ul).
2016-01-08 14:32:51 +01:00
Raphael Collet 40be041ae7 [ADD] test_access_rights: add test writing on many2many field with access rules 2016-01-08 11:58:34 +01:00
Christophe Simonis 329c6e7763 [FIX] mail: check if browser support Notification API before verifying permission 2016-01-08 11:48:34 +01:00
Nicolas Martinelli 98e5673c90 [FIX] product: sort pricelist items by sequence
The pricelist items should be sorted by sequence.

opw-660745
2016-01-08 10:44:52 +01:00
Martin Trigaux 44e65e72d3 [FIX] mail: ignore abritrary argument domain for searching channel
We should not trust arbitrary arguments from public method to compose a domain
as it is possible to inject '|' to disable filters and be able to search any
channel (mitigated by access rules).
Create a private method and use a wrapper that ignores the domain.
2016-01-08 10:07:38 +01:00
Nicolas Martinelli ef6116bfb5 [FIX] account: exchange difference date and amount
The use case is the following: the currency of a customer invoice (e.g.
EUR) is different from the currency of the company (e.g. USD). An
invoice is created in EUR, and a payment is done in EUR on the
receivable account which is in EUR.

Between the invoice date (e.g. 2015-01-01) and the payment date (e.g.
2015-02-01), the rate has changed. The reconciliation between the
invoice and the payment is done afterwards, for example 2015-03-01.

When the write-off related to the exchange difference is created:
- the date should be the max date between payment and invoice if the
  corresponding fiscal year is not closed (otherwise, today's date).
- the amount currency on the receivable/payable account should be zero,
  since the amount currency on the foreign exchange account is zero.

opw-659289
2016-01-08 08:11:24 +01:00
Nicolas Martinelli 54be29f0bc [FIX] product_visible_discount: fix price with tax included
_fix_tax_included_price should take new_list_price as parameter.
Moreover, this should be done in both onchange methods.
2016-01-08 08:06:15 +01:00
Christophe Simonis 100d604cb0 [FIX] im_livechat: correct loader js code 2016-01-07 18:16:20 +01:00
Christophe Matthieu 231e026936 [FIX] product: write active value on all product variants from product template
Issue: When writing active on many products, only change the active value for the last product variants
2016-01-07 17:12:07 +01:00
Goffin Simon 61cf01b7a8 [FIX] mail: mailing domain not set properly
When selecting contacts from Contacts list views and clicking on
action window "Partner Mass Mailing", the 'active_domain' must be
filled in the wizard with the selecting contacts. In this way,
the right mailing_domain will be set when creating the related
mail.mass_mailing record (in addons/mass_mailing/wizard/mail_compose_message.py
in function get_mail_values).

opw:659383
2016-01-07 16:58:52 +01:00
Julien Laloux 96352ae515 [Fix] Remove an unwanted ">" sign in the print 2016-01-07 16:11:18 +01:00
Jeremy Kersten 9e6528f77d [FIX] email_template: allow to format date in the right language
Format_tz allow to format a date, but if the format was '%B', it was always January regardless lang in context
Now, it possible to use babel, to get the date in the customer language.

So:
    format_tz(object.date_order, format='short', context={'use_babel':1, 'lang': 'fr_BE'})
        will return '5/01/16 22:20'

    format_tz(object.date_order, format='short', context={'use_babel':1, 'lang': 'en_US'})
        will return '1/5/16, 10:20 PM'

    format_tz(object.date_order, context={'use_babel':1, 'lang': 'en_US})
        will return 'Jan 5, 2016, 10:20:31 PM'

    format_tz(object.date_order, context={'use_babel':1, 'lang': 'fr_BE'})
        will return '5 janv. 2016 22:20:31'
2016-01-07 14:42:57 +01:00
Christophe Simonis c9401d70f8 [FIX] point_of_sale: remove leftover print statement 2016-01-07 14:02:53 +01:00
Denis Ledoux ff72139aff [FIX] website_sale, website_quote: pay now confirmation email
When configuring the payment acquirer with the confirmation
`at_pay_now`, meaning the sale order has to be
confirmed when clicking on the "Pay now" button, instead
of waiting for the payment confirmation,
the confirmation email wasn't not sent.

opw-665697
2016-01-07 13:52:07 +01:00
Denis Ledoux 2afa1942ca [MERGE] forward port of branch 8.0 up to 7473f4a 2016-01-07 13:40:01 +01:00