fixed bug :
* production name should be have next sequnce number if make duplicate production order. * track records only those user which is added in user list in audittrail rules bzr revid: hmo@tinyerp.com-20090122084405-2a4tex6y6863ygy8
This commit is contained in:
parent
bddd25289a
commit
5c852de159
|
@ -332,9 +332,10 @@ def tmp_fct(fct_src):
|
|||
for thisrule in pool.get('audittrail.rule').browse(cr, uid, rule_ids):
|
||||
for user in thisrule.user_id:
|
||||
logged_uids.append(user.id)
|
||||
if field in ('read','write','create','unlink'):
|
||||
if getattr(thisrule, 'log_'+field):
|
||||
return log_fct(db, uid, passwd, object, method, fct_src , *args)
|
||||
if not len(logged_uids) or uid in logged_uids:
|
||||
if field in ('read','write','create','unlink'):
|
||||
if getattr(thisrule, 'log_'+field):
|
||||
return log_fct(db, uid, passwd, object, method, fct_src , *args)
|
||||
return fct_src( db, uid, passwd, object, method, *args)
|
||||
res = my_fct( db, uid, passwd, object, method, *args)
|
||||
cr.close()
|
||||
|
|
|
@ -447,6 +447,14 @@ class mrp_production(osv.osv):
|
|||
raise osv.except_osv(_('Invalid action !'), _('Cannot delete Production Order(s) which are in %s State!' % s['state']))
|
||||
return osv.osv.unlink(self, cr, uid, unlink_ids, context=context)
|
||||
|
||||
def copy(self, cr, uid, id, default=None,context={}):
|
||||
if not default:
|
||||
default = {}
|
||||
default.update({
|
||||
'name': self.pool.get('ir.sequence').get(cr, uid, 'mrp.production'),
|
||||
})
|
||||
return super(mrp_production, self).copy(cr, uid, id, default, context)
|
||||
|
||||
def location_id_change(self, cr, uid, ids, src, dest, context={}):
|
||||
if dest:
|
||||
return {}
|
||||
|
|
Loading…
Reference in New Issue