From 4251af33f5e912af9d1606e51b821264f51b43d1 Mon Sep 17 00:00:00 2001 From: Mohamed Magdy Date: Mon, 30 Mar 2015 08:26:09 +0200 Subject: [PATCH] Add XML file to import static files instead of the __openerp__.py file, it fits Odoo v8.0 Convert the business object 'Users' to Odoo 8.0 format --- web_digital_sign/__openerp__.py | 12 +++--------- web_digital_sign/users.py | 11 +++++------ web_digital_sign/views/we_digital_sign_view.xml | 13 +++++++++++++ 3 files changed, 21 insertions(+), 15 deletions(-) create mode 100644 web_digital_sign/views/we_digital_sign_view.xml diff --git a/web_digital_sign/__openerp__.py b/web_digital_sign/__openerp__.py index 6e872a2f..687ce325 100644 --- a/web_digital_sign/__openerp__.py +++ b/web_digital_sign/__openerp__.py @@ -31,15 +31,9 @@ This module provides the functionality to store digital signature image for a record. The example can be seen into the User's form view where we have added a test field under signature. """, - 'data': ['users_view.xml'], - 'js':[ - "static/lib/excanvas.js", - "static/lib/jquery.signature.js", - "static/src/js/digital_sign.js", - ], - 'css':[ - "static/src/css/digital.css", - "static/src/css/jquery.signature.css", + 'data': [ + 'views/we_digital_sign_view.xml', + 'users_view.xml' ], 'website': 'http://www.serpentcs.com', 'qweb': ['static/src/xml/digital_sign.xml'], diff --git a/web_digital_sign/users.py b/web_digital_sign/users.py index cf641f67..20486b62 100644 --- a/web_digital_sign/users.py +++ b/web_digital_sign/users.py @@ -20,13 +20,12 @@ # ############################################################################## -from openerp.osv import osv, fields +from openerp import models, fields, api -class Users(osv.Model): +class Users(models.Model): + _name = 'res.users' _inherit = 'res.users' - - _columns = { - 'signature_image': fields.binary('Signature') - } + + signature_image= fields.Binary(string='Signature') # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/web_digital_sign/views/we_digital_sign_view.xml b/web_digital_sign/views/we_digital_sign_view.xml new file mode 100644 index 00000000..b366fd51 --- /dev/null +++ b/web_digital_sign/views/we_digital_sign_view.xml @@ -0,0 +1,13 @@ + + + + + \ No newline at end of file