hiding a field using Openerp report designer

核能气质少年 提交于 2019-12-13 04:43:43

问题


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

Background:

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

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'))...

What to do:

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.

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

Many Thanks


回答1:


Try this in your report. This will work.

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


来源:https://stackoverflow.com/questions/25762142/hiding-a-field-using-openerp-report-designer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!