Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I have a custom field in res.partner to indicate whether they like to get their invoices via E-Mail or via post. Now I want this information to show in the TreeView of the invoices as a new column.
<tree colors="blue:state == 'draft';black:state in ('proforma','proforma2','open');gray:state == 'cancel'" string="Invoice">
<field name="partner_id" groups="base.group_user"/>
<field name="amount_total" sum="Total Amount"/>
This results in an error (Field "partner_id.x_invoice_by" does not exist). I tried to include the information with a reference field with this selection: [('res.partner', 'partner_id.x_invoice_by')] , but had no luck either, the column appears, but is empty for all invoices.
EDIT: I'm using Odoo 8.0 if that matters
you can use related="product_id.x_invoice_by" attribute, in the definition of a new field in the account.invoice
your_name: fields.Char(related="product_id.x_invoice_by", string="Your Name")
then use this field in the tree view.
you can check Related fields section in this documentation
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 7/30/15, 6:08 AM|
|Seen: 470 times|
|Last updated: 7/30/15, 7:06 AM|