Skip to content

Commit

Permalink
[ADD] access right for wizrard print attachment and fix trans format
Browse files Browse the repository at this point in the history
  • Loading branch information
sonhd committed Apr 14, 2022
1 parent c24ea1b commit c7fac1b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
17 changes: 17 additions & 0 deletions base_report_to_printer/security/security.xml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,23 @@
<field name="name">Update printer wizard</field>
<field name="model_id" ref="model_printing_printer_update_wizard" />
<field name="group_id" ref="printing_group_manager" />
<field eval="1" name="perm_read" />
<field eval="1" name="perm_unlink" />
<field eval="1" name="perm_write" />
</record>
<record id="access_wizard_print_attachment_user" model="ir.model.access">
<field name="name">Print Attachment User</field>
<field name="model_id" ref="model_wizard_print_attachment" />
<field name="group_id" ref="printing_group_user" />
<field eval="1" name="perm_read" />
<field eval="1" name="perm_unlink" />
<field eval="1" name="perm_write" />
<field eval="1" name="perm_create" />
</record>
<record id="access_wizard_print_attachment_line_user" model="ir.model.access">
<field name="name">Print Attachment Line User</field>
<field name="model_id" ref="model_wizard_print_attachment_line" />
<field name="group_id" ref="printing_group_user" />
<field eval="1" name="perm_read" />
<field eval="1" name="perm_unlink" />
<field eval="1" name="perm_write" />
Expand Down
14 changes: 6 additions & 8 deletions base_report_to_printer/wizards/print_attachment_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,12 @@ def print_attachments(self):
)
if errors:
return {
"warning": _(
"Following attachments could not be printed:\n\n%s"
% "\n".join(
[
_("%s (%s copies)") % (err.record_name, err.copies)
for err in errors
]
)
"warning": _("Following attachments could not be printed:\n\n%s")
% "\n".join(
[
_("%s (%s copies)") % (err.record_name, err.copies)
for err in errors
]
)
}

Expand Down

0 comments on commit c7fac1b

Please sign in to comment.