Question

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.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top