Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions sign_oca/README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

========
Sign Oca
========
Expand All @@ -17,7 +13,7 @@ Sign Oca
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsign-lightgray.png?logo=github
Expand Down
1 change: 1 addition & 0 deletions sign_oca/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"data/ir_sequence_data.xml",
"wizards/sign_oca_template_generate.xml",
"wizards/sign_oca_template_generate_multi.xml",
"wizards/share.xml",
"views/res_partner_views.xml",
"views/sign_oca_request_log.xml",
"views/sign_oca_request.xml",
Expand Down
10 changes: 10 additions & 0 deletions sign_oca/models/sign_oca_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,16 @@ def action_send_signed_request(self):
attachment_ids=attachments.ids,
)

def action_open_share_wizard(self):
return {
"name": "Share Sign Request",
"type": "ir.actions.act_window",
"res_model": "sign.request.share.wizard",
"view_mode": "form",
"target": "new",
"context": {"default_request_id": self.id},
}

def _check_signed(self):
self.ensure_one()
if self.state != "0_sent":
Expand Down
1 change: 1 addition & 0 deletions sign_oca/security/ir.model.access.csv
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ edit_sign_generate_signer,edit_sign_generate_signer,model_sign_oca_template_gene
edit_sign_generate_multi,edit_sign_generate_multi,model_sign_oca_template_generate_multi,sign_oca_group_user,1,1,1,1
access_sign_request_log,access_sign_request_log,model_sign_oca_request_log,sign_oca_group_user,1,0,0,0
access_sign_request_log_admin,access_sign_request_log_admin,model_sign_oca_request_log,sign_oca_group_admin,1,1,1,1
access_sign_request_share_wizard,access_sign_request_share_wizard,model_sign_request_share_wizard,sign_oca_group_admin,1,1,1,1
42 changes: 18 additions & 24 deletions sign_oca/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>README.rst</title>
<title>Sign Oca</title>
<style type="text/css">

/*
Expand Down Expand Up @@ -360,21 +360,16 @@
</style>
</head>
<body>
<div class="document">
<div class="document" id="sign-oca">
<h1 class="title">Sign Oca</h1>


<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
</a>
<div class="section" id="sign-oca">
<h1>Sign Oca</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:b17d01dcbe348901b5e778fda1c276bbd58e85a4a1c3f1cdffbb855ad51afe05
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/sign/tree/16.0/sign_oca"><img alt="OCA/sign" src="https://img.shields.io/badge/github-OCA%2Fsign-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/sign-16-0/sign-16-0-sign_oca"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/sign&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/sign/tree/16.0/sign_oca"><img alt="OCA/sign" src="https://img.shields.io/badge/github-OCA%2Fsign-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/sign-16-0/sign-16-0-sign_oca"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/sign&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module allows to create documents for signature inside Odoo using
OWL.</p>
<p><strong>Table of contents</strong></p>
Expand Down Expand Up @@ -403,17 +398,17 @@ <h1>Sign Oca</h1>
</ul>
</div>
<div class="section" id="configuration">
<h2><a class="toc-backref" href="#toc-entry-1">Configuration</a></h2>
<h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
<p>There is a wizard (sign.oca.template.generate.multi) that can be used
for any model needed. If there is a template without a linked model or
linked to a model (res.partner for example) an action will be
automatically displayed in the tree and form view (only for users with
Sign permissions).</p>
</div>
<div class="section" id="usage">
<h2><a class="toc-backref" href="#toc-entry-2">Usage</a></h2>
<h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
<div class="section" id="creation-of-templates">
<h3><a class="toc-backref" href="#toc-entry-3">Creation of templates</a></h3>
<h2><a class="toc-backref" href="#toc-entry-3">Creation of templates</a></h2>
<ul class="simple">
<li>Access Sign / Templates</li>
<li>Create a new template</li>
Expand All @@ -425,7 +420,7 @@ <h3><a class="toc-backref" href="#toc-entry-3">Creation of templates</a></h3>
</ul>
</div>
<div class="section" id="sign-role">
<h3><a class="toc-backref" href="#toc-entry-4">Sign role</a></h3>
<h2><a class="toc-backref" href="#toc-entry-4">Sign role</a></h2>
<ul class="simple">
<li>Access Sign / Settings / Roles</li>
<li>Create a new role (Equipment employee for example)</li>
Expand All @@ -436,7 +431,7 @@ <h3><a class="toc-backref" href="#toc-entry-4">Sign role</a></h3>
</ul>
</div>
<div class="section" id="sign-a-document-from-template">
<h3><a class="toc-backref" href="#toc-entry-5">Sign a document from template</a></h3>
<h2><a class="toc-backref" href="#toc-entry-5">Sign a document from template</a></h2>
<ul class="simple">
<li>Access Sign / Templates</li>
<li>Press the Sign button from a template</li>
Expand All @@ -451,7 +446,7 @@ <h3><a class="toc-backref" href="#toc-entry-5">Sign a document from template</a>
</ul>
</div>
<div class="section" id="sign-a-pending-document">
<h3><a class="toc-backref" href="#toc-entry-6">Sign a pending document</a></h3>
<h2><a class="toc-backref" href="#toc-entry-6">Sign a pending document</a></h2>
<ul class="simple">
<li>Go to the pencil icon in the upper right corner (systray) of the sign
request to access the pending signatures.</li>
Expand All @@ -464,7 +459,7 @@ <h3><a class="toc-backref" href="#toc-entry-6">Sign a pending document</a></h3>
</ul>
</div>
<div class="section" id="sign-from-template">
<h3><a class="toc-backref" href="#toc-entry-7">Sign from template</a></h3>
<h2><a class="toc-backref" href="#toc-entry-7">Sign from template</a></h2>
<ul class="simple">
<li>Go to any list view or form view (except sign.oca models), e.g.:
Contacts</li>
Expand All @@ -482,9 +477,9 @@ <h3><a class="toc-backref" href="#toc-entry-7">Sign from template</a></h3>
</div>
</div>
<div class="section" id="known-issues-roadmap">
<h2><a class="toc-backref" href="#toc-entry-8">Known issues / Roadmap</a></h2>
<h1><a class="toc-backref" href="#toc-entry-8">Known issues / Roadmap</a></h1>
<div class="section" id="tasks">
<h3><a class="toc-backref" href="#toc-entry-9">Tasks</a></h3>
<h2><a class="toc-backref" href="#toc-entry-9">Tasks</a></h2>
<ul class="simple">
<li>Ensure that the signature is inalterable. Maybe we might need to use
some tools like endevise or pyHanko with a certificate. Signer can be
Expand All @@ -493,23 +488,23 @@ <h3><a class="toc-backref" href="#toc-entry-9">Tasks</a></h3>
</div>
</div>
<div class="section" id="bug-tracker">
<h2><a class="toc-backref" href="#toc-entry-10">Bug Tracker</a></h2>
<h1><a class="toc-backref" href="#toc-entry-10">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/sign/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/sign/issues/new?body=module:%20sign_oca%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h2><a class="toc-backref" href="#toc-entry-11">Credits</a></h2>
<h1><a class="toc-backref" href="#toc-entry-11">Credits</a></h1>
<div class="section" id="authors">
<h3><a class="toc-backref" href="#toc-entry-12">Authors</a></h3>
<h2><a class="toc-backref" href="#toc-entry-12">Authors</a></h2>
<ul class="simple">
<li>Dixmit</li>
</ul>
</div>
<div class="section" id="contributors">
<h3><a class="toc-backref" href="#toc-entry-13">Contributors</a></h3>
<h2><a class="toc-backref" href="#toc-entry-13">Contributors</a></h2>
<ul class="simple">
<li>Enric Tobella (<a class="reference external" href="http://www.dixmit.com">www.dixmit.com</a>)</li>
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:<ul>
Expand All @@ -523,7 +518,7 @@ <h3><a class="toc-backref" href="#toc-entry-13">Contributors</a></h3>
</ul>
</div>
<div class="section" id="maintainers">
<h3><a class="toc-backref" href="#toc-entry-14">Maintainers</a></h3>
<h2><a class="toc-backref" href="#toc-entry-14">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
Expand All @@ -538,6 +533,5 @@ <h3><a class="toc-backref" href="#toc-entry-14">Maintainers</a></h3>
</div>
</div>
</div>
</div>
</body>
</html>
7 changes: 7 additions & 0 deletions sign_oca/views/sign_oca_request.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@
<field name="arch" type="xml">
<form create="0">
<header>
<button
name="action_open_share_wizard"
class="btn btn-primary"
type="object"
string="Sign on Behalf"
icon="fa-pencil"
/>
<button
string="Sign"
name="sign"
Expand Down
1 change: 1 addition & 0 deletions sign_oca/wizards/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from . import res_config_settings
from . import sign_oca_template_generate
from . import sign_oca_template_generate_multi
from . import share
16 changes: 16 additions & 0 deletions sign_oca/wizards/share.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2025 Kencove - Mohamed Alkobrosli
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import fields, models


class SignRequestShareWizard(models.TransientModel):
_name = "sign.request.share.wizard"
_description = "Share Sign Request Wizard"

request_id = fields.Many2one("sign.oca.request", required=True)
signer_ids = fields.One2many(
"sign.oca.request.signer",
related="request_id.signer_ids",
string="Signers",
)
23 changes: 23 additions & 0 deletions sign_oca/wizards/share.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2025 Kencove - Mohamed Alkobrosli
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>
<record id="view_sign_request_share_wizard" model="ir.ui.view">
<field name="name">sign.request.share.wizard.form</field>
<field name="model">sign.request.share.wizard</field>
<field name="arch" type="xml">
<form string="Share Sign Request">
<field name="request_id" invisible="1" />
<field name="signer_ids" widget="one2many" nolabel="1">
<tree editable="false">
<field name="partner_id" />
<field name="access_url" readonly="1" widget="url" />
</tree>
</field>
<footer>
<button string="Close" class="btn-secondary" special="cancel" />
</footer>
</form>
</field>
</record>
</odoo>