This question has been flagged
4 Replies
10787 Views

Python :

'file_upload': fields.binary('Documents')

Xml :

<field name="file_upload"/>


i created one binary fields contain "select" ," Save As" , "Clear"

I want to hide the "Save as"  button , How to do it 

Please any one explain 

Avatar
Discard
Best Answer

This button is removed in latest version 10.0 of odoo.

but if you want remove that button just comment this code or override it in addons/web/static/src/xml/base.xml from line 1023

<td>

    <a class="oe_form_binary_file_save_data">

        <button class="oe_button oe_form_binary_file_save" type="button" title="Save As">

            <img t-att-src='_s + "/web/static/src/img/icons/gtk-save.png"'/>

            <span>Save As</span>

        </button>

    </a>

</td>


and also comment the javascript or override it that depends on oe_form_binary_file_save class that used in above button in addons/web/static/src/js/views/form_widget.js

Avatar
Discard
Author

ParseError: "External ID not found in the system: base.FieldBinary" while parsing None:4, near

<data inherit_id="base.FieldBinary">

<xpath expr="//t/t/table/tr/td/td/table/tr/td/td/a/button/img/span[@Save As]" position="replace">

</xpath>

</data>

Author

How to Inherit template in another module , i did this but i got an error

Best Answer

<field widget="binary" name="datas" filename="datas_fname"/>

                  <field name="datas_fname" readonly = "1" invisible="1"/>

Avatar
Discard

what i should add to make it uploading many file and download them ?