使用Openerp报表设计器隐藏字段 [英] hiding a field using Openerp report designer

查看:69
本文介绍了使用Openerp报表设计器隐藏字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用OpenERP报表设计器来稍微更改销售订单报表.

I am using OpenERP report designer to alter the sales order report a bit.

背景:

我正在尝试删除出现在发票,销售订单和报价中的产品的内部参考....

I am trying to remove the internal reference of a product that appears in my invoices, sales orders and quotations....

已完成的操作: 我已经通过delevoper模式创建了一个新字段,并将其命名为x_showintref,它是一个布尔值('x_showintref':fields.boolean('Show Internal Reference'))...

Actions done: I have created a new field through the delevoper mode and named it x_showintref which is a boolean ('x_showintref': fields.boolean('Show Internal Reference'))...

做什么:

我正在尝试编辑销售-报价报告,以便在选中x_showintref时,它将显示内部参考,否则将不显示产品的内部参考.

I am trying to edit the sales - quotation report so that when the x_showintref is ticked, it will display the internal reference else it will not display the Internal Reference of the product.

其他想法: 还有一种方法可以将其放入python脚本中吗?

Other Ideas: Is there a way one can put this in a python script as well??

非常感谢

推荐答案

在报告中尝试一下.这会起作用.

Try this in your report. This will work.

[[ o.x_showintref==True and line.product_id.default_code or line.name ]] 

这篇关于使用Openerp报表设计器隐藏字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆