Odoo Help

Welcome!

This community 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.

2

What could be the reasons for a field not shown in a view?

By
TestUser
on 5/27/13, 3:53 AM 1,336 views

I want to add discount to the tree in account.invoice.form view.

I'm just wondering why it is not shown. I set invisible false but still no effect.

...

<page string="Invoice Lines"> <field name="invoice_line" nolabel="1" widget="one2many_list" context="{'type': type}">

<tree string="Invoice Lines" editable="bottom"> <field name="product_id" on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, context, parent.company_id)"/>

<field name="name"/> <field name="company_id" invisible="1"/>

<field name="account_id" groups="account.group_account_user" domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '!=', 'view')]" on_change="onchange_account_id(product_id, parent.partner_id, parent.type, parent.fiscal_position,account_id)"/>

<field name="account_analytic_id" groups="analytic.group_analytic_accounting" domain="[('type','!=','view'), ('company_id', '=', parent.company_id)]"/>

<field name="quantity"/>

<field name="uos_id" groups="product.group_uom" on_change="uos_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.currency_id, context, parent.company_id)"/>

<field name="price_unit"/>

<field name="discount" invisible="0"/>

<field name="invoice_line_tax_id" widget="many2many_tags" context="{'type':parent.type}" domain="[('parent_id','=',False),('company_id', '=', parent.company_id)]"/>

<field name="price_subtotal"/> </tree>

...

I tried <field name="discount"/> and <field name="discount" invisible="0"/> but still nothing, no errors.

What could it be?

0

Andreas Maertens

--Andreas Maertens--
912
| 5 5 7
Finsterwalde, Germany
--Andreas Maertens--

I develop odoo8.0 modules

Andreas Maertens
On 5/27/13, 4:02 AM

Your field could be settet invisible by another view or by the or another model. Did you figured out that it is really your view that is displayed? What does the "debug mode" say on client? (klick: About/"debug Mode" in top right corner of the screen)

Thanks, after I checked several views I found a module replacing some fields. After uninstall it worked.

TestUser
on 5/27/13, 9:02 AM

Your Answer

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

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 5/27/13, 3:53 AM
Seen: 1336 times
Last updated: 3/16/15, 8:10 AM