[ADD] access right for wizrard print attachment and fix trans format

This commit is contained in:
sonhd
2022-01-21 10:19:14 +07:00
committed by trisdoan
parent 18df11440a
commit e16f52491c
2 changed files with 23 additions and 8 deletions

View File

@@ -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" />

View File

@@ -42,14 +42,12 @@ class PrintAttachment(models.TransientModel):
)
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
]
)
}