Commit Graph

92558 Commits

Author SHA1 Message Date
Denis Ledoux ee8919af84 [MERGE] forward port of branch saas-3 up to fe8845a 2015-02-12 11:05:00 +01:00
Denis Ledoux fe8845ade6 [MERGE] forward port of branch 7.0 up to 0b5271e9 2015-02-12 11:04:36 +01:00
Denis Ledoux 0b5271e90d [FIX] account: always use a copy when altering a context
To avoid wrong context propagation
2015-02-12 11:03:54 +01:00
Josse Colpaert 30b5285c9d [IMP] Add composite indexes for stock_move and stock_quant and do manual query for history_ids when splitting quants to avoid unnecessary full table scan on stock_move
[IMP] Improve indexes

[IMP] history_ids opti

[IMP] Clean and document

[IMP] Clean
2015-02-12 10:08:29 +01:00
Josse Colpaert d42af010ce [IMP] Do manual query in search for negative quants to avoid ORM ordering by id and as such always using the wrong index
[IMP] Simplify code

[IMP] Negative quant search should include child locations also

[IMP] Comment

[IMP] Could be child_of also
2015-02-12 10:08:29 +01:00
Christophe Simonis 33a8989d77 [MERGE] forward port of branch saas-3 up to d73eeab 2015-02-11 16:40:01 +01:00
Christophe Simonis d73eeab5ba [MERGE] forward port of branch 7.0 up to 9fe040e 2015-02-11 16:39:11 +01:00
Denis Ledoux e92e633e64 [FIX] google_account: sync of event deleted google side
When creating and deleting (disabling, actually)an event without syncyng with google,
this is possible that Google returns a 404 status page,
meaning the event we are trying to delete google side do not exist.

We can safely ignore these 404 pages, as the event are not anymore existing
in Odoo side either

opw-627767
2015-02-11 15:20:17 +01:00
Raphael Collet 13b36ac677 [IMP] fields: in selection fields, 'selection_add' only adds options not in selection yet 2015-02-11 13:31:17 +01:00
Denis Ledoux 9fe040e592 [FIX] account: invoice analysis residual amount
When having an invoice with multiple lines having the same
product_id and account_id, the residual amount was wrong.

This is due to the fact the residual amount of each line
was computed on the residual amount of the invoice divided
by the number of lines of the invoice, and the fact the main
select of the sql view was grouped by product_id, account_id.

So, for an invoice defined as
Product Account Total
A       1       10
A       1       10
B       1       10

The invoice analysis, grouped by product, account, computed
Product Account Total   Residual
A       1       20      10
B       1       10      10

The residual amount '10' of the first line being
30 (the residual amount of the invoice)
divided by 3 (the number of lines in the invoice)

The residual amount of the invoice should actually be divided by
the number of lines in the invoice * the count
of occurences in the group by clause
So, in this case, (30 / 3) * 2 = 20

Replacing the big jointure by
SELECT count(*) FROM account_invoice_line l where invoice_id = ai.id
to get the number of lines in the invoice
is just an optimization for performances

opw-621672
2015-02-11 13:10:54 +01:00
Géry Debongnie 2d524c947c [FIX] web: editable lists and read only fields bug
when the user press tab in editable list views, the focus is supposed to
go to the next cell unless it is at the last cell of the line.  in that
case, it is supposed to create a new record.

Sadly, when the last cell is readonly, this does not work.  This commit
make sure that read only fields are properly ignored when computing the
last_field state.
2015-02-11 12:46:13 +01:00
Raphael Collet 75ca4f8b71 [FIX] models: in onchange(), do not assign field 'id' on record 2015-02-11 12:45:18 +01:00
Raphael Collet 3a44d84b0f [FIX] models: inherited fields must be copied iff their original field is copied
This fixes a bug introduced by commit f650522bbf
(related fields should not be copied by default).  Inherited fields are a
particular case, and given the implementation of copy(), they must be copied if
their original field is copied.

The test on copy() in test_orm has been modified to show the bug.
2015-02-11 12:23:11 +01:00
Stéphane Bidoul 9d167ea7b3 [CLA] Acsone (fix emails)
Closes #5217 (again)
2015-02-11 12:15:41 +01:00
Stéphane Bidoul 71e3b2d624 [CLA] ACSONE signature of Corporate CLA 1.0
Closes #5217
2015-02-11 11:06:16 +01:00
Olivier Dony ea9a162a5e [FIX] mailmap for Tech Receptives 2015-02-11 11:03:12 +01:00
Parthiv Patel 95aaea3a73 [CLA] Tech Receptives
Closes #5200
2015-02-11 11:01:06 +01:00
Raphael Collet ac0eec6c99 [IMP] models: in recompute(), only save stored fields to database 2015-02-11 10:49:17 +01:00
Olivier Dony 601954f5d4 [FIX] mailmap for Serpent CS contributors
New entries for distinct persons as employees
of Serpent CS and as employees of TinyERP Pvt Ltd.
2015-02-11 10:32:19 +01:00
Serpent Consulting Services Pvt Ltd 32a39b3a3c [CLA] Serpent Consulting Services Pvt Ltd.
Closes #5206
2015-02-11 10:31:50 +01:00
David Monjoie 88349d0fab [FIX] point_of_sale: added date_done field value on generated stock.picking
Fix for Issue 627561 (5169 on Github)
2015-02-11 10:23:02 +01:00
ma78nee 8f7b60903f [CLA] copadoMEDIA UG
Closes #5214
2015-02-11 10:20:41 +01:00
moylop260 9ec5529ac1 [FIX] product: avoid duplicate product ref in demo data
Closes #5142
2015-02-11 10:14:35 +01:00
Raphael Collet 2eb3ad2b46 [FIX] res_bank: fix onchange_partner_id(), where partner_id may be a NewId 2015-02-11 09:29:51 +01:00
Raphael Collet 6cf7bc8838 [FIX] models: invoke old-api onchange methods with context
This helps fixing old-api onchange methods with a record id as a parameter.
Browsing this record id may be problematic, since it reads the record in an
environment with an empty context.  This is really problematic when the record
is a new record, because such a record only exists in a given environment.
2015-02-11 09:29:51 +01:00
Josse Colpaert 73899fd2dd [FIX] Store for moving package with inner packages. Further Fixes #5125
[IMP] Search quant instead of underlying packages
2015-02-10 17:46:49 +01:00
Denis Ledoux 08888b21b8 [MERGE] forward port of branch saas-3 up to 48f527b 2015-02-10 15:32:20 +01:00
Denis Ledoux 48f527b860 [MERGE] forward port of branch 7.0 up to 368c674 2015-02-10 15:31:51 +01:00
Julien Laloux 368c674a9b [FIX] account_followup: formatted user language date in followup text
When using %(date)s in the follow-up text in the follow-up levels configuration
the date was formatted within server date format
instead of the partner language date format.

Closes https://github.com/odoo/odoo/pull/5168
2015-02-10 15:26:57 +01:00
Alexandre Fayolle 0e1deed63b [FIX] purchase: typo in commit 675357b + add coverage test
Closes #5193
2015-02-10 14:51:18 +01:00
Anton Chepurov 7b9ff1be72 [CLA] Anton Chepurov
Closes #5185
2015-02-10 14:27:41 +01:00
Antony Lesuisse af3a8ada58 [FIX] hw_escpos copyright notice
In v9 we will plan remove the lib and replace it by an optionnal import.
2015-02-10 14:24:54 +01:00
Martin 3cf45e1111 [FIX] hw_escpos: Backport driver robustness 2015-02-10 13:24:59 +01:00
Raphael Collet 2067a206ec [FIX] models: process onchange methods on new records in the order of the view
The onchange() on new records processes fields in non-predictable order.  This
is problematic when onchange methods are designed to be applied after each
other.  The expected order is presumed to be the one of the fields in the view.

In order to implement this behavior, the JS client invokes method onchange()
with the list of fields (in view order) instead of False.  The server then uses
that order for evaluating the onchange methods.

This fixes #4897.
2015-02-10 13:12:40 +01:00
Denis Ledoux 372f4a82d5 [FIX] account_followup: set lang for each partner
So dates are formatted using each partner language date format
2015-02-10 12:37:58 +01:00
Leonardo Pistone 0715a408e8 [FIX] stock: propagate owner from pack to stock operation
Using pack instead of picking for more precise tracking of the owner.
Fixes #5165
2015-02-10 16:53:07 +05:30
Olivier Dony c67431f126 [FIX] mailmap for parent commit 2015-02-10 12:14:57 +01:00
Joël Grand-Guillaume 3be46240ca [CLA] Corporate CLA for Camptocamp team
Closes #5190
2015-02-10 12:06:35 +01:00
Denis Ledoux c718661ba8 [FIX] hr_timesheet_sheet: default product in analytic lines
The module analytic_user_function allows to define a specific product
to use, when creating timesheet activities for a specific employee
with a specific contract

Nevertheless, the product was not set accordingly to this feature
for the first timesheet activity, because,
when initilialing the timesheet line,
the on_change_account_id, which returns
the product to use according to the user and contract, was called
without passing the user.

Besides, by default, on_change_account_id does not have a user_id parameter,
this parameter is added by the module analytic_user_function, overriding
this onchange, and adding a new user_id parameter (which is not a good pratice).

We therefore use multi_on_change_account_id, which allow to pass the user_id,
within the context
2015-02-10 11:54:55 +01:00
Martin Trigaux 3c3f54549a [FIX] account: typo in 45485fe
My bad, blame the heat
2015-02-10 14:11:08 +05:30
Alexis de Lattre 45485fe1d6 [FIX] account: multicompany with currency rates
A record rule exists on currencies but not on rates.
If creates multiple currencies with rate = 1, we could fetch the wrong one in
the search and get a security exception while trying to convert rates.
Fixes #3323, opw 626353
2015-02-10 14:06:29 +05:30
Raphael Collet a11100adb8 [FIX] fields: new-api many2many fields always determine their table and columns
The mechanism to determine the table and column names of new-api many2many
fields only worked for many2many fields created from old-api many2many columns!

This fixes #4851.
2015-02-10 09:21:12 +01:00
moylop260 028458a87f [CLA] vauxoo
Closes #5178
2015-02-09 22:15:30 +01:00
Kiril Vangelovski ea60fed97a [FIX] tools.translate: use `request` to find `cr` and `lang` when other methods fail
Do it only after other direct methods fail,
to avoid ignoring a closer environement coming
from a calling frame.

+ Sign CLA

Closes #5148
2015-02-09 20:21:10 +01:00
Csaba Tóth a8b88e4dd4 [CLA] i3 Rendszerház Kft.
Closes #5175
2015-02-09 18:26:17 +01:00
Denis Ledoux 534d4e3e07 [MERGE] forward port of branch saas-3 up to a8fdc60 2015-02-09 17:58:28 +01:00
Denis Ledoux a8fdc60b88 [MERGE] forward port of branch 7.0 up to 1d76586 2015-02-09 17:57:39 +01:00
Denis Ledoux 1d76586a1b [FIX] web: context lang & active* in action buttons
This reverts rev. 9f9e7ef0e1

As explained in 9f9e7ef0e1,
if a field "lang" is present in the view, clicking in any action item
in the more menu leaded for the action title to be translated
in the lang value of the form, such as in the partner form.

9f9e7ef0e1 fixed the issue,
but has as side-effect to not update correctly the active* keys.
So, if "active_id" was used in the context of the action button,
and the active_id was set in the dataset context, for example
because you come from another form, trough another action button
(For instance, Customers > Opportunities > Logged Calls),
the active_id was not updated with the current id of the record.

opw-620293
opw-617321
fixes #3462
2015-02-09 17:53:11 +01:00
Adrien Peiffer (ACSONE) 675357b7d7 [FIX] purchase: propagate analytic accounts when invoicing on incoming shipments
Closes #5127
2015-02-09 16:31:19 +01:00
Denis Ledoux ca7036776d [FIX] web: do not apply default_order if list grouped
If the list view is grouped (with a groubpy filter),
the default order must always be the order of the groupby
2015-02-09 14:44:45 +01:00