mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
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:
@@ -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, "
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user