Commit Graph
100721 Commits
Author SHA1 Message Date
Jeremy Kersten e45edc1912 [FIX] website_mail_channel: Impossible to subscribe to forum_post
Missing from previous commit 503824184c
2016-02-14 16:12:30 +01:00
Odoo Translation Bot ee42be5921 [I18N] Update translation terms from Transifex 2016-02-14 00:34:15 +01:00
Goffin Simon 1f081bed9f [FIX] sale: Ordered Qty=0 in a SO line
A SO line with an ordered qty less or equal to the sum of all the quantity
linked to its procurement must be ignored. In this way, when a SO line has
an Ordered Qty equal to 0 in a SO, all the other lines can be processed like
in 8.0

opw:669200
2016-02-12 15:06:51 +01:00
Denis Ledoux 26d6e83881 [FIX] mail: specific message subscribe
`write` expects a `dict` for the `values` argument,
`part[record.id]` is a list of commands to add new
followers.

See the returned variable `specific` of the method
`_add_follower_command` in `mail_followers.py`.

Surrounding `part[record.id]` with a `dict` with
`message_follower_ids` has probably been
forgotten by oversight.

`gen` and `part[record.id]` have actualy the same
syntax, and the `write` done with these variables
should therefore be called the same way.

opw-669376
2016-02-12 13:54:05 +01:00
Aaron Bohy 26f1d75606 [FIX] mail: followers: can't access res.partner case
When the user can't read the model res.partner, former code tried to determine
whether or not the user was follower of the document. This was wrong for three
reasons.

First, it performed an RPC to get the partner_id of the current user, but this
info is already stored in the session so the RPC was useless.
Second, the partner_id isn't helpful to know if the user is a follower because
everything we have is the follower_ids, which aren't ids of the res_partner
model, but ids of the mail_follower model (compare apples and oranges...).
Third, we anyway didn't use that information at all as the button indicating
whether or not the user is a follower wasn't displayed.

This rev. simply removes that useless RPC and only displays the count of
followers as previously.
2016-02-12 12:10:08 +01:00
Denis Ledoux 24315867bf [FIX] crm: email link in opportunities help message
The email link in the opportunities help message
was built as:
`<a href="mailto:info">odoo.com</a>`
instead of:
`<a href="mailto:info@odoo.com">info@odoo.com</a>`

opw-669361
2016-02-12 11:58:07 +01:00
Nicolas Lempereur c1784a4d28 Revert "[IMP] calendar: enable change recurrence start/stop"
This reverts commit 33755f1882.

note: revert for now since some scenarios were not taken into account,
detached event could have been moved to another day.
2016-02-11 18:43:32 +01:00
Nicolas Lempereur 924c2dee21 [FIX] {web_,}calendar: order contact sidebar
In 22051dc, the sidebar contacts of the calendar were ordered, this does
it in another way to solve several issues when selecting filters.
2016-02-11 16:34:33 +01:00
Nicolas Lempereur fb7bb95a11 [FIX] web_calendar: operator prirority typo from e029724 2016-02-11 16:34:33 +01:00
Nicolas Lempereur 33755f1882 [IMP] calendar: enable change recurrence start/stop
When editing a recurring event clicking `Update only this instance`
allow us to detach this event from the recurring sequence, but without
clicking it there are instances where the event will still be detached
maybe unexpectedly.

Clicking on it will create an event which shadow the recurring one that
being done thanks to:

- recurring_id: the id of the recurring event creating this event
- recurring_id_date: start of the virtual event this new event shadows

Before this commit: when the start or end date of an recurring event is
changed, all modification are not applied on the recurring events but
only the current virtual event occurrence is detached and modified.

After this commit:

- when the end date of a recurring event is modified, it is modified for
  all the instance (not detached) of the recurring event,

- when the start date of a recurring event is modified, it is modified
  all the instance (not detached) of the reccuring event and if:

  * one occurrence of the recurring event is still on a (not-moved)
    detached event of this recurrence, this virtual event will be
    shadowed.

  * a detached event has now no occurrence of the recurring event on its
    day, it will still be left untouched but will now not shadow an
    event anymore.

eg.

we start with recurring event A on 4, 5, 6 => we see [4: A, 5: A, 6: A]

-> detach event on 5 calling it B => we see [4: A, 5: B, 6: C]
-> change start of recurrence to 5 => we see [5:B, 6:A, 7: A]
-> change start of recurrence to 7 => we see [5:B, 7:A, 8: A, 9:A]
-> delete detached event B on 5 => we see [7:A, 8: A, 9:A]
-> change start of recurrence to 3 => we see [3:A, 4: A]

closes #10873
fixes #10278
opw-665700
2016-02-11 15:56:14 +01:00
Géry Debongnie f201cb5b7e [FIX] mail: various ui improvements
- swap reply-to and mark-as-unread buttons in threads
- remove blockquote from stripped html in channel previews
- readd padding to no-content message in threads, also to no match found
  message
- add 1 to chat window z-index to prevent control panel buttons to show
  through it
2016-02-11 15:49:10 +01:00
Christophe Simonis f89eda9eb2 [FIX] base: ir.qweb: save assets attchment with correct references
Force the values of `res_id` and `res_model` when creating assets
attachments. This avoid getting wrong default values from the context.

When using the mail composer with a automatically created report (like
when sending a quotation by email), if the report asset must be saved,
the context used is the one from the mail composer, which contains a
`default_res_id` entry.
2016-02-11 15:29:31 +01:00
Raphael Collet ac9e8c0700 [FIX] ir_translation: use ValidationError in constraint method 2016-02-11 15:21:03 +01:00
Goffin Simon 935e61bab5 [FIX] stock_account: "Set standard price" button
When a product with costing method = standard price and inventory valuation = perpetual (automated),
the button "Set standard price" in General information in  "product.template" is shown if the
product template has only one variant. In the other case, the button is displayed in the variant
view form.

opw:668568
2016-02-11 15:02:41 +01:00
Goffin Simon 6a7482702a [FIX] stock: Customer Address in report delivery slip
The customer address must be the shipping address defined on the SO.
The contact address can be removed from the report because the object
passed to the report is the stock.picking where the partner_id is the
one linked to the shipping contact.

opw:669015
2016-02-11 14:43:46 +01:00
Denis Ledoux 504689e14f [FIX] base_setup: typo, Ressources > Resources
opw-669266
2016-02-11 12:47:24 +01:00
David Monjoie 21a64ad96e [FIX] sale: removed wrong and duplicated sales team groubby
The section_id field has been renamed to team_id in 9.0. Moreover,
the Sales Team group by is already present in the view from which
this one was inheriting, resulting in duplicated group by's.
2016-02-11 11:11:36 +01:00
Goffin Simon 22051dcc1b [FIX] calendar: To avoid duplicate contacts
Before the fix dda8e2211a, the duplicate
records were erased thanks to the index used in the dictionary(id of the partner).
After this fix, to avoid this this problem, the label of each record is used as
key in the dictionary.
2016-02-10 19:53:58 +01:00
Christophe Simonis f7432efb95 [MERGE] forward port of branch saas-6 up to 07d7147 2016-02-10 18:17:21 +01:00
Christophe Simonis 07d7147846 [MERGE] forward port of branch 8.0 up to cdf21eb 2016-02-10 18:03:42 +01:00
xmo-odoo 686b039651 [REM] mistaken file addition 2016-02-10 17:38:37 +01:00
Jeremy Kersten 5d14c2c0ff [FIX] website_forum: don't display user profile link in post when it is private
Return 404 for seo when profile is private.
2016-02-10 17:09:20 +01:00
Raphael Collet 0b27a37156 [FIX] ir_translation: validate translation values and do not sanitize them
The value validation was de facto nullified by escaping invalid translations in
`XMLTranslator.process_text`.  Reimplement it by checking whether the
translated term can be translated back to its source term in the field value.
The sanitization of translated terms is now gone, as not all terms should be
sanitized (like attribute values).
2016-02-10 16:10:18 +01:00
Martin Trigaux 669b6f7b3d [FIX] tools: less strict evaluation of translations
Do not parse the translation of an attribute value.  The content of a
translatable node attribute (such as 'string') should not be tested for
XML/HTML validity: the value can contain special chars such as `&` in its
source and should not be escaped when evaluated.

This fixes escaped page title in the partner form
`Sales & Purchases` => `Ventes &amp; Achats`
2016-02-10 16:10:18 +01:00
Denis Ledoux 47bb1bd225 [FIX] account, purchase, sale, currency: companies rates
In Odoo 9.0, the field `company_id` has been moved
from the `res.currency` model to the `res.currency.rate`
model.

The different reports applying the currency rates on the amount
at date have not been updated according to this change. This
includes the sales, purchases and invoices analysis report.

Basically, before 9.0, there was one `res.currency`
per existing currency per company. A simple `JOIN`
on the `res_currency` table was therefore enough
to apply the currency rate.

From 9.0, the currency records are shared between
companies. It's the rates (`res.currency.rate`) that can be
set a on specific company. The simple `JOIN` on
`res_currency` is therefore no longer enough: the company condition
must be added. Only rates from the specific company
(e.g the company of the invoice) must be considered, or rates
without companies.

We take the opportunity to factor out the method, so, if a correction
must be done, it must be done in one place only.

opw-669129
2016-02-10 15:53:21 +01:00
Goffin Simon fbf6f2cd9b [FIX] delivery: Delivery method without redirect on courier provider's website
A UserError must be sent if the delivery method set on the delivery order
has no redirect on courier provider's website.

opw:668960
2016-02-10 14:46:11 +01:00
Olivier Dony e901ef2938 [FIX] website: confusion/dangerous config options for CDN
Users are tempted to enable all features they
see under the former "Speed" section of the
website settings, even if they have no idea
what they do.
One of them was `CDN Base URL` and had a default
value that was wrong and very likely to break
your website if enabled by mistake.

This commit replaces the default value with
a placeholder that looks more like a `sample`
URL, and makes the fields required when the
CDN option is enabled.

It also moves the whole "Speed" options to
technical features / debug mode.
2016-02-10 13:40:57 +01:00
Denis Ledoux 4c4ccd7b14 [FIX] account: settings, Assets management & Revenue recognition
The checkbox `Assets management & Revenue recognition`
actually installs only the assets management. The revenue
recognition is not installed when checking this box.

Actually, the revenue recognition is not even
available within the community edition. This box
couldn't therefore possibly install this module.

opw-669093
2016-02-10 11:25:08 +01:00
Denis Ledoux 911112c322 [FIX] mail: announcement bar URl displayed on print
On printing, the announcement bar URL was displayed
in the printing result.
e.g.
`https://services.openerp.com/openerp-enterprise/ab/register/...`
was displayed at the top of the print.

This is related to the revision 50a4ca31f8.

This is due to this simple typo, the according CSS rule was
never applied because of it.
2016-02-10 10:51:13 +01:00
Denis Ledoux a9c9f78ed9 Revert "[IMP] mail: remove deprecated annoucement bar"
This reverts commit 50a4ca31f8.
This causes retro-compatibility issues if you do not
update the `assets_backend` qweb views.

Closes #10853
2016-02-10 10:50:56 +01:00
Aaron Bohy d2574b7018 [FIX] im_livechat: match_rules: backward-compatibility
Add a dummy 'match_rules()' function for backward-compatibility of commit
d8605b79, as 'match_rules()' was called from  server-side 'im_livechat.loader'
template.
2016-02-10 09:42:42 +01:00
Martin Trigaux 8521ac6cc0 [FIX] doc: missing parameters of gantt view 2016-02-09 22:20:43 +01:00
Martin Trigaux 37e7113c56 [FIX] doc: tutorial was still considering pivot as graph type 2016-02-09 17:44:03 +01:00
Joren Van Onder cdf21ebe4a [FIX] point_of_sale: make POSBox print only one ticket when losing wifi
The POSBox attempts to maintain whatever Wi-Fi connection it has as best
it can. When it loses it's current Wi-Fi connection it will attempt
to recreate it every 30 seconds. This works well, but a side-effect of
this is that it'll also print a 'Could not connect to LAN' ticket every
time it fails. If you where to leave the POSBox with Wi-Fi on for an
extended period of time you could return to a lot of 'Could not connect
to LAN' tickets.

This makes it so that the 'Could not connect to LAN' ticket only gets
printed once upon connection loss. Although it would be simpler to just
not print this ticket at all when losing connection, it is very useful
to know when the POSBox has lost connection. Otherwise when it loses
connection it would stop working and noone would know why.
2016-02-09 16:30:01 +01:00
Christophe Simonis 50a4ca31f8 [IMP] mail: remove deprecated annoucement bar
This bar was never displayed as the remote css was always empty.

When using the enterprise web client, the printing stylesheet show the
target of links (<a> tags) between parentheses, including the one from
the annoucement bar that should be kept hidden.
2016-02-09 16:23:38 +01:00
Nicolas Lempereur 5c853870bc [IMP] website_crm: set utm medium override Website
To set utm values (medium, source and campaign) on created record, the
system use default function which check cookies and other funny things.

But for website form creating a record, the medium value would be
overrided always to Website whilst that should be a fallback (and the
set medium should have priority).

closes #10848
opw-668853
2016-02-09 16:13:40 +01:00
Martin Trigaux 980cc6363e [FIX] doc: missing mode attribute in calendar doc 2016-02-09 15:56:56 +01:00
Goffin Simon 328d34a221 [FIX] base: active field of a related partner
The related partner created from a user must be active=false if
the user.active=false

opw:668984
2016-02-09 15:48:01 +01:00
Martin Trigaux 07a19b7949 [FIX] doc: deprecated tree parameter colors 2016-02-09 15:18:31 +01:00
Goffin Simon b0ce65dacc [FIX] sale: quantity in invoice line from invoicing
Introduced by 98ccb8539e
2016-02-09 14:49:05 +01:00
Olivier Dony 13833d5257 [MERGE] Forward-port saas-6 up to rev. 3ea3348 2016-02-09 14:37:52 +01:00
Goffin Simon 98ccb8539e [FIX] sale: invoice_status of a SO line from an advance payment
When making an advance payment, the SO line created from this payment
must have a qty_invoiced equal to 0 and the invoice line created for
this SO line must have a quantity equal to 0. In this way, the SO line
created is "Fully invoiced".

opw:668844
2016-02-09 14:03:57 +01:00
Goffin Simon d8503b68a2 [FIX] sale: invoicable line
When invoicing the invoiceable lines on a SO, if there is no
invoicable lines then a UserError is raised to avoid to create
an empty invoice.

opw:668844
2016-02-09 13:58:38 +01:00
Denis Ledoux 3266d43399 [FIX] marketing_campaign: pass context as kwargs in overriden search
When converting a new API call to an old API call,
the context is expected to be found within the kwargs
argument. If not, it is seen as a regular argument.

See `get_context_split` in `openerp/api.py`

As it was not the case in the overidden method
`search` in `marketing_campaign.py`, if a module
overriden the method `search` of
`ir.actions.report.xml` using the new API, the
context wasn't treated as such correctly, and it leaded
to wrong number of arguments passed.

I take the opportunity to pass all arguments
that are passed as kwargs in the base `search`
as kwargs as well, to be clean.

opw-668471
2016-02-09 11:30:44 +01:00
Nicolas Lempereur 37dc9303a6 [FIX] website_crm: fix medium_id for website sent form
In ddac26c `crm.crm_medium_website` was replaced by
`utm.utm_medium_website`.

There was one place where it was not reverberated so the medium_id was
always unset in that instance (a crm.lead created from a website form).

opw-668853

note: equivalent of saas-6's 3ea3348
2016-02-09 11:29:39 +01:00
Nicolas Lempereur 3ea3348d20 [FIX] website_crm: fix medium_id for website sent form
In ddac26c `crm.crm_medium_website` was replaced by
`utm.utm_medium_website`.

There was one place where it was not reverberated so the medium_id was
always unset in that instance (a crm.lead created from a website form).

opw-668853

note: no need to forward port after saas-6 (code change)
2016-02-09 11:05:46 +01:00
Raphael Collet 8a2b172c3e [FIX] addons: fix usage of decorators api.v7/api.v8 2016-02-09 10:33:34 +01:00
Martin Trigaux f0dcb4493b [FIX] doc: iterating on a recordset 2016-02-09 10:17:36 +01:00
Olivier Dony 39b8330331 [FIX] base: enable o2m test foreseen in 4de3f4c4
See 4de3f4c4ba
2016-02-09 10:10:28 +01:00
Raphael Collet 5763c32a6d [FIX] addons: fix usage of decorators api.v7/api.v8
Specifically, when one API implementation calls the other one, it has to call
the method *from the same class*.  Otherwise, overriding the method may result
in an infinite recursion.  Consider:

    class A(Model):
        _name = 'stuff'

        @api.v8
        def foo(self):
            return 42

        @api.v7
        def foo(self, cr, uid, context=None):
            return self.browse(cr, uid, [], context).foo()

    class B(Model):
        _inherit = 'stuff'

        def foo(self, cr, uid, context=None):
            return super(B, self).foo(cr, uid, context=context) + 1

and now call: `env['stuff'].foo()`.  This invokes `B.foo` (new-API), which
calls `B.foo` (old-API), which calls `A.foo` (old-API), which calls `B.foo`
(new-API) instead of `A.foo`!

This issue would not be present if old-API `A.foo` was defined as:

        @api.v7
        def foo(self, cr, uid, context=None):
            return A.foo(self.browse(cr, uid, [], context))
2016-02-09 10:01:43 +01:00