小编DAS*_*NYA的帖子

如何为Odoo 8.0创建窗口设置?

我在ODOO 8.0 adones中创建了很多自定义模块,我想为Window安装创建ODOO安装文件,然后我想要遵循哪种步骤,或者需要单独的软件来制作我的Window安装文件.

openerp-8 odoo

9
推荐指数
1
解决办法
2215
查看次数

限制从SQL查询返回无值

我正在使用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)

python sql postgresql openerp odoo-8

2
推荐指数
1
解决办法
471
查看次数

标签 统计

odoo ×1

odoo-8 ×1

openerp ×1

openerp-8 ×1

postgresql ×1

python ×1

sql ×1