[Merge]openerp-dev/openobject-addons/trunk-wmsimplement-seduce-fp-inventory-form-tpa

bzr revid: sunilsharma.sharma07@gmail.com-20130829095205-al25ioe240bvqhqx
This commit is contained in:
Sunil Sharma (OpenERP Trainee)
2013-08-29 15:22:05 +05:30
2 changed files with 10 additions and 10 deletions
+7 -7
View File
@@ -1664,16 +1664,16 @@ class stock_inventory(osv.osv):
_columns = {
'name': fields.char('Inventory Reference', size=64, required=True, readonly=True, states={'draft': [('readonly', False)]}, help="Inventory Name."),
'date': fields.datetime('Creation Date', required=True, readonly=True, states={'draft': [('readonly', False)]}, help="Inventory Create Date."),
'date_done': fields.datetime('Date done', help="Inventory Date time."),
'line_ids': fields.one2many('stock.inventory.line', 'inventory_id', 'Inventories', readonly=False, states={'done': [('readonly', True)]}),
'move_ids': fields.one2many('stock.move', 'inventory_id', 'Created Moves'),
'date_done': fields.datetime('Date done', help="Inventory Validation Date."),
'line_ids': fields.one2many('stock.inventory.line', 'inventory_id', 'Inventories', readonly=False, states={'done': [('readonly', True)]}, help="Inventory Lines."),
'move_ids': fields.one2many('stock.move', 'inventory_id', 'Created Moves', help="Inventory Moves."),
'state': fields.selection([('draft', 'Draft'), ('cancel', 'Cancelled'), ('confirm', 'In Progress'), ('done', 'Validated')], 'Status', readonly=True, select=True),
'company_id': fields.many2one('res.company', 'Company', required=True, select=True, readonly=True, states={'draft': [('readonly', False)]}, help="Your Company Name."),
'location_id': fields.many2one('stock.location', 'Location', required=True, help="Physical location stock name."),
'company_id': fields.many2one('res.company', 'Company', required=True, select=True, readonly=True, states={'draft': [('readonly', False)]}),
'location_id': fields.many2one('stock.location', 'Location', required=True),
'product_id': fields.many2one('product.product', 'Product', help="Product Name"),
'package_id': fields.many2one('stock.quant.package', 'Pack'),
'partner_id': fields.many2one('res.partner', 'Owner'),
'lot_id': fields.many2one('stock.production.lot', 'Lot/Serial Number', help="Forces to specify a Serial Number for all moves containing this product and generated by a Manufacturing Order"),
'lot_id': fields.many2one('stock.production.lot', 'Lot/Serial Number', help="Forces to specify a Serial Number for all moves generated by Inventoty"),
'move_ids_exist': fields.function(_get_move_ids_exist, type='boolean', string=' Stock Move Exists?', help='technical field for attrs in view'),
}
@@ -1843,7 +1843,7 @@ class stock_inventory_line(osv.osv):
'company_id': fields.related('inventory_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, select=True, readonly=True),
'prod_lot_id': fields.many2one('stock.production.lot', 'Serial Number', domain="[('product_id','=',product_id)]"),
'state': fields.related('inventory_id', 'state', type='char', string='Status', readonly=True),
'real_qty':fields.related('product_id','qty_available', type='float',string='Real Quantity',store=True),
'real_qty':fields.related('product_id','qty_available', type='float', string='Real Quantity', store=True),
}
def _resolve_inventory_line(self, cr, uid, inventory_line, theorical_lines, context=None):
+3 -3
View File
@@ -131,9 +131,9 @@
<field name="move_ids_exist" invisible="1"/>
<notebook>
<page string="Inventory Details" attrs="{'invisible':[('state','=','draft')]}">
<button name="set_checked_qty" states="confirm" string="==> Set Checked Quantity to 0" type="object" class="oe_link oe_right" groups="stock.group_stock_user"/>
<button name="set_checked_qty" states="confirm" icon="gtk-go-forward" string="Set Checked Quantity to 0" type="object" class="oe_link oe_right" groups="stock.group_stock_user"/>
<field name="line_ids" string="Inventory Details">
<tree string="Inventory Details" editable="bottom">
<tree string="Inventory Details" editable="bottom" colors="blue: product_qty != real_qty">
<field context="{'location':location_id, 'uom':product_uom_id, 'to_date':parent.date}" name="product_id" on_change="on_change_product_id(location_id,product_id,product_uom_id,parent.date)" domain="[('type','=','product')]"/>
<field name="real_qty" readonly="1"/>
<field name="product_qty" string="Checked Quantity"/>
@@ -145,7 +145,7 @@
</tree>
</field>
</page>
<page string="Inventory Adjustments" attrs="{'invisible': [('move_ids_exist', '=', False)],'invisible': [('state','=','draft')] }">
<page string="Inventory Adjustments" attrs="{'invisible': [('move_ids_exist', '=', False)],'invisible': [('state','=','draft')] }">
<field name="move_ids" context="{'inventory_id':active_id}" readonly="1">
<tree string="Inventory Adjustments">
<field name="product_id"/>