odoo接口
@http.route('/zimo_lunch/select/<string:db_name>', type='http', auth='none')
def trash_demo(self, db_name=None):
print ('db_name',db_name)
db = request.params.get('db')
print ('db',db)
db=db_name
request.session.db = db
print ('--------request.session.db----------',request.session.db)
order = request.env['sale.order'].search([('name','=','S00020')])
print ('--------ordr----------',order)
return 'hello world --[%s]'%order.name or False
json.loads(kw['state'])
心有猛虎,细嗅蔷薇