Commit Graph
100253 Commits
Author SHA1 Message Date
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
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
Denis Ledoux 7473f4a3c7 [FIX] payment_buckaroo: return url, payment validation
This revision is related to 6efc371291

The return URL parameter key has changed: The capital letters
are not the same than before.

Besides, send a dict in the `ADD_RETURNDATA` doesn't seem
to be supported by Buckaroo. We therefore no
longer uses a dict but a string to avoid problems.

opw-665697
2016-01-07 13:20:13 +01:00
Stephen Medina 8e1057316f [ADD] doc: mention how to include static files
Does not explicitly mention how static files are loaded. This will
confuse anyone who is using the documentation as a guide and not going
through the pet store example code. Feel free to edit however, as long
as it is mentioned somewhere.

fixes #9170
2016-01-07 12:29:25 +01:00
Jairo Llopis 7f230a540e Remove the right backdrop.
If anybody adds a new modal in the `then()` part of the promise, without
this code, all `.modal-backdrop` elements will be deleted, and further
dialogs will not be modal; with this, only the current modal's backdrop
will be deleted.
2016-01-07 11:40:39 +01:00
Denis Ledoux 0b9fbc67bb [FIX] purchase: prevent write on the related stock.location
`default_location_dest_id_usage` on `purchase.order` is
used only for an attrs domain on the field
`dest_address_id` in the purchase order form.

There is therefore no worries to set it as readonly,
it won't break the feature he has been added for.

Besides, this will prevent the useless write of the
same field value on the related `stock.location`
when saving the purchase order.

This is important to prevent the useless write
on `stock.location`, as users might have the rights
to create/edit purchase orders without having
the write access to the stock locations.

opw-660736
2016-01-07 10:29:49 +01:00
Christophe Matthieu 7fcce928f3 [FIX] web_editor: allow custom template for html_frame field 2016-01-07 09:52:56 +01:00
Goffin Simon da03d97003 [IMP] account: test_product_id_change
Forward port of c4fb2c2 in new api
2016-01-06 23:18:54 +01:00
Joren Van Onder 17bb5fd374 [FIX] point_of_sale: fix forward port related issues
Fix 697739d, 682e660, da9275a and 697739d which where forward-ported in
8b4f052a38.
2016-01-06 16:55:59 +01:00
Joren Van Onder 70e43b18e0 [FIX] point_of_sale: use tax_ids on the pos orderline, not the product
We have taxes on pos.order.line and we have taxes on the product of the
`pos.order.line`. There was no real consensus in the POS about which
taxes to use. As long as they're the same it doesn't cause issues, but
if someone where to change the taxes on a product which is used in an
open `pos.session` things will start going wrong.

When closing the pos.session amount_total of the `pos.order` in question
will not equal tax `account.move.lines` + product
`account.move.lines`. The reason for it is that we use the taxes on the
`pos.order.line` for the tax account.move.lines, whereas amount_total
used the taxes on product.

This fixes the problem by always using the tax set on
`pos.order.line`. This tax should be set only once through
`_order_line_fields` during orderline creation. After that it shouldn't
change. Therefore `pos.sessions` won't be affected by changes to taxes
of products anymore.

opw-660765
2016-01-06 16:45:28 +01:00
Jeremy Kersten e9fc7353d2 [FIX] website_hr_recruitment: recruitment form customization
This commit is related to the PR #9515 and the continuation of 67b1be7f57
2016-01-06 15:43:26 +01:00
Cedric Snauwaert 833fe492d1 [FIX] account: add buttons on journal entries and journal item to see reconciled entries 2016-01-06 14:46:19 +01:00
Martin Trigaux bf6b106044 [FIX] doc: remove reference to website_less
No more module website_less needed to create a theme
Fixes #8182
2016-01-06 14:29:38 +01:00
Goffin Simon b935289acc [FIX] sale_analytic, sale_timesheet: _compute_analytic
The default domain set in _compute_analytic didn't allow to recompute
SO lines linked to several analytic lines because unit_amount is always
greater or equal to zero. The idea is to recompute the quantity delivred
on SO line linked to analytic lines with amount<=0 (which means that this
is a cost for the company, an expense or a refund).

opw:660812
2016-01-06 12:41:04 +01:00
Goffin Simon 3756969517 [FIX] account: total_invoiced in res.partner
"total_invoiced" must only take customer invoices into account because
when you click on the button "invoiced" in the partner view form
you just see the customer invoices.

opw:665574
2016-01-06 11:46:31 +01:00
qsm-odoo 49b938a0f1 [FIX] web_kanban: useless breaking-layout o_kanban_mobile
Remove fixed width for kanban records in .o_kanban_mobile (in grouped
view the records overflowed their columns).

Note: this class seems useless and wrongly used by templates. This
should be removed in master (remove the class from templates and
include its less rules in all kanban records for specific classes).
2016-01-06 11:03:55 +01:00
Cedric Snauwaert a81d6121aa [IMP] hr_expense: improve expense report by grouping by employee-state-currency 2016-01-06 10:08:11 +01:00