|
@ -39,8 +39,7 @@ class ResPartner(orm.Model): |
|
|
|
|
|
|
|
|
def copy(self, cr, uid, id, default=None, context=None): |
|
|
def copy(self, cr, uid, id, default=None, context=None): |
|
|
default = default or {} |
|
|
default = default or {} |
|
|
if not default.get('ref') and self._needsRef(cr, uid, id=id, |
|
|
|
|
|
context=context): |
|
|
|
|
|
|
|
|
if self._needsRef(cr, uid, id=id, context=context): |
|
|
default['ref'] = self.pool.get('ir.sequence')\ |
|
|
default['ref'] = self.pool.get('ir.sequence')\ |
|
|
.next_by_code(cr, uid, 'res.partner', |
|
|
.next_by_code(cr, uid, 'res.partner', |
|
|
context=context) |
|
|
context=context) |
|
|