Hardik Sanchawat (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-addons-issues3-product-wizard-hsa into
lp:~openerp-dev/openobject-addons/trunk-addons-issues3-product.
Requested reviews:
Priyesh (OpenERP) (pso-openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons-issues3-product-wizard-hsa/+merge/117628
Hello,
I improved "Product by Location" wizard in Product module.
Thanks
-hsa
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-addons-issues3-product-wizard-hsa/+merge/117628
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-addons-issues3-product.
=== modified file 'product/product_view.xml'
--- product/product_view.xml 2012-07-31 15:03:58 +0000
+++ product/product_view.xml 2012-08-01 12:02:20 +0000
@@ -45,7 +45,6 @@
<field name="categ_id" invisible="1"/>
<field name="variants" groups="product.group_product_variant"/>
<field name="uom_id" string="Unit of Measure" groups="product.group_uom"/>
- <field name="type"/>
<field name="qty_available"/>
<field name="virtual_available"/>
<field name="lst_price"/>
=== modified file 'stock/wizard/stock_location_product.py'
--- stock/wizard/stock_location_product.py 2011-11-21 16:33:36 +0000
+++ stock/wizard/stock_location_product.py 2012-08-01 12:02:20 +0000
@@ -20,13 +20,16 @@
##############################################################################
from osv import fields, osv
+from tools.translate import _
class stock_location_product(osv.osv_memory):
_name = "stock.location.product"
_description = "Products by Location"
_columns = {
'from_date': fields.datetime('From'),
- 'to_date': fields.datetime('To'),
+ 'to_date': fields.datetime('To'),
+ 'type': fields.selection([('inventory','Analyse Current Inventory'),
+ ('period','Analyse a Period')], 'Analyse Type', required=True),
}
def action_open_window(self, cr, uid, ids, context=None):
@@ -43,7 +46,7 @@
location_products = self.read(cr, uid, ids, ['from_date', 'to_date'], context=context)
if location_products:
return {
- 'name': False,
+ 'name': _('Current Inventory'),
'view_type': 'form',
'view_mode': 'tree,form',
'res_model': 'product.product',
=== modified file 'stock/wizard/stock_location_product_view.xml'
--- stock/wizard/stock_location_product_view.xml 2012-07-11 15:50:14 +0000
+++ stock/wizard/stock_location_product_view.xml 2012-08-01 12:02:20 +0000
@@ -7,14 +7,15 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="View Stock of Products" version="7.0">
- <separator string="Stock Location Analysis"/>
<group>
+ <field name="type"/>
+ </group>
+ <group attrs="{'invisible':[('type', '!=', 'period')], 'required':[('type', '=', 'period')]}">
<field name="from_date"/>
<field name="to_date"/>
</group>
- <label string="(Keep empty to open the current situation. Adjust HH:MM:SS to 00:00:00 to filter all resources of the day for the 'From' date and 23:59:59 for the 'To' date)"/>
<footer>
- <button name="action_open_window" string="Open Product" type="object" class="oe_highlight"/>
+ <button name="action_open_window" string="View Products Inventory" type="object" class="oe_highlight"/>
or
<button string="Cancel" class="oe_link" special="cancel" />
</footer>
_______________________________________________
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