Commit Graph
104545 Commits
Author SHA1 Message Date
Thibault Delavallée fcd6813dc9 [FIX][IMP] various: unsudo mail/view controller and get_access_action
This is a backport of saas-13 commit a9bd9ab160.

mail/view controller is a generic controller that redirects the user to a
given view, depending on the record and the user. Users may be redirected
to the backend form view, or to a website view. This is done notably by
calling get_access_action method that gives the action to perform (act_window
or url).

Previously this method was called using SUPERUSER. However it was therefore
impossible to know who the user was. This method is now called using the
current user. Various overrides of get_access_action have been updated to
add some logic and access rights check directly in the method allowing
more fine-grain behavior of the access action.
2016-09-26 14:42:25 +02:00
Martin Trigaux d59d95107e [I18N] Update master translation terms from Transifex 2016-09-26 11:44:55 +02:00
Jeremy Kersten 5f90769f41 [FIX] website_sale: SignIn url if SignUp not allowed 2016-09-23 14:46:48 +02:00
Jeremy Kersten 0ee98f4b42 [FIX] website_sale: fix display price in cart. 2016-09-23 13:21:08 +02:00
Jeremy Kersten 81447ca711 [FIX] website_sale: set payment_term_immediate by default in shop 2016-09-23 13:21:08 +02:00
Christophe Simonis b1b700adb1 [MERGE] forward port branch saas-11 up to 6854887 2016-09-22 14:23:07 +02:00
qsm-odoo 5a0a29b528 [FIX] web_editor: prevent crash when deleting multiple snippets in one deletion
Since saas-12, when deleting contents, parents are deleted too if they
become empty (while it was not possible to delete contents in that case
before). The problem here was that the history was recorded multiple
times if one deletion made multiple snippets be deleted and this
sometimes could crash.

Now the history is recorded only on first deletion when the user ask
for it.
2016-09-22 13:44:06 +02:00
Christophe Simonis 6854887ade [MERGE] forward port branch saas-10 up to 477482e 2016-09-22 13:41:33 +02:00
Christophe Simonis 477482ed9f [MERGE] forward port branch 9.0 up to 78f6117 2016-09-22 13:05:29 +02:00
Christophe Simonis 78f6117db0 [MERGE] forward port branch saas-6 up to 6a67e5c 2016-09-22 12:52:35 +02:00
Christophe Simonis 6a67e5cf42 [MERGE] forward port branch 8.0 up to e083d72 2016-09-22 12:46:30 +02:00
Raphael Collet 16a0b3b249 [FIX] models: do not delete ir.model.fields in _field_create (#13565)
Following 5c5d0865b9, apparently unused records
are simply deleted after updating existing ones.  This causes an issue when a
module is installed or upgraded.  The inspection of `ir.model.fields` records
is based on a *partial* registry (not all modules loaded); therefore records
will be deleted and recreated afterwards.  This triggers inconsistencies in
other models that refer to `ir.model.fields`, like server actions, base action
rules, mail templates, etc.: many2one fields will be set to null!
2016-09-22 12:29:24 +02:00
Nicolas Martinelli be8bbc2396 [FIX] base: traceback in read_group
An issue originally occurs in the Event module.
- Go to Events >> Reports >> Events
- Add a "Group By" in the search view: "Event Month"
- A mighty traceback pops up

This is because the rows and the columns are grouped by the same field
(`event_date:month`).

In method `_read_group_format_result`, a group_by of type "date" or
"datetime" is replaced by a "(range_start/range_end, label)" tuple. The
first element of the loop on `annotated_groupbys` is handled correctly,
but the next identical element will crash on `value + gb['interval']`,
since `value` is now a tuple and not a date/datetime anymore.

opw-686242
2016-09-22 10:21:10 +02:00
qsm-odoo 9ea6861d7e [FIX] web_editor: allow editing t-field links
There is a hackish feature in the web_editor which forces the
contenteditable to true on links which are clicked and removes it
anywhere else in the page so that only the link is editable after
click. This allows to add text at the end of a link without adding it
outside of the link by mistake.

The feature was badly implemented because, if the link was editable
without having any parent which is editable, the contenteditable was
forced to true, then immediatly forced to false when forcing to false
every page element. This was the case for lots of t-field. By example
the product categories in eCommerce are t-field links which are in non
editable <li/> elements...
2016-09-22 09:41:39 +02:00
Nicolas Lempereur e083d720a9 [FIX] website_blog: blog pager page issue
When we are on the page:

 /blog/myblog-1/page/2

the link to page 3 is:

 /blog/myblog-1/page/3

So we need to give /blog/our-blog-1 as source url of pager.

Previously in this instance, since 4faed0b7 the page 3 url
in this scenario would erroneously be:

 /blog/myblog-1/page/2/page/3

opw-688681
2016-09-22 08:05:20 +02:00
Jeremy Kersten e72b852015 [FIX] website_crm, website_hr_recruitment: remove useless token
This token will be added automatically at posting (by ajax.js from framework)
2016-09-21 21:34:11 +02:00
Wolfgang Taferner 71fd0829ef [FIX] anonymization: intercept exception in case of removed models and fields 2016-09-21 21:34:11 +02:00
Olivier Laurent 5bd0b05c22 [FIX] doc: typo in upgrade_api 2016-09-21 16:27:02 +02:00
Jeremy Kersten 6dc985b0ad [FIX] website_crm_partner_assign: allow partner to be uninteressed for a lead.
Avoid traceback "'int' object has no attribute 'partner_id'"
uid is the id and not the browser record of 'user'

Avoid traceback: Database fetch misses ids (u'<id>') and has extra ids (<id>),
 may be caused by a type incoherence in a previous request.
JS call with id as string.

Avoid traceback: Invalid value res.partner(x,y,z) in domain term ('partner_id', 'in', res.partner(x,y,z))
Search in new api return browseRecord now

Avoid to write on a lead without the right on it.
2016-09-21 16:21:51 +02:00
Christophe Matthieu ab06013e30 [FIX] mass_mailing: can't change color button snippet when edit mass mailing 2016-09-21 16:14:49 +02:00
Thomas Binsfeld (ACSONE) 69a4bf7a43 [IMP] hr: add tree view in Departments action window (#13418)
Tree view was removed to hide the different view types display in enterprise as it was "cleaner" for a dashboard. Re-adding for import button.

Future versions will not display departments as dashboard but employees anyway.
2016-09-21 14:56:38 +02:00
Denis Ledoux 5b4c1d405d [FIX] mrp: fix partner ref and so number in mrp report
These fields are no longer in the model `._columns`
since their migration to the new API.

Courtesy of Daniel Dico
https://github.com/ddico

opw-688768
2016-09-21 13:23:49 +02:00
Denis Ledoux 7233add42b [FIX] point_of_sale: picking creation after payment
Since the below revision:
32b5515a8f

It was no longer possible to create a payment
for a pos order without picking.

Indeed, if `picking_type` is not set,
`picking_id`, which is initialized to `False`,
remains as `False`, and you therefore can't
ask it's `.id` (`picking_id.id`).

opw-687597
2016-09-21 12:23:33 +02:00
Jeremy Kersten 8b41933a9e [FIX] web_graph: force row title to be string
If the title was 'true' or 'false', the export failed, because we are tying to
concat bool and str. TypeError: cannot concatenate 'str' and 'bool' objects

How to reproduce, install sale, be sure to have one order with delivered = True
In Reporting / Sale analysis, add a group by 'shipped' filed to have 'true' as
title.

This commit closes issue odoo/odoo#13425
2016-09-21 10:59:39 +02:00
Stéphane Bidoul (ACSONE) dbd4114d38 [FIX] l10n_lu: fix reconcile flag in accounts template csv
Changes f -> FALSE and t -> TRUE, otherwise when installing the l10n_lu
COA, the reconcile flag is wrong.

Closes #13282
opw-688957
2016-09-20 17:46:13 +02:00
Richard deMeester 4f0ca6d923 [FIX] base: res.config name_get fix (#13513)
name_get function needs to ensure that read passes the required
ids as a list, not a single value.  This is very important if
the method is inherited.
2016-09-20 16:19:46 +02:00
Raphael Collet 5c5d0865b9 [FIX] models: reflect inherited (by _inherits) custom fields
When a custom field is created, it now appears in `ir.model.fields` on the
model's children models (by `_inherits`).  This makes the reflection more
accurate (inherited custom fields are visible), although not perfect (they
appear as "base" fields and thus cannot be overridden).

The reflection of fields in `ir.model.fields` has been improved to deal with
custom field creation, modification and suppression.

Note that custom fields are still not inherited through `_inherit` relations.

opw-687626
opw-645065
2016-09-20 14:08:55 +02:00
Christophe Matthieu 12a6889088 [FIX] website_sale: wrong help menu name to create new product.
Issue: Missing Menu on E-commerce because the user click on the wrong menu
opw-681201
2016-09-20 13:53:57 +02:00
qsm-odoo c4784fc75b [FIX] web_editor: activate autoplay feature for videos
The checkbox was there to activate autoplay... but was not doing
anything since the web_editor/website split.
2016-09-20 13:40:53 +02:00
Jeremy Kersten 6d8ae0a039 [FIX] crm: fix bug introduced by new api in #aa44700
Before migration:
  'phone': customer and customer.phone or lead.phone,
After migration:
  'phone': customer.phone if customer else self.phone,

So if a customer exists and that it has no phone, the phone
on the lead need to be preserved during convertion in opp.
2016-09-20 12:25:45 +02:00
Martin Trigaux f978d85f05 [I18N] l10n_be: add missing translations for CoA 2016-09-19 17:49:58 +02:00
Martin Trigaux 0576b7af19 [FIX] account: translate refund by note de crédit 2016-09-19 17:00:16 +02:00
Martin Trigaux fe0cbf897d [FIX] add missing tag and correct typo
Thanks Transifex reporters
2016-09-19 16:20:30 +02:00
Fabien Meghazi 5dec69c35d [REV] fix ir.qweb#render() return type
This commit reverts the API change introduced in b3302398bc
that changes `ir.qweb#render()` to return a unicode string instead of a utf8
encoded bytestring.

Returning a unicode string is undoubtedly cleaner and a step in the direction
of python 3 but still is an API change that can break third party modules.

Let's wait the migration to python 3 before breaking other people's toys.
2016-09-19 15:22:46 +02:00
Nicolas Martinelli d2707fa7d7 [FIX] pad: initialize pad at creation
When a pad is created programmatically (e.g. through a project task or a
note), the pad is empty when it is first displayed. It is necessary to
edit the record and save it in order to be able to see the content.

This is because the pad is normally initialized by the JS layer, at the
first edition, thanks to a call to `pad_generate_url`. Therefore, a
programmatic pad creation won't initialize it.

opw-685826
2016-09-19 11:41:38 +02:00
Jeremy Kersten 06032f8883 [FIX] purchase: don't check subtype if not in the context of purchase order.
Before this commit, we check everytime the subtype.
In some case (eg: portal user on the forum) don't have access to subtype of
type internal.

This commit fixes opw-688403
This commit closes #13510
2016-09-19 11:27:31 +02:00
Odoo Translation Bot 6a1ecef775 [I18N] Update translation terms from Transifex 2016-09-18 03:05:57 +02:00
Odoo Translation Bot 9413bafdd3 [I18N] Update translation terms from Transifex 2016-09-18 00:34:39 +02:00
qsm-odoo f98aa664df [FIX] web: fix low perf. of web_tour when a modal is opened
When a modal was opened, the system seemed slower because a web_tour
callback was called every 500 ms.

This was because of jQuery. Using the "find" method on a jQuery element
will temporary set an ID on this element for some jQuery reason. So,
when a modal opened, a DOM mutation was caught by the web_tour observer
which then called the "update" method in which a $modal.find
is done... and so an ID was set and a new DOM mutation was caught again.

The solution here is to provide an unique ID on each modal in odoo so
that the find function has not to set an ID, and so does not trigger
any DOM mutation.
2016-09-16 16:43:19 +02:00
Christophe Simonis 5b796318b4 [FIX] web: correctly hide advanced search input for 'is set/is not set' operator 2016-09-16 14:54:43 +02:00
Aaron Bohy 59710faa0a [FIX] board: correctly pass options arg to do_action
The dashboard instantiates an action manager for each view it has to display.
It then replaces the do_action() function of those action managers by its own
one, forgetting to pass the second argument 'options'. Thus, when do_action was
called by a view of the dashboard (e.g. a button in a list view), it was called
without the options.
2016-09-16 12:05:38 +02:00
Olivier Dony a5e2039aee [IMP] account.invoice: include origin in payment reference
Makes it easier to later reconcile payments with
bank statements. For eCommerce orders the payment
transaction happens before the creation of the invoice,
so the invoice number is not sufficient to quickly
find a match for reconciliation.
2016-09-16 11:31:37 +02:00
Christophe Simonis 10cde43fd4 [MERGE] forward port branch saas-11 up to 4c2b536 2016-09-16 10:34:39 +02:00
Christophe Simonis 4c2b536031 [FIX] core: adapt method api
Forward-port problem, once again
2016-09-15 19:00:26 +02:00
Christophe Simonis f8a601cad7 [MERGE] forward port branch saas-10 up to e634a52 2016-09-15 18:55:01 +02:00
xmo-odoo 9c78ba1f75 [IMP] document subset/superset operations 2016-09-15 17:05:10 +02:00
qsm-odoo e634a52cac [FIX] web_editor: mark snippets which can't be dropped in the page
The system was lost with the editor refactoring which came with saas-10
and commit bf39884a5c.
Indeed the show() method of the BuildingBlock class was removed as the
widget is now always showed but the show_blocks() method it called was
not removed (and thus was not called anymore).

As a fix, the show_blocks method is now called again, on snippets
initializations and each time a snippet is dropped or removed.
2016-09-15 16:47:15 +02:00
Christophe Simonis 784eaf28dc [MERGE] forward port branch 9.0 up to 6647e1f 2016-09-15 16:45:13 +02:00
Christophe Simonis a4f9c25cf0 [FIX] account: handle move line without partner in Aged Balance 2016-09-15 16:41:58 +02:00
Simon Lejeune 6647e1f8a9 [FIX] barcodes: correctly unbind quantity event listener
The quantity event handler is not correctly unbound when its action
is deleted, resulting in multiple window.prompt asking the quantity
of the products if you go mulitple times trough a view when a widget
implementing the barcode thing is used.

There seems to be a bug in the framework ("barcode_scanned" events
are registered the same way than the "keypress" one on core.bus
but they don't have suffer from the same issue).
2016-09-15 16:20:18 +02:00