Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[15.0][FIX] hr_expense_petty_cash: add permission for internal user #190

Merged
merged 1 commit into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion hr_expense_petty_cash/models/petty_cash.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class PettyCash(models.Model):

@api.depends("partner_id", "account_id")
def _compute_petty_cash_balance(self):
aml_env = self.env["account.move.line"]
aml_env = self.sudo().env["account.move.line"]
for rec in self:
aml = aml_env.search(
[
Expand Down
1 change: 1 addition & 0 deletions hr_expense_petty_cash/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_hr_expense_petty_cash,access_hr_expense_petty_cash,model_petty_cash,account.group_account_user,1,1,1,1
access_hr_expense_petty_cash_user,access_hr_expense_petty_cash_user,model_petty_cash,base.group_user,1,0,0,0
Loading