Commit ff198638 authored by Santiago Said's avatar Santiago Said
Browse files

Merge branch '7.0-stage' into '7.0'

7.0 stage

See merge request !10
parents 9875df02 111d139d
Branches
1 merge request!107.0 stage
Showing with 17 additions and 1 deletion
......@@ -26,7 +26,7 @@
'description': """""",
'author': '',
'website': 'http://www.eynes.com.ar/',
'depends': ['mrp', 'jasper_reports'],
'depends': ['mrp', 'jasper_reports', 'delivery_cot'],
'init_xml': [],
'data': [
'anadelia_produccion_view.xml',
......
......@@ -493,6 +493,22 @@ class stock_picking(osv.osv):
'operation_code': fields.char('Operation Code', size=13),
}
def _get_packages(self, cr, uid, ids, context=None):
"""
Overriden to use the qty_x_package defined in product
"""
if context is None:
context = {}
for line in self.browse(cr, uid, ids, context=context):
qty = 0
aux = 0
for move in line.move_lines:
q_x_p = line.product_id.qty_x_package
if q_x_p:
aux = move.product_qty / q_x_p
qty += aux
return qty
def create(self, cr, uid, vals, context=None):
vals['operation_code'] = self.pool.get('ir.sequence').get(cr, uid, 'picking.code') or '/'
return super(stock_picking, self).create(cr, uid, vals, context=context)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment