1

我想知道如果合同的状态等于“已签署”,我如何从合同模块的 ListView 中删除一个复选框。

我通过这个链接尝试了这个建议,添加了一个条件,比如: Details of Manipulation

然而,什么也没发生。

4

2 回答 2

1

1)创建文件custom/modules/AOS_Contracts/views/view.list.php:

<?php

class AOS_ContractsViewList extends ViewList
{
    function AOS_ContractsViewList()
    {
        parent::ViewList();
    }

    function listViewProcess()
    {
        $this->processSearchForm();
        $this->lv->searchColumns = $this->searchForm->searchColumns;

        if (!$this->headers)
            return;
        if (empty($_REQUEST['search_form_only']) || $_REQUEST['search_form_only'] == false) {
            $this->lv->ss->assign("SEARCH", true);
            $this->lv->setup($this->seed, 'custom/modules/AOS_Contracts/tpls/ListViewAOS_Contracts.tpl', $this->where, $this->params);
            echo $this->lv->display();
        }
    }
}

2) 复制modules/include/ListView/ListViewGeneric.tplcustom/modules/AOS_Contracts/tpls/ListViewAOS_Contracts.tpl

3) 换行:

{if !$is_admin && is_admin_for_user && $rowData.IS_ADMIN==1}
    <input type='checkbox' disabled="disabled" class='checkbox' value='{$rowData.ID}'>
{else}
    <input title="{sugar_translate label='LBL_SELECT_THIS_ROW_TITLE'}"
        onclick='sListView.check_item(this, document.MassUpdate)' type='checkbox'
        class='checkbox' name='mass[]' value='{$rowData.ID}'>
{/if}

至:

{if !$is_admin && is_admin_for_user && $rowData.IS_ADMIN==1}
    <input type='checkbox' disabled="disabled" class='checkbox' value='{$rowData.ID}'>
{else}
    {if $pageData.bean.moduleDir == 'AOS_Contracts' && $rowData.STATUS == 'Signed'}
    {else}
        <input title="{sugar_translate label='LBL_SELECT_THIS_ROW_TITLE'}"
            onclick='sListView.check_item(this, document.MassUpdate)' type='checkbox'
            class='checkbox' name='mass[]' value='{$rowData.ID}'>
   {/if}
{/if}

4) 进行维修/重建。

于 2016-01-11T21:02:59.313 回答
0

SugarCRM 版本 9 创建 PHP 文件 recordlist.php 并添加:

$viewdefs['<MODULE>']['base']['view']['recordlist']['selection']['isSearchAndSelectAction'] = false;
于 2019-07-20T17:38:50.973 回答