我在ODOO 8.0 adones中创建了很多自定义模块,我想为Window安装创建ODOO安装文件,然后我想要遵循哪种步骤,或者需要单独的软件来制作我的Window安装文件.
我正在使用Odoo ERP,我想限制从生成SQL查询中的字典列表返回无值.
form_data = self.read(cr, uid, ids, ['start_date','end_date'], context=context)[0]
sql = "select i.date_invoice, i.number, (select name from res_partner where id=i.partner_id) as partner,i.currency_id, (select name from res_currency where id=i.currency_id) as currency, (select description from account_tax where name=t.name), t.amount, t.base, (t.amount+t.base) as total from account_invoice i, account_invoice_tax t where t.invoice_id = i.id and i.state = 'open' and i.type = 'out_invoice' and i.date_invoice >= '%s' and i.date_invoice <= '%s' order by t.name"%(form_data['start_date'],form_data['end_date'])
cr.execute(sql)
data = cr.dictfetchall()
Run Code Online (Sandbox Code Playgroud)
生成结果:
data=[
{'currency_id': 38,
'description': u'GST 7%', …Run Code Online (Sandbox Code Playgroud)