Commit Graph

92695 Commits

Author SHA1 Message Date
Denis Ledoux a87d60f70f [FIX] warning: no notes parameter in onchange_product_id
This is related to rev. 4606b4535a
2015-02-16 15:07:21 +01:00
Denis Ledoux 30d3f9605f [FIX] purchase: order line description being reset on qty change
Also set name as False for product_id field in the purchase order line form (popup)
This rev. is related to 11bd7a6774
2015-02-16 15:04:22 +01:00
Denis Ledoux 4606b4535a [FIX] warning: onchange_product method signature
Module 'Warning' overwrites onchange_product_id method of purchase.order.line

The signature in the warning module had 'notes', while there isn't any 'notes'
parameter in the original method, in the purchase module.

The super call was also wrong, ignoring the optional fields, which
were therefore always set to the default value
2015-02-16 15:01:12 +01:00
Jeremy Kersten e4030e2016 [FIX] google_calendar: write info on current user with superuser_id
If the user is not admin, it will synchronize always from start, because last_synchro_date cannot be write on res_users
2015-02-16 14:55:22 +01:00
Denis Ledoux 11bd7a6774 [FIX] purchase: order line description being reset on qty change
The name must be changed when changing of product,
but not for other changes, quantity for instance.
The 'or not uom_id' is just for retro-compatibility concerns
uom_id being False actually means we just changed of product,
and the name must therefore be changed
name as been set as False in the onchange call in the view
for the product_id field, in this rev.,
so the name being False now means th change of product
Nevertheless, existing databases for which the view
is not up to date won't have this change
and we therefore have to rely on something else to know
when the product has been changed or not.

fixes #5295
opw-628138
2015-02-16 14:22:15 +01:00
Denis Ledoux d00d90a95e [FIX] web: cached company logo on database change
When having several databases in the login form (not monodb mode),
when switching from one database to another,
if the company logo was different,
the company logo could be the logo of the database you came from.

fixes #5291
opw-628131
2015-02-16 13:34:58 +01:00
Christophe Matthieu 8518a963e0 [FIX] product: if the product has no attribute and you add one without any value, the product is deleted. 2015-02-16 13:22:50 +01:00
Arthur Maniet 32b4ded242 [FIX] account: bank account field of the transactions in a bank statement
- Field is readonly when the statement is closed
- Only bank accounts with the same partner as the transaction or no partner can be selected
2015-02-16 11:55:45 +01:00
Arthur Maniet d1be21dfdf [IMP] account: feature that links bank accounts to partners upon bank statement closing.
Retreive additional informations to write on the res.partner.bank by using the onchange_partner_id, instead of only writing the partner_id
2015-02-16 11:55:45 +01:00
Christophe Matthieu a7e0b73930 [FIX] website: need to add an attribute on html to apply css selector in function of the browser. Fix the media video display for ie 2015-02-16 10:49:28 +01:00
Christophe Matthieu 72c418e6dd [FIX] website_sale: wrong line details in pdf invoice, the invoice line name does not contains the product name 2015-02-16 10:32:39 +01:00
Denis Michiels 8da53f9dec [FIX] account: taxes translated in partner language
Regression introduced during cbe2dbb672
Fixes #5132
opw-627826
2015-02-16 10:20:51 +01:00
Xavier Morel eac831f45b [IMP] doc: allow force-right sections, removing bootstrap class from tables 2015-02-16 09:44:33 +01:00
Jeremy Kersten 9ffa3a5c15 [FIX] google_calendar: force google synchro to be without default notif 2015-02-13 16:11:51 +01:00
Denis Ledoux 3fed8ca58d [FIX] base: Address must stay readonly when field use_parent_address is checked
When you change the country of your company, each field of a company address keeps
its attrs. This is why the company address stays on readonly when use_parent_address
is checked.

Closes #4808
opw: 627033
2015-02-13 16:01:07 +01:00
Denis Ledoux 899acef186 [FIX] payment: unique reference constraint
The payment transactions references must be unique, but for
states within draft, pending, done states, not
if the transaction has been canceled or in error.

Otherwise, this is not possible to create a new payment
transaction for an ecommerce order for which
the payment has been canceled by the acquirer

For instance, when the customer lands on Ogone,
then hit the cancel button

opw-627914
2015-02-13 15:35:35 +01:00
moylop260 88ab3db5f2 [FIX] product: missing default init before using it as dict
This revision bring back the possibility to use the copy method
of product.product without passing parameters

Closes #5236
2015-02-13 15:03:13 +01:00
Jeremy Kersten 7638fe51a9 [FIX] website*: SEO optimizely 2015-02-13 13:51:01 +01:00
Jeremy Kersten aed865aa93 [IMP] google_calendar - synchronize OE alarm with google reminders 2015-02-13 13:51:00 +01:00
Goffin Simon 5b283419d3 [FIX] base: Address must stay readonly when field use_parent_address is checked
When you change the country of your company, each field of a company address keeps
its attrs. This is why the company address stays on readonly when use_parent_address
is checked.

Closes #4808
opw: 627033
2015-02-13 11:35:00 +01:00
Martin Trigaux 20e3f33ebd [FIX] purchase: get supplier from the procurement company
The seller_id field is a related that is read administrator so it would fetch
the first line, whatever the company specified.
Setting related_sudo=False would not be enough as creating purchase orders
through the scheduler makes the computation done as administrator.
Use the company of the procurement (required) to search for a supplier.
If no result, fallback on the first one as before.

Fixes #3833, opw 618809
2015-02-13 15:07:45 +05:30
Géry Debongnie 4e2025719b [FIX] web: viewlist editable use correct record_id in dataset
When clicking on an element in a listview editable, the record_id
is not updated in the dataset, which means that when you switch to form
view, the list view does not display the last selected record.

Also, it should fix the issue solved by PR pull/2725
2015-02-13 10:01:42 +01:00
Denis Ledoux c62be6167a [FIX] website_sale: price overlapping product name
In ecommerce products list view, if the product name was
shorter than the product price, than,
the product price overlapped the product description

Besides, this display: inline-block; has no useful utility
(at least not known), and it should be set in a CSS property
anyway
2015-02-12 16:40:14 +01:00
moylop260 f2ab162d31 [FIX] l10n_mx: Set reconcile=True on receivable and payable accounts
This is necessary to enable reconciliations on these
accounts, and also ensures the residual amount on
invoices will be properly computed.

Closes #5235
2015-02-12 15:08:08 +01:00
Denis Ledoux c9154e08aa [FIX] api: environment recomputation
In a workflow context (for instance, in the invoice workflow),
context is not passed.

Therefore, relying on the 'recompute' key being the context
in order to not recompute the fields does not work with Workflows.

It leads to huge performance issues,
as fields are recomputed recursively (instead of sequentially)
when several records are implied.
For instance, when reconciling several invoices with one payment
(100 invoices with 1 payment for instance),
records of each invoice are recomputed uselessly in each workflow call
(for each "confirm_paid" method done for each invoice).

With a significant number of invoices (100, for instance),
it even leads to a "Maximum recursion depth reached" errror.

closes #4905
2015-02-12 14:57:31 +01:00
Denis Ledoux a67747f77e [FIX] website_quote: duplicate sales order options on order duplication 2015-02-12 14:11:49 +01:00
Denis Ledoux 0e248245dd [FIX] website_quote: prevent to add options to a confirmed order 2015-02-12 14:10:14 +01:00
Christophe Simonis c7648a1026 [FIX] event_sale: data have to be in `noupdate` 2015-02-12 13:20:25 +01:00
Christophe Matthieu 9fbdd2d83d [IMP] website: improve speed of test crawl and load only one slug by route
If they are this routes:
/partner/p-1
/partner/p-2
...
/partner/grade-1/p-1
/partner/grade-1/p-2
...
/partner/grade-2/p-1
/partner/grade-2/p-2
...
We want test only one time the routes:
/partner/p-1
/partner/grade-1/p-1
2015-02-12 12:26:23 +01:00
Christophe Combelles 34d4508535 [FIX] hr_payroll: nicer error message for some bad rule definitions
For example avoids a crash with:

    TypeError: can't multiply sequence by non-int of type 'float'

when setting the quantity field of a salary rule to `1,0`
instead of `1.0`.

Fixes #5154
Closes #5155
2015-02-12 12:23:02 +01:00
Jeremy Kersten 7c751e9243 [FIX] web: insert notification container into the .openerp container
During the refactoring of the web client, the self.$el has been changed
from .openerp to body, so the notification was no more into the .openerp container.
Custom css (eg .highlight) was no more applicated.
2015-02-12 11:57:01 +01:00
Jeremy Kersten 6740cdaff5 [IMP] calendar: change default data for calendar alarm 2015-02-12 11:57:01 +01:00
Jeremy Kersten 8ef8cf7dba [IMP] calendar: use from_string and to_string from new api to convert datetime/string 2015-02-12 11:57:01 +01:00
Jeremy Kersten 064f18e6b6 [FIX] calendar: stop to think that cron will be always on time
Fix error where if no email_from was in openerp.tool.config, notif by mail was not sent
Add optionnal param 'missing' to allow to have missing alarm.

Missing field is the date from the last time that cron had run.
Now we stop to process the next 30 minutes, but we process all alarm since the next cron.
So, an email alarm will be always in delay, but a mail will be sent !

In v8 we use ICP to save the date, but it should be changed in master, maybe we should
save the last execution time in the ir_cron model directly ?
2015-02-12 11:57:01 +01:00
Jeremy Kersten f540c2c586 [FIX] calendar: add missing menu to manage calendar alarm 2015-02-12 11:57:01 +01:00
Denis Ledoux 314a0358b7 [FIX] website_membership: include free members in members page
This is possible to set a partner as a free member
simply by checking the "free member" box, in the partner form

This leads to the fact there is no membership lines for this partner
Before this rev., only partners having membership lines were displayed
on the website members page.
2015-02-12 11:56:08 +01:00
Olivier Dony 3d542b1199 [FIX] CONTRIBUTING:.md emphasize the fact that PRs supersede issues 2015-02-12 11:08:25 +01:00
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