mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
@@ -23,7 +23,7 @@ Qweb PDF reports signer
|
|||||||
:target: https://runbot.odoo-community.org/runbot/143/14.0
|
:target: https://runbot.odoo-community.org/runbot/143/14.0
|
||||||
:alt: Try me on Runbot
|
:alt: Try me on Runbot
|
||||||
|
|
||||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||||
|
|
||||||
This module extends the functionality of report module to sign
|
This module extends the functionality of report module to sign
|
||||||
PDFs using a PKCS#12 certificate.
|
PDFs using a PKCS#12 certificate.
|
||||||
|
|||||||
@@ -47,6 +47,9 @@ class IrActionsReport(models.Model):
|
|||||||
[
|
[
|
||||||
("company_id", "=", company_id),
|
("company_id", "=", company_id),
|
||||||
("model_id", "=", self.model),
|
("model_id", "=", self.model),
|
||||||
|
"|",
|
||||||
|
("action_report_ids", "=", False),
|
||||||
|
("action_report_ids", "in", self.id),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
if not certificates:
|
if not certificates:
|
||||||
|
|||||||
@@ -37,6 +37,16 @@ class ReportCertificate(models.Model):
|
|||||||
string="Domain",
|
string="Domain",
|
||||||
help="Domain for filtering if sign or not the document",
|
help="Domain for filtering if sign or not the document",
|
||||||
)
|
)
|
||||||
|
action_report_ids = fields.Many2many(
|
||||||
|
string="Allowed reports",
|
||||||
|
help="Reports to sign for the selected model."
|
||||||
|
"No report selected means all reports are allowed.",
|
||||||
|
comodel_name="ir.actions.report",
|
||||||
|
relation="report_certificate_action_report",
|
||||||
|
column1="report_certificate_id",
|
||||||
|
column2="action_report_id",
|
||||||
|
domain="[('model_id', '=', model_id)]",
|
||||||
|
)
|
||||||
allow_only_one = fields.Boolean(
|
allow_only_one = fields.Boolean(
|
||||||
string="Allow only one document",
|
string="Allow only one document",
|
||||||
default=True,
|
default=True,
|
||||||
|
|||||||
@@ -2,3 +2,6 @@
|
|||||||
then 'Save as attachment' is not applied and signed result is not
|
then 'Save as attachment' is not applied and signed result is not
|
||||||
saved as attachment.
|
saved as attachment.
|
||||||
* Add tests.
|
* Add tests.
|
||||||
|
* Why not taking the occasion to add the whole configuration at report level
|
||||||
|
(if to be signed or not, the domain, etc...)?
|
||||||
|
See https://github.com/OCA/reporting-engine/pull/533#issuecomment-898321161
|
||||||
|
|||||||
@@ -33,6 +33,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
|||||||
widget="selection"
|
widget="selection"
|
||||||
groups="base.group_multi_company"
|
groups="base.group_multi_company"
|
||||||
/>
|
/>
|
||||||
|
<field name="action_report_ids" widget="many2many_tags" />
|
||||||
</group>
|
</group>
|
||||||
<group
|
<group
|
||||||
attrs="{'invisible': [('signing_method', '!=', 'endesive')]}"
|
attrs="{'invisible': [('signing_method', '!=', 'endesive')]}"
|
||||||
|
|||||||
Reference in New Issue
Block a user