To update sequence to number and checks from the value encoded in the wizard, first we have to go in .py file (Python file) After that we have to decide where we want to update the sequence to number and then write python code to that field from start to end. Use below .py code in python file:
dummy, sequence_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account_check_writing', 'sequence_check_number')
increment = ir_sequence_obj.read(cr, uid, [sequence_id], ['number_increment'])[0]['number_increment']
new_value = self.browse(cr, uid, ids[0], context=context).check_number
ir_sequence_obj.write(cr, uid, sequence_id, {'number_next': new_value})
0 Comment(s)