mirror of
https://github.com/OCA/bank-statement-import.git
synced 2025-01-20 12:37:43 +02:00
[FIX+IMP] account_statement_import: Several things post-migration:
* Read action with sudo. If not, other users from admin ones can't import statements. * Icon revamp. Now the icon is used (PNG export was needed), and a bit of tuning has been made for better appeal.
This commit is contained in:
committed by
Alexis de Lattre
parent
634dc34011
commit
0ad636d3e0
@@ -25,8 +25,10 @@ class AccountJournal(models.Model):
|
||||
def import_statement(self):
|
||||
"""return action to import bank/cash statements.
|
||||
This button should be called only on journals with type =='bank'"""
|
||||
action = self.env.ref(
|
||||
"account_statement_import.account_statement_import_action"
|
||||
).read()[0]
|
||||
action = (
|
||||
self.env.ref("account_statement_import.account_statement_import_action")
|
||||
.sudo()
|
||||
.read()[0]
|
||||
)
|
||||
action["context"] = {"journal_id": self.id}
|
||||
return action
|
||||
|
||||
Reference in New Issue
Block a user