Merge pull request #4485 from expsa/dev_odex25_accounting
Dev odex25 accounting
This commit is contained in:
commit
538fe2aa45
|
|
@ -271,7 +271,7 @@ class HrEmployee(models.Model):
|
|||
petty_cash_count = fields.Integer(compute='_compute_petty_cash_count')
|
||||
def _compute_petty_cash_count(self):
|
||||
for emp in self:
|
||||
items = self.env['petty.cash'].search([
|
||||
items = self.env['petty.cash'].sudo().search([
|
||||
('partner_id', '=', emp.user_id.partner_id.id),
|
||||
])
|
||||
emp.petty_cash_count = len(items)
|
||||
|
|
|
|||
Loading…
Reference in New Issue