mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[MOD] First search MO name
This commit is contained in:
committed by
Oihane Crucelaegui
parent
12ff139a02
commit
da972db6ce
@@ -71,7 +71,7 @@ class MrpProduction(models.Model):
|
||||
@api.model
|
||||
def create(self, values):
|
||||
sequence_obj = self.env['ir.sequence']
|
||||
if 'active' not in values or values['active']:
|
||||
if values.get('active', True):
|
||||
values['active'] = True
|
||||
if values.get('name', '/') == '/':
|
||||
values['name'] = sequence_obj.get('mrp.production')
|
||||
|
||||
Reference in New Issue
Block a user