Skip to content

Commit 38ad02c

Browse files
committed
[ADD] survey_sign_oca: survey and sign_oca connector
1 parent bf920eb commit 38ad02c

24 files changed

+1097
-1
lines changed

.eslintrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ env:
44

55
# See https://github.com/OCA/odoo-community.org/issues/37#issuecomment-470686449
66
parserOptions:
7-
ecmaVersion: 2019
7+
ecmaVersion: 2021
88

99
overrides:
1010
- files:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../survey_sign_oca

setup/survey_sign_oca/setup.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import setuptools
2+
3+
setuptools.setup(
4+
setup_requires=['setuptools-odoo'],
5+
odoo_addon=True,
6+
)

survey_sign_oca/README.rst

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
===============
2+
Survey Sign Oca
3+
===============
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:c6ec61a6c8661f9097946736d2cd67efc929e1531803516fa6d82728aab2c98a
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Beta
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18+
:alt: License: AGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsign-lightgray.png?logo=github
20+
:target: https://github.com/OCA/sign/tree/16.0/survey_sign_oca
21+
:alt: OCA/sign
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/sign-16-0/sign-16-0-survey_sign_oca
24+
:alt: Translate me on Weblate
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/sign&target_branch=16.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
This module allows you to make survey signature requests manually or
32+
automatically.
33+
34+
**Table of contents**
35+
36+
.. contents::
37+
:local:
38+
39+
Configuration
40+
=============
41+
42+
1. Go to Sign > Settings > Roles and create a new one with the following
43+
data if not there:
44+
45+
- For the survey participant
46+
47+
- Partner type: Expression
48+
- Expression: {{object.partner_id.id}}
49+
50+
- For the survey responsible if you want
51+
52+
- Partner type: Expression
53+
- Expression: {{object.survey_id.user_id.partner_id.id}}
54+
55+
2. Go to Sign > Settings > Fields and create a new one with the
56+
following data if not there:
57+
58+
- Field Type: text
59+
- Default Value: survey
60+
61+
3. Go to Sign > Templates and create a template with the following data:
62+
63+
- Model: Survey User Input
64+
- In some of the elements you will have to set the previously created
65+
role[s].
66+
67+
4. Go to Settings > Survey Sign OCA:
68+
69+
5. Defines the template previously created (optional, only for automatic
70+
creation of signature requests).
71+
72+
Usage
73+
=====
74+
75+
A smart-button will be displayed on the participations form view of the
76+
linked sign requests.
77+
78+
Manual Sign Request creation process:
79+
80+
::
81+
82+
- Go to Surveys \> Participations and change to list view.
83+
- Select the records that you want.
84+
- Click on the "Sign from template" action.
85+
- Select a template.
86+
- Click on Generate.
87+
- Sign Requests will have been generated (and sent) for the selected items.
88+
89+
Automatic Sign Request creation process:
90+
91+
::
92+
93+
- When an partner takes a survey, a sign request will be created automatically.
94+
95+
For generated sign requests scoping survey, input values are populated
96+
automatically with the survey answered values.
97+
98+
Signers can still update the input values if they want.
99+
100+
Bug Tracker
101+
===========
102+
103+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/sign/issues>`_.
104+
In case of trouble, please check there if your issue has already been reported.
105+
If you spotted it first, help us to smash it by providing a detailed and welcomed
106+
`feedback <https://github.com/OCA/sign/issues/new?body=module:%20survey_sign_oca%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
107+
108+
Do not contact contributors directly about support or help with technical issues.
109+
110+
Credits
111+
=======
112+
113+
Authors
114+
-------
115+
116+
* Kencove
117+
118+
Contributors
119+
------------
120+
121+
- `Kencove <https://kencove.com>`__
122+
123+
- Mohamed Alkobrosli
124+
125+
Maintainers
126+
-----------
127+
128+
This module is maintained by the OCA.
129+
130+
.. image:: https://odoo-community.org/logo.png
131+
:alt: Odoo Community Association
132+
:target: https://odoo-community.org
133+
134+
OCA, or the Odoo Community Association, is a nonprofit organization whose
135+
mission is to support the collaborative development of Odoo features and
136+
promote its widespread use.
137+
138+
.. |maintainer-Kencove| image:: https://github.com/Kencove.png?size=40px
139+
:target: https://github.com/Kencove
140+
:alt: Kencove
141+
142+
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
143+
144+
|maintainer-Kencove|
145+
146+
This module is part of the `OCA/sign <https://github.com/OCA/sign/tree/16.0/survey_sign_oca>`_ project on GitHub.
147+
148+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

survey_sign_oca/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import models

survey_sign_oca/__manifest__.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright 2025 Kencove - Mohamed Alkobrosli
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
3+
{
4+
"name": "Survey Sign Oca",
5+
"version": "16.0.1.0.0",
6+
"category": "Surveys",
7+
"website": "https://github.com/OCA/sign",
8+
"author": "Kencove, Odoo Community Association (OCA)",
9+
"license": "AGPL-3",
10+
"depends": ["sign_oca", "survey"],
11+
"data": [
12+
"views/survey_user_views.xml",
13+
"views/res_config_settings_view.xml",
14+
"views/sign_oca_request_views.xml",
15+
"data/sign_oca_role.xml",
16+
],
17+
"assets": {
18+
"web.assets_backend": [
19+
"survey_sign_oca/static/src/text.esm.js",
20+
],
21+
"web.assets_frontend": [
22+
"survey_sign_oca/static/src/text.esm.js",
23+
],
24+
},
25+
"installable": True,
26+
"maintainers": ["Kencove"],
27+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<odoo>
2+
<record id="sign_field_survey" model="sign.oca.field">
3+
<field name="name">Survey</field>
4+
<field name="field_type">text</field>
5+
<field name="default_value">survey</field>
6+
</record>
7+
8+
<record id="role_survey_user_input" model="sign.oca.role">
9+
<field name="name">Survey Participant</field>
10+
<field name="partner_selection_policy">expression</field>
11+
<field name="expression_partner">{{object.partner_id.id}}</field>
12+
</record>
13+
14+
<record id="role_survey_responsible_input" model="sign.oca.role">
15+
<field name="name">Survey Responsible</field>
16+
<field name="partner_selection_policy">expression</field>
17+
<field
18+
name="expression_partner"
19+
>{{object.survey_id.user_id.partner_id.id}}</field>
20+
</record>
21+
</odoo>

survey_sign_oca/models/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from . import survey_invite
2+
from . import res_company
3+
from . import res_config_settings
4+
from . import sign_oca_request
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright 2025 Kencove - Mohamed Alkobrosli
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
3+
4+
from odoo import fields, models
5+
6+
7+
class ResCompany(models.Model):
8+
_inherit = "res.company"
9+
10+
survey_user_input_sign_oca_template_id = fields.Many2one(
11+
comodel_name="sign.oca.template",
12+
domain="[('model_id.model', '=', 'survey.user_input')]",
13+
string="Sign Oca Template",
14+
)
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright 2025 Kencove - Mohamed Alkobrosli
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
3+
4+
from odoo import fields, models
5+
6+
7+
class ResConfigSettings(models.TransientModel):
8+
_inherit = "res.config.settings"
9+
10+
survey_user_input_sign_oca_template_id = fields.Many2one(
11+
comodel_name="sign.oca.template",
12+
related="company_id.survey_user_input_sign_oca_template_id",
13+
string="Sign Oca Template",
14+
readonly=False,
15+
)

0 commit comments

Comments
 (0)