Merge pull request #287 from SimoRubi/10.0-fix-quality_control-sequence_get_deprecated

[FIX] get ir_sequence.get method is deprecated
This commit is contained in:
Pedro M. Baeza
2018-07-05 10:10:37 +02:00
committed by GitHub
2 changed files with 3 additions and 2 deletions

View File

@@ -8,7 +8,7 @@
{
"name": "Quality control",
"version": "10.0.1.0.2",
"version": "10.0.1.0.3",
"category": "Quality control",
"license": "AGPL-3",
"author": "OdooMRP team, "

View File

@@ -88,7 +88,8 @@ class QcInspection(models.Model):
@api.model
def create(self, vals):
if vals.get('name', '/') == '/':
vals['name'] = self.env['ir.sequence'].get('qc.inspection')
vals['name'] = self.env['ir.sequence'] \
.next_by_code('qc.inspection')
return super(QcInspection, self).create(vals)
@api.multi