I'm trying to customize the stock module in OpenErp to suit a Business need.

However, i cannot find a clean way to delete the "Accounting" tab in Product View.

On developer mode it says that the field name is "<field name='property_account_income'>" and <field name='property_account_expense'>

I found this object on "stock.py"

 if invoice_vals['type'] in ('out_invoice', 'out_refund'):
        account_id = move_line.product_id.property_account_income.id
        if not account_id:
            account_id = move_line.product_id.categ_id.\
                    property_account_income_categ.id
    else:
        account_id = move_line.product_id.property_account_expense.id
        if not account_id:
            account_id = move_line.product_id.categ_id.\
                    property_account_expense_categ.id

But if i delete this, the app or module will become unstable, and also didn't find this on any xml inside the stock app.

Is there any way to do this?

Thanks in advance.

有帮助吗?

解决方案

You mean you want complete remove the "Accounting" tab from product.

You can find "Accounting" tab in product_view.xml in account module of openerp.

If you want to remove the tab complete then you can inherit the product form and replace it like this:

<xpath expr="//notebook/page[@string='Accounting']" position="replace">
</xpath>

Hope this help you

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top