1
# -*- encoding: utf-8 -*-
4
from tools.translate import _
6
class sale_order_line(osv.osv):
8
OpenERP Model : sale_order_line
10
_inherit = 'sale.order.line'
12
'att_bro':fields.boolean('Attach Brochure', required=False, help="If you ccheck this option, the first attachment related to the product_id marked as brochure will be printed as extra info with sale order"),
16
class sale_order(osv.osv):
18
OpenERP Model : sale_order_line
20
_inherit = 'sale.order'
21
def print_with_attachment(self, cr, user, ids, context={}):
22
for o in self.browse(cr,user,ids,context):
23
for ol in o.order_line:
25
print "Im Here i will go to print %s " % ol.name