Below example will helps you to add the digital signature in OpenERP/Odoo, you just have to follow the steps mentioned below:
Step-1 Install the web_digital_sign module from Odoo apps to addons
Step-2 After installation you have to make user settings code like below:
from openerp import models, fields, api
class Users(models.Model):
_name = 'res.users'
_inherit = 'res.users'
signature= fields.Binary(string=' Digital Signature')
after that we have to make .xml file for user interface..
<?xml version="1.0" ?>
<openerp>
<data>
<record id="inherited_res_users_form" model="ir.ui.view">
<field name="name">inherited.res.users.form</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name=' Digital signature']" position="after">
<label for="signature_image" class="oe_edit_only"/>
<h2><field name=" Digital signature" widget="signature"/></h2>
</xpath>
</field>
</record>
</data>
</openerp>
Step-3 After that go to settings->Users->Preferences see below screen for reference:
0 Comment(s)