与odoo12中的定制修改销售报告相关的问题

时间:2019-04-24 08:59:58

标签: xml python-3.x odoo odoo-12

我在销售报告中遇到了一些自定义销售问题。 我面临的问题。

  1. 我已经在我的自定义模块中继承了销售报告元素,如下所示

?xml version =“ 1.0” encoding =“ UTF-8”?>

<data>
    <report 
        id = "sale_template_action"
        string = "Quotation/Order without PID"
        model = "sale.order"
        report_type = "qweb-pdf"
        file="customization.custom_sale_report_product_without_id"
        name="customization.custom_sale_report_product_without_id"
        print_report_name="(object.state in ('draft', 'sent') and 'Quotation - %s' % (object.name)) or 'Order - %s' % (object.name)"
    />
    <report 
        id="sale.action_report_saleorder"
        string="Quotation/Order with PID"
        model="sale.order" 
        report_type="qweb-pdf"
        file = "customization.custom_sale_report"
        name = "customization.custom_sale_report" 
        print_report_name="(object.state in ('draft', 'sent') and 'Quotation - %s' % (object.name)) or 'Order - %s' % (object.name)"
    />
</data>

系统升级后, sale.action_report_saleorder 字符串在打印下拉按钮中显示为子菜单(附近操作)。当我卸载模块时,sale.action_report_saleorder的字符串(名称)仍然显示在打印下拉菜单和抛出问题中。卸载模块后,为什么未显示原始销售报告的字符串? enter image description here

  1. 从上面的报告代码中,如何获得我单击报告模板的打印下拉菜单中的特定子菜单后得到的引用?基于该参考,我想隐藏或显示报告模板中的某些字段。我怎么知道在Q-web模板中单击了哪个子菜单?如何签入我的Q-web模板?
  2. 在我的Q-web模板中,我位于模板底部的 批准。这部分有时会分为pdf页面的两个部分。我想在单个页面中显示该部分,无论如何都不应将其分为两部分。它应该粘在底部。如果该部分开始被分成两部分,则整个 批准 应当进入下一页。我怎样才能做到这一点? enter image description here
    一个建议将是非常可取的。

0 个答案:

没有答案