from datetime import datetime, timedelta from dateutil.relativedelta import relativedelta import time from openerp import pooler from openerp.osv import fields, osv from openerp.tools.translate import _ from openerp.tools import DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT, DATETIME_FORMATS_MAP, float_compare import openerp.addons.decimal_precision as dp from openerp import netsvc class sale_order(osv.osv): _name = "sale.order" _inherit = ['sale.order'] #_description = "Sales Order custom print button" def print_quotation(self, cr, uid, ids, context=None): res = super(sale_order,self).print_quotation(cr,uid,ids,context=context) res.update({'type': 'ir.actions.report.xml', 'report_name': 'sale.order.report.cust', 'datas': res['datas'], 'nodestroy': True}) return res
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question