Don't force opportunity reference if already set
issue4315 review14621002
This commit is contained in:
1 parent
1344689f77
commit
b73f45fb2a
1 file changed
+3
-2
+3
-2
@@ -211,10 +211,11 @@ class SaleOpportunity(Workflow, ModelSQL, ModelView):
|
||||
Sequence = pool.get('ir.sequence')
|
||||
Config = pool.get('sale.configuration')
|
||||
|
||||
sequence = Config(1).sale_opportunity_sequence
|
||||
vlist = [x.copy() for x in vlist]
|
||||
for vals in vlist:
|
||||
vals['reference'] = Sequence.get_id(sequence.id)
|
||||
if not vals.get('reference'):
|
||||
sequence = Config(1).sale_opportunity_sequence
|
||||
vals['reference'] = Sequence.get_id(sequence.id)
|
||||
return super(SaleOpportunity, cls).create(vlist)
|
||||
|
||||
@classmethod
|
||||
|
||||
Reference in new issue
Block a user