Browse Source

[MIG] web_widget_digitized_signature: Migration to 12.0

pull/1325/head
Mayank Gosai 5 years ago
committed by Maxime Chambreuil
parent
commit
200e2f8a17
  1. 20
      web_widget_digitized_signature/__manifest__.py
  2. 6
      web_widget_digitized_signature/models/res_users.py
  3. 8
      web_widget_digitized_signature/readme/CONTRIBUTORS.rst
  4. 1
      web_widget_digitized_signature/readme/CREDITS.rst
  5. 2
      web_widget_digitized_signature/static/description/index.html
  6. 4
      web_widget_digitized_signature/static/src/js/digital_sign.js
  7. 2
      web_widget_digitized_signature/views/res_users_view.xml
  8. 8
      web_widget_digitized_signature/views/web_digital_sign_view.xml

20
web_widget_digitized_signature/__manifest__.py

@ -1,18 +1,20 @@
# Copyright 2004-2010 OpenERP SA (<http://www.openerp.com>) # Copyright 2004-2010 OpenERP SA (<http://www.openerp.com>)
# Copyright 2011-2015 Serpent Consulting Services Pvt. Ltd. # Copyright 2011-2015 Serpent Consulting Services Pvt. Ltd.
# Copyright 2017 Tecnativa - Vicent Cubells # Copyright 2017 Tecnativa - Vicent Cubells
# Copyright (C) 2019 - TODAY, Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{ {
"name": "Web Widget Digitized Signature",
"version": "11.0.1.0.0",
"author": "Serpent Consulting Services Pvt. Ltd., "
"Agile Business Group, "
"Tecnativa, "
"Odoo Community Association (OCA)",
'name': 'Web Widget Digitized Signature',
'version': '12.0.1.0.0',
'author': 'Serpent Consulting Services Pvt. Ltd., '
'Agile Business Group, '
'Tecnativa, '
'Open Source Integrators,'
'Odoo Community Association (OCA)',
'website': 'https://github.com/OCA/web', 'website': 'https://github.com/OCA/web',
"license": "AGPL-3",
"category": 'Web',
'license': 'AGPL-3',
'category': 'Web',
'depends': [ 'depends': [
'web', 'web',
'mail', 'mail',
@ -25,4 +27,6 @@
'static/src/xml/digital_sign.xml', 'static/src/xml/digital_sign.xml',
], ],
'installable': True, 'installable': True,
'development_status': 'Stable',
'maintainers': ['cubells'],
} }

6
web_widget_digitized_signature/models/res_users.py

@ -10,10 +10,8 @@ class ResUsers(models.Model):
_name = 'res.users' _name = 'res.users'
_inherit = ['res.users', 'mail.thread'] _inherit = ['res.users', 'mail.thread']
digital_signature = fields.Binary(
string='Signature',
oldname="signature_image",
)
digital_signature = fields.Binary(string='Digital Signature',
oldname="signature_image")
@api.model @api.model
def create(self, vals): def create(self, vals):

8
web_widget_digitized_signature/readme/CONTRIBUTORS.rst

@ -1,4 +1,6 @@
* Jay Vora <jay.vora@serpentcs.com> * Jay Vora <jay.vora@serpentcs.com>
* Tecnativa <https://www.tecnativa.com>:
* Vicent Cubells
* Lorenzo Battistini <lorenzo.battistini@agilebg.com>
* Pedro M. Baeza <pedro.baeza@gmail.com>
* Vicent Cubells <vicent@vcubells.net>
* Mayank Gosai <mgosai@opensourceintegrators.com>
* Maxime Chambreuil <mchambreuil@opensourceintegrators.com>

1
web_widget_digitized_signature/readme/CREDITS.rst

@ -0,0 +1 @@
* Tecnativa <https://www.tecnativa.com>

2
web_widget_digitized_signature/static/description/index.html

@ -420,6 +420,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<li>Serpent Consulting Services Pvt. Ltd.</li> <li>Serpent Consulting Services Pvt. Ltd.</li>
<li>Agile Business Group</li> <li>Agile Business Group</li>
<li>Tecnativa</li> <li>Tecnativa</li>
<li>Open Source Integrators</li>
</ul> </ul>
</div> </div>
<div class="section" id="contributors"> <div class="section" id="contributors">
@ -429,6 +430,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
<li>Tecnativa &lt;<a class="reference external" href="https://www.tecnativa.com">https://www.tecnativa.com</a>&gt;:<ul> <li>Tecnativa &lt;<a class="reference external" href="https://www.tecnativa.com">https://www.tecnativa.com</a>&gt;:<ul>
<li>Vicent Cubells</li> <li>Vicent Cubells</li>
</ul> </ul>
<li>Mayank Gosai &lt;<a class="reference external" href="mailto:mgosai&#64;opensourceintegrators.com">mgosai&#64;opensourceintegrators.com</a>&gt;</li>
</li> </li>
</ul> </ul>
</div> </div>

4
web_widget_digitized_signature/static/src/js/digital_sign.js

@ -22,8 +22,8 @@ odoo.define('web_widget_digitized_signature.web_digital_sign', function(require)
placeholder: "/web/static/src/img/placeholder.png", placeholder: "/web/static/src/img/placeholder.png",
init: function() { init: function() {
this._super.apply(this, arguments); this._super.apply(this, arguments);
this.$('> img').remove();
this.$('.signature > canvas').remove();
// this.$('> img').remove();
// this.$('.signature > canvas').remove();
this.sign_options = { this.sign_options = {
'decor-color': '#D1D0CE', 'decor-color': '#D1D0CE',
'color': '#000', 'color': '#000',

2
web_widget_digitized_signature/views/res_users_view.xml

@ -1,4 +1,3 @@
<?xml version="1.0" ?>
<odoo> <odoo>
<record id="inherited_res_users_form" model="ir.ui.view"> <record id="inherited_res_users_form" model="ir.ui.view">
@ -14,6 +13,7 @@
</xpath> </xpath>
</field> </field>
</record> </record>
<record id="inherited_res_users_preferences_form" model="ir.ui.view"> <record id="inherited_res_users_preferences_form" model="ir.ui.view">
<field name="name">inherited.res.users.preferences.form</field> <field name="name">inherited.res.users.preferences.form</field>
<field name="model">res.users</field> <field name="model">res.users</field>

8
web_widget_digitized_signature/views/web_digital_sign_view.xml

@ -1,9 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo> <odoo>
<template id="web_widget_digitized_signature_backend" name="web_widget_digitized_signature assets" inherit_id="web.assets_backend">
<template id="web_widget_digitized_signature_backend"
name="web_widget_digitized_signature assets"
inherit_id="web.assets_backend">
<xpath expr="." position="inside"> <xpath expr="." position="inside">
<script type="text/javascript" src="/web_widget_digitized_signature/static/src/js/digital_sign.js"></script>
<script type="text/javascript"
src="/web_widget_digitized_signature/static/src/js/digital_sign.js"/>
</xpath> </xpath>
</template> </template>

Loading…
Cancel
Save