문제

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