[FIX] POS: Lots in POS => Add product lot on pos order line for validate pos order for product which has tracking outgoing set to true

lp bug: https://launchpad.net/bugs/710561 fixed

bzr revid: mra@mra-laptop-20110204113247-732fgockzszz7n6k
This commit is contained in:
Mustufa Rangwala 2011-02-04 17:02:47 +05:30
parent 51e3c0dff5
commit 8f43d299d0
3 changed files with 9 additions and 2 deletions

View File

@ -1428,6 +1428,11 @@ msgstr ""
msgid "Person who uses the the cash register. It could be a reliever, a student or an interim employee."
msgstr ""
#. module: point_of_sale
#: help:pos.order.line, prodlot_id:0
msgid "You can specify Production lot for stock move created when you validate the pos order"
msgstr ""
#. module: point_of_sale
#: field:report.transaction.pos,invoice_id:0
msgid "Nbr Invoice"

View File

@ -423,7 +423,7 @@ class pos_order(osv.osv):
"""Create a picking for each order and validate it."""
picking_obj = self.pool.get('stock.picking')
property_obj = self.pool.get("ir.property")
move_obj=self.pool.get('stock.move')
move_obj = self.pool.get('stock.move')
pick_name = self.pool.get('ir.sequence').get(cr, uid, 'stock.picking.out')
orders = self.browse(cr, uid, ids, context=context)
for order in orders:
@ -464,7 +464,6 @@ class pos_order(osv.osv):
stock_dest_id = val.id
if line.qty < 0:
location_id, stock_dest_id = stock_dest_id, location_id
move_obj.create(cr, uid, {
'name': '(POS %d)' % (order.id, ),
'product_uom': line.product_id.uom_id.id,
@ -478,6 +477,7 @@ class pos_order(osv.osv):
'state': 'waiting',
'location_id': location_id,
'location_dest_id': stock_dest_id,
'prodlot_id': line.prodlot_id and line.prodlot_id.id or False
}, context=context)
wf_service = netsvc.LocalService("workflow")
@ -1147,6 +1147,7 @@ class pos_order_line(osv.osv):
'discount': fields.float('Discount (%)', digits=(16, 2)),
'order_id': fields.many2one('pos.order', 'Order Ref', ondelete='cascade'),
'create_date': fields.datetime('Creation Date', readonly=True),
'prodlot_id': fields.many2one('stock.production.lot', 'Production Lot', help="You can specify Production lot for stock move created when you validate the pos order"),
}
_defaults = {

View File

@ -41,6 +41,7 @@
<field name="price_unit"/>
<field name="notice"/>
<field name="serial_number"/>
<field name="prodlot_id" domain="[('product_id','=',product_id)]"/>
</form>
</field>
<group colspan="4" col="7">