[MERGE] forward port of branch 8.0 up to f2bc45f
This commit is contained 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
|
||||
|
||||
@@ -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
|
||||
)""")
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="context">{}</field>
|
||||
<field name="domain">[('url', 'like', '/spreadsheet/')]</field>
|
||||
<field name="domain">[('url', '=ilike', '%google%/spreadsheet%')]</field>
|
||||
<field name="help">Google Spreadsheets</field>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
</li>
|
||||
<li t-if="submenu.child_id" t-attf-class="dropdown #{
|
||||
(submenu.url and submenu.url != '/' and any([request.httprequest.path == child.url.replace('/page/website.', '/page/') for child in submenu.child_id]) or
|
||||
request.httprequest.path == submenu.url.replace('/page/website.', '/page/')) and 'active'
|
||||
(submenu.url and request.httprequest.path == submenu.url.replace('/page/website.', '/page/'))) and 'active'
|
||||
}">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
<span t-field="submenu.name"/> <span class="caret" t-ignore="true"></span>
|
||||
|
||||
Reference in New Issue
Block a user