Commit Graph
102450 Commits
Author SHA1 Message Date
qsm-odoo f242721eb0 [FIX] website: fix FAQ Roller opening on old apple devices
On old apple devices (IPad 2, IPhone 4, ...), the FAQ Roller could not
be opened on click. This is because the snippet does not use standard
bootstrap correctly and put the toggle on a <div/> element instead of
a <a/> element.

This fix forces an empty click handler on these <div/>, which allows
standard bootstrap to work.
2016-10-10 12:08:27 +02:00
Jeremy Kersten e2ede31238 [FIX] stock_dropshipping: Prevent dropshipping settings erasable by code update
These data should be in no update. Else at next update, it can change the configuration
of the production.

This commit closes #13404
Courtesy of @bealdav
2016-10-10 11:17:17 +02:00
Jeremy Kersten b770c3e5a3 [FIX] web: fix styling in many2many tag input
Since Chrome 53.0.2785, the input select is hover the existing tag.
With this fix, the existing tag are displayed at the right side of
the input to create a new one.

This commit closes #13655

Courtesy of @8cells
2016-10-10 11:17:17 +02:00
Nicolas Martinelli 9548fcb2e5 [FIX] event_sale: confirm registration
When a user registers for an event on the front-end, the confirmation of
the associated SO will also confirm the registration. However, if a SO
is created manually and a ticket event is added to it, the confirmation
of the SO will not trigger the confirmation of the registration.

In the second case, the registration simply doesn't exist yet at
confirmation and is created by the method `default_get` of
`registration.editor`.

We make sure to confirm these registration when we make the final
reservation.

opw-688665
2016-10-10 10:24:57 +02:00
Sébastien BEAU 1c2a7b8e3f [FIX] purchase: copy company in picking
In a multi-company environment, we need to make sure to copy the company
of the PO to the company of the picking. Otherwise, it might happen than
the PO as a different company than the picking.

Closes #13129
2016-10-10 09:57:14 +02:00
Odoo Translation Bot 7185ae4f67 [I18N] Update translation terms from Transifex 2016-10-09 00:34:56 +02:00
Michael Brown d477dcc316 [FIX] models: fix behaviour of 'defer_parent_store_computation'
If a model uses nested sets to maintain a hierarchical record
ordering, then bulk inserts (e.g. via a CSV import) are likely to
suffer from an O(n^2) performance penalty, since there is a high
chance that each new record will require many of the existing records'
parent_left and parent_right fields to be updated.

The context parameter 'defer_parent_store_computation' may be passed
to the load() method, in order to defer updating the parent_left and
parent_right fields until after the bulk operation is complete.  This
appears to have last been fully supported in version 7 (via the old
import_data() method).

It is still possible to specify 'defer_parent_store_computation',
e.g. via an XML-RPC call such as

  m.execute_kw(dbname, uid, password, 'stock.location', 'load', [],
               {'fields': fields, 'data': data,
                'context': {'defer_parent_store_computation': True}})

This will currently defer the recalculation of parent_left and
parent_right, but does not correctly call _parent_store_compute()
after the bulk operation is complete.

Add the missing call to _parent_store_compute() to perform a one-time
update of the parent_left and parent_right fields if needed after the
import operation is complete.

Also fix the child_of_domain() and parent_of_domain() expression
methods, so that the 'child_of' and 'parent_of' operators give correct
answers when updates to parent_left and parent_right have been
deferred.

Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>

Closes #13688 (part 2/2)
2016-10-06 17:52:03 +02:00
Michael Brown 22c4a0c1b0 [FIX] expression: pass context to hierarchical domain operators
The expression context is currently passed to to_ids() but is missing
from all calls to child_of_domain() or parent_of_domain().  These
methods are effectively always passed a context of None.

Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>

Closes #13688 (part 1/2)
2016-10-06 17:51:28 +02:00
Michael Brown 1b3d60d961 [FIX] product: speed up product.template bulk record creation
Bulk inserts of product definitions (e.g. via a CSV import) will
suffer from an O(n^2) performance penalty due to an unfortunate cache
invalidation bug.  The underlying cause is difficult to determine due
to the labyrinthine nature of the relationship between product.product
and product.template, but some key elements are:

- The "product_variant_count" field is a non-stored computed field,
  and so gets invalidated by the call to recs.modified(upd_todo) in
  BaseModel.create()

- Field.determine_value() will call _prefetch_field() to repopulate
  "product_variant_count" by refetching all records from the database,
  despite the fact that "product_variant_count" is not stored in the
  database.

Using the length of "product_variant_ids" directly (instead of going
via "product_variant_count") seems to avoid this problem, possibly
because the definition of "product_variant_ids" conveys more
information about the circumstances in which its value must be
invalidated.

An alternative solution of making product_variant_count a stored field
(using the same trigger as for other variant-derived fields such as
volume and weight) works but still results in some unnecessary fetches
and invalidations.

Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>

Closes #13689
2016-10-06 13:02:52 +02:00
Valencia Rodrigues Sah 10dcec1e9a [IMP] account: It is better to order also by 'id', esp. when 'sequence' could match among multiple records. 2016-10-04 10:24:03 +02:00
Nicolas Lempereur 886751e2c1 [IMP] base: upstream_dependencies called from new api
In saas-12 and up, upstream_dependencies returns:

- when called from old API : a list of ir.module.module ids
- when called from new API : a recordset of ir.module.module

From 9.0 to saas-11, when called from new API it would also returns a
list of ids which can bring needless inconsistencies.

With this commit when called from new API a recordset is returned.

opw-690015
2016-10-04 09:29:31 +02:00
Olivier Dony b64b9619f8 [MERGE] Forward-port saas-6 up to 447179c2d3 2016-10-03 23:59:12 +02:00
Olivier Dony 447179c2d3 [MERGE] Forward-port 8.0 up to 3d55aff1c8 2016-10-03 23:53:23 +02:00
Olivier Dony 3d55aff1c8 [FIX] convert: properly catch Value/Name Errors 2016-10-03 23:41:44 +02:00
Olivier Dony ba7880a249 [FIX] base: force local cursor in case of mismatch 2016-10-03 19:48:09 +02:00
Olivier Dony 12634e1227 [FIX] base_import_module, tools: raise a clear error for unsupported file types
Also restrict XML data attribute evaluation context
even for real module data files. This will prevent
accidentally depending on context parameters that
would not be available inside base_import_module.
2016-10-03 19:48:09 +02:00
Thibault Delavallée 0b87f76628 [IMP] mail: separate management of mail routes from redirection
Move code related to redirection in its own class method. This way all
controllers perform their own actions and checks before calling the
redirection itself. Moreover it is necessary for some controllers to be
able to call the redirection independently outside of the mail/view
controller scope.

This commit also fixes some links generated for mail notification email
buttons. Assign and (un)follow buttons now effectively use the link helper
when generating the associated URL instead of manually crafting it.

Custom routes for notification buttons used in HR and CRM are added.
Indeed in order to be able to fine-tune the behavior called by those
buttons, using dedicated controllers is simpler than trying to use
a generic one. As there are few custom buttons in notification emails
using dedicated controllers does not lead to a code overhead.
2016-10-03 19:03:50 +02:00
Olivier Dony 0ea7842c5e [FIX] base: force local cursor to avoid mismatch 2016-10-03 17:42:37 +02:00
Olivier Dony 8aba05dc08 [FIX] base_import_module, tools: raise a clear error for unsupported file types
Also restrict XML data attribute evaluation context
even for real module data files. This will prevent
accidentally depending on context parameters that
would not be available inside base_import_module.
2016-10-03 16:57:00 +02:00
Christophe Simonis 2c5ef3b7b0 [FIX] l10n_*: limit tags and taxes migration scripts to 9.0 series 2016-10-03 11:06:37 +02:00
Christophe Simonis d2d1233429 [MERGE] forward port branch saas-6 up to ba790d1 2016-10-03 10:47:55 +02:00
Christophe Simonis ba790d1e27 [MERGE] forward port branch 8.0 up to ca18a16 2016-10-03 10:36:56 +02:00
Odoo Translation Bot ca18a1699c [I18N] Update translation terms from Transifex 2016-10-02 02:57:59 +02:00
Odoo Translation Bot b33415f3bd [I18N] Update translation terms from Transifex 2016-10-02 00:35:04 +02:00
Manuel Vázquez Acosta 5b692df1b1 [FIX] mail: Ignore case for mail aliases.
When receiving new mail (not replies) to an alias we should not take
case into account.

This also homogenize the treatment of local parts.  For instance, lines
967 and 980 convert the local part to lower case to avoid
case-sensitivity issues.

Also `mail_alias` normalizes alias names by lowering case and finding,
if necessary to make it unique, a suffix to alias name provided.

From RFC 5321, section 2.4:

  > Exploiting the case sensitivity of mailbox local-parts impedes
  > interoperability and is discouraged

Closes #334
Closes #13037
2016-09-30 18:41:39 +02:00
Nicolas Martinelli 1a0d173b9a [FIX] account: analytic account in write-off
The analytic account of the write-off move is not copied on the line
when doing a reconciliation.

opw-688635
2016-09-30 16:03:59 +02:00
Christophe Simonis da388aa192 [MERGE] forward port branch saas-6 up to eb4f030 2016-09-30 15:37:25 +02:00
Christophe Simonis eb4f0309a9 [MERGE] forward port branch 8.0 up to 295f627 2016-09-30 15:35:57 +02:00
Nicolas Lempereur c8ca71fc62 [IMP] stock_account: stock_history slow read_group
On a given instance with 600 000 stock.history, the query changed by
this commit takes:

- before this change => 32 minutes
- after this change => 20 seconds

opw-685747
2016-09-30 12:58:45 +02:00
Thibault Delavallée 00aab045b0 [FIX] sale: fix context update wrongly migrated / updated at 94716a3f14
Purpose of the code is to automatically add the recipients of quotation emails
as followers. It is done using the mail_post_autofollow context key. However
current code add the context key in all cases and not just when composing
a message on sale order.
2016-09-30 12:37:02 +02:00
Nicolas Martinelli b2b85fbb19 [FIX] website_sale: recompute fiscal position
Following commit 6006c0d72a, the shipping address can be changed after
the call to `checkout_form_save`. This is the case, for example, when
the user has the same shipping and invoicing address. We need to make
sure to recompute the fiscal position after the shipping address is
finally set.

opw-689281
2016-09-30 11:52:51 +02:00
Nicolas Martinelli 204c75939a [FIX] sale: always set fiscal position
An issue occurs in the following case:
- create a SO
- set a partner for which a fiscal position applies
- change the partner to a partner for which no fiscal position applies

The fiscal position set in a first place remains. This is a major issue
when interacting with the eCommerce, since a fiscal position can be
first set based on the GeoIP results, then might need to be removed when
the user fills in his address details.

opw-689281
2016-09-30 11:48:16 +02:00
Denis Ledoux dd28f9bf78 [FIX] website_quote: /quote/ redirects to login when not signed in and no token
When the route /quote/<order_id>
is accessed without token
e.g. through the `View sales Order` button
in the headers of thread mails

the user must be redirected to the login screen
if he's not signed in.

In other words, you must be signed in to access
this route without token.

opw-687931
2016-09-29 15:06:38 +02:00
qdp-odoo 6c79cfa83d [FIX] stock_account: copy the analytic account on the COGS entry in anglo-saxon mode.
OPW Ticket: 688456
2016-09-29 10:19:45 +02:00
Martin Trigaux 349e873f8e [IMP] l10n_be: fully translate CoA in Dutch 2016-09-29 08:27:47 +02:00
Nicolas Martinelli b83efd4c3d [FIX] google_drive: user_is_admin
Oversight of commit e80f1152 which causes a crash since the variable is
not defined anymore.

opw-689353
2016-09-28 15:03:31 +02:00
David Monjoie f82aeb05d0 [FIX] event: fix registration confirmation delay
The previous line was O(n^2). With n=1200 like we just have now,
things didn't look good for this loop and confirming an attendee
registration to such event took approx. 13 seconds.

Since the list comprehension is in no mean linked to the value
of "item" in the filter, I simply moved it out so it is only
computed once.
2016-09-28 13:44:16 +02:00
Jairo Llopis 295f62741d [FIX] tools: cherry-pick of 0529a7f9
extract terms in correct folder

If two addons path have a common part in the folder name (e.g. `/home/alice/dev`
and `/home/alice/devodoo`), the `get_module_from_path` method may match the
wrong folder.
A file `/home/alice/devodoo/bob/models.py` would wrongly match `/home/alice/dev`
path (due to the lack of separator) and the returned module would be `odoo`
(`"odoo/bob/models.py".split('/')[0]`).

In such scenario, the translations of files (code, static folder, report) would
not be included in the exported translation file.

Force the module path to ends with a folder separator to avoid wrong matching.

Closes #13363
2016-09-28 13:43:41 +02:00
Alexandre Fayolle 94f58d647c [FIX] auth_ldap: fix authentication with special chars
encode the filter in utf-8

This prevents a UnicodeDecode error in python-ldap when the
filter contains non ascii characters.

opw-682783
closes #10899
closes #12710
2016-09-28 12:58:32 +02:00
Denis Ledoux 9ba569874c [FIX] calendar: fix attendees list in invitation email
Upon the creation of an event,
the list of attendees displayed in the invitation emails
were not complete because the emails were sent as the attendees
were being added to the event, in the loop.

e.g.:
 - Create an event with Joseph and Michel
 - Joseph received the invitation email with only him as attendee
 - Michel received the invitaiton email with Joseph and him.

The invitation email of Joseph now contains all the attendees.

opw-681242
2016-09-28 12:43:51 +02:00
Nicolas Martinelli 8469fe2eac [FIX] account: exchange rate date
The fields `amount_total_company_signed` and `amount_untaxed_signed` are
always converted using the exchange rate of today.

opw-688838
2016-09-28 09:55:00 +02:00
Olivier Dony 40bce50ddb Revert "[FIX] mail: onchange_template_id"
This reverts commit dc02f773ce.

This commit caused a side-effect that is worse than the issue
it tried to fix, which was purely cosmetic.
Now in mass-mail mode the template is only rendered once
and all recipients receive the same PDF, which completely
defeats the goal of a dynamic report. We have static
attachments for that.

Original fix related to opw-657152
Reverts PR #10568
2016-09-27 19:39:30 +02:00
qsm-odoo 1df161db6b [FIX] website_blog: keep consistent cover classes when changing cover image
! Note forward port: this is a partial backport, ignore when conflict

For some strange reason, the cover_full class was added when the cover
image was changed, without checking if the cover_narrow class was
already there. The cover was then a hybrid cover_narrow cover_full.

The problem was reinforced by the graphene theme which does some
animation on cover_full covers.
2016-09-27 17:28:31 +02:00
qsm-odoo c952e1fc55 [FIX] website_sale: fix shop list view publish buttons
Publish buttons appeared in list view item in /shop with commit
5a5dd1e100.

They however never worked for some reasons:
* The publish buttons were unclickable as the around style was badly
implemented: the section title was over the publish button
* Even if it was clickable, the publish button handler had no prevent
default, thus it submitted the form it is in -> crash when no cart
button or added to cart on click on publish button if there was a cart
button...

Note: the style should be reviewed in next versions, this commit, as
a 9.0 fix, fixes the style with the minimum code and so that it does
not break any theme.
2016-09-27 13:47:07 +02:00
Denis Vermylen (dve) 6490bdc263 [IMP] hr_holiday: remove leave onchange date check
When you create a leave, you first set the start date. The date widget triggers
and automatically sets you at today, which triggers the onchange and puts the
end date at today + 8 hours. You then set your start date in the future
-> invalid dates because start date > end date.

This commit removes the onchange verification of the dates, because almost
everyone gets the above problem and because it is redundant with the sql
constraint that triggers anyway when you try to save with invalid dates.
2016-09-27 10:51:37 +02:00
tdi-odoo ccd6fc621b [FIX] expense: fixes #13446 mutliple taxes on expenses 2016-09-27 10:45:38 +02:00
Michael Brown 1bb162c913 [CLA] Michael Brown
Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>

Closes #13070
2016-09-27 08:57:57 +02:00
Fabrice Henrion 6fb7680ef8 [IMP] policy clarification 2016-09-27 08:33:37 +02:00
Christophe Simonis e318a96490 [MERGE] forward port branch saas-6 up to 858a8b9 2016-09-26 13:49:49 +02:00
Christophe Simonis 858a8b9ef1 [MERGE] forward port branch 8.0 up to 4ab34d4 2016-09-26 13:32:09 +02:00