基本的に、リソースモデルを編集して、含めるフィールドを含める必要があります。コードでリソースを編集できます。使用しているバージョンはわかりませんが、Grid.phpファイルでは、_prepareCollectionが次のようなコードを検索します。
$collection = Mage::getResourceModel('sales/order_invoice_collection')
->addAttributeToSelect('order_id')
->addAttributeToSelect('increment_id')
->addAttributeToSelect('created_at')
->addAttributeToSelect('state')
->addAttributeToSelect('grand_total') ...and so on!
行を追加します
->addAttributeToSelect('tax_amount')
そのリストにあなたが使用できるはずです
$this->addColumn('tax_amount', array(
'header' => Mage::helper('sales')->__('Tax'),
'index' => 'tax_amount',
'type' => 'number',
));
これは、私が開発マシンから離れていて、Mageを手に入れることができないのと同じくらいテストされていませんが、これは機能するか、少なくとも正しい方向を示しているはずです。
編集:
_prepareCollection全体を置き換えてみることができませんでした
protected function _prepareCollection()
{
$collection = Mage::getResourceModel('sales/order_invoice_collection')
->addAttributeToSelect('order_id')
->addAttributeToSelect('increment_id')
->addAttributeToSelect('created_at')
->addAttributeToSelect('state')
->addAttributeToSelect('grand_total')
->addAttributeToSelect('tax_amount')
->addAttributeToSelect('order_currency_code')
->joinAttribute('billing_firstname', 'order_address/firstname', 'billing_address_id', null, 'left')
->joinAttribute('billing_lastname', 'order_address/lastname', 'billing_address_id', null, 'left')
->joinAttribute('order_increment_id', 'order/increment_id', 'order_id', null, 'left')
->joinAttribute('order_created_at', 'order/created_at', 'order_id', null, 'left');
$this->setCollection($collection);
return parent::_prepareCollection();
}
繰り返しますが、これはテストされていません。メモリからは、これはmagentoの1.3範囲の_prepareCollectionであるため、少し古いですが、動作するはずです。