Commit Graph

94123 Commits

Author SHA1 Message Date
Antony Lesuisse c16f65b1dc [CLA] update mailmap 2015-09-08 15:45:09 +02:00
Denis Ledoux ca2fa82aba [FIX] mass_mailing: Select records with Leads / Opps as recipients
`False` is not syntax valid for a domain.
It leads to errors when trying to evaluate `False`
as a domain in the evaluation of `pyeval.js`.

Therefore, using `False` as default value for `mailing_domain`
isn't correct

opw-648857
2015-09-08 15:33:55 +02:00
Raphael Collet 05f176f418 [IMP] ir_ui_view: do not recompute field `model_data_id` on views
The recomputation should not be necessary, as we normally don't change the
record referred by an ir_model_data record.  This speeds up the creation of
ir_model_data records by 33%, which should be noticeable during module
installations.
2015-09-08 14:14:58 +02:00
Goffin Simon ba74cb9144 [FIX] account: Cash registers
In Accounting > Bank and Cash > Cash Registers, when clicking in "More" button
on 'Put Money In' or 'Take Money out', the date used for the bank statement line
created must be the date of the bank stattement(same behaviour then when clicking
on "Add item" in edit mode). It's forbidden to put/take money in/out for a bank
statement which is not open.

opw:647631
2015-09-08 13:16:02 +02:00
Cédric Pigeon 20b5e0a4ab [ADD] base: test to check too long table aliases
Test for rev. 11f538fae6
2015-09-08 11:53:29 +02:00
Thomas Rehn 11f538fae6 [FIX] expression: table alias reaching 64 characters limits
Postgresql has a limit of 64 characters for tables, columns names
as well as for aliases names.

When generating an alias name, e.g. for group by and order
by clauses, if the alias is longer than 64 characters,
use hashing to force the alias length to be within this
64 chars limit.

Fixes #8094
Closes #8142
2015-09-08 11:53:18 +02:00
Denis Ledoux 64e44c0a24 [IMP] base: tests, move patch_order to TransactionCase
In order to be able to redefine simply the order
of a model for testing purposes,
without having to re-define this method in each test class.
2015-09-08 11:53:18 +02:00
Antoine Huvelle 79822ed30a [IMP] account_cancel: "Reset to draft" on cash registers
Complement of the fix 6f355623f0
Adds the button for cash registers as well since the base view is
different than the one for bank statements.

Closes #8410
Closes #8342
2015-09-08 08:11:29 +02:00
Martin Trigaux 10433efcf1 [FIX] google_calendar: export terms
The tutorial was updated at 6bac6ba6 but the terms where not re-exported.
2015-09-07 14:40:34 +02:00
agaldona db6514ea48 [IMP] tools: add language eu_ES Basque / Euskara
As a new translation team has been composed.
Closes #8346
2015-09-07 12:30:06 +02:00
Martin Trigaux f8daf6fb31 [I18N] synchronise Basque and Ecuador translations
They were new languages, needed a manual fetching.
Fixes #8363
2015-09-07 12:26:51 +02:00
Martin Trigaux a3a2f374ff [FIX] sale: onchange always triggered
The product_id_change was always triggered at the creation of a sale order line.
This is due to the 'type' field that is no longer present in 8.0 and makes the
condition to be always verified.
2015-09-07 11:29:59 +02:00
Olivier Dony c345d294b1 [MERGE] Forward-port saas-3 up to rev. 10e6ad1355 2015-09-07 11:18:10 +02:00
Olivier Dony 10e6ad1355 [MERGE] Forward-port 7.0 up to rev. 20f69bbce9 2015-09-07 11:12:57 +02:00
Paul Catinean 20f69bbce9 [FIX] res.users: remove check_super duplication
Closes #8403
2015-09-07 11:07:43 +02:00
Raphael Collet 1c4c64fe01 [FIX] fields: add support for date/datetime null values in field methods 2015-09-07 10:27:34 +02:00
Raphael Collet 1d314962fe [FIX] models: handle the case of `_constraints` with empty list of field names 2015-09-07 09:12:14 +02:00
Odoo Translation Bot 927c00525c [I18N] Update translation terms from Transifex 2015-09-06 01:50:52 +02:00
Nicolas Seinlet 9c8b99acf7 [IMP] website_sale: extract search domain in overwritable method 2015-09-04 17:26:06 +02:00
Christophe Simonis 549c371bad [MERGE] forward port of branch saas-3 up to 7ea9691 2015-09-04 17:15:34 +02:00
Raphael Collet fa427f15b7 [FIX] models: performance of `mapped` is now in O(n) instead of O(n²) 2015-09-04 17:11:57 +02:00
Christophe Simonis 7ea9691e2a [MERGE] forward port of branch 7.0 up to 1cfe191 2015-09-04 17:09:43 +02:00
Goffin Simon ba8ef420eb [FIX] account: Put Money In
When a account.bank.statement.line is created by clicking on "Put Money In"
(Accounting(Menu)>Bank and Cash(Menu)>Cash Registers(Menu)>More(Button)>"Put Money In"),
the account.bank.statement linked to this line must be updated(by passing in the write of
this model) to compute the real closing balance. This fix allow to have the same
behaviour than when a line is manually added (with "Add Item) in an account.bank.statement.

opw:647631
2015-09-04 16:52:40 +02:00
Adrien Peiffer (ACSONE) b429621676 [FIX] hr: Show address doesn't work without always_reload option
The address of the company is supposed to be displayed
in the form view. Without this, it's not the case.

Closes #8373
2015-09-04 16:25:42 +02:00
Adrien Peiffer (ACSONE) a519527c72 [FIX] hr: Set name field translatable
The job name can be displayed on the
website, which can be translated in several
language. It must therefore be translatable.

Closes #8373
2015-09-04 16:25:42 +02:00
Denis Ledoux 50f915f3ac [FIX] models: oversight introduced in 1658bee8d4 2015-09-04 13:27:29 +02:00
Raphael Collet f5e5bbdae0 [FIX] expression: fix search on one2many field with inherited inverse field
Consider the following setting:
 - on model A, field F is computed, stored, and depends on field G
 - on model A, field one2many G to model B, with inverse field H
 - on model B, field many2one H is inherited (_inherits) from model C
 - on model C, field many2one H is stored

When adding records of model B, the field F must be recomputed.  In order to
determine which records to recompute, one searches model A with a domain like
[(G, 'in', ids)].  In expression.py, this is resolved with an SQL query like

    select H from B where id in {ids}

This query fails, since the field H is not stored in model B.  This happens in
general if H is not stored (it may be any computed field).  In that case, one
should instead browse records from B, and read field H through the ORM.

A test case has been added: it introduces a many2one field in a parent model,
and a one2many field using the inherited many2one on a child model.  The test
checks whether one can search on the one2many field.
2015-09-04 13:25:51 +02:00
Denis Ledoux 1658bee8d4 [FIX] models: copy_data call in new API.
Context are frozendict in the new API.
Therefore, they cannot be altered.
Any attempt to alter a frozendict
will lead to a crash.

Fixes #7362
2015-09-04 13:17:34 +02:00
Adrien Peiffer (ACSONE) 67b1be7f57 [IMP] website_hr_recruitment: recruitment form customization
Add the possibility to add some fields on website recruitment form

Closes #8049
2015-09-04 13:08:48 +02:00
Denis Ledoux bd9cbdfc41 [FIX] web: sql constraint translation
The `check` decorator expects the context to be in the `kwargs`
or to be the last arguments of the method.

The `call_kw` route, which is decorated by the `check` decorator,
like every route,
expands its kwargs arguments.

Therefore, once in the `check` decorator,
the context is located in the `kwargs` key
of the kwargs.
(More simply, instead of
`kwargs.get('context', {})`
it's
`kwargs.get('kwargs', {}).get('context', {})`

As the context is not retrieved correctly,
the lang is not set correctly either,
and the sql constraints were not translated.

In 7.0, it worked, because there was a double
check, as the call_kw was called trough an rpc
(`dispatch_rpc`) call,
which was decorated by the `check` as well.

As a fix for 8.0, we apply the same logic,
we perform a double check, with an indirection.

The check decorator should probably be
refactored, but this cannot be done
in a stable release such as 8.0.

Closes #3634
2015-09-04 12:58:00 +02:00
Goffin Simon 64e1c28e35 [FIX] resource: get_working_intervals_of_day
To compute start and end date of a working interval this function replaced
hour in datetime object without taking into account the time zone. The start and end date
taking respectively from calendar_working_day.hour_from and calendar_working_day.hour_to are
in the time zone of the user and the datetime object are compared in UTC to avoid schedule's gap.
This is why the start and end must be converted in UTC after being replaced by these hours.
The tz_info must be removed from dates because it's forbidden to compare naive and aware dates.

opw:648349
2015-09-04 10:01:20 +02:00
Nicolas Lempereur a69af9c908 [FIX] addons: propagate context when get sequence
With 3e82c94d we use the timezone in the context to format date
sequences when formatting an ir.sequence.

This commit adds the other missing context when getting a sequence, so
these sequences are also dependant on the timezone.

closes #8351
opw-646487
2015-09-03 13:58:01 +02:00
Goffin Simon ea2745b866 [FIX] delivery: conversion rate according to the date
When using compute in model "res.currency", the date must be set in the
context to have the right conversion rate.

opw:647799
2015-09-03 11:35:24 +02:00
Nicolas Lempereur ea07b7dc2b [FIX] website: don't escape if embedded html field
We should escape arch ir.ui.view arch content, but we should not escape
embedded html field content.
2015-09-02 18:36:19 +02:00
Josse Colpaert 56a6483477 [FIX] stock: inventory filters check used the wrong groups 2015-09-02 18:21:31 +02:00
Matthieu Dietrich 1cfe1910db [FIX] account: Remove superfluous bracket for analytic account domain
With the bracket in place,
the domain does not consider the last part,
"('state','not in',('close','cancelled'))".

Closes #3714
2015-09-02 14:10:19 +02:00
Goffin Simon c3b847daa8 [FIX] delivery: total passed to get_price_from_picking
The total used to check which delivery.grid.line to apply must be in
the currency of the company because the delivery.grid.line records with
variable == Price are expressed in the currency of the company.

opw:647799
2015-09-02 12:17:01 +02:00
matt454357 f243a01795 [FIX] hr_timesheet_sheet: Attendances & timesheets timezone
When creating timesheet,
default from-date and to-date are adjusted for user timezone.
Fixes #3627

User timezone considered when assigning attendance records to timesheet
Fixes #3628

Closes #3632
2015-09-02 11:48:55 +02:00
Lionel Sausin a0d44f9952 [IMP] update the expiry dates when changing the product
Written in the new API even though the rest is in the old API, because otherwise we'd have to add an onchange in the views which may be a problem for existing custom modules.

We want this behavior because previously, in some cases the default values were only added at create() time, ie. possibily when the users close the pop-up, so they may never have an opportunity to see and adjust the default.
2015-09-01 18:04:45 +02:00
Denis Ledoux 3c0fe940aa [FIX] google_calendar: force internal id only on creation
This rev. is related to 1c533b193f

The reason why we force the event Google internal id is
explained in the above commit.

Forcing the internal id must be done only when creating the
event in Google, not when updating, for retro-compatibility:
if the event is already in the attendee calendar, with a different
internal id then the other attendee, we must leave it like this,
otherwise Google will be lost.
2015-09-01 17:36:52 +02:00
Denis Ledoux 1c533b193f [FIX] google_calendar: events disappearing
This rev. is related to a9e3d74713

This new revision is about the same use case than above, except
that both Google users login doesn't match the Odoo login email.

e.g.
User A: A@agrolait.com in Odoo, A@gmail.com in Google
User B: B@agrolait.com in Odoo, B@gmail.com in Google.

When A creates an event, with B in the attendees, and
syncs his calendar to Google, B is not automatically invited
Google side, as his attendee email is B@agrolait.com, which
doesn't match any existing Google User (doesn't match B@gmail.com)

While the revision mentioned above, a9e3d74713,
expected the attendee to be automatically invited Google side, and therefore
expected the event to already exists in B's calendar.

Therefore, when B syncs his calendar in Odoo, as the event
was there in his Odoo calendar, but not in his Google Calendar,
the code actually think it's no - longer - there, and take the assumption
the event has been deleted Google side. So, it deletes the event
in Odoo side as well, for both users A & B.

To overcome this new issue, when the Google & Odoo users emails
do not match, while keeping the compatibility when the Google & Odoo
emails do match (and therefore the invitation is automatically sent
Google side, as the email matches an existing Google account, and
the event is automatically created in B's calendar without needing the
sync in Odoo), we now force the Google internal id to be the same
for all attendees of an event, event by Google side.

opw-645745
2015-09-01 17:15:43 +02:00
Denis Ledoux b8f630e59f [FIX] stock_account: context could be None
In the use case of a mrp repair ending, the
context when calling `_store_average_cost_price`
is None

opw-648254
2015-09-01 16:18:10 +02:00
Thomas Rehn 0fb00808b2 [FIX] account_bank_statement_extensions: lines confirmation
Confirm lines of account cash statement on closing

The `account_bank_statement_extensions` adds
a state field to account.bank.statement.line
and sets the status to 'confirm'
when a bank statement is closed.

When a cash statement is closed,
the lines remained in draft.

Closes #3584
2015-09-01 12:41:20 +02:00
Goffin Simon fdd08a8b4b [FIX] account: closed period in test
The period used to make the test must be closed.
2015-09-01 12:05:29 +02:00
Commandant Custo f26df86ea9 [FIX] portal_sale: fix default domains
Quotations/Sales orders menu in the portal must copy the behavior
of the menus in the regular back-end.
Backport of e5c5b1cc23

closes #8271
opw:648186
2015-09-01 09:58:41 +02:00
Commandant Custo e5c5b1cc23 [FIX] portal_sale: fix default domains
Quotations/Sales orders menu in the portal must copy the behavior
of the menus in the regular back-end.

closes #8271
opw:648186
2015-09-01 09:35:39 +02:00
Ravi Gohil 0c1e97895a [FIX] server: missing format string argument.
Introduced by 099ae0f70c

Closes #3356
2015-08-31 17:55:00 +02:00
Olivier LAURENT 017688cc29 [FIX] models: old api, prevent infinite recursion in stored function fields
The risk was introduced by b7f1b9c.
IF _store_set_values() recall another _create() or _write(),
the recomputation mechanism enter in an infinite recursion
trying to reevaluate for each call exactly the same fields
for the same records than the previous one

This revision replaces the loop of _store_set_values()
by 2 nested loops:

 - that not breaks the entire consumption
   of recompute_old queue
   (Tested thanks to revision a922d39),
 - that allows to clear the queue
   before each recomputations bundle fixing thereby the recursion

Closes #7558
2015-08-31 17:45:21 +02:00
Denis Ledoux 408ac6a5f0 [FIX] hr_timesheet_invoice: on_change_account_id expects context instead of user_id
This is related to 12c1993e03
2015-08-31 15:22:11 +02:00
Pedro M. Baeza 12c1993e03 [FIX] hr_timesheet_invoice: Call super on on_change_account_id of hr.analytic.timesheet
`hr_timesheet_invoice.py` overrides `on_change_account_id`
of model `hr.analytic.timesheet`.

The super call wasn't done, probably because this on_change
method in the base model was trivial:
`return {'value':{}}`

Nevertheless, if another module overrides this on_change,
according to the module dependences,
this method could have been called first in the calling chain,
discarding the changes from the other overriden
`on_change_account_id` methods, preventing
any customization in this on_change according to the
current database state.

Closes #8248
2015-08-31 14:25:07 +02:00