[FIX] HR Evaluation Plan Phase \n[FIX] POS Retun Picking
bzr revid: jam@tinyerp.com-20101015132640-ieziln79k73pmtov
This commit is contained in:
@@ -51,7 +51,7 @@ class hr_evaluation_plan_phase(osv.osv):
|
||||
'name': fields.char("Phase", size=64, required=True),
|
||||
'sequence': fields.integer("Sequence"),
|
||||
'company_id': fields.related('plan_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True),
|
||||
'plan_id': fields.many2one('hr_evaluation.plan','Evaluation Plan', required=True, ondelete='cascade'),
|
||||
'plan_id': fields.many2one('hr_evaluation.plan','Evaluation Plan', ondelete='cascade'),
|
||||
'action': fields.selection([
|
||||
('top-down','Top-Down Appraisal Requests'),
|
||||
('bottom-up','Bottom-Up Appraisal Requests'),
|
||||
|
||||
@@ -143,6 +143,23 @@ class pos_return(osv.osv_memory):
|
||||
@return: Return the add product form again for adding more product
|
||||
|
||||
"""
|
||||
current_rec = self.read(cr, uid, data[0], context=context)
|
||||
order_obj =self.pool.get('pos.order')
|
||||
line_obj = self.pool.get('pos.order.line')
|
||||
pos_current = order_obj.browse(cr, uid, context.get('active_id'))
|
||||
pos_line_ids = pos_current.lines
|
||||
if pos_line_ids:
|
||||
for pos_line in pos_line_ids:
|
||||
line_field = "return"+str(pos_line.id)
|
||||
pos_list = current_rec.keys()
|
||||
newline_vals = {}
|
||||
if line_field in pos_list :
|
||||
less_qty = current_rec.get(line_field)
|
||||
pos_cur_line = line_obj.browse(cr, uid, pos_line.id, context=context)
|
||||
qty = pos_cur_line.qty
|
||||
qty = qty - less_qty
|
||||
newline_vals.update({'qty':qty})
|
||||
line_obj.write(cr, uid, pos_line.id, newline_vals, context=context)
|
||||
return {
|
||||
'name': _('Add Product'),
|
||||
'view_type': 'form',
|
||||
|
||||
Reference in New Issue
Block a user