Commit Graph

93407 Commits

Author SHA1 Message Date
Alexandre Laidin 39d7322274 [CLA] iris-solutions 2015-04-30 09:21:55 +02:00
Olivier Dony caf333eb59 [FIX] account.invoice.report: performance problem in currency rate computation
The SQL view implementing the "Invoice Analysis" report
JOINs the res.currency.rate table in order to obtain the
correct currency rate to convert each invoice line amount
in the same currency.

The matching of the rate needs to be done on the date
of that rate (`name` column) - the last rate preceding
the invoice date is presumed to be the right one.
However there is no simple way to make a direct JOIN between
account.invoice.line and res.currency.rate with a single
match, without using an ORDER BY clause and LIMIT 1.
This requires a costly SUBSELECT query for each invoice
line, quickly becoming prohibitive.

Through the use of PostgreSQL's Common Table Expressions
(CTE) it is possible to construct a temporary table
with the rates' start and end date of application.
This temporary table can then be used in a direct
JOIN with account.invoice.line, delivering much better
performance (no SUBSELECT needed for each invoice line)

On a database with 50k invoice lines this makes invoice
analysis return results in less than 800 ms instead of
10+ seconds.
2015-04-30 00:20:12 +02:00
Denis Ledoux f2f4391e8b [FIX] account_followup: partial overdue payments
This is related to rev. ab9f02cdee

The above rev. take care to exclude payments that are not yet due;
meaning the ones due in the future, by checking the maturity
date.

Problem: Payments (e.g. move lines from bank statements)
do not have a maturity date. Only move lines that actually
have a maturity date, in the future, must be excluded,
not the one that do not have a maturity date.

opw-633930
2015-04-29 17:45:02 +02:00
Martin Trigaux 6e25d6e589 [FIX] stock: better recomputation of pack operations
Revert c06a96 "[FIX] stock: force recomputing transfer information on picking"
and unlink packoperations only when move lines are changed (fix opw 620636).

c06a96 introduced a regression as it prevents to plan moves (e.g. assigning lots
through the barcode interface) before the reception.
2015-04-29 17:36:20 +02:00
Nicolas Martinelli fa01054ae0 [FIX] delivery: delivery price uses pricelist currency instead of company currency
opw-632574
2015-04-29 17:17:20 +02:00
Jeremy Kersten aea358ca67 [FIX] website: ir_http - auto redirect for lang, use cookies to save pref language
Save in cookie the last lang selected to allow to stay consistent at the next visit from visitor
2015-04-29 14:19:52 +02:00
Alejandro Santana db44db8edb [FIX] crm_profiling: answers order in view.
colspan on separator is ignored so the answers are not grouped
Fixes #6226
2015-04-29 13:50:11 +02:00
Mohammad Alhashash a6a3db3188 [FIX] account: custom '_where_calc' method instead of 'search'
The domain on account.account was preprocessed in search method but it had no
effect on read_group. This lead to inconsistency or errors when using 'goup by'
filter.

Move domain processing in '_where_calc' method instead as this is used by both
'search' and 'read_group'.
2015-04-29 11:17:47 +02:00
Goffin Simon ec47493f46 [FIX] website: edit menu
when closing a modal, the class 'modal-open' was removed from the
'body' tag and all the existing modals became not scrollable.
The class 'modal-open' must be kept in the 'body' tag if there is
still a visible modal in the dom.
Inspired from commit: dee000be14

opw:633801
2015-04-29 11:09:51 +02:00
Mohammad Alhashash 717a695317 Revert "[FIX] account: remove journal_id from account domains"
This reverts commit 24526b18a7.
The journal_id field is not present on account.account but is processed in
search method.
Next commit will improve the processing to also accept journal_id in read_group.
2015-04-29 11:06:29 +02:00
Sylvain Calador fa18530210 [REF] Add a hook for import fake fields
Used during records extraction phase of import (CSV)

closes #6188
2015-04-29 10:42:56 +02:00
Christophe Matthieu e9c3336003 [IMP] website: improved tours error message and race conditions 2015-04-29 10:25:20 +02:00
Nicolas Lempereur 21e65ae3c6 [FIX] website_blog: don't add background from backend
Adding an image from the frontend use ir.attachment or pre-existing url
and set the url in the blog.post's background_image field. This is
not the same as a binary field which sets the data in the field.

Since it's possible to do it in the frontend, there is no use of the
field in the backend. This fix removes this field.

closes #6497
issue #1305
opw-633725
2015-04-28 16:50:34 +02:00
Laurent Destailleur c09abf8d22 Adding teclib CLA 2015-04-28 16:37:25 +02:00
Mohammad Alhashash 24526b18a7 [FIX] account: remove journal_id from account domains
From invoice lines and move lines views.

The model 'account.account' has no field journal_id.
2015-04-28 16:34:29 +02:00
Guewen Baconnier ff09135dbb [FIX] sale_crm: SO created from opportunity in wrong language
The onchange partner on the sale.order set the 'note' field as the terms of the
company in the partner's language.
When the SO is created from an opportunity, the terms are not translated.
Call get_salenote method that handles patner's language.
2015-04-28 16:13:28 +02:00
Christophe Simonis dd84e612d0 [FIX] payment: remove extra field.
Commit 8a6e859 wrongly introduced this new field when adding the new
`payment_authorize` module.
As 8.0 is a [stable version](http://git.io/vfACM), no data model change
is allowed.

We convert this field to a `fields.dummy` in case someone installed (or
update) this module with this fields to ensure the view still applied
and is not broken.
2015-04-28 15:46:34 +02:00
Goffin Simon 37bf219643 [FIX] account: Display Taxes
The function _unite_compute and _unit_compute_inv did not give the same display result.
Regardless the way the tax is computed, the display must be the same. The display must
only shows the name of the tax.

opw:633828
2015-04-28 11:25:44 +02:00
Denis Ledoux 39325842e4 [FIX] note: do not set self in args of a super call
This silly mistake prevents to group notes by
something else than stages.

opw-633980
2015-04-28 11:18:07 +02:00
Goffin Simon 4775c24af7 [IMP] sale_mrp: bom and property tests
-Test the function _bom_find to check that it searches the bom corresponding
	 to the properties passed or takes the bom with the smallest sequence.
	For this commit: d357667df4279070b51af58cad55ef314688d69f

	- Test the function _bom_explode to check that it only takes the lines with the
	 right properties.
	For this commit: 6b6e71a3e0c86aa8a9b8c4f20eaa61b17c64ce7b
2015-04-28 11:11:30 +02:00
Goffin Simon 8a7993958d [IMP] mrp: properties on mrp.bom.line
Now it's possible to put a property on a bom line.
For example, the bom for an apple pie and for an apricot pie can be made
in a single bom.
Three lines are necessary in the bom of the product "pie":
	- First line with product " dough" without property
	- Second line, with product "apple" with property "apple" if you want an apple pie
	- Third line, with product "apricot" with property "apricot" if you want an apricot pie

The type of this bom pie must be "set" to allow the customer to assemblate
his favorite pie by himself.

Now to sell an apple pie, you must create a SO with the product "pie" and
the property "apple".

In that way, the delivery order consists of two lines:
	- dough
	- apple
2015-04-28 11:11:29 +02:00
Goffin Simon 5b479e6114 [FIX] mrp: bom properties
The bom related to the product in a sale line order must be
filtered by the function _bom_find. If two boms can be applied
on a product, the bom with the smallest sequence is applied.

opw:632558
2015-04-28 11:11:29 +02:00
Goffin Simon 1062905acb [IMP] purchase: fiscal positions
Automatic detection of a fiscal position is now working for Purchase.

opw:631554
2015-04-28 11:05:03 +02:00
Olivier Dony 622e00baa5 [I18N] Sync 8.0 translations from Launchpad 2015-04-28 09:45:53 +02:00
Nicolas Lempereur 71aa34fb54 [FIX] web: see selection didn't show selection
This fix gives the domain to the "See selection" view opened from a
FieldCharDomain.

In Odoo 8.0, this widget is available at two places:

- mass_mailing: Marketing > Mass Mailing | Mass Mailing > (any
  newsletter) > "See selection".

- gamification: Settings > Gamification Tools > Challenge > (any
  challenge) > "See selection".

With this fix the "Selected records" view display selected records.

closes #6463
opw-633201
2015-04-28 09:22:07 +02:00
Goffin Simon 3c055a769f [FIX] account: Taxes report
The Tax Report printed with details should not include draft accounting entries.
Technicaly, the account move lines include in a draft account move do not have to be
printed

opw:633642
2015-04-27 16:25:43 +02:00
Goffin Simon a90b94f291 [FIX] sale_margin: product margin
The product margin computed on each line of a sale order must be
rounded according to the currency of the order pricelist.
Inspired from the field 'price_subtotal' in addons/sale/sale.py
2015-04-27 15:38:01 +02:00
Denis Ledoux cf4d14ce39 [MERGE] forward port of branch saas-3 up to 09b277c 2015-04-27 14:02:52 +02:00
Denis Ledoux 09b277c008 [FIX] crm: fp mistakes during d6ae7fb7db.
`crm.meeting`
has been replaced by
`calendar.event`

`base_calendar.view_crm_meeting_search`
has been replaced by
`calendar.view_calendar_event_search`
2015-04-27 13:21:51 +02:00
Nicolas Lempereur 068071cf9a [FIX] website_hr: add published for hr.employee
Previously, we could unpublish an employee from the website, but there
was no simple way to publish it again after we leave the page.

This fix show the unpublished employees on the about us page for the
users who can modify these employees records.

closes #6416
opw-633462
2015-04-27 12:57:35 +02:00
Denis Ledoux 70d28a69b9 [FIX] crm: silly mistake during forward-port d6ae7fb7db
type="object" was already there, no need to set it twice.
2015-04-27 12:46:01 +02:00
Denis Ledoux d6ae7fb7db [MERGE] forward port of branch 7.0 up to 3e7d3c7 2015-04-27 12:19:43 +02:00
Denis Ledoux 3e7d3c7ee4 [FIX] account: tax_amount can be null in database
The `tax_amount` of move lines is by default set to `0.0`.
Nevertheless, this default value is set by Odoo,
not by postgresql.

This is therefore likely that the `tax_amount` is set as
null instead of 0.0, in database.

Therefore, when getting this value directly with a SQL
request, this is possible that `null` will be returned.

Therefore, in this specific case, `res.get(record.id, 0.0`
could return `False`, if the sum of `tax_amount` is `null`,
and try to multiply a boolean with an integer is not possible:
`_rec_get(rec) * rec.sign`

opw-633903
2015-04-27 12:01:21 +02:00
David Monjoie 675fd554f1 [FIX] website: removed the deers picture
The new image comes from www.gratisography.com by Bells Design and is
licensed under Creative Commons Zero.
2015-04-27 11:26:02 +02:00
Nicolas Lempereur bf9544d7d4 [FIX] account: float issue in reconciliation wizard
The CSS on the linei with the "New" button of an bank statement
reconciliation wizard was only applied when there was only a multiple of
two "block" before.

Hence it worked when there was a multiple of 2 cases before, but if not
(for example when account_analytic_plans is installed) on:

- google chrome: the button is on the right (instead of on a line by its
  own).

- firefox: idem, but also a difference in float display positioning
  caused the parent container to not take floating elements into account
  to calculate it's height.

This fix apply the CSS independently if the last block is even or odd.

Before this fix in firefox:
 https://cloud.githubusercontent.com/assets/9977887/7315195/70ca5eca-ea6b-11e4-8892-1272f7ee0cb4.png

After this fix in firefox:
 https://cloud.githubusercontent.com/assets/9977887/7315194/6e2b05ca-ea6b-11e4-9400-69c9cd587756.png

closes #6459
opw-633703
2015-04-27 09:26:23 +02:00
Guewen Baconnier 3a314780c0 [FIX] sale_*, delivery: more consistent ignore of cancelled SO lines
Sales Order lines have a cancelled state, but this state is not
always considered when looping over lines. This check is
done in some places already and this patch's aim is to do it in the
remaining places.

- Cancel the procurement of a sale line in sale.order.line
instead of sale.order, so a line canceled individually with
sale_order_line.button_cancel will properly cancel it
procurement.
- Sale report: uses the state of lines instead of Sales order,
so canceled lines of not-canceled orders are correctly represented
in the analysis.
- test: do not create invoices lines for canceled sale lines
- test: creation of moves with canceled lines
- test: check if lines are still canceled when sale order is done

Closes #6036
2015-04-24 17:29:51 +02:00
Ravi Gohil a7cb326e5a [FIX] stock_dropshipping: do not warn for dropshipped items non-availibility
When selectiong a dropshipped product in a sale.order, the user should not be
warned that the product is not available in stock (as it never goes to the stock
anyway but directly from the supplier to the customer).
Factorise verification in _check_routing method.
2015-04-24 15:55:56 +02:00
Denis Ledoux 3c61ee5c68 [FIX] report: random disappearance of headers/footers
This issue is related to the wkhtmltopdf issue
https://github.com/wkhtmltopdf/wkhtmltopdf/issues/2083

It seems there is a race condition in the Javascript file
loading in wkhtmltopdf 0.12.x.

The subst.js file put in the header/footer of reports
was not always loaded when the page was being rendered,
leading to the crash of the onload="subst()" attr in
the body node, leading to the non-rendering
of the header/footer.

Replacing the script file by its content solves
the issue.

Increasing the --javascript-delay of the wkhtmltopdf
executable (e.g. 1000 ms instead of 200 ms,
the default value) seems to solve the problem
as well, but will lead to obvious performance issues.

We therefore choose to put the javascript code inline,
as a workaround,
the time the issue is solved in wkhtmltopdf, at least.

closes #3047,#5548,#6207
opw-633161
2015-04-24 15:55:35 +02:00
Thomas Rehn e8ffc09b30 [FIX] ir.ui.view (diagram): do not depend on semi-random order of _columns
The ir.ui.view.graph_get() method depended on the natural
semi-random order of Python dict keys in the _columns dict.

When the number and/or names of the _columns happened to
yield the o2m field of the "incoming transitions" *before*
the "outgoing transitions" of the "Node model"
(e.g. workflow activity), it would swap the incoming and
outgoing transitions fields around, causing a crash later
in the `tools.graph.process` method (currently an infinite
loop in the `tree_order()` method of tools.graph.py).

Closes #3614
Fixes https://bugs.launchpad.net/openobject-server/+bug/1316948
opw-633765
2015-04-24 13:50:26 +02:00
Goffin Simon 296130fbd3 [FIX] account: Invoice's creation problem
The action window "action_invoice_refund_out_tree" must have the same
context that "action_invoice_tree1"

opw:633635
2015-04-24 13:39:17 +02:00
Goffin Simon 3760b1f0f4 [FIX] website: customize logo
The company logo can't be customized because it's a t-field from the db.
This fix don't have to be forward ported because the problem is
already fixed in saas-6.

opw:632702
2015-04-24 13:30:47 +02:00
Nicolas Lempereur a1bfa84f65 [FIX] web: get right result for arrow suggestions
In the search input, the result of filtered search with an arrow was
placed under the currently selected arrow.

Hence if we get to another arrow filter before the result is received,
the result is added under the wrong arrow.

This fix adds the result under the right arrow.

closes #6442
opw-632519
2015-04-24 11:32:58 +02:00
Martin Trigaux 641c25b2e6 [FIX] project: typo 2015-04-24 11:19:34 +02:00
Josse Colpaert 6dcccae568 [FIX] project: use selected unit of measure in gantt display
Hack to use working time unit in gantt view. Similar to 533399f for project.task
Fixes lp:1108913, opw 613979
2015-04-24 10:53:54 +02:00
Martin Trigaux 316be12a3c [FIX] purchase: mark order as invoiced when fully invoiced only
Make sure the purchase order is marked as invoiced only when fully invoiced.
If the invoices are generated on delivery order (invoice_method picking), make
sure all products are delivered before setting it as invoiced.
opw 614256
2015-04-24 10:46:42 +02:00
David Monjoie e66efbd9f6 [FIX] website_sale: search button didn't work on product page
You can't move elements which needs website_sale js outside of the element with class oe_website_sale
2015-04-24 09:54:42 +02:00
Goffin Simon 0d74dce709 [FIX] sale_margin: sale margin accuracy
Unit Price, Cost Price and Margin must have the same accuracy.

opw:632511
2015-04-24 09:08:53 +02:00
Goffin Simon 67530c7b1d [FIX] website_sale: checkout problem
When the user is not logged, there is no branding for the options.
This is why, the product_id of the option must be written in the
template "optional product".

opw:633093
2015-04-24 09:00:39 +02:00
Martin Trigaux 68621de7df [ADD] base: Australian states
Fixes #6402
2015-04-23 16:47:42 +02:00
anajuaristi 0555b868cf [ADD] Avanzosc Corporate CLA added 2015-04-23 16:18:02 +02:00