I would like to add new column to the table account_invoice
I tried using:
from openerp import fields as fieldss
product_id= fieldss.related('order_line', 'product_id', type='many2one', relation='product.product', string='Product'),
the purpose: add product in the view account invoice view search <record id="view_account_invoice_filter" model="ir.ui.view">
from openerp import models,fields,api
_inherit = 'account.invoice'
Your xml file
<record id="view_account_invoice_filter_inherit" model="ir.ui.view">
<field name="inherit_id" ref="account.view_account_invoice_filter"/>
<field name="arch" type="xml">
<field name="period_id" position="after">
Hope this helps !!.
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 1/10/15, 3:33 PM|
|Seen: 1437 times|
|Last updated: 3/16/15, 8:10 AM|