Odoo Help

4

Digital signature(Custom Widget): How to save image(defined in widget template ) in database?

By
PujaBaa Zala
on 7/17/15, 6:24 AM 2,084 views

Hello Everyone,

We're going to implement the digital signature by using custom widgets in odoo 8. We've captured sign into the image . But, the problem we're facing right now is how to save the image of signature (defined in widget template .xml) in database.  

<img id="imgb64" style="width:300px;height:150px"> </img> 

In view of this module, widget is defined as binary field..

<field name="signature_image" widget="signature"/> 

Is it possible to link up this image to database from .js file of widget?


Thanks in advance.

I am not able to understand your problem. Can you explain it in greater detail please.

Merlin TecSol Pvt. Ltd., Merlin TecSol Pvt. Ltd.
on 7/17/15, 10:35 AM
2
PujaBaa Zala
On 7/18/15, 1:07 AM

Hello,

We're implementing digital signature. Firstly, I've created custom widget named "signature". In this widget, Activex object is used. one <textarea>(to display several msg) and <img>(to display captured sign)also defined in widget template(.xml).

I've already defined one binary field "signature_image" in main module and view(form view) is also created as above.

But , How to save this <img> into database? When save button is clicked image is not saved. Is it possible to communicate this <img> defined in widget template file with database or with .py file?

Thanks.

I think this link will also be useful to you: http://www.odoo.yenthevg.com/creating-many2many-drag-and-drop-handle-widget-in-odoo/

Merlin TecSol Pvt. Ltd., Merlin TecSol Pvt. Ltd.
on 7/18/15, 2:53 AM
2

Serpent Consulting Services Pvt. Ltd.

--Serpent Consulting Services Pvt. Ltd.--
4693
| 6 6 8
Gandhinagar, India
--Serpent Consulting Services Pvt. Ltd.--

Serpent Consulting Services Pvt. Ltd. Your Odoo/OpenERP Solution, just an email away!

Serpent Consulting Services Pvt. Ltd.
On 7/18/15, 2:55 AM

There is already a contribution http://www.serpentcs.com/serpentcs-openerpodoo-digital-signature-widget and we are sure you can use for any hint.

Thanks.

Yea,We've checked ur module.U've done really nice job.& our module captures the sign from another Hardware.Bt I cant understand code of '.save_sign'. pls, Guide me how that sign is saved in database.

PujaBaa Zala
on 7/18/15, 9:20 AM

Pujabaa, this.save_list.push(save_obj); does it! You got trained under javascript? You may ask specific questions on contact@serpentcs.com, as it willbe hard to type it all here.

Serpent Consulting Services Pvt. Ltd.
on 7/19/15, 1:16 AM

Hi, I installed Digital signature in odoo version 8. It working using mouse click event. How to make work in iphone or ipad in touch screen? Thanks

Prakash
on 2/4/16, 3:50 AM

The above module working fine in normal form. But we are facing issue while adding signature fields in one2many related table. For example, Sale order Line added signature fields and created new entry added signature, while edit and save record facing below error:- TypeError: this.find(...).add(...).data(...) is undefined Please let me know the possible solutions to fix the above issue.

Manish Bohra
on 5/4/18, 3:29 AM
0

I think this link may help you out: http://pinakinnayi.blogspot.in/2012/04/how-to-add-custom-widget-in-your-open.html

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 7/17/15, 6:24 AM
Seen: 2084 times
Last updated: 8/28/15, 11:57 AM