Showing posts with label openerp. Show all posts
Showing posts with label openerp. Show all posts

Thursday, August 16, 2012

OpenERP Meeting Invitation . 

In Core OpenERP 6.1 meeting invitations are going wia mail and ICS file as attachment. But no feature for the Get back Response Or the Normal Invitation Feature which Mail Client are providing by default for accepting or rejecting invitations.


You can have this feature by providing . "METHOD : REQUEST" with valid Dates and organizer with "mailto" attributes.
"cal.add('METHOD').value = 'REQUEST' "

also you have to set the header for the mail .

"part = MIMEBase('text', "calendar") "
"part.set_param('method','REQUEST') "





Wednesday, July 13, 2011

Generate BarCode in Python

You can Generate Barcode (image, Pdf Etc...) in Python
Example is for JPG file
from reportlab.graphics.barcode import createBarcodeDrawing, \
getCodes
def get_image(self, value, width, hight, hr, code='QR'):
""" genrating image for barcode """
options = {}

if width:options['width'] = width
if hight:options['hight'] = hight
if hr:options['humanReadable'] = hr
try:
ret_val = createBarcodeDrawing(code, value=value,
**options)
except Exception, e:
raise osv.except_osv('Error', e)
return ret_val.asString('jpg')


To get Supported barcode in your system

$ print getCodes()

reference : report lab

Wednesday, November 17, 2010

Domain's value depending on condition

In OpenERP view depending on condition value for the right argument can be provided.

domain="[('product_tmpl_id.categ_id.name', 'ilike',
(parent.category in ('RM', 'PM') and parent.category) or
(parent.category == 'OM' and 'Other') or
'')]"