diff --git a/MANIFEST.in b/MANIFEST.in
index f0f27169c12..75f71dc16ad 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -5,6 +5,7 @@ recursive-include openerp *.css
recursive-include openerp *.csv
recursive-include openerp *.gif
recursive-include openerp *.html
+recursive-include openerp *.ico
recursive-include openerp *.jpeg
recursive-include openerp *.jpg
recursive-include openerp *.js
diff --git a/addons/account_asset/report/account_asset_report.py b/addons/account_asset/report/account_asset_report.py
index 938da73efd5..1cafe349079 100644
--- a/addons/account_asset/report/account_asset_report.py
+++ b/addons/account_asset/report/account_asset_report.py
@@ -33,9 +33,7 @@ class AssetAssetReport(models.Model):
dl.name as name,
dl.depreciation_date as depreciation_date,
a.date as date,
- (CASE WHEN (select min(d.id) from account_asset_depreciation_line as d
- left join account_asset_asset as ac ON (ac.id=d.asset_id)
- where a.id=ac.id) = min(dl.id)
+ (CASE WHEN dlmin.id = min(dl.id)
THEN a.value
ELSE 0
END) as gross_value,
@@ -59,8 +57,9 @@ class AssetAssetReport(models.Model):
a.company_id as company_id
from account_asset_depreciation_line dl
left join account_asset_asset a on (dl.asset_id=a.id)
+ left join (select min(d.id) as id,ac.id as ac_id from account_asset_depreciation_line as d inner join account_asset_asset as ac ON (ac.id=d.asset_id) group by ac_id) as dlmin on dlmin.ac_id=a.id
group by
dl.amount,dl.asset_id,dl.depreciation_date,dl.name,
a.date, dl.move_check, a.state, a.category_id, a.partner_id, a.company_id,
- a.value, a.id, a.salvage_value
+ a.value, a.id, a.salvage_value, dlmin.id
)""")
diff --git a/addons/google_spreadsheet/google_spreadsheet_view.xml b/addons/google_spreadsheet/google_spreadsheet_view.xml
index 1f014edb8be..60284478c5e 100644
--- a/addons/google_spreadsheet/google_spreadsheet_view.xml
+++ b/addons/google_spreadsheet/google_spreadsheet_view.xml
@@ -42,7 +42,7 @@
form
tree,form
{}
- [('url', 'like', '/spreadsheet/')]
+ [('url', '=ilike', '%google%/spreadsheet%')]
Google Spreadsheets
diff --git a/addons/stock_account/wizard/stock_valuation_history.py b/addons/stock_account/wizard/stock_valuation_history.py
index b213c44c295..343278ba3dd 100644
--- a/addons/stock_account/wizard/stock_valuation_history.py
+++ b/addons/stock_account/wizard/stock_valuation_history.py
@@ -129,8 +129,7 @@ class stock_history(osv.osv):
source
FROM
((SELECT
- stock_move.id::text || '-' || quant.id::text AS id,
- quant.id AS quant_id,
+ stock_move.id AS id,
stock_move.id AS move_id,
dest_location.id AS location_id,
dest_location.company_id AS company_id,
@@ -141,25 +140,28 @@ class stock_history(osv.osv):
quant.cost as price_unit_on_quant,
stock_move.origin AS source
FROM
- stock_quant as quant, stock_quant_move_rel, stock_move
- LEFT JOIN
+ stock_move
+ JOIN
+ stock_quant_move_rel on stock_quant_move_rel.move_id = stock_move.id
+ JOIN
+ stock_quant as quant on stock_quant_move_rel.quant_id = quant.id
+ JOIN
stock_location dest_location ON stock_move.location_dest_id = dest_location.id
- LEFT JOIN
+ JOIN
stock_location source_location ON stock_move.location_id = source_location.id
- LEFT JOIN
+ JOIN
product_product ON product_product.id = stock_move.product_id
- LEFT JOIN
+ JOIN
product_template ON product_template.id = product_product.product_tmpl_id
- WHERE quant.qty>0 AND stock_move.state = 'done' AND dest_location.usage in ('internal', 'transit') AND stock_quant_move_rel.quant_id = quant.id
- AND stock_quant_move_rel.move_id = stock_move.id AND (
+ WHERE quant.qty>0 AND stock_move.state = 'done' AND dest_location.usage in ('internal', 'transit')
+ AND (
(source_location.company_id is null and dest_location.company_id is not null) or
(source_location.company_id is not null and dest_location.company_id is null) or
source_location.company_id != dest_location.company_id or
source_location.usage not in ('internal', 'transit'))
- ) UNION
+ ) UNION ALL
(SELECT
- '-' || stock_move.id::text || '-' || quant.id::text AS id,
- quant.id AS quant_id,
+ (-1) * stock_move.id AS id,
stock_move.id AS move_id,
source_location.id AS location_id,
source_location.company_id AS company_id,
@@ -170,17 +172,21 @@ class stock_history(osv.osv):
quant.cost as price_unit_on_quant,
stock_move.origin AS source
FROM
- stock_quant as quant, stock_quant_move_rel, stock_move
- LEFT JOIN
+ stock_move
+ JOIN
+ stock_quant_move_rel on stock_quant_move_rel.move_id = stock_move.id
+ JOIN
+ stock_quant as quant on stock_quant_move_rel.quant_id = quant.id
+ JOIN
stock_location source_location ON stock_move.location_id = source_location.id
- LEFT JOIN
+ JOIN
stock_location dest_location ON stock_move.location_dest_id = dest_location.id
- LEFT JOIN
+ JOIN
product_product ON product_product.id = stock_move.product_id
- LEFT JOIN
+ JOIN
product_template ON product_template.id = product_product.product_tmpl_id
- WHERE quant.qty>0 AND stock_move.state = 'done' AND source_location.usage in ('internal', 'transit') AND stock_quant_move_rel.quant_id = quant.id
- AND stock_quant_move_rel.move_id = stock_move.id AND (
+ WHERE quant.qty>0 AND stock_move.state = 'done' AND source_location.usage in ('internal', 'transit')
+ AND (
(dest_location.company_id is null and source_location.company_id is not null) or
(dest_location.company_id is not null and source_location.company_id is null) or
dest_location.company_id != source_location.company_id or
diff --git a/addons/website/views/website_templates.xml b/addons/website/views/website_templates.xml
index c223a40ff50..dd3f90c95c1 100644
--- a/addons/website/views/website_templates.xml
+++ b/addons/website/views/website_templates.xml
@@ -142,7 +142,7 @@