[ADD] docuseal_signing: request Docuseal signatures from Odoo #1
@@ -1,3 +1,4 @@
|
|||||||
from . import docuseal_template
|
from . import docuseal_template
|
||||||
from . import docuseal_template_field
|
from . import docuseal_template_field
|
||||||
from . import res_config_settings
|
from . import res_config_settings
|
||||||
|
from . import res_partner
|
||||||
|
|||||||
21
docuseal_signing/models/res_partner.py
Normal file
21
docuseal_signing/models/res_partner.py
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
import logging
|
||||||
|
|
||||||
|
from odoo import models
|
||||||
|
|
||||||
|
_logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
class ResPartner(models.Model):
|
||||||
|
_inherit = "res.partner"
|
||||||
|
|
||||||
|
def request_docuseal_signature(self, docuseal_template_id):
|
||||||
|
template = self.env["docuseal.template"].search(
|
||||||
|
[("template_id", "=", docuseal_template_id)], limit=1
|
||||||
|
)
|
||||||
|
if not template:
|
||||||
|
_logger.warning(
|
||||||
|
"Docuseal: no template configured in Odoo for template ID %s",
|
||||||
|
docuseal_template_id,
|
||||||
|
)
|
||||||
|
return
|
||||||
|
template._create_submissions(self)
|
||||||
Reference in New Issue
Block a user