[FIX]scrap

bzr revid: csn@openerp.com-20130807110219-82bky3atj4jefox8
This commit is contained in:
Cedric Snauwaert 2013-08-07 13:02:19 +02:00
parent 2c35c5b78f
commit 05e01eafe6
6 changed files with 2 additions and 12 deletions

View File

@ -129,7 +129,6 @@ class StockMove(osv.osv):
for move in self.browse(cr, uid, ids, context=context):
new_moves = super(StockMove, self).action_scrap(cr, uid, [move.id], product_qty, location_id, context=context)
#If we are not scrapping our whole move, tracking and lot references must not be removed
#self.write(cr, uid, [move.id], {'prodlot_id': False, 'tracking_id': False})
production_ids = production_obj.search(cr, uid, [('move_lines', 'in', [move.id])])
for prod_id in production_ids:
production_obj.signal_button_produce(cr, uid, [prod_id])

View File

@ -513,7 +513,6 @@ class mrp_repair(osv.osv):
'partner_id': repair.address_id and repair.address_id.id or False,
'location_id': move.location_id.id,
'location_dest_id': move.location_dest_id.id,
'tracking_id': False,
'state': 'done',
})
repair_line_obj.write(cr, uid, [move.id], {'move_id': move_id, 'state': 'done'}, context=context)
@ -537,7 +536,6 @@ class mrp_repair(osv.osv):
'partner_id': repair.address_id and repair.address_id.id or False,
'location_id': repair.location_id.id,
'location_dest_id': repair.location_dest_id.id,
'tracking_id': False,
'state': 'assigned',
})
pick_obj.signal_button_confirm(cr, uid, [picking])

View File

@ -724,7 +724,6 @@ class pos_order(osv.osv):
'product_id': line.product_id.id,
'product_uos_qty': abs(line.qty),
'product_uom_qty': abs(line.qty),
'tracking_id': False,
'state': 'draft',
'location_id': location_id,
'location_dest_id': output_id,

View File

@ -6,7 +6,5 @@
<variant type="field" name="product_id.variants"/>
<uom type="field" name="product_uom.name"/>
<quantity type="field" name="product_uom_qty"/>
<tracking type="field" name="tracking_id.name"/>
<serial type="field" name="tracking_id.serial"/>
</lot-line>
</lots>

View File

@ -54,10 +54,6 @@
<xsl:template match="lot-line" mode="story">
<para style="nospace"><xsl:value-of select="code"/><xsl:text>, </xsl:text><xsl:value-of select="quantity"/><xsl:text> </xsl:text><xsl:value-of select="uom"/></para>
<para style="nospace"><xsl:value-of select="product"/><xsl:text> </xsl:text><xsl:value-of select="variant"/></para>
<para style="nospace">Serial: <xsl:value-of select="serial"/></para>
<para style="nospace">Tracking: <xsl:value-of select="serial"/></para>
<spacer length="0.3cm"/>
<barCode><xsl:value-of select="tracking"/></barCode>
<nextFrame/>
</xsl:template>
</xsl:stylesheet>

View File

@ -1381,8 +1381,8 @@ class stock_move(osv.osv):
'state': move.state,
'scrapped': True,
'location_dest_id': location_id,
'tracking_id': move.tracking_id.id,
'lot_id': move.lot_id.id,
#TODO lot_id is now on quant and not on move, need to do something for this
#'lot_id': move.lot_id.id,
}
new_move = self.copy(cr, uid, move.id, default_val)