Browse Source

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
pull/666/head
Mohamed Magdy 10 years ago
committed by Pedro M. Baeza
parent
commit
4251af33f5
  1. 12
      web_digital_sign/__openerp__.py
  2. 9
      web_digital_sign/users.py
  3. 13
      web_digital_sign/views/we_digital_sign_view.xml

12
web_digital_sign/__openerp__.py

@ -31,15 +31,9 @@
This module provides the functionality to store digital signature image for a record. 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. 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', 'website': 'http://www.serpentcs.com',
'qweb': ['static/src/xml/digital_sign.xml'], 'qweb': ['static/src/xml/digital_sign.xml'],

9
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' _inherit = 'res.users'
_columns = {
'signature_image': fields.binary('Signature')
}
signature_image= fields.Binary(string='Signature')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

13
web_digital_sign/views/we_digital_sign_view.xml

@ -0,0 +1,13 @@
<openerp>
<data>
<template id="sale_order_backend" name="sale_order assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link rel="stylesheet" href="/web_digital_sign/static/src/css/digital.css"/>
<link rel="stylesheet" href="/web_digital_sign/static/src/css/jquery.signature.css"/>
<script type="text/javascript" src="/web_digital_sign/static/lib/excanvas.js"></script>
<script type="text/javascript" src="/web_digital_sign/static/lib/jquery.signature.js"></script>
<script type="text/javascript" src="/web_digital_sign/static/src/js/digital_sign.js"></script>
</xpath>
</template>
</data>
</openerp>
Loading…
Cancel
Save