1128
1128
write_values = {'origin': origin}
1129
1129
purchase_read = self.pool.get('purchase.order').read(cr, uid, purchase_ids[0], ['categ', 'priority'])
1130
1130
# update categ and prio if they are different from the existing po one's.
1132
1132
write_values['categ'] = 'other'
1134
1134
if priority_sorted[values['priority']] < priority_sorted[purchase_read['priority']]:
1135
1135
write_values['priority'] = values['priority']
1136
1136
self.pool.get('purchase.order').write(cr, uid, purchase_ids[0], write_values, context=context)