Commit Graph
101117 Commits
Author SHA1 Message Date
Richard Mathot 929ff48e17 [FIX] l10n_pa: bad XML indentation 2016-02-17 09:32:43 +01:00
Yannick Tivisse 76ed5965b7 [IMP] delivery: Do not open Put in Pack wizard if no related packaging_id
When clicking on the 'Put in Pack' button, do not open the wizard
to select the packaging_id if no packaging_id is available for this carrier
('package_carrier_type').

Example:
- If the carrier is Fedex, it makes sense to open the wizard
- If there are no packaging, it doesn't
2016-02-17 09:15:44 +01:00
Raphael Collet 92144ef64b [FIX] fields: do not add triggers for the fields of an abstract model
This avoids recomputing a computed field defined on an abstract model, which
crashes because the model's table does not exist in database.
2016-02-16 17:05:05 +01:00
Raphael Collet e3ed3d67fb [IMP] models: factor code in _onchange_eval
The factorization enables new-API onchange methods to return values as old-API
onchange methods.
2016-02-16 16:39:18 +01:00
Yannick Tivisse 631e8bd46a [IMP] Purchase: Prevent PO creation on Vendor Bills
On the field 'Add Purchase Order' on vendor bills, don't allow the
user to create a new purchase order.

The button 'Set to Done' is not clear. This button will prevent the
creation of new invoices for this purchase order. Done is not a 'final'
state and the naming is not clear. Fp proposes to rename the state
'Locked' and the button 'Lock Bills'.
2016-02-16 09:59:13 +01:00
Yannick Tivisse 006de6b38d [IMP] base: Remove ir.actions.todos on module install
And jump to the App Switcher automatically on module install/upgrade.
That way, we can remove a lot of ir.actions.todo in the code.
2016-02-15 17:40:47 +01:00
Fabien Pinckaers d2a20c324d [IMP] Usability on task: no need for sum since it's rewritten bellow (and could be confusing if >80 in list 2016-02-15 14:28:28 +01:00
Aaron Bohy 30c655b43d [FIX] sales_team: remove useless RPC
do_action() can directly be called with the xmlid.

Also some code linting.
2016-02-12 12:15:15 +01:00
Aaron Bohy a4dade389b [IMP] mail: batch RPCs at init
Remove the RPC to retrieve the action_id of the client action as do_action()
can take directly the xml_id, and batch the RPC to retrieve the menu_id with
the initial RPC used to fetch channel slots, emojis...
2016-02-12 12:04:02 +01:00
Aaron Bohy 452bf80aff [IMP] mail: remove 'Send Mail' button in Discuss
as it was more confusing than useful.
2016-02-12 12:04:01 +01:00
Aaron Bohy a1821d470a [REF] im_livechat: remove dummy match_rules() function
introduced in 9 at d2574b7018.
2016-02-12 12:04:01 +01:00
Christophe Simonis 9a805c90ed [MERGE] forward port of branch saas-9 up to d70fde0 2016-02-10 18:40:56 +01:00
Christophe Simonis d70fde0330 [MERGE] forward port of branch saas-7 up to cab5c48 2016-02-10 18:37:01 +01:00
Christophe Simonis cab5c480e2 [MERGE] forward port of branch 9.0 up to f7432ef 2016-02-10 18:33:01 +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 & Achats`
2016-02-10 16:10:18 +01:00
Denis Ledoux c2d230ad68 [MERGE] forward port of branch 9.0 up to 47bb1bd 2016-02-10 15:55:48 +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
Yannick Tivisse 7db8f1ca30 [IMP] web: remove rpc call on SwitchCompany widget loading
By setting the information returned by read_companies on the session
information, we are able to remove the rpc call and the willStart
method definition

Also: Set a debounce on SwitchCompany widget to avoid multiple RPC
2016-02-09 17:40:34 +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
Yenthe 95c37d1b0e [FIX] project_issue: typo sStage to stage
Closes #10835
2016-02-09 10:52:34 +01:00
rap-odoo 52193c4953 [IMP] crm: count won opportunities on partner form
Customer form opportunity state Button now counts all opportunities
of related customer, except archived one.
2016-02-09 10:45:37 +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