[IMP] mrp,mrp_repair,stock: Rename fields Production Lot >> Serial Number and also rename the fields in stock congi wizard

bzr revid: jap@tinyerp.com-20120424130805-dbfdz0f4j440vy2h
This commit is contained in:
Jagdish Panchal (Open ERP) 2012-04-24 18:38:05 +05:30
parent cf91c3fc3d
commit 18653db6f2
18 changed files with 63 additions and 63 deletions

View File

@ -674,7 +674,7 @@
states="draft,waiting,confirmed,assigned" />
<button
name="%(stock.track_line)d"
string="Split in production lots"
string="Split in Serial Number"
type="action" icon="gtk-justify-fill"
states="draft,waiting,confirmed,assigned" />
<button name="%(stock.move_scrap)d"
@ -742,7 +742,7 @@
<field name="scrapped" invisible="1"/>
<field name="state" invisible="1"/>
<button name="%(stock.track_line)d"
string="Split in production lots" type="action" icon="gtk-justify-fill" states="done,cancel"/>
string="Split in Serial Number" type="action" icon="gtk-justify-fill" states="done,cancel"/>
<button name="%(stock.move_scrap)d"
string="Scrap Products" type="action" icon="gtk-convert"
states="done,cancel" />

View File

@ -268,9 +268,9 @@ class mrp_repair(osv.osv):
}
def onchange_lot_id(self, cr, uid, ids, lot, product_id):
""" On change of production lot sets the values of source location,
""" On change of Serial Number sets the values of source location,
destination location, move and guarantee limit.
@param lot: Changed id of production lot.
@param lot: Changed id of Serial Number.
@param product_id: Product id from current record.
@return: Dictionary of values.
"""
@ -334,7 +334,7 @@ class mrp_repair(osv.osv):
raise osv.except_osv(_('Error !'),_('You cannot confirm a repair order which has no line.'))
for line in o.operations:
if line.product_id.track_production and not line.prodlot_id:
raise osv.except_osv(_('Warning'), _("Production lot is required for opration line with product '%s'") % (line.product_id.name))
raise osv.except_osv(_('Warning'), _("Serial Number is required for opration line with product '%s'") % (line.product_id.name))
mrp_line_obj.write(cr, uid, [l.id for l in o.operations], {'state': 'confirmed'})
return True

View File

@ -219,7 +219,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="search_view_id" ref="view_repair_order_form_filter"/>
<field name="help">Repair orders allow you to organize your product repairs. In a repair order, you can detail the components you remove, add or replace and record the time you spent on the different operations. The repair order uses the warranty date on the production lot in order to know if whether the repair should be invoiced to the customer or not.</field>
<field name="help">Repair orders allow you to organize your product repairs. In a repair order, you can detail the components you remove, add or replace and record the time you spent on the different operations. The repair order uses the warranty date on the Serial Number in order to know if whether the repair should be invoiced to the customer or not.</field>
</record>
<menuitem action="action_repair_order_tree" id="menu_repair_order" parent="mrp.menu_mrp_manufacturing" groups="mrp.group_mrp_user" name="Repair Orders" sequence="50"/>

View File

@ -50,7 +50,7 @@ class stock_production_lot(osv.osv):
help='The date on which the lot starts deteriorating without becoming dangerous.'),
'removal_date': fields.datetime('Removal Date',
help='The date on which the lot should be removed.'),
'alert_date': fields.datetime('Alert Date', help="The date on which an alert should be notified about the production lot."),
'alert_date': fields.datetime('Alert Date', help="The date on which an alert should be notified about the Serial Number."),
}
# Assign dates according to products data
def create(self, cr, uid, vals, context=None):
@ -78,12 +78,12 @@ class product_product(osv.osv):
_inherit = 'product.product'
_columns = {
'life_time': fields.integer('Product Life Time',
help='The number of days before a production lot may become dangerous and should not be consumed.'),
help='The number of days before a Serial Number may become dangerous and should not be consumed.'),
'use_time': fields.integer('Product Use Time',
help='The number of days before a production lot starts deteriorating without becoming dangerous.'),
help='The number of days before a Serial Number starts deteriorating without becoming dangerous.'),
'removal_time': fields.integer('Product Removal Time',
help='The number of days before a production lot should be removed.'),
'alert_time': fields.integer('Product Alert Time', help="The number of days after which an alert should be notified about the production lot."),
help='The number of days before a Serial Number should be removed.'),
'alert_time': fields.integer('Product Alert Time', help="The number of days after which an alert should be notified about the Serial Number."),
}
product_product()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -388,9 +388,9 @@ class product_product(osv.osv):
"Shop, or any of its children.\n"
"Otherwise, this includes goods leaving from any Stock "
"Location typed as 'internal'."),
'track_production': fields.boolean('Track Manufacturing Lots', help="Forces to specify a Production Lot for all moves containing this product and generated by a Manufacturing Order"),
'track_incoming': fields.boolean('Track Incoming Lots', help="Forces to specify a Production Lot for all moves containing this product and coming from a Supplier Location"),
'track_outgoing': fields.boolean('Track Outgoing Lots', help="Forces to specify a Production Lot for all moves containing this product and going to a Customer Location"),
'track_production': fields.boolean('Track Manufacturing Lots', help="Forces to specify a Serial Number for all moves containing this product and generated by a Manufacturing Order"),
'track_incoming': fields.boolean('Track Incoming Lots', help="Forces to specify a Serial Number for all moves containing this product and coming from a Supplier Location"),
'track_outgoing': fields.boolean('Track Outgoing Lots', help="Forces to specify a Serial Number for all moves containing this product and going to a Customer Location"),
'location_id': fields.dummy(string='Location', relation='stock.location', type='many2one'),
'warehouse_id': fields.dummy(string='Warehouse', relation='stock.warehouse', type='many2one'),
'valuation':fields.selection([('manual_periodic', 'Periodical (manual)'),

View File

@ -26,13 +26,13 @@ from tools.sql import drop_view_if_exists
class stock_report_prodlots(osv.osv):
_name = "stock.report.prodlots"
_description = "Stock report by production lots"
_description = "Stock report by Serial Number"
_auto = False
_columns = {
'qty': fields.float('Quantity', readonly=True),
'location_id': fields.many2one('stock.location', 'Location', readonly=True, select=True),
'product_id': fields.many2one('product.product', 'Product', readonly=True, select=True),
'prodlot_id': fields.many2one('stock.production.lot', 'Production lot', readonly=True, select=True),
'prodlot_id': fields.many2one('stock.production.lot', 'Serial Number', readonly=True, select=True),
}
def init(self, cr):

View File

@ -35,12 +35,12 @@ class stock_config_settings(osv.osv_memory):
'module_claim_from_delivery': fields.boolean("Track Claims from Delivery",
help="""Adds a Claim link to the delivery order.
This installs the module claim_from_delivery."""),
'module_stock_invoice_directly': fields.boolean("Invoice Picking on Delivery",
'module_stock_invoice_directly': fields.boolean("Invoice Directly from the Picking",
help="""This allows to automatically launch the invoicing wizard if the delivery is
to be invoiced when you send or deliver goods.
This installs the module stock_invoice_directly."""),
'module_product_expiry': fields.boolean("Expiry Date on Lots",
help="""Track different dates on products and production lots.
help="""Track different dates on products and Serial Number.
The following dates can be tracked:
- end of life
- best before date
@ -66,12 +66,12 @@ class stock_config_settings(osv.osv_memory):
implied_group='stock.group_production_lot',
help="""This allows you to manage products by using serial numbers.
When you select a lot, you can get the upstream or downstream traceability of the products contained in lot."""),
'group_stock_tracking_lot': fields.boolean("Serial Numbers on Pallets (Logistic Units)",
'group_stock_tracking_lot': fields.boolean("Serial Numbers on Logistic Units (Pallets)",
implied_group='stock.group_tracking_lot',
help="""Allows you to get the upstream or downstream traceability of the products contained in lot."""),
'group_stock_inventory_valuation': fields.boolean("Accounting Entries per Stock Movement",
'group_stock_inventory_valuation': fields.boolean("Generate Accounting Entries per Stock Movement",
implied_group='stock.group_inventory_valuation',
help="""This allows to split stock inventory lines according to production lots."""),
help="""This allows to split stock inventory lines according to Serial Number."""),
'group_stock_multiple_locations': fields.boolean("Manage Multiple Locations and Warehouses",
implied_group='stock.group_locations',
help="""This allows to configure and use multiple stock locations and warehouses,

View File

@ -16,7 +16,7 @@
<separator string="Traceability" colspan="4"/>
<field name="group_stock_production_lot"/>
<field name="module_product_expiry"
attrs="{'invisible': [('group_stock_production_lot','=',False), ('group_stock_tracking_lot','=',False)]}"/>
attrs="{'invisible': [('group_stock_production_lot','=',False)]}"/>
<newline/>
<field name="group_stock_tracking_lot"/>

View File

@ -14,7 +14,7 @@
</record>
<record id="group_production_lot" model="res.groups">
<field name="name">Manage Production Lots</field>
<field name="name">Manage Serial Number</field>
<field name="category_id" ref="base.module_category_hidden"/>
</record>

View File

@ -1430,7 +1430,7 @@ class stock_production_lot(osv.osv):
return self.name_get(cr, uid, ids, context)
_name = 'stock.production.lot'
_description = 'Production lot'
_description = 'Serial Number'
def _get_stock(self, cr, uid, ids, field_name, arg, context=None):
""" Gets stock of products for locations
@ -1477,7 +1477,7 @@ class stock_production_lot(osv.osv):
return ids
_columns = {
'name': fields.char('Production Lot', size=64, required=True, help="Unique production lot, will be displayed as: PREFIX/SERIAL [INT_REF]"),
'name': fields.char('Serial Number', size=64, required=True, help="Unique Serial Number, will be displayed as: PREFIX/SERIAL [INT_REF]"),
'ref': fields.char('Internal Reference', size=256, help="Internal reference number in case it differs from the manufacturer's serial number"),
'prefix': fields.char('Prefix', size=64, help="Optional prefix to prepend when displaying this serial number: PREFIX/SERIAL [INT_REF]"),
'product_id': fields.many2one('product.product', 'Product', required=True, domain=[('type', '<>', 'service')]),
@ -1487,7 +1487,7 @@ class stock_production_lot(osv.osv):
digits_compute=dp.get_precision('Product UoM')),
'revisions': fields.one2many('stock.production.lot.revision', 'lot_id', 'Revisions'),
'company_id': fields.many2one('res.company', 'Company', select=True),
'move_ids': fields.one2many('stock.move', 'prodlot_id', 'Moves for this production lot', readonly=True),
'move_ids': fields.one2many('stock.move', 'prodlot_id', 'Moves for this Serial Number', readonly=True),
}
_defaults = {
'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
@ -1512,7 +1512,7 @@ stock_production_lot()
class stock_production_lot_revision(osv.osv):
_name = 'stock.production.lot.revision'
_description = 'Production lot revisions'
_description = 'Serial Number revisions'
_columns = {
'name': fields.char('Revision Name', size=64, required=True),
@ -1520,7 +1520,7 @@ class stock_production_lot_revision(osv.osv):
'date': fields.date('Revision Date'),
'indice': fields.char('Revision Number', size=16),
'author_id': fields.many2one('res.users', 'Author'),
'lot_id': fields.many2one('stock.production.lot', 'Production lot', select=True, ondelete='cascade'),
'lot_id': fields.many2one('stock.production.lot', 'Serial Number', select=True, ondelete='cascade'),
'company_id': fields.related('lot_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True),
}
@ -1578,7 +1578,7 @@ class stock_move(osv.osv):
return res
def _check_tracking(self, cr, uid, ids, context=None):
""" Checks if production lot is assigned to stock move or not.
""" Checks if Serial Number is assigned to stock move or not.
@return: True or False
"""
for move in self.browse(cr, uid, ids, context=context):
@ -1620,7 +1620,7 @@ class stock_move(osv.osv):
'location_dest_id': fields.many2one('stock.location', 'Destination Location', required=True,states={'done': [('readonly', True)]}, select=True, help="Location where the system will stock the finished products."),
'partner_id': fields.many2one('res.partner', 'Destination Address ', states={'done': [('readonly', True)]}, help="Optional address where goods are to be delivered, specifically used for allotment"),
'prodlot_id': fields.many2one('stock.production.lot', 'Production Lot', states={'done': [('readonly', True)]}, help="Production lot is used to put a serial number on the production", select=True),
'prodlot_id': fields.many2one('stock.production.lot', 'Serial Number', states={'done': [('readonly', True)]}, help="Serial Number is used to put a serial number on the production", select=True),
'tracking_id': fields.many2one('stock.tracking', 'Pack', select=True, states={'done': [('readonly', True)]}, help="Logistical shipping unit: pallet, box, pack ..."),
'auto_validate': fields.boolean('Auto Validate'),
@ -1650,7 +1650,7 @@ class stock_move(osv.osv):
_constraints = [
(_check_tracking,
'You must assign a production lot for this product',
'You must assign a Serial Number for this product',
['prodlot_id']),
(_check_location, 'You can not move products from or to a location of the type view.',
['location_id','location_dest_id']),
@ -2781,7 +2781,7 @@ class stock_inventory_line(osv.osv):
'product_uom': fields.many2one('product.uom', 'Product UOM', required=True),
'product_qty': fields.float('Quantity', digits_compute=dp.get_precision('Product UoM')),
'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', 'Production Lot', domain="[('product_id','=',product_id)]"),
'prod_lot_id': fields.many2one('stock.production.lot', 'Serial Number', domain="[('product_id','=',product_id)]"),
'state': fields.related('inventory_id','state',type='char',string='State',readonly=True),
}

View File

@ -20,7 +20,7 @@
Request link
-->
<record id="req_link_tracking" model="res.request.link">
<field name="name">Production Lot</field>
<field name="name">Serial Number</field>
<field name="object">stock.production.lot</field>
</record>

View File

@ -52,11 +52,11 @@
Sequences from tracking numbers
-->
<record id="sequence_type_serial" model="ir.sequence.type">
<field name="name">Production Lots</field>
<field name="name">Serial Number</field>
<field name="code">stock.lot.serial</field>
</record>
<record id="sequence_production_lots" model="ir.sequence">
<field name="name">Production Lots</field>
<field name="name">Serial Number</field>
<field name="code">stock.lot.serial</field>
<field name="prefix"></field>
<field name="padding">7</field>

View File

@ -147,7 +147,7 @@
<field name="product_qty" on_change="onchange_quantity(product_id, product_qty, product_uom, product_uos)"/>
<field name="product_uom" string="UoM" groups="product.group_uom"/>
<field name="prodlot_id" groups="stock.group_production_lot"/>
<button name="%(track_line)d" string="Split in production lots" type="action"
<button name="%(track_line)d" string="Split in Serial Number" type="action"
icon="terp-stock_effects-object-colorize"
attrs="{'invisible': [('prodlot_id','&lt;&gt;',False)]}"
states="draft,done,cancel"
@ -289,7 +289,7 @@
<field name="model">stock.production.lot.revision</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Production Lot Revisions">
<form string="Serial Number Revisions">
<field colspan="4" name="name"/>
<field colspan="2" name="indice"/>
<field colspan="2" name="date"/>
@ -306,7 +306,7 @@
<field name="model">stock.production.lot.revision</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Production Lot Revisions">
<tree string="Serial Number Revisions">
<field name="indice"/>
<field name="author_id"/>
<field name="date"/>
@ -319,9 +319,9 @@
<field name="model">stock.production.lot</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Production Lot">
<form string="Serial Number">
<group col="4" colspan="2">
<separator string="Production Lot Identification" colspan="4"/>
<separator string="Serial Number Identification" colspan="4"/>
<field name="product_id" colspan="4"/>
<field name="prefix" colspan="2"/>
<field name="name" colspan="2"/>
@ -364,7 +364,7 @@
<field name="model">stock.production.lot</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Production Lot">
<tree string="Serial Number">
<field name="prefix" />
<field name="name"/>
<field name="ref"/>
@ -399,7 +399,7 @@
</record>
<record id="action_production_lot_form" model="ir.actions.act_window">
<field name="name">Production Lots</field>
<field name="name">Serial Number</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">stock.production.lot</field>
<field name="view_type">form</field>
@ -723,7 +723,7 @@
<field name="prodlot_id" groups="stock.group_production_lot"/>
<button
name="%(stock.track_line)d"
string="Split in production lots"
string="Split in Serial Number"
groups="stock.group_production_lot"
type="action" icon="terp-stock_effects-object-colorize"
states="draft,waiting,confirmed,assigned" />
@ -911,7 +911,7 @@
states="draft,waiting,confirmed,assigned" />
<field name="scrapped" invisible="1"/>
<field name="prodlot_id" groups="stock.group_production_lot"/>
<button name="%(track_line)d" string="Split in production lots" type="action"
<button name="%(track_line)d" string="Split in Serial Number" type="action"
icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('prodlot_id','&lt;&gt;',False)]}"
states="draft,assigned,confirmed"
groups="stock.group_production_lot"/>
@ -1132,7 +1132,7 @@
<field name="prodlot_id" groups="stock.group_production_lot"/>
<button
name="%(stock.track_line)d"
string="Split in production lots"
string="Split in Serial Number"
groups="stock.group_production_lot"
type="action" icon="terp-stock_effects-object-colorize"
states="draft,waiting,confirmed,assigned" />
@ -1372,7 +1372,7 @@
states="draft,waiting,confirmed,assigned"
groups="base.group_extended"/>
<field name="prodlot_id" groups="stock.group_production_lot"/>
<button name="%(track_line)d" string="Split in production lots" type="action"
<button name="%(track_line)d" string="Split in Serial Number" type="action"
icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('prodlot_id','&lt;&gt;',False)]}"
states="draft,waiting,confirmed,assigned,done"
groups="stock.group_tracking_lot"/>
@ -1543,7 +1543,7 @@
icon="gtk-convert" context="{'scrap': True}"
states="draft,waiting,confirmed,assigned" groups="base.group_extended"/>
<field name="prodlot_id" groups="stock.group_production_lot"/>
<button name="%(track_line)d" string="Split in production lots" type="action"
<button name="%(track_line)d" string="Split in Serial Number" type="action"
icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('prodlot_id','&lt;&gt;',False)]}"
states="draft,waiting,confirmed,assigned,done"
groups="stock.group_tracking_lot"/>

View File

@ -31,7 +31,7 @@ class stock_change_product_qty(osv.osv_memory):
_columns = {
'product_id' : fields.many2one('product.product', 'Product'),
'new_quantity': fields.float('Quantity', digits_compute=dp.get_precision('Product UoM'), required=True, help='This quantity is expressed in the Default UoM of the product.'),
'prodlot_id': fields.many2one('stock.production.lot', 'Production Lot', domain="[('product_id','=',product_id)]"),
'prodlot_id': fields.many2one('stock.production.lot', 'Serial Number', domain="[('product_id','=',product_id)]"),
'location_id': fields.many2one('stock.location', 'Location', required=True, domain="[('usage', '=', 'internal')]"),
}

View File

@ -27,8 +27,8 @@ class stock_inventory_line_split(osv.osv_memory):
_description = "Split inventory lines"
_columns = {
'line_ids': fields.one2many('stock.inventory.line.split.lines', 'wizard_id', 'Production Lots'),
'line_exist_ids': fields.one2many('stock.inventory.line.split.lines', 'wizard_exist_id', 'Production Lots'),
'line_ids': fields.one2many('stock.inventory.line.split.lines', 'wizard_id', 'Serial Number'),
'line_exist_ids': fields.one2many('stock.inventory.line.split.lines', 'wizard_exist_id', 'Serial Number'),
}
def default_get(self, cr, uid, fields, context=None):
@ -46,7 +46,7 @@ class stock_inventory_line_split(osv.osv_memory):
return res
def split(self, cr, uid, ids, line_ids, context=None):
""" To split stock inventory lines according to production lot.
""" To split stock inventory lines according to Serial Number.
:param line_ids: the ID or list of IDs of inventory lines we want to split
"""

View File

@ -144,7 +144,7 @@ stock_move_scrap()
class split_in_production_lot(osv.osv_memory):
_name = "stock.move.split"
_description = "Split in Production lots"
_description = "Split in Serial Number"
def default_get(self, cr, uid, fields, context=None):
if context is None:
@ -168,8 +168,8 @@ class split_in_production_lot(osv.osv_memory):
'qty': fields.float('Quantity', digits_compute=dp.get_precision('Product UoM')),
'product_id': fields.many2one('product.product', 'Product', required=True, select=True),
'product_uom': fields.many2one('product.uom', 'UoM'),
'line_ids': fields.one2many('stock.move.split.lines', 'wizard_id', 'Production Lots'),
'line_exist_ids': fields.one2many('stock.move.split.lines', 'wizard_exist_id', 'Production Lots'),
'line_ids': fields.one2many('stock.move.split.lines', 'wizard_id', 'Serial Number'),
'line_exist_ids': fields.one2many('stock.move.split.lines', 'wizard_exist_id', 'Serial Number'),
'use_exist' : fields.boolean('Existing Lots', help="Check this option to select existing lots in the list below, otherwise you should enter new ones line by line."),
'location_id': fields.many2one('stock.location', 'Source Location')
}
@ -182,7 +182,7 @@ class split_in_production_lot(osv.osv_memory):
return {'type': 'ir.actions.act_window_close'}
def split(self, cr, uid, ids, move_ids, context=None):
""" To split stock moves into production lot
""" To split stock moves into Serial Number
:param move_ids: the ID or list of IDs of stock move we want to split
"""
@ -210,7 +210,7 @@ class split_in_production_lot(osv.osv_memory):
quantity = line.quantity
total_move_qty += quantity
if total_move_qty > move_qty:
raise osv.except_osv(_('Processing Error'), _('Production lot quantity %d of %s is larger than available quantity (%d) !') \
raise osv.except_osv(_('Processing Error'), _('Serial Number quantity %d of %s is larger than available quantity (%d) !') \
% (total_move_qty, move.product_id.name, move_qty))
if quantity <= 0 or move_qty == 0:
continue
@ -260,11 +260,11 @@ class stock_move_split_lines_exist(osv.osv_memory):
_name = "stock.move.split.lines"
_description = "Stock move Split lines"
_columns = {
'name': fields.char('Production Lot', size=64),
'name': fields.char('Serial Number', size=64),
'quantity': fields.float('Quantity', digits_compute=dp.get_precision('Product UoM')),
'wizard_id': fields.many2one('stock.move.split', 'Parent Wizard'),
'wizard_exist_id': fields.many2one('stock.move.split', 'Parent Wizard (for existing lines)'),
'prodlot_id': fields.many2one('stock.production.lot', 'Production Lot'),
'prodlot_id': fields.many2one('stock.production.lot', 'Serial Number'),
}
_defaults = {
'quantity': 1.0,

View File

@ -93,11 +93,11 @@
<group colspan="4" attrs="{'invisible':[('use_exist','=',True)]}">
<field name="line_ids" colspan="4" nolabel="1">
<tree string="Production Lot Numbers" editable="bottom">
<tree string="Serial Number" editable="bottom">
<field name="name" string="Lots"/>
<field name="quantity" />
</tree>
<form string="Production Lot Number">
<form string="Serial Number">
<field name="name" string="Lot number"/>
<field name="quantity" />
</form>
@ -105,11 +105,11 @@
</group>
<group colspan="4" attrs="{'invisible':[('use_exist','!=',True)]}">
<field name="line_exist_ids" colspan="4" nolabel="1">
<tree string="Production Lot Numbers" editable="bottom">
<tree string="Serial Number" editable="bottom">
<field name="prodlot_id" string="Lot number" domain="[('product_id','=',parent.product_id)]" on_change="onchange_lot_id(prodlot_id, quantity, parent.location_id, parent.product_id, parent.product_uom)"/>
<field name="quantity" on_change="onchange_lot_id(prodlot_id, quantity, parent.location_id, parent.product_id, parent.product_uom)" />
</tree>
<form string="Production Lot Number">
<form string="Serial Number">
<field name="prodlot_id" string="Lot number" domain="[('product_id','=',parent.product_id)]" on_change="onchange_lot_id(prodlot_id, quantity, parent.location_id, parent.product_id, parent.product_uom)"/>
<field name="quantity" on_change="onchange_lot_id(prodlot_id, quantity, parent.location_id, parent.product_id, parent.product_uom)" />
</form>

View File

@ -44,7 +44,7 @@ class stock_partial_picking_line(osv.TransientModel):
'product_id' : fields.many2one('product.product', string="Product", required=True, ondelete='CASCADE'),
'quantity' : fields.float("Quantity", digits_compute=dp.get_precision('Product UoM'), required=True),
'product_uom': fields.many2one('product.uom', 'Unit of Measure', required=True, ondelete='CASCADE'),
'prodlot_id' : fields.many2one('stock.production.lot', 'Production Lot', ondelete='CASCADE'),
'prodlot_id' : fields.many2one('stock.production.lot', 'Serial Number', ondelete='CASCADE'),
'location_id': fields.many2one('stock.location', 'Location', required=True, ondelete='CASCADE', domain = [('usage','<>','view')]),
'location_dest_id': fields.many2one('stock.location', 'Dest. Location', required=True, ondelete='CASCADE',domain = [('usage','<>','view')]),
'move_id' : fields.many2one('stock.move', "Move", ondelete='CASCADE'),