[MERGE] lp:~openerp-dev/openobject-addons/trunk-addons-issues3-product-wizard-hsa
bzr revid: stw@openerp.com-20120802093845-z5m1le3p4eznk43q
This commit is contained in:
commit
a2c6890705
|
@ -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"/>
|
||||
|
|
|
@ -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 @@ class stock_location_product(osv.osv_memory):
|
|||
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',
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue