mirror of
https://github.com/OCA/report-print-send.git
synced 2025-02-16 07:11:31 +02:00
[ADD] access right for wizrard print attachment and fix trans format
This commit is contained in:
@@ -125,6 +125,23 @@
|
|||||||
<field name="name">Update printer wizard</field>
|
<field name="name">Update printer wizard</field>
|
||||||
<field name="model_id" ref="model_printing_printer_update_wizard" />
|
<field name="model_id" ref="model_printing_printer_update_wizard" />
|
||||||
<field name="group_id" ref="printing_group_manager" />
|
<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_read" />
|
||||||
<field eval="1" name="perm_unlink" />
|
<field eval="1" name="perm_unlink" />
|
||||||
<field eval="1" name="perm_write" />
|
<field eval="1" name="perm_write" />
|
||||||
|
|||||||
@@ -42,14 +42,12 @@ class PrintAttachment(models.TransientModel):
|
|||||||
)
|
)
|
||||||
if errors:
|
if errors:
|
||||||
return {
|
return {
|
||||||
"warning": _(
|
"warning": _("Following attachments could not be printed:\n\n%s")
|
||||||
"Following attachments could not be printed:\n\n%s"
|
% "\n".join(
|
||||||
% "\n".join(
|
[
|
||||||
[
|
_("%s (%s copies)") % (err.record_name, err.copies)
|
||||||
_("%s (%s copies)") % (err.record_name, err.copies)
|
for err in errors
|
||||||
for err in errors
|
]
|
||||||
]
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user