Antoine(OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/6.1-scrap-inventory-analysis-fix-ahu into
lp:openobject-addons/6.1.
Requested reviews:
Xavier ALT (OpenERP) (xal-openerp)
Related bugs:
Bug #985635 in OpenERP Addons: "Scrap filter in inventory analysis doesn't
work"
https://bugs.launchpad.net/openobject-addons/+bug/985635
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-scrap-inventory-analysis-fix-ahu/+merge/102700
Allows the scrap location button to work properly in "Warehouse > Reporting >
Inventory Analysis". See linked bug for more details.
--
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-scrap-inventory-analysis-fix-ahu/+merge/102700
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/6.1-scrap-inventory-analysis-fix-ahu.
=== modified file 'stock/report/report_stock_move.py'
--- stock/report/report_stock_move.py 2011-12-19 16:54:40 +0000
+++ stock/report/report_stock_move.py 2012-04-19 13:30:50 +0000
@@ -166,6 +166,7 @@
help='When the stock move is created it is in the \'Draft\' state.\n After that it is set to \'Confirmed\' state.\n If stock is available state is set to \'Avaiable\'.\n When the picking it done the state is \'Done\'.\
\nThe state is \'Waiting\' if the move is waiting for another one.'),
'location_type': fields.selection([('supplier', 'Supplier Location'), ('view', 'View'), ('internal', 'Internal Location'), ('customer', 'Customer Location'), ('inventory', 'Inventory'), ('procurement', 'Procurement'), ('production', 'Production'), ('transit', 'Transit Location for Inter-Companies Transfers')], 'Location Type', required=True),
+ 'scrap_location': fields.boolean('scrap'),
}
def init(self, cr):
tools.drop_view_if_exists(cr, 'report_stock_inventory')
@@ -174,7 +175,7 @@
(SELECT
min(m.id) as id, m.date as date,
m.address_id as partner_id, m.location_id as location_id,
- m.product_id as product_id, pt.categ_id as product_categ_id, l.usage as location_type,
+ m.product_id as product_id, pt.categ_id as product_categ_id, l.usage as location_type, l.scrap_location as scrap_location,
m.company_id,
m.state as state, m.prodlot_id as prodlot_id,
@@ -191,12 +192,12 @@
LEFT JOIN stock_location l ON (m.location_id=l.id)
GROUP BY
m.id, m.product_id, m.product_uom, pt.categ_id, m.address_id, m.location_id, m.location_dest_id,
- m.prodlot_id, m.date, m.state, l.usage, m.company_id, pt.uom_id
+ m.prodlot_id, m.date, m.state, l.usage, l.scrap_location, m.company_id, pt.uom_id
) UNION ALL (
SELECT
-m.id as id, m.date as date,
m.address_id as partner_id, m.location_dest_id as location_id,
- m.product_id as product_id, pt.categ_id as product_categ_id, l.usage as location_type,
+ m.product_id as product_id, pt.categ_id as product_categ_id, l.usage as location_type, l.scrap_location as scrap_location,
m.company_id,
m.state as state, m.prodlot_id as prodlot_id,
coalesce(sum(pt.standard_price * m.product_qty * pu.factor / pu2.factor)::decimal, 0.0) as value,
@@ -212,7 +213,7 @@
LEFT JOIN stock_location l ON (m.location_dest_id=l.id)
GROUP BY
m.id, m.product_id, m.product_uom, pt.categ_id, m.address_id, m.location_id, m.location_dest_id,
- m.prodlot_id, m.date, m.state, l.usage, m.company_id, pt.uom_id
+ m.prodlot_id, m.date, m.state, l.usage, l.scrap_location, m.company_id, pt.uom_id
)
);
""")
=== modified file 'stock/report/report_stock_move_view.xml'
--- stock/report/report_stock_move_view.xml 2012-01-31 13:36:57 +0000
+++ stock/report/report_stock_move_view.xml 2012-04-19 13:30:50 +0000
@@ -230,7 +230,7 @@
<field name="state"/>
<field name="location_type"/>
<field name="date"/>
- <filter icon="terp-go-home" name="location_type_scrap" string="Scrap" domain="[('location_type','=','scrap')]"/>
+ <filter icon="terp-go-home" name="location_type_scrap" string="Scrap" domain="[('scrap_location','=','True')]"/>
</group>
<newline/>
<group expand="1" string="Group By..." >
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp