I'm trying to figure how the .get works, i'm looking the code from sale.py and how the sequence is added to any saleOrder and trying to understand this.
if vals.get('sequence','New') == 'New':
As I understand the vals.get('sequence') will return the value from the sequence field. But I don't know and I didn't find information about the use of the other parameters and how gets compared with the string "New" (Or if is a reserved word for a new register).
That New is used after in the value assignation for the 'sequence' field, as the following code shows.
if vals.get('sequence','New') == 'New':
vals['sequence'] = self.env['ir.sequence'].next_by_code(sequence_name)
result = super(feature,self).create(vals)
return result
Hope you can help me with my question.
Regards.