Commit Graph
117975 Commits
Author SHA1 Message Date
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
Yannick Tivisse 77fa9220d3 [FIX] l10n_be_hr_payroll: Remove warrants values on payslips
Purpose
=======

The warrants are not displayed on the same payslip than common salaries, and therefore it is confusing to see all the different concepts matched into the same payslip.
2018-02-19 14:56:18 +01:00
Yannick Tivisse 5d2217004a [FIX] l10n_be_hr_payroll: Update the warrant computation
Purpose
=======

Currently the warrant computation was made under a wrong basis.
2018-02-19 14:56:18 +01:00
Simon Lejeune 97ed2e730e [FIX] purchase, sale_stock: propagation of UOM
Before this commit, the uom defined on the sale order line and on the
purchase order line was propagated to the moves. This is not the
behaviour of v8-10 and may confuse the stock operator (one time he's
working in dozen, another time in units for example). It also leads to
rounding issues if the configuration is not adapted correctly (product's
uom is in units, sale order line is in dozen, the rouding precision on
the uom is left to their defaults, now if a dozen is partially available
there's a good chance converting back and forth form dozen to units will
break).

An ir.config_parameter was added to restore the behaviour before this
commit.
2018-02-19 14:29:09 +01:00
qsm-odoo de62e33618 [FIX] calendar, event: do not send emails to canceled attendees
Backport of https://github.com/odoo/odoo/commit/cf753a7fdf1739dcf37d2ad74f4c8efb3d4ff3b3
(it was finally considered as a real bug to fix in stable versions
from 10.0).

opw-769955
opw-814459
Closes https://github.com/odoo/odoo/pull/22882
2018-02-19 14:27:29 +01:00
Marius Stedjan 657fe7da71 [CLA] signature for willmakenoise
Closes #22946
2018-02-19 13:46:50 +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
Ward Marissen 52f3a5ecc4 [CLA] signature for Ward Marissen
Closes #22841
2018-02-19 13:44:03 +01:00
Subodh Dahal 668a090df3 [CLA] signature for SubodhDahal
Closes #22970
2018-02-19 13:42:03 +01:00
Olivier Sarrat d504027bfa [CLA] signature for osarrat
Closes #23113
2018-02-19 13:39:50 +01:00
Christophe Simonis da881b0bd2 [MERGE] forward port branch 9.0 up to 5d086cea9b 2018-02-19 13:25:05 +01:00
Xavier Morel f1143b4073 [FIX] doc: tokenization of nested generics in JS docstrings
With more than 1 level of generic type, the "closure" of generic
parameters would get tokenized by python as a single right shift (>>)
rather than two gt (>, >) leading to our own tokenizing pass getting
lost and blowing up.

Fix by explicitly recognizing and splitting (>>) into (>, >). We could
consider writing the entire tokenizer ourselves instead of
post-processing Python's but given the entire post-processing function
is currently shorter than just Pythons' tokenizer's regexes...

Anyway issue found by vsc while trying to write better docstrings.
2018-02-19 13:22:58 +01:00
Aaron Bohy 8aec3c9128 [FIX] web: WebClient: edit company data
Before this rev., a traceback was raised when the user tried to
edit the company data, by clicking on the company logo in the
submenu (community edition only). This was due to code not being
converted after the ActionManager refactoring of 7b6056a0.

Also ensures that the logo is properly reloaded by specifying the
timestamp in the img url as a query string parameter instead of an
hash param, since changing the hash doesn't seem to be enough to
fool the browser's cache anymore.
2018-02-19 13:05:36 +01:00
qsm-odoo 57c99a690c [FIX] sales_team: properly show group-by-week graph data for 2018 year
Since the new year, the graphs in sale dashboards were not displayed
properly when grouped by week. This was because the computation of the
number of weeks in 2018 gave "1" as a result as this was got from the
week number of 31/12/2018 which is in fact in the first week of the
ISO year 2019.

This commit solves the problem by using the 28/12/xxxx which is always
in the last week of ISO years.

opw-816758
2018-02-19 12:10:41 +01:00
David Arnold 5d086cea9b [FIX] rpc: correctly handle xmlrpclib.Fault
The error string was always missing, despite being provided.

Backport in #22276 courtesy of Yenthe V.G

Fixes #13111
Closes #21741
Closes #22276
2018-02-19 11:15:04 +01:00
David Arnold ca36c0542c [CLA] signature for XOE and blaggacao
Backport of de803378f1 from 10.0,
in order to allow PRs in 9.0

Closes #19210
2018-02-19 11:15:03 +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
RomainLibert 05bb9848a2 [IMP] resource: add time_type field on resource.calendar.leaves
We would like to have an overview of project forecast that include
leaves, for this we need to implement several kind of 'leaves' directly
in resource module.

These kind of 'leaves' can be defined via the hr.leave.type model (only
visible in base.group_no_one (choices currently are 'leave' and 'other')

    * Add field time_type on resource.calendar.leaves
    * Add a domain restriction that allows for filtering on this field
    * Add tests
2018-02-19 10:43:25 +01:00
RomainLibert 6d870463d0 [IMP] resource: Add possibility to pass in a domain
It will enable to retrieve data from the resource module based on a
domain that we pass to the model. It can be used in order to filter on
certain leave types only.

  * In resource_mixin and resource add a way to use a domain in order to
  filter the leaves
  * In resource_mixin add a method to get the work/leaves hours count
2018-02-19 10:43:25 +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
tbe-odoo 825180867a [FIX] hr_holidays: Remove related on employee's department
- In SaaS-16 we have added a related on the employee's department.
    This causes access rights issues when changing the employee's department.
    We do not want to rewrite all the old records, only the new ones should use the new employee's department.
2018-02-19 10:39:04 +01:00
Goffin Simon 5c1f025a42 [FIX] sale_timesheet: Field Invoicing Policy in Product Variants not saved correctly
When a product variant from Catalog > Product variant was created
with invoice policy = 'delivery', it was set as 'order'.

opw:815112
2018-02-19 10:24:36 +01:00
Arnold Moyaux e242ee5f74 [FIX] stock: log activity with SO without line
Use case to reproduce:
- Install sale_stock
- Create a SO
- Cancel it
Traceback

It happens because _log_activity_get_documents need at least
one entry in the dict orig_obj_changes.
2018-02-19 10:18:00 +01:00
Kishan Gajjar 90e8da9b4f [FIX] portal: It ask to login even if user already logged in
- options inside the template will not be correct if we set options in start method(template already loaded when start is call), for the correct value of options inside the template we must set it inside willstart

(PR  #22751)
2018-02-19 10:09:08 +01:00
David Arnold 906a9af8f2 [FIX] bus: set timeout to gracefully recover
Before this in the event of a network failure that lasts longer than the respective return cycle of the deferred call,
this deferred will keep in purgatory forever (until reload of the client).
This is not problematic in the normal use case, but working with offline modules, such as POS or similar making use of the
long polling concept for synchronization purposes, this generates toxic behavior.
Simply: The client state never recovers on it's own from the network failure

(PR #21653)
2018-02-19 10:05:50 +01:00
David Arnold 59202d5e8c [FIX] bus: set timeout to gracefully recover
Before this in the event of a network failure that lasts longer than the respective return cycle of the deferred call,
this deferred will keep in purgatory forever (until reload of the client).
This is not problematic in the normal use case, but working with offline modules, such as POS or similar making use of the
long polling concept for synchronization purposes, this generates toxic behavior.
Simply: The client state never recovers on it's own from the network failure

(PR #21653)
2018-02-19 09:59:01 +01:00
XavierDo 813065cb5b [IMP] mail: add settings button on channels
The settings of a channel were available in debug mode only. Adding a settings button on each channel allows to read/edit a channel settings easily.

Remove the unsubribe button and the settings button from the top of the page since they can be acceses another way now.
2018-02-19 09:48:38 +01:00
Xavier Morel 965f492018 [FIX] website: don't include empty keyword & description metas
Apparently, SEO audit thingies (possibly google's own? unclear) don't
ignore *empty* keyword or description meta tags, then complain that
they're duplicated (there's a use case for SQL-like nulls).

So remove the keyword & description metas entirely if the
corresponding fields are empty.

OPW-815492
2018-02-19 09:47:28 +01:00
Jordi Ballester Alomar 5404b8b4e7 [FIX] doc: update default values
limit_memory_soft and limit_memory_hard had values default different that the
ones written in the documentation

Introduced at 3ef93918a

Closes #23131
2018-02-19 08:52:14 +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
Joren Van Onder f76cc095b8 [FIX] point_of_sale: fix the behavior of default fiscal positions
Issue 1) and 3) in 73f7567627 still
occured in 11.0. It seems this was not fully forward-ported, most
likely due to conflicts caused by
ac89783d2f.

opw-782855
2018-02-16 13:48:59 -08:00
Aaron Bohy ff019aa52f [FIX] web: BasicModel: onchange on X2M: handle command 6
Before this rev., when an onchange returned a command 6 for an
x2many field, it was completely ignored by the BasicModel.
2018-02-16 14:28:50 +01:00
Aaron Bohy cf03101447 [FIX] web: BasicModel: fetch nested x2manys after onchange
When onchange RPCs return a command 4 (LINK TO), the res_id of the
record to link is given, and the BasicModel has to read the fields
in the view for that record. When one of those fields is an x2many
(for instance, displayed with widget many2many_tags), the
subrecords in the relation must be read as well (at least their
display_name).

Before this rev., this last part wasn't done by the BasicModel, and
as a consequence, the many2many_tags widget was always empty, even
though there were records in the relation.

Same thing applied to reference fields, but this is way more
uncommon.

This rev. ensures that x2manys and reference fields are correctly
fetched in this scenario.
2018-02-16 14:28:50 +01:00
Christophe Simonis 0017902733 [MERGE] forward port branch saas-16 up to 675a876347 2018-02-16 13:58:16 +01:00
Christophe Simonis 675a876347 [MERGE] forward port branch saas-15 up to 3a25ff6ccd 2018-02-16 13:57:38 +01:00
Christophe Simonis 3a25ff6ccd [MERGE] forward port branch saas-14 up to 67cc7a7c26 2018-02-16 13:57:03 +01:00
Christophe Simonis 67cc7a7c26 [MERGE] forward port branch 10.0 up to dce265e8fe 2018-02-16 13:25:38 +01:00
xmo-odoo dce265e8fe [FIX] stock_account: typos causing errors
OPW-816769
2018-02-16 13:22:12 +01:00
xmo-odoo 06b565e942 [FIX] stock_account: typos causing errors
OPW-816769
2018-02-16 12:49:29 +01:00
Olivier Colson a42ee08676 [FIX] stock_account: use correct rounding for anglosaxon accounting's price difference line generation
These data are expressed in invoice currency, they must be rounded accordingly.
2018-02-16 12:41:48 +01:00
Alexandre Kühn b09f0c99be [FIX] web: discard new record with empty required field
Before this commit, there is an issue with one2many lists with records that
have been created on 'default_get': if the record has a required field that
is empty, when the user clicks on this empty required field and then somewhere
else, the record is removed from the list.

The cause of this bug is that these records have invalid field changes, here
the required field that is empty. As a consequence, it checks whether the
record is "new", and if so, removes it visually from the editable list.
(Note: a record is "new" when it is not stored in DB).

This behaviour is expected when discarding records created from "Add an item".
However, that is not intended for records that have been created as default
items of the list. These records are still considered as "new"  items, because
they are not stored in DB, but they should stay in the list on discard.

This commit solves the issue by making an additional check before assuming
that the record for which we discard changes comes from "Add an item":
if the record in the list has been created before user interacts on the list
(in other words, the record has been added in the list when the user accesses
it), then we should not remove the record from the list, even though the record
has some invalid fields from the savepoint (e.g. empty required).

opw-806650
2018-02-16 11:17:36 +01:00
Alexandre Kühn aa8745f1a8 [FIX] web,*: various nocontent helper fixes
* account, board, hr_holidays, mail, sale, website_sale

Small fixes on nocontent onboarding screens.

Initial commit: https://github.com/odoo/odoo/commit/a87d761fdbf345ada5dc93e0a686b08a0f5a0417

Details:

- list: centered;
- pivot/graph: centered + empty folder face;
- Dashboard app with nocontent helper;
- Discuss inbox/starred: centered without neutral/smiling faces;
    => no faces because it's too much with animated
       rainbow man when emptying the any of the boxes.
- hr_holidays: fixed onboarding screens;
- (technical) dropped obsolete 'o_view_nocontent_container' style;
- manual reconciliation 'nothing to reconcile': centered + inside form sheet;
    => renamed account's o_view_nocontent to o_view_noreconciliation,
       so that it doesn't use the style of views.less.
- kanban: nocontent helper above the columns (if any);
- texts "no order to upsell"/"abandonned cart" paragraph split in two.
2018-02-16 10:23:01 +01:00
David Arnold fcaf459a89 [FIX] account: aged partner report in multi-company.
Was PR #23074. Courtesy of David Arnold
2018-02-16 10:03:30 +01:00
Joren Van Onder e5c6c5db42 [FIX] stock_account: correct forward-port 251b2fdc
5ca0ef97 was forward-ported from 9.0. In 10.0 the function signature
of product.uom's _compute_price has changed. In 10.0 it uses the new
API and it no longer takes a to_uom_id keyword argument.

opw-816738
2018-02-15 15:42:31 -08:00
Romain Derie 4f418c26d5 [FIX] website: sitemap.xml incorrect domain
Before this commit, the domain use to retrieve pages in enumerate_pages was
wrong (mainly used for sitemap.xml). It would only show website.page that:
1. are published
2. are indexed
3. have a publishing date (whatever date, future or past).
Last point was incorrect

Now, we correctly retrieve pages that:
1. are published
2. are indexed
3. have no publishing date or a publishing date in the past
2018-02-15 23:13:50 +01:00
Christophe Simonis ac7abc9879 [MERGE] forward port branch saas-16 up to 7e42a21ee2 2018-02-15 19:40:21 +01:00
Christophe Simonis 7e42a21ee2 [MERGE] forward port branch saas-15 up to d952e3678b 2018-02-15 19:36:09 +01:00