Merge lp:~openerp-dev/openobject-addons/trunk-addons7-update-aja

bzr revid: jam@tinyerp.com-20120910074258-mg2tcxqdmclldo8o
This commit is contained in:
Jigar Amin - OpenERP 2012-09-10 13:12:58 +05:30
commit af555bdd84
3 changed files with 76 additions and 77 deletions

View File

@ -436,8 +436,8 @@ class mrp_production(osv.osv):
return dest_location_id.id
_columns = {
'name': fields.char('Reference', size=64, required=True, states={'in_production':[('readonly',True)],'ready':[('readonly',True)]}),
'origin': fields.char('Source Document', size=64, help="Reference of the document that generated this production order request.", states={'in_production':[('readonly',True)],'ready':[('readonly',True)]}),
'name': fields.char('Reference', size=64, required=True, states={'in_production':[('readonly',True)],'ready':[('readonly',True)],'done':[('readonly',True)]}),
'origin': fields.char('Source Document', size=64, help="Reference of the document that generated this production order request.", states={'in_production':[('readonly',True)],'ready':[('readonly',True)],'done':[('readonly',True)]}),
'priority': fields.selection([('0','Not urgent'),('1','Normal'),('2','Urgent'),('3','Very Urgent')], 'Priority', select=True),
'product_id': fields.many2one('product.product', 'Product', required=True, readonly=True, states={'draft':[('readonly',False)]}),
@ -452,9 +452,9 @@ class mrp_production(osv.osv):
readonly=True, states={'draft':[('readonly',False)]}, help="Location where the system will stock the finished products."),
'date_planned_end': fields.function(_production_date_end, type='date', string='Scheduled End Date'),
'date_planned_date': fields.function(_production_date, type='date', string='Scheduled Date', states={'in_production':[('readonly',True)],'ready':[('readonly',True)]}),
'date_planned': fields.datetime('Scheduled Date', required=True, select=1, states={'in_production':[('readonly',True)],'ready':[('readonly',True)]}),
'date_start': fields.datetime('Start Date', select=True, states={'in_production':[('readonly',True)],'ready':[('readonly',True)]}),
'date_planned_date': fields.function(_production_date, type='date', string='Scheduled Date', states={'in_production':[('readonly',True)],'ready':[('readonly',True)],'done':[('readonly',True)]}),
'date_planned': fields.datetime('Scheduled Date', required=True, select=1, states={'in_production':[('readonly',True)],'ready':[('readonly',True)],'confirmed':[('readonly',True)],'done':[('readonly',True)]}),
'date_start': fields.datetime('Start Date', select=True, states={'in_production':[('readonly',True)],'ready':[('readonly',True)],'done':[('readonly',True)]}),
'date_finished': fields.datetime('End Date', select=True),
'bom_id': fields.many2one('mrp.bom', 'Bill of Material', domain=[('bom_id','=',False)], readonly=True, states={'draft':[('readonly',False)]}),
@ -463,11 +463,11 @@ class mrp_production(osv.osv):
help="This is the Internal Picking List that brings the finished product to the production plan"),
'move_prod_id': fields.many2one('stock.move', 'Product Move', readonly=True),
'move_lines': fields.many2many('stock.move', 'mrp_production_move_ids', 'production_id', 'move_id', 'Products to Consume', domain=[('state','not in', ('done', 'cancel'))], states={'done':[('readonly',True)],'in_production':[('readonly',True)],'ready':[('readonly',True)]}),
'move_lines2': fields.many2many('stock.move', 'mrp_production_move_ids', 'production_id', 'move_id', 'Consumed Products', domain=[('state','in', ('done', 'cancel'))], states={'in_production':[('readonly',True)],'ready':[('readonly',True)]}),
'move_lines2': fields.many2many('stock.move', 'mrp_production_move_ids', 'production_id', 'move_id', 'Consumed Products', domain=[('state','in', ('done', 'cancel'))], states={'in_production':[('readonly',True)],'ready':[('readonly',True)],'done':[('readonly',True)]}),
'move_created_ids': fields.one2many('stock.move', 'production_id', 'Products to Produce', domain=[('state','not in', ('done', 'cancel'))], states={'done':[('readonly',True)],'in_production':[('readonly',True)],'ready':[('readonly',True)]}),
'move_created_ids2': fields.one2many('stock.move', 'production_id', 'Produced Products', domain=[('state','in', ('done', 'cancel'))]),
'product_lines': fields.one2many('mrp.production.product.line', 'production_id', 'Scheduled goods',states={'in_production':[('readonly',True)],'ready':[('readonly',True)]}),
'workcenter_lines': fields.one2many('mrp.production.workcenter.line', 'production_id', 'Work Centers Utilisation', states={'in_production':[('readonly',True)],'ready':[('readonly',True)]}),
'product_lines': fields.one2many('mrp.production.product.line', 'production_id', 'Scheduled goods',states={'in_production':[('readonly',True)],'ready':[('readonly',True)],'done':[('readonly',True)]}),
'workcenter_lines': fields.one2many('mrp.production.workcenter.line', 'production_id', 'Work Centers Utilisation', states={'in_production':[('readonly',True)],'ready':[('readonly',True)],'done':[('readonly',True)]}),
'state': fields.selection([('draft','New'),('cancel','Cancelled'),('picking_except', 'Picking Exception'),('confirmed','Waiting Goods'),('ready','Ready to Produce'),('in_production','Production Started'),('done','Done')],'Status', readonly=True,
help='When the production order is created the state is set to \'Draft\'.\n If the order is confirmed the state is set to \'Waiting Goods\'.\n If any exceptions are there, the state is set to \'Picking Exception\'.\
\nIf the stock is available then the state is set to \'Ready to Produce\'.\n When the production gets started then the state is set to \'In Production\'.\n When the production is over, the state is set to \'Done\'.'),

View File

@ -345,74 +345,73 @@
<field name="model">mrp.bom</field>
<field name="arch" type="xml">
<form string="Bill of Material" version="7.0">
<sheet>
<div class="oe_title">
<h1>Bill of Material <field name="name" class="oe_inline"/></h1>
</div>
<group>
<group>
<group>
<field name="product_id" on_change="onchange_product_id(product_id, name, context)" class="oe_inline"/>
<label for="product_qty"/>
<div>
<field name="product_qty" class="oe_inline"/>
<field name="product_uom" class="oe_inline" groups="product.group_uom"/>
</div>
<label for="product_uos_qty" groups="product.group_uos"/>
<div groups="product.group_uos" >
<field name="product_uos_qty"
class="oe_inline"/>
<label string="-" attrs="{'invisible':[('product_uos','=',False)]}" class="oe_inline"/>
<field name="product_uos" class="oe_inline"/>
</div>
</group>
<group>
<field name="routing_id" class="oe_inline"/>
<field name="code" string="Reference"/>
<field name="type"/>
<p colspan="2" class="oe_grey" attrs="{'invisible': [('type','=','normal')]}">
When processing a sale order for this product, the delivery order
will contain the raw materials, instead of the finished product.
</p>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
<field name="product_id" on_change="onchange_product_id(product_id, name, context)" class="oe_inline"/>
<label for="product_qty" string="Quantity"/>
<div>
<field name="product_qty" class="oe_inline"/>
<field name="product_uom" class="oe_inline" groups="product.group_uom"/>
</div>
<label for="product_uos_qty" groups="product.group_uos"/>
<div groups="product.group_uos" >
<field name="product_uos_qty"
class="oe_inline"/>
<label string="-" attrs="{'invisible':[('product_uos','=',False)]}" class="oe_inline"/>
<field name="product_uos" class="oe_inline"/>
</div>
<div groups="mrp.group_mrp_routings">
<label for="routing_id" class="oe_edit_only"/>
<h2><field name="routing_id" class="oe_inline"/></h2>
</div>
</group>
<notebook>
<page string="Components">
<field name="bom_lines" widget="one2many_list">
<tree string="Components" editable="bottom">
<field name="product_id" on_change="onchange_product_id(product_id, name)"/>
<field name="product_qty"/>
<field name="product_uom" groups="product.group_uom"/>
<field name="name" invisible="1"/>
<field name="date_start"/>
<field name="date_stop"/>
</tree>
</field>
</page>
<page string="Properties" groups="product.group_mrp_properties">
<group>
<field name="name" class="oe_inline"/>
<field name="code" string="Reference"/>
<field name="type"/>
<p colspan="2" class="oe_grey" attrs="{'invisible': [('type','=','normal')]}">
When processing a sale order for this product, the delivery order
will contain the raw materials, instead of the finished product.
</p>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</group>
</group>
<notebook>
<page string="Components">
<field name="bom_lines" widget="one2many_list">
<tree string="Components" editable="bottom">
<field name="product_id" on_change="onchange_product_id(product_id, name)"/>
<field name="product_qty"/>
<field name="product_uom" groups="product.group_uom"/>
<field name="name" invisible="1"/>
<field name="date_start"/>
<field name="date_stop"/>
</tree>
</field>
</page>
<page string="Properties" groups="product.group_mrp_properties">
<group>
<group>
<group>
<field name="position"/>
<field name="bom_id"/>
<field name="sequence"/>
<field name="active"/>
</group>
<group>
<field name="date_start"/>
<field name="date_stop"/>
<field name="product_rounding"/>
<field name="product_efficiency"/>
</group>
<field name="position"/>
<field name="bom_id"/>
<field name="sequence"/>
<field name="active"/>
</group>
<separator string="Properties"/>
<field name="property_ids" widget="many2many_tags"/>
</page>
</notebook>
<div class="oe_chatter">
<field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
<field name="message_follower_ids" widget="mail_followers"/>
</div>
</sheet>
<group>
<field name="date_start"/>
<field name="date_stop"/>
<field name="product_rounding"/>
<field name="product_efficiency"/>
</group>
</group>
<separator string="Properties"/>
<field name="property_ids" widget="many2many_tags"/>
</page>
</notebook>
<div class="oe_chatter">
<field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
<field name="message_follower_ids" widget="mail_followers"/>
</div>
</form>
</field>
</record>
@ -626,7 +625,7 @@
</div>
<group>
<group>
<field name="product_id" on_change="product_id_change(product_id)" domain="[('bom_ids','&lt;&gt;',False),('bom_ids.bom_id','=',False)]" class="oe_inline"/>
<field name="product_id" on_change="product_id_change(product_id)" domain="[('bom_ids','&lt;&gt;',False),('bom_ids.bom_id','=',False)]" class="oe_inline" context='{"default_supply_method":"produce", "default_type": "product"}'/>
<label for="product_qty"/>
<div>
<field name="product_qty" class="oe_inline"/>
@ -634,7 +633,7 @@
<button type="action"
icon="terp-accessories-archiver+"
name="%(mrp.action_change_production_qty)d"
string="(Update)" states="ready,confirmed" class="oe_edit_only oe_link"/>
string="(Update)" states="confirmed" class="oe_edit_only oe_link"/>
</div>
<label for="product_uos_qty" groups="product.group_uos"/>
<div groups="product.group_uos">
@ -660,11 +659,11 @@
<group>
<group string="Products to Consume">
<field name="move_lines" domain="[('state','&lt;&gt;', ('done', 'cancel'))]" nolabel="1">
<tree colors="blue:state == 'draft';black:state in ('picking_except','confirmed','ready','in_production');gray:state in ('cancel','done') " string="Products to Consume">
<tree colors="blue:state == 'draft';black:state in ('picking_except','confirmed','ready');gray:state in ('cancel','done') " string="Products to Consume">
<field name="product_id"/>
<field name="product_qty" string="Quantity"/>
<field name="product_uom" string="Unit of Measure" groups="product.group_uom"/>
<field name="prodlot_id"/>
<field name="prodlot_id" groups="stock.group_production_lot"/>
<field name="state" invisible="1"/>
<button name="%(stock.move_consume)d"
string="Consume Products" type="action"

View File

@ -170,7 +170,7 @@ class split_in_production_lot(osv.osv_memory):
'product_uom': fields.many2one('product.uom', 'Unit of Measure'),
'line_ids': fields.one2many('stock.move.split.lines', 'wizard_id', 'Serial Numbers'),
'line_exist_ids': fields.one2many('stock.move.split.lines', 'wizard_exist_id', 'Serial Numbers'),
'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."),
'use_exist' : fields.boolean('Existing Serial Number', help="Check this option to select existing serial number in the list below, otherwise you should enter new ones line by line."),
'location_id': fields.many2one('stock.location', 'Source Location')
}