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'])
posted @ 2023-02-08 09:04  何双新  阅读(83)  评论(0编辑  收藏  举报