mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
[IMP] report_qweb_signer: Black python code
This commit is contained in:
committed by
Omar (Comunitea)
parent
e9665dcfb3
commit
b2b51f0e4c
@@ -5,38 +5,51 @@ from odoo import api, fields, models
|
||||
|
||||
|
||||
class ReportCertificate(models.Model):
|
||||
_name = 'report.certificate'
|
||||
_description = 'Report Certificate'
|
||||
_order = 'sequence,id'
|
||||
_name = "report.certificate"
|
||||
_description = "Report Certificate"
|
||||
_order = "sequence,id"
|
||||
|
||||
@api.model
|
||||
def _default_company(self):
|
||||
m_company = self.env['res.company']
|
||||
return m_company._company_default_get('report.certificate')
|
||||
m_company = self.env["res.company"]
|
||||
return m_company._company_default_get("report.certificate")
|
||||
|
||||
sequence = fields.Integer(default=10)
|
||||
name = fields.Char(required=True)
|
||||
path = fields.Char(
|
||||
string="Certificate file path", required=True,
|
||||
help="Path to PKCS#12 certificate file")
|
||||
string="Certificate file path",
|
||||
required=True,
|
||||
help="Path to PKCS#12 certificate file",
|
||||
)
|
||||
password_file = fields.Char(
|
||||
string="Password file path", required=True,
|
||||
help="Path to certificate password file")
|
||||
string="Password file path",
|
||||
required=True,
|
||||
help="Path to certificate password file",
|
||||
)
|
||||
model_id = fields.Many2one(
|
||||
string="Model", required=True,
|
||||
comodel_name='ir.model',
|
||||
help="Model where apply this certificate")
|
||||
string="Model",
|
||||
required=True,
|
||||
comodel_name="ir.model",
|
||||
help="Model where apply this certificate",
|
||||
)
|
||||
domain = fields.Char(
|
||||
string="Domain",
|
||||
help="Domain for filtering if sign or not the document")
|
||||
help="Domain for filtering if sign or not the document",
|
||||
)
|
||||
allow_only_one = fields.Boolean(
|
||||
string="Allow only one document", default=True,
|
||||
string="Allow only one document",
|
||||
default=True,
|
||||
help="If True, this certificate can not be useb to sign "
|
||||
"a PDF from several documents.")
|
||||
"a PDF from several documents.",
|
||||
)
|
||||
attachment = fields.Char(
|
||||
string="Save as attachment",
|
||||
help="Filename used to store signed document as attachment. "
|
||||
"Keep empty to not save signed document.")
|
||||
"Keep empty to not save signed document.",
|
||||
)
|
||||
company_id = fields.Many2one(
|
||||
string='Company', comodel_name='res.company',
|
||||
required=True, default=_default_company)
|
||||
string="Company",
|
||||
comodel_name="res.company",
|
||||
required=True,
|
||||
default=_default_company,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user