问题
I used openerp version 7 & i created a form view.but its only used to display data .not to add / edit data.above 2 selection boxes for query records.
my requirement is need to remove save button from top left corner
EDITED : Code added for relevant to that area
<record model="ir.actions.act_window" id="bpl_worker_summary_action">
<field name="name">Worker Summary</field>
<field name="res_model">bpl.worker.summary</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
</record>
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record model="ir.ui.view" id="bpl_worker_summary_form">
<field name="name">Worker Summary</field>
<field name="model">bpl.worker.summary</field>
<field name="arch" type="xml">
<form string='bpl_worker_summary' create="false" edit="false" version='7.0' >
<sheet>
<group>
<group>
<field name='bpl_company_id' readonly="1" />
<field name='bpl_estate_id' />
回答1:
To remove the save button, you can modify the access right for the logged in user that shouldn't be able to save.
The access rights rule will be such that the user or preferrably his group wouldn't have "write" access to the "object"
回答2:
You can use create="false" attribute in form tag. It will disable Create button from form view. You can use edit="false" to disable Edit button.
If you want to disable button from form view then use this:
<form create="false" edit="false">
If you want to disable button from tree view then use this:
<tree create="false">
回答3:
Disable the Edit and Create buttons. The Save button appears when you click Edit or Create Button. I hope this helps.
来源:https://stackoverflow.com/questions/16330804/how-to-remove-save-button-from-form-view