Skip to Content
Menu
This question has been flagged
4 Replies
5140 Views

There are an annoying "False" after the Sale Price and Cost field in my product form. The screen capture is as below:

http://village.photos/images/user/63ed576d-5936-47dd-9dfa-f19b8ce60d08/ad4be703-1499-4ef7-b844-061c0c15e73f.png

Where do they come from? How can I remove them? Please advise. Thanks.

I am using odoo 9 community edition running on ubunt.

Simon Lee

Avatar
Discard
Best Answer

Hi Simon lee

As I see it is currencies. The field is referring to a 'widget' to remove them must inherit the xml model, and remove the widget attributes, as follows:


<record id="ew_product_template_form_view" model="ir.ui.view">
    <field name="name">ew.product.template.form.view</field>
    <field name="model">product.template</field>
    <field name="inherit_id" ref="product.product_template_form_view"/>
    <field name="arch" type="xml">
        <field name="list_price" position="attributes">
            <attribute name="widget"></attribute>
        </field>
    </field>
</record>

or, if this another model

<record id="id_inherit" model="ir.ui.view">
    <field name="name">name_inherit</field>
    <field name="model">product.template</field>
    <field name="inherit_id" ref="stock_account.view_template_property_form"/>
    <field name="arch" type="xml">
        <field name="list_price" position="attributes">
            <attribute name="widget"></attribute>
        </field>
    </field>
</record>


I hope you help, regards.

Avatar
Discard
Author

Thank you for your advise. The code works to remove "False" after list_price. I tried to add similar code to remove False after standard_price as folllowed: ew.product.template.form.view product.template It does not removed the word False after Cost. How to resolve tis? Simon

Maybe your field in another module, in my answer make reference to two inheritance, see your view if not having another inheritances. In developer mode, in your form product, next "http://prntscr.com/ay1kna" And see this lash "http://prntscr.com/ay1lca" Here see some inheritances, I hope help you

Author Best Answer

I finally found what was wrong. I had not set the default currency. To do that I went to Accounting/Settings/Accounting & Finance and change the "Default Company Currency to HKD. The 'false' words went away.

Avatar
Discard