Skip to content

Commit

Permalink
[IMP] sign_oca: Improve README
Browse files Browse the repository at this point in the history
TT41745
  • Loading branch information
victoralmau committed Jan 23, 2024
1 parent 7aa851e commit 82049ad
Show file tree
Hide file tree
Showing 5 changed files with 175 additions and 28 deletions.
58 changes: 55 additions & 3 deletions sign_oca/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Sign Oca
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:42a5e3d7fee8a597c68a320cee2c54d6825c2a5f5434c0e638604937bf41cbc6
!! source digest: sha256:6f2bbf4d5809509b940a5870c5ca38a80bb83d58624e815a74c46b309030a0ac
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down Expand Up @@ -35,6 +35,31 @@ This module allows to create documents for signature inside Odoo using OWL.
.. contents::
:local:

Configuration
=============

There is a wizard (sign.oca.template.generate.multi) that can be used for any model needed, an example would be `maintenance_sign_oca`.

It would be necessary to set an action linked to the model with the code:

.. code-block:: xml
model.action_sign_oca_template_generate_multi()
and code method:

.. code-block:: python
def action_sign_oca_template_generate_multi(self):
action = self.env.ref("sign_oca.sign_oca_template_generate_multi_act_window")
result = action.read()[0]
ctx = dict(self.env.context)
ctx.update({"default_model": self._name})
result["context"] = ctx
return result
this would allow to create `sign.request` records for the selected records (in a tree view for example).

Usage
=====

Expand All @@ -49,12 +74,34 @@ Creation of templates
* Click on the field in order to delete or edit some configuration of it
* The template is autosaved

Sign a document
~~~~~~~~~~~~~~~
Sign role
~~~~~~~~~~

* Access `Sign / Settings / Roles`
* Create a new role (Equipment employee for example)
* You can set the Partner type you need (empty, default or expression).
* With the expression option you can set: ${object.field_name.id}
* If you create a sign request from template signer will be auto-create according to roles


Sign a document from template
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* Access `Sign / Templates`
* Press the `Sign` button from a template
* Fill all the possible partners that will sign the document
* You can link the template to a model (maintenance.equipment for example)
* The signature action will be opened.
* There, you can fill all the data you need.
* Once you finish, press the sign button on the top
* When the last signer signs it, the final file will be generated as a PDF


Sign a pending document
~~~~~~~~~~~~~~~~~~~~~~~

* Go to the pencil icon in the upper right corner (systray) of the sign request to access the pending signatures.
* Press the `Sign` button from signer request
* The signature action will be opened.
* There, you can fill all the data you need.
* Once you finish, press the sign button on the top
Expand Down Expand Up @@ -93,6 +140,11 @@ Contributors

* Enric Tobella (www.dixmit.com)


* `Tecnativa <https://www.tecnativa.com>`_:

* Víctor Martínez

Maintainers
~~~~~~~~~~~

Expand Down
21 changes: 21 additions & 0 deletions sign_oca/readme/CONFIGURE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
There is a wizard (sign.oca.template.generate.multi) that can be used for any model needed, an example would be `maintenance_sign_oca`.

It would be necessary to set an action linked to the model with the code:

.. code-block:: xml
model.action_sign_oca_template_generate_multi()
and code method:

.. code-block:: python
def action_sign_oca_template_generate_multi(self):
action = self.env.ref("sign_oca.sign_oca_template_generate_multi_act_window")
result = action.read()[0]
ctx = dict(self.env.context)
ctx.update({"default_model": self._name})
result["context"] = ctx
return result
this would allow to create `sign.request` records for the selected records (in a tree view for example).
5 changes: 5 additions & 0 deletions sign_oca/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
* Enric Tobella (www.dixmit.com)


* `Tecnativa <https://www.tecnativa.com>`_:

* Víctor Martínez
26 changes: 24 additions & 2 deletions sign_oca/readme/USAGE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,34 @@ Creation of templates
* Click on the field in order to delete or edit some configuration of it
* The template is autosaved

Sign a document
~~~~~~~~~~~~~~~
Sign role
~~~~~~~~~~

* Access `Sign / Settings / Roles`
* Create a new role (Equipment employee for example)
* You can set the Partner type you need (empty, default or expression).
* With the expression option you can set: ${object.field_name.id}
* If you create a sign request from template signer will be auto-create according to roles


Sign a document from template
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* Access `Sign / Templates`
* Press the `Sign` button from a template
* Fill all the possible partners that will sign the document
* You can link the template to a model (maintenance.equipment for example)
* The signature action will be opened.
* There, you can fill all the data you need.
* Once you finish, press the sign button on the top
* When the last signer signs it, the final file will be generated as a PDF


Sign a pending document
~~~~~~~~~~~~~~~~~~~~~~~

* Go to the pencil icon in the upper right corner (systray) of the sign request to access the pending signatures.
* Press the `Sign` button from signer request
* The signature action will be opened.
* There, you can fill all the data you need.
* Once you finish, press the sign button on the top
Expand Down
93 changes: 70 additions & 23 deletions sign_oca/static/description/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
Expand Down Expand Up @@ -367,35 +366,57 @@ <h1 class="title">Sign Oca</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:42a5e3d7fee8a597c68a320cee2c54d6825c2a5f5434c0e638604937bf41cbc6
!! source digest: sha256:6f2bbf4d5809509b940a5870c5ca38a80bb83d58624e815a74c46b309030a0ac
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/14.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-14-0/sign-14-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=14.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>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#usage" id="toc-entry-1">Usage</a><ul>
<li><a class="reference internal" href="#creation-of-templates" id="toc-entry-2">Creation of templates</a></li>
<li><a class="reference internal" href="#sign-a-document" id="toc-entry-3">Sign a document</a></li>
<li><a class="reference internal" href="#configuration" id="toc-entry-1">Configuration</a></li>
<li><a class="reference internal" href="#usage" id="toc-entry-2">Usage</a><ul>
<li><a class="reference internal" href="#creation-of-templates" id="toc-entry-3">Creation of templates</a></li>
<li><a class="reference internal" href="#sign-role" id="toc-entry-4">Sign role</a></li>
<li><a class="reference internal" href="#sign-a-document-from-template" id="toc-entry-5">Sign a document from template</a></li>
<li><a class="reference internal" href="#sign-a-pending-document" id="toc-entry-6">Sign a pending document</a></li>
</ul>
</li>
<li><a class="reference internal" href="#known-issues-roadmap" id="toc-entry-4">Known issues / Roadmap</a><ul>
<li><a class="reference internal" href="#tasks" id="toc-entry-5">Tasks</a></li>
<li><a class="reference internal" href="#known-issues-roadmap" id="toc-entry-7">Known issues / Roadmap</a><ul>
<li><a class="reference internal" href="#tasks" id="toc-entry-8">Tasks</a></li>
</ul>
</li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-6">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-7">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-8">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-9">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-10">Maintainers</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-9">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-10">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-11">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-12">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-13">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="configuration">
<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, an example would be <cite>maintenance_sign_oca</cite>.</p>
<p>It would be necessary to set an action linked to the model with the code:</p>
<pre class="code xml literal-block">
model.action_sign_oca_template_generate_multi()
</pre>
<p>and code method:</p>
<pre class="code python literal-block">
<span class="k">def</span> <span class="nf">action_sign_oca_template_generate_multi</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span><span class="w">
</span> <span class="n">action</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">env</span><span class="o">.</span><span class="n">ref</span><span class="p">(</span><span class="s2">&quot;sign_oca.sign_oca_template_generate_multi_act_window&quot;</span><span class="p">)</span><span class="w">
</span> <span class="n">result</span> <span class="o">=</span> <span class="n">action</span><span class="o">.</span><span class="n">read</span><span class="p">()[</span><span class="mi">0</span><span class="p">]</span><span class="w">
</span> <span class="n">ctx</span> <span class="o">=</span> <span class="nb">dict</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">env</span><span class="o">.</span><span class="n">context</span><span class="p">)</span><span class="w">
</span> <span class="n">ctx</span><span class="o">.</span><span class="n">update</span><span class="p">({</span><span class="s2">&quot;default_model&quot;</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">_name</span><span class="p">})</span><span class="w">
</span> <span class="n">result</span><span class="p">[</span><span class="s2">&quot;context&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">ctx</span><span class="w">
</span> <span class="k">return</span> <span class="n">result</span>
</pre>
<p>this would allow to create <cite>sign.request</cite> records for the selected records (in a tree view for example).</p>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
<h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
<div class="section" id="creation-of-templates">
<h2><a class="toc-backref" href="#toc-entry-2">Creation of templates</a></h2>
<h2><a class="toc-backref" href="#toc-entry-3">Creation of templates</a></h2>
<ul class="simple">
<li>Access <cite>Sign / Templates</cite></li>
<li>Create a new template</li>
Expand All @@ -406,12 +427,34 @@ <h2><a class="toc-backref" href="#toc-entry-2">Creation of templates</a></h2>
<li>The template is autosaved</li>
</ul>
</div>
<div class="section" id="sign-a-document">
<h2><a class="toc-backref" href="#toc-entry-3">Sign a document</a></h2>
<div class="section" id="sign-role">
<h2><a class="toc-backref" href="#toc-entry-4">Sign role</a></h2>
<ul class="simple">
<li>Access <cite>Sign / Settings / Roles</cite></li>
<li>Create a new role (Equipment employee for example)</li>
<li>You can set the Partner type you need (empty, default or expression).</li>
<li>With the expression option you can set: ${object.field_name.id}</li>
<li>If you create a sign request from template signer will be auto-create according to roles</li>
</ul>
</div>
<div class="section" id="sign-a-document-from-template">
<h2><a class="toc-backref" href="#toc-entry-5">Sign a document from template</a></h2>
<ul class="simple">
<li>Access <cite>Sign / Templates</cite></li>
<li>Press the <cite>Sign</cite> button from a template</li>
<li>Fill all the possible partners that will sign the document</li>
<li>You can link the template to a model (maintenance.equipment for example)</li>
<li>The signature action will be opened.</li>
<li>There, you can fill all the data you need.</li>
<li>Once you finish, press the sign button on the top</li>
<li>When the last signer signs it, the final file will be generated as a PDF</li>
</ul>
</div>
<div class="section" id="sign-a-pending-document">
<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>
<li>Press the <cite>Sign</cite> button from signer request</li>
<li>The signature action will be opened.</li>
<li>There, you can fill all the data you need.</li>
<li>Once you finish, press the sign button on the top</li>
Expand All @@ -420,9 +463,9 @@ <h2><a class="toc-backref" href="#toc-entry-3">Sign a document</a></h2>
</div>
</div>
<div class="section" id="known-issues-roadmap">
<h1><a class="toc-backref" href="#toc-entry-4">Known issues / Roadmap</a></h1>
<h1><a class="toc-backref" href="#toc-entry-7">Known issues / Roadmap</a></h1>
<div class="section" id="tasks">
<h2><a class="toc-backref" href="#toc-entry-5">Tasks</a></h2>
<h2><a class="toc-backref" href="#toc-entry-8">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.
Expand All @@ -431,29 +474,33 @@ <h2><a class="toc-backref" href="#toc-entry-5">Tasks</a></h2>
</div>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-6">Bug Tracker</a></h1>
<h1><a class="toc-backref" href="#toc-entry-9">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:%2014.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">
<h1><a class="toc-backref" href="#toc-entry-7">Credits</a></h1>
<h1><a class="toc-backref" href="#toc-entry-10">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#toc-entry-8">Authors</a></h2>
<h2><a class="toc-backref" href="#toc-entry-11">Authors</a></h2>
<ul class="simple">
<li>Dixmit</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#toc-entry-9">Contributors</a></h2>
<h2><a class="toc-backref" href="#toc-entry-12">Contributors</a></h2>
<ul class="simple">
<li>Enric Tobella (www.dixmit.com)</li>
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:<ul>
<li>Víctor Martínez</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-10">Maintainers</a></h2>
<h2><a class="toc-backref" href="#toc-entry-13">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" /></a>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
Expand Down

0 comments on commit 82049ad

Please sign in to comment.