[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:
parent
51e3c0dff5
commit
8f43d299d0
|
@ -1428,6 +1428,11 @@ msgstr ""
|
||||||
msgid "Person who uses the the cash register. It could be a reliever, a student or an interim employee."
|
msgid "Person who uses the the cash register. It could be a reliever, a student or an interim employee."
|
||||||
msgstr ""
|
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
|
#. module: point_of_sale
|
||||||
#: field:report.transaction.pos,invoice_id:0
|
#: field:report.transaction.pos,invoice_id:0
|
||||||
msgid "Nbr Invoice"
|
msgid "Nbr Invoice"
|
||||||
|
|
|
@ -423,7 +423,7 @@ class pos_order(osv.osv):
|
||||||
"""Create a picking for each order and validate it."""
|
"""Create a picking for each order and validate it."""
|
||||||
picking_obj = self.pool.get('stock.picking')
|
picking_obj = self.pool.get('stock.picking')
|
||||||
property_obj = self.pool.get("ir.property")
|
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')
|
pick_name = self.pool.get('ir.sequence').get(cr, uid, 'stock.picking.out')
|
||||||
orders = self.browse(cr, uid, ids, context=context)
|
orders = self.browse(cr, uid, ids, context=context)
|
||||||
for order in orders:
|
for order in orders:
|
||||||
|
@ -464,7 +464,6 @@ class pos_order(osv.osv):
|
||||||
stock_dest_id = val.id
|
stock_dest_id = val.id
|
||||||
if line.qty < 0:
|
if line.qty < 0:
|
||||||
location_id, stock_dest_id = stock_dest_id, location_id
|
location_id, stock_dest_id = stock_dest_id, location_id
|
||||||
|
|
||||||
move_obj.create(cr, uid, {
|
move_obj.create(cr, uid, {
|
||||||
'name': '(POS %d)' % (order.id, ),
|
'name': '(POS %d)' % (order.id, ),
|
||||||
'product_uom': line.product_id.uom_id.id,
|
'product_uom': line.product_id.uom_id.id,
|
||||||
|
@ -478,6 +477,7 @@ class pos_order(osv.osv):
|
||||||
'state': 'waiting',
|
'state': 'waiting',
|
||||||
'location_id': location_id,
|
'location_id': location_id,
|
||||||
'location_dest_id': stock_dest_id,
|
'location_dest_id': stock_dest_id,
|
||||||
|
'prodlot_id': line.prodlot_id and line.prodlot_id.id or False
|
||||||
}, context=context)
|
}, context=context)
|
||||||
|
|
||||||
wf_service = netsvc.LocalService("workflow")
|
wf_service = netsvc.LocalService("workflow")
|
||||||
|
@ -1147,6 +1147,7 @@ class pos_order_line(osv.osv):
|
||||||
'discount': fields.float('Discount (%)', digits=(16, 2)),
|
'discount': fields.float('Discount (%)', digits=(16, 2)),
|
||||||
'order_id': fields.many2one('pos.order', 'Order Ref', ondelete='cascade'),
|
'order_id': fields.many2one('pos.order', 'Order Ref', ondelete='cascade'),
|
||||||
'create_date': fields.datetime('Creation Date', readonly=True),
|
'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 = {
|
_defaults = {
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
<field name="price_unit"/>
|
<field name="price_unit"/>
|
||||||
<field name="notice"/>
|
<field name="notice"/>
|
||||||
<field name="serial_number"/>
|
<field name="serial_number"/>
|
||||||
|
<field name="prodlot_id" domain="[('product_id','=',product_id)]"/>
|
||||||
</form>
|
</form>
|
||||||
</field>
|
</field>
|
||||||
<group colspan="4" col="7">
|
<group colspan="4" col="7">
|
||||||
|
|
Loading…
Reference in New Issue