Skip to content
Snippets Groups Projects
Commit df870d8d authored by Santiago Said's avatar Santiago Said
Browse files

Merge branch 'fixRU-OmmitRecalcTS' into '12.0-stage'

[FIX] If RU has an RP associated, do not trigger TS recalc

See merge request !291
parents 4adbc02c 346234f7
No related branches found
No related tags found
1 merge request!291[FIX] If RU has an RP associated, do not trigger TS recalc
......@@ -63,6 +63,11 @@ class ResPartner(models.Model):
@api.multi
def write(self, vals):
res = super(ResPartner, self).write(vals)
RU = self.env['res.users']
ruass = RU.search([('partner_id', '=', self.id)])
if ruass:
_logger.warning('There is a %s associated with %s: Omitting _compute_timesheet.' % (ruass, self))
return res
if "active" in vals:
self._compute_timesheet()
return res
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment