[IMP] stock, claim views

bzr revid: nel@tinyerp.com-20100615202004-grbyetb7kwe8yewy
This commit is contained in:
nel@tinyerp.com 2010-06-15 22:20:04 +02:00
parent 45bf2eb613
commit ecd057eb70
4 changed files with 23 additions and 10 deletions

View File

@ -92,11 +92,18 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Claims">
<group colspan="4" col="4">
<field name="name"/>
<field name="date" string="Date of Claim"/>
<field name="date_deadline" string="Deadline"/>
<group colspan="4" col="4">
<group colspan="1" col="2">
<field name="name" />
</group>
<group colspan="1" col="2">
<field name="date" string="Date of Claim"/>
</group>
<group colspan="1" col="2">
<field name="date_deadline" string="Deadline"/><newline/>
</group>
</group>
<group colspan="4" col="4">
<notebook>

View File

@ -66,7 +66,7 @@ class stock_move_split_lines_exist(osv.osv_memory):
_name = "stock.move.split.lines.exist"
_inherit = "stock.move.split.lines.exist"
_columns = {
'date': fields.date('Date'),
'date': fields.date('Expiry Date'),
}
def on_change_product(self, cr, uid, ids, product_id):
if not product_id:

View File

@ -637,6 +637,7 @@
icon="terp-stock_effects-object-colorize"
states="draft,assigned,confirmed,done"/>
<button name="setlast_tracking" string="Set Last Tracking" type="object"
attrs="{'invisible': [('tracking_id','=',False)]}"
icon="terp-stock_effects-object-colorize"
states="draft,assigned,confirmed,done"/>
<field name="location_id"/>
@ -792,6 +793,7 @@
icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
states="draft,assigned,confirmed,done"/>
<button name="setlast_tracking" string="Set Last Tracking" type="object"
attrs="{'invisible': [('tracking_id','=',False)]}"
icon="terp-stock_effects-object-colorize"
states="draft,assigned,confirmed,done"/>
<field name="location_id"/>
@ -992,6 +994,7 @@
icon="terp-stock_effects-object-colorize"
states="draft,assigned,confirmed,done"/>
<button name="setlast_tracking" string="Set Last Tracking" type="object"
attrs="{'invisible': [('tracking_id','=',False)]}"
icon="terp-stock_effects-object-colorize"
states="draft,assigned,confirmed,done"/>
<field name="location_id"/>
@ -1166,9 +1169,9 @@
<page string="General Information">
<field colspan="4" name="move_lines" nolabel="1" widget="one2many_list" default_get="{'move_line':move_lines, 'address_in_id': address_id}" >
<tree colors="grey:state in ('cancel')" string="Stock Moves" editable="top">
<field name="product_id"/>
<field name="product_qty"/>
<field name="product_uom" string="Product Unit of Measure"/>
<field name="product_id" readonly="1"/>
<field name="product_qty" readonly="1"/>
<field name="product_uom" string="UOM" readonly="1"/>
<field name="location_dest_id"/>
<field name="prodlot_id" groups="base.group_extended"/>
<button
@ -1181,7 +1184,7 @@
icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
states="draft,assigned,confirmed,done"/>
<button name="setlast_tracking" string="Set Last Tracking" type="object"
icon="terp-stock_effects-object-colorize"
icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('tracking_id','=',False)]}"
states="draft,assigned,confirmed,done"/>
<field name="state"/>
<button name="%(stock.move_scrap)d"
@ -1371,6 +1374,7 @@
states="draft,assigned,confirmed,done"/>
<button name="setlast_tracking" string="Set Last Tracking" type="object"
icon="terp-stock_effects-object-colorize"
attrs="{'invisible': [('tracking_id','=',False)]}"
states="draft,assigned,confirmed,done"/>
<field name="location_id"/>
<field name="location_dest_id"/>
@ -1527,6 +1531,7 @@
icon="terp-stock_effects-object-colorize" attrs="{'invisible': [('tracking_id','&lt;&gt;',False)]}"
states="draft,assigned,confirmed,done"/>
<button name="setlast_tracking" string="Set Last Tracking" type="object"
attrs="{'invisible': [('tracking_id','=',False)]}"
icon="terp-stock_effects-object-colorize"
states="draft,assigned,confirmed,done"/>
<field name="date_planned"/>

View File

@ -258,7 +258,7 @@ class split_in_production_lot(osv.osv_memory):
prodlot_id = prodlot_obj.create(cr, uid, {'name': line.name},
# 'prefix' : line.name},
{'product_id': move.product_id.id})
move_obj.write(cr, uid, [current_move], {'prodlot_id': prodlot_id})
move_obj.write(cr, uid, [current_move], {'prodlot_id': prodlot_id, 'state':move.state})
prodlot = prodlot_obj.browse(cr, uid, prodlot_id)
# ref = '%d' % (move.id)
# if prodlot.ref:
@ -269,6 +269,7 @@ class split_in_production_lot(osv.osv_memory):
if quantity_rest > 0:
update_val['product_qty'] = quantity_rest
update_val['product_uos_qty'] = uos_qty_rest
update_val['state'] = move.state
move_obj.write(cr, uid, [move.id], update_val)
return new_move
split_in_production_lot()