[IMP] apply color in inventory line and improved help

bzr revid: tpa@tinyerp.com-20130827094900-xq7eful67vimd2xk
This commit is contained in:
Turkesh Patel (Open ERP) 2013-08-27 15:19:00 +05:30
parent 742de63e0c
commit 14dac5ce8c
2 changed files with 8 additions and 8 deletions

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'),
}
@ -1837,7 +1837,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):

View File

@ -132,7 +132,7 @@
<notebook>
<page string="Inventory Details" attrs="{'invisible':[('state','=','draft')]}">
<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"/>