Skip to content

Instantly share code, notes, and snippets.

@Endika
Created May 20, 2016 12:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Endika/4609fe81473230031219d2d1a545f284 to your computer and use it in GitHub Desktop.
Save Endika/4609fe81473230031219d2d1a545f284 to your computer and use it in GitHub Desktop.
@api.model
def create(self, vals):
if vals:
vals.update({
'seq_id': self.env['ir.sequence'].get('seq.obj.name')
})
return super(PurchaseOrder, self).create(vals)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment