Commit Graph
1510 Commits
Author SHA1 Message Date
Christophe Simonis a0d7763e09 [MERGE] forward port branch saas-11.2 up to 932e641be1 2018-02-23 17:20:52 +01:00
qdp-odoo 7b322d08de [IMP] base: set partner_id as required on res.partner.bank 2018-02-23 14:56:12 +01:00
Prakash Prajapati a3dda5b350 [IMP] base, base_iban, l10n_ch: few improvements in res.partner.bank
- Change the type in 'acc_type' field char into selection field and change tooltip
- added new field 'acc_holder_name' that can be used to set the account holder name in case it is different than the partner name

Was task 39334.
Was PR #20794
2018-02-22 15:19:51 +01:00
Christophe Simonis 9a84ba5533 [MERGE] forward port branch saas-11.1 up to e750bb6e11 2018-02-22 10:39:15 +01:00
Christophe Simonis ae6a65753e [MERGE] forward port branch 11.0 up to dbb713c2f8 2018-02-21 20:19:26 +01:00
Nicolas Martinelli 7c92417cba [FIX] base: copy VAT
When creating a company from a partner, copy the VAT number as well.

opw-808019
2018-02-20 13:23:41 +01:00
Christophe Simonis bd16df15ea [MERGE] forward port branch saas-16 up to 98d01e46e5 2018-02-20 11:53:06 +01:00
Christophe Simonis 98d01e46e5 [MERGE] forward port branch saas-15 up to 482370d014 2018-02-20 11:08:54 +01:00
Odoo Translation Bot 54670bb149 [I18N] Update translation terms from Transifex 2018-02-20 09:46:32 +01:00
Christophe Simonis 8b527229bf [MERGE] forward port branch saas-14 up to e3d39b0e5f 2018-02-19 19:01:54 +01:00
Christophe Simonis e3d39b0e5f [MERGE] forward port branch 10.0 up to de62e33618 2018-02-19 17:07:29 +01:00
Martin Trigaux 5b88b1a961 [I18N] export 11.0 source terms
To reflect recent code changes
2018-02-19 15:46:33 +01:00
xmo-odoo 2c1b97e22b [IMP] base: make module fields !create
Trying to create a module through the interface will blow up as
computing the `desc` leads to a concatenation of the module's addons
path, the module's name and a hard-coded path, which does not work as
the module does not have a name yet. This creation attempt can be
performed as the admin through m2o fields.

Given said creation through the UI doesn't really make sense, disable
it on the relevant fields.

Fixes #23059
2018-02-19 15:02:38 +01:00
xmo-odoo d28f8f704f [FIX] base: high memory usage in export
Overly attached cache's overhead turns out problematic. Clearing the
cache after batches of records keeps the cache overhead low and does
not change performances.

Explanations:

env.cache is 3 levels of maps {field: record_id: {env: value}}, where
env can be either an Environment or a pair (cr, uid) depending on the
field's dependency on the context or not.

This can be an issue when the current request loads many fields in an
enormous number of records in a single environment. The (PaaS) case
here was the export of a res.partner field from 36358 records in a single
environment[0]:

* prefetch expanded the single field to 68, leading the base `cache`
  to have 68 entries. getsizeof(d<len=68>) == 3360 (3kB, which we will
  soon see we can ignore entirely).
* *each* of these entries would hold a map of 36358
   records. getsizeof(d<len=36358>) = 3146016 (3MB), 68 times = 213MB.
* finally each record entry is also a {(cr, uid): value}, here the
  dicts have a single entry which makes them 280B, and their key is a
  2-tuple "worth" 72B, or 352B/record/field, or 352 * 36358 * 68 ~
  870MB[1].

For a total of ~1GB, which is roughly the issue we can observe.

Future possibilities: extract the cache-clearing iterator to be more generic 
and available on BaseModel directly? Or even make the default iterator 
batched & cache-clearing?

[0] note that sys.getsizeof only provides the size of the object it's
    called on, it is not recursive

[1] slightly more in actuality as there's some variation between the
    leaves depending on the field type e.g. M2O values are a 1-tuple
    adding 60B, ...

Fixes #22475
2018-02-19 13:46:26 +01:00
Christophe Simonis da881b0bd2 [MERGE] forward port branch 9.0 up to 5d086cea9b 2018-02-19 13:25:05 +01:00
Xavier Morel fc55d649d6 [FIX] base: don't recompute while performing the bulk of the unlink
If a record is deleted *and* has property fields, the deletion of the
property fields will trigger the various recomputes before the record
itself has actually been deleted, and thus stuff which depend(ed) on
that record will be recomputed under the assumption that the record
still exists, which probably will not work.

Under the assumption that the same issue would occur when deleting
more than one batch of records (unlinking the data, values or
attachment would also trigger a recompute before the proper end of the
function and could lead to incoherence, e.g. some of the records being
deleted being visible to recomputes), lift the entire effective body
of the unlink into a norecompute context, to ensure that only the very
final recompute (from the top-level unlink) is actually triggered.

opw-807036
2018-02-19 10:48:30 +01:00
Xavier Morel a583a56324 [FIX] base, web: don't fold M2M when not in import compatible mode
Before this commit, if the first exported field of an M2M is `id` (the
xid) the entire M2M is folded into a single cell with comma-separated
xids and any following field is ignored. If `id` is any but the first
field, the export behaves normally (with the m2m exported as a "table"
inside the parent record).

This behaviour makes sense for import-compatible exports where the id
is the only thing which can be exported anyway, but it is troublesome
outside of that mode as the behaviour of m2m under export becomes
incoherent/unpredictable (ish) as it depends on the position of the
m2m's `id` in the exports list.

Change it so we only perform folding in import-compatible mode (which
is the default for backwards compatibility with e.g. API calling
export_data directly & the like).

opw-813361

Fixes #22600
2018-02-19 10:43:15 +01:00
Odoo Translation Bot d070bdf536 [I18N] Update translation terms from Transifex 2018-02-18 07:06:15 +01:00
Odoo Translation Bot 0be75775de [I18N] Update translation terms from Transifex 2018-02-18 04:28:35 +01:00
Odoo Translation Bot 40aedd74a3 [I18N] Update translation terms from Transifex 2018-02-18 01:04:11 +01:00
Christophe Simonis 806f42b065 [MERGE] forward port branch saas-11.2 up to 8b9e854be4 2018-02-15 13:46:23 +01:00
Christophe Simonis 3b959c313d [MERGE] forward port branch saas-11.1 up to a277b58507 2018-02-15 11:52:10 +01:00
Christophe Simonis a277b58507 [MERGE] forward port branch 11.0 up to 259686ba78 2018-02-15 10:58:08 +01:00
Christophe Simonis 72508cc241 [MERGE] forward port branch saas-16 up to 7792755946 2018-02-14 18:26:57 +01:00
Christophe Simonis 7792755946 [MERGE] forward port branch saas-15 up to d24bdbde81 2018-02-14 17:18:59 +01:00
Christophe Simonis d24bdbde81 [MERGE] forward port branch saas-14 up to 9d0de61114 2018-02-14 16:34:13 +01:00
Christophe Simonis 9d0de61114 [MERGE] forward port branch 10.0 up to 73c2ac451a 2018-02-14 16:04:23 +01:00
Christophe Simonis 73c2ac451a [MERGE] forward port branch 9.0 up to b7b82f1267 2018-02-14 15:32:37 +01:00
Denis Ledoux 0db75089ef [FIX] base: prevent PhantomJS tests to send emails
The emails sending is skipped during the tests.
The mecanism to determine if the server was running tests
was to check if the attribute `testing` was set for the thread.

Unfortunately, this `testing` attribute is removed/set to false after the loading/installation
of the modules is done, and phantomJS tests are ran post-installation,
and therefore the emails that were potentialy sent following an action
performed in a PhantomJS tour were not skipped.

This occurred for instance in the tour `project.tour`,
when the responsible of a task was changed,
the sending of the assignation notification email was not skipped.

In the case the machine on which the tests are ran does
not have an smtp server (or mailcatcher) running on the port 25,
this resulted in a test fail.
2018-02-14 14:26:39 +01:00
Odoo Translation Bot 91f2209216 [I18N] Update translation terms from Transifex 2018-02-14 11:53:12 +01:00
Christophe Simonis 19a37782fb [MERGE] forward port branch 9.0 up to 2d73ea9bed 2018-02-13 19:02:37 +01:00
Raphael Collet 34c52e9938 [FIX] fields: performance of onchange on related fields
Optimize the copy of the cache being made by related fields to compute
themselves.  Instead of traversing records data in cache, follow the cache
structure itself and copy everything!

OPW 816125
2018-02-13 17:08:49 +01:00
Christophe Simonis adeea2a88d [MERGE] forward port branch saas-11.2 up to 0f02dcb639 2018-02-12 18:34:43 +01:00
Christophe Simonis 0f02dcb639 [MERGE] forward port branch saas-11.1 up to c69d00157e 2018-02-12 18:08:27 +01:00
Aaron Bohy c265e47a63 [FIX] web,*: tests: remove src attr from img nodes
In the tests environmnent, we don't want img and iframe nodes to
perform RPCs when they are inserted into the DOM. For img nodes,
we prefixed the src attribute by '#test: ' as soon as they were
inserted into the DOM. Unfortunately, this didn't work as expected:
an RPC was done to fetch route '/web/tests?' (i.e. the tests page),
because everything after '#' in the url isn't sent to the server.

This rev. completely removes the src attribute of img nodes, and
set a 'data-src' attribute with the original src attribute's value,
so that it can still be checked in the tests.

Tests using this attribute have been adapted accordingly.
2018-02-12 11:13:42 +01:00
Raphael Collet 107b82f6e1 [IMP] clean up use of cursors in tests 2018-02-12 10:31:59 +01:00
Raphael Collet 7ea4f13f16 [REF] tests: TestCursor is now a proxy to a real Cursor
This allows rpc requests in `HttpCase` to use the cursor `self.cr`, which is
now shared between the Python test and the rpc requests.  This simplifies code
to prepare a JS test, and code to check the result of a JS tour.

Fixes #12237
2018-02-12 10:31:59 +01:00
Odoo Translation Bot 09923c7bf6 [I18N] Update translation terms from Transifex 2018-02-11 07:05:39 +01:00
Odoo Translation Bot 26468bfaba [I18N] Update translation terms from Transifex 2018-02-11 04:26:28 +01:00
Odoo Translation Bot 0351677a00 [I18N] Update translation terms from Transifex 2018-02-11 00:48:18 +01:00
Christophe Simonis 5f3301e5cb [MERGE] forward port branch 11.0 up to 20e4cd5bcd 2018-02-09 16:13:08 +01:00
Christophe Simonis 4b43803dc6 [MERGE] forward port branch saas-16 up to e2ae51c4b0 2018-02-09 15:02:31 +01:00
Christophe Simonis e2ae51c4b0 [MERGE] forward port branch saas-15 up to 6d0f63ec4e 2018-02-09 12:41:15 +01:00
Christophe Simonis 6d0f63ec4e [MERGE] forward port branch saas-14 up to 9b2d3b19a6 2018-02-09 12:40:16 +01:00
Christophe Simonis 9b2d3b19a6 [MERGE] forward port branch 10.0 up to df3fb9f85a 2018-02-09 12:39:43 +01:00
mreficent aac8f9730e [FIX] base: on_change_country() on res.company should return an ID
Previously, the return value was sometimes an int and sometimes a browse record.
Was PR #22810. Courtesy of Miquel Raïch (Eficent)
2018-02-09 09:53:57 +01:00
Christophe Matthieu 6494f51171 [FIX] base/mail: Added an access_token on the attachments url
The access_token is automatically added by the media editor. It's added
on the website and by the html editor to send by email. The widget display
the attachments from 'ir.ui.view' (public attachment) and the attachment
from the current record.

Issue: can't load image in gmail or mobile because the client mail use a
proxy who avoid ours odoo access.
2018-02-08 11:25:51 +01:00
Prakash Prajapati dfdc06fe43 [IMP] base_settings,...: Improve usability to tend towards a perfect onboarding.
Purpose
=======

Lots of small things could be improved in the general settings (labels to rename, layout issues,...)

Specifications
==============

- auth_oauth: Remove useless title
- base_gengo,  : Fix layout issue due to missing oe_inline class
- base_setup: Modify Inter_company_rule labels
- google_calendar: Remove technical menuitem leading to general settings
- ir_actions_todo, ir_ui_menu, mail_message_subtype: Add a handle widget on the line instead of displaying the sequence
2018-02-08 08:04:10 +01:00
Christophe Simonis bba0bc6ded [MERGE] forward port branch saas-11.2 up to eefca5d492 2018-02-05 17:21:35 +01:00
Christophe Simonis eefca5d492 [MERGE] forward port branch saas-11.1 up to 73610ff992 2018-02-05 16:20:48 +01:00