Move buttons information from view definition to ir.model.button and remove 80 cols limit to xml files.

This commit is contained in:
Albert Cervera i Areny 2019-06-17 23:45:28 +02:00
parent 06e234d052
commit 9edd83282a
32 changed files with 146 additions and 210 deletions

View File

@ -185,6 +185,7 @@
<!-- Buttons -->
<record model="ir.model.button" id="change_observation_animal_button">
<field name="string">Change Cycle Observation</field>
<field name="name">change_observation</field>
<field name="model" search="[('model', '=', 'farm.animal')]"/>
</record>

View File

@ -26,6 +26,7 @@
</record>
<record model="ir.model.button" id="draft_abort_event_button">
<field name="string">Draft</field>
<field name="name">draft</field>
<field name="model" search="[('model', '=', 'farm.abort.event')]"/>
</record>
@ -38,10 +39,11 @@
<field name="group" ref="group_farm_females"/>
</record>
<record model="ir.model.button"
id="validate_abort_event_button">
<record model="ir.model.button" id="validate_abort_event_button">
<field name="string">Validate</field>
<field name="name">validate_event</field>
<field name="model" search="[('model', '=', 'farm.abort.event')]"/>
<field name="help">Are you sure to validate this event?</field>
</record>
<record model="ir.model.button-res.group"
id="validate_abort_event_button_group_farm_admin">

View File

@ -114,10 +114,12 @@ class AbstractEvent(ModelSQL, ModelView, Workflow):
# 'invisible': Eval('state') == 'cancel',
# },
'draft': {
'invisible': Eval('state') == 'draft',
'invisible': Eval('state') == 'draft',
'icon': 'tryton-go-previous',
},
'validate_event': {
'invisible': Eval('state') != 'draft',
'icon': 'tryton-ok',
},
})
cls._transitions = set((

View File

@ -104,6 +104,7 @@
</record>
<record model="ir.model.button" id="draft_farrowing_event_button">
<field name="name">Draft</field>
<field name="name">draft</field>
<field name="model" search="[('model', '=', 'farm.farrowing.event')]"/>
</record>
@ -117,8 +118,10 @@
</record>
<record model="ir.model.button" id="validate_farrowing_event_button">
<field name="string">Validate</field>
<field name="name">validate_event</field>
<field name="model" search="[('model', '=', 'farm.farrowing.event')]"/>
<field name="help">Are you sure to validate this event?</field>
</record>
<record model="ir.model.button-res.group" id="validate_farrowing_event_button_group_farm_admin">
<field name="button" ref="validate_farrowing_event_button"/>

View File

@ -19,61 +19,54 @@
</record>
<record model="ir.model.button" id="draft_feed_event_button">
<field name="string">Draft</field>
<field name="name">draft</field>
<field name="model" search="[('model', '=', 'farm.feed.event')]"/>
</record>
<record model="ir.model.button-res.group"
id="draft_feed_event_button_group_farm_admin">
<record model="ir.model.button-res.group" id="draft_feed_event_button_group_farm_admin">
<field name="button" ref="draft_feed_event_button"/>
<field name="group" ref="group_farm_admin"/>
</record>
<record model="ir.model.button-res.group"
id="draft_feed_event_button_group_farm_males">
<record model="ir.model.button-res.group" id="draft_feed_event_button_group_farm_males">
<field name="button" ref="draft_feed_event_button"/>
<field name="group" ref="group_farm_males"/>
</record>
<record model="ir.model.button-res.group"
id="draft_feed_event_button_group_farm_females">
<record model="ir.model.button-res.group" id="draft_feed_event_button_group_farm_females">
<field name="button" ref="draft_feed_event_button"/>
<field name="group" ref="group_farm_females"/>
</record>
<record model="ir.model.button-res.group"
id="draft_feed_event_button_group_farm_individuals">
<record model="ir.model.button-res.group" id="draft_feed_event_button_group_farm_individuals">
<field name="button" ref="draft_feed_event_button"/>
<field name="group" ref="group_farm_individuals"/>
</record>
<record model="ir.model.button-res.group"
id="draft_feed_event_button_group_farm_groups">
<record model="ir.model.button-res.group" id="draft_feed_event_button_group_farm_groups">
<field name="button" ref="draft_feed_event_button"/>
<field name="group" ref="group_farm_groups"/>
</record>
<record model="ir.model.button" id="validate_feed_event_button">
<field name="string">Validate</field>
<field name="name">validate_event</field>
<field name="model" search="[('model', '=', 'farm.feed.event')]"/>
<field name="help">Are you sure to validate this event?</field>
</record>
<record model="ir.model.button-res.group"
id="validate_feed_event_button_group_farm_admin">
<record model="ir.model.button-res.group" id="validate_feed_event_button_group_farm_admin">
<field name="button" ref="validate_feed_event_button"/>
<field name="group" ref="group_farm_admin"/>
</record>
<record model="ir.model.button-res.group"
id="validate_feed_event_button_group_farm_males">
<record model="ir.model.button-res.group" id="validate_feed_event_button_group_farm_males">
<field name="button" ref="validate_feed_event_button"/>
<field name="group" ref="group_farm_males"/>
</record>
<record model="ir.model.button-res.group"
id="validate_feed_event_button_group_farm_females">
<record model="ir.model.button-res.group" id="validate_feed_event_button_group_farm_females">
<field name="button" ref="validate_feed_event_button"/>
<field name="group" ref="group_farm_females"/>
</record>
<record model="ir.model.button-res.group"
id="validate_feed_event_button_group_farm_individuals">
<record model="ir.model.button-res.group" id="validate_feed_event_button_group_farm_individuals">
<field name="button" ref="validate_feed_event_button"/>
<field name="group" ref="group_farm_individuals"/>
</record>
<record model="ir.model.button-res.group"
id="validate_feed_event_button_group_farm_groups">
<record model="ir.model.button-res.group" id="validate_feed_event_button_group_farm_groups">
<field name="button" ref="validate_feed_event_button"/>
<field name="group" ref="group_farm_groups"/>
</record>

View File

@ -16,32 +16,27 @@
</record>
<record model="ir.model.button" id="confirm_feed_inventory_button">
<field name="string">Confirm</field>
<field name="name">confirm</field>
<field name="model"
search="[('model', '=', 'farm.feed.inventory')]"/>
<field name="model" search="[('model', '=', 'farm.feed.inventory')]"/>
</record>
<record model="ir.model.button-res.group"
id="confirm_feed_inventory_button_group_farm_admin">
<record model="ir.model.button-res.group" id="confirm_feed_inventory_button_group_farm_admin">
<field name="button" ref="confirm_feed_inventory_button"/>
<field name="group" ref="group_farm_admin"/>
</record>
<record model="ir.model.button-res.group"
id="confirm_feed_inventory_button_group_farm_males">
<record model="ir.model.button-res.group" id="confirm_feed_inventory_button_group_farm_males">
<field name="button" ref="confirm_feed_inventory_button"/>
<field name="group" ref="group_farm_males"/>
</record>
<record model="ir.model.button-res.group"
id="confirm_feed_inventory_button_group_farm_females">
<record model="ir.model.button-res.group" id="confirm_feed_inventory_button_group_farm_females">
<field name="button" ref="confirm_feed_inventory_button"/>
<field name="group" ref="group_farm_females"/>
</record>
<record model="ir.model.button-res.group"
id="confirm_feed_inventory_button_group_farm_individuals">
<record model="ir.model.button-res.group" id="confirm_feed_inventory_button_group_farm_individuals">
<field name="button" ref="confirm_feed_inventory_button"/>
<field name="group" ref="group_farm_individuals"/>
</record>
<record model="ir.model.button-res.group"
id="confirm_feed_inventory_button_group_farm_groups">
<record model="ir.model.button-res.group" id="confirm_feed_inventory_button_group_farm_groups">
<field name="button" ref="confirm_feed_inventory_button"/>
<field name="group" ref="group_farm_groups"/>
</record>
@ -95,138 +90,98 @@
<field name="name">farm_feed_provisional_inventory_list</field>
</record>
<record model="ir.model.button"
id="draft_feed_provisional_inventory_button">
<record model="ir.model.button" id="draft_feed_provisional_inventory_button">
<field name="string">Draft</field>
<field name="name">draft</field>
<field name="model"
search="[('model', '=', 'farm.feed.provisional_inventory')]"/>
<field name="model" search="[('model', '=', 'farm.feed.provisional_inventory')]"/>
</record>
<record model="ir.model.button-res.group"
id="draft_feed_provisional_inventory_button_group_farm_admin">
<field name="button"
ref="draft_feed_provisional_inventory_button"/>
<record model="ir.model.button-res.group" id="draft_feed_provisional_inventory_button_group_farm_admin">
<field name="button" ref="draft_feed_provisional_inventory_button"/>
<field name="group" ref="group_farm_admin"/>
</record>
<record model="ir.model.button-res.group"
id="draft_feed_provisional_inventory_button_group_farm_males">
<field name="button"
ref="draft_feed_provisional_inventory_button"/>
<record model="ir.model.button-res.group" id="draft_feed_provisional_inventory_button_group_farm_males">
<field name="button" ref="draft_feed_provisional_inventory_button"/>
<field name="group" ref="group_farm_males"/>
</record>
<record model="ir.model.button-res.group"
id="draft_feed_provisional_inventory_button_group_farm_females">
<field name="button"
ref="draft_feed_provisional_inventory_button"/>
<record model="ir.model.button-res.group" id="draft_feed_provisional_inventory_button_group_farm_females">
<field name="button" ref="draft_feed_provisional_inventory_button"/>
<field name="group" ref="group_farm_females"/>
</record>
<record model="ir.model.button-res.group"
id="draft_feed_provisional_inventory_button_group_farm_individuals">
<field name="button"
ref="draft_feed_provisional_inventory_button"/>
<record model="ir.model.button-res.group" id="draft_feed_provisional_inventory_button_group_farm_individuals">
<field name="button" ref="draft_feed_provisional_inventory_button"/>
<field name="group" ref="group_farm_individuals"/>
</record>
<record model="ir.model.button-res.group"
id="draft_feed_provisional_inventory_button_group_farm_groups">
<field name="button"
ref="draft_feed_provisional_inventory_button"/>
<record model="ir.model.button-res.group" id="draft_feed_provisional_inventory_button_group_farm_groups">
<field name="button" ref="draft_feed_provisional_inventory_button"/>
<field name="group" ref="group_farm_groups"/>
</record>
<record model="ir.model.button"
id="confirm_feed_provisional_inventory_button">
<record model="ir.model.button" id="confirm_feed_provisional_inventory_button">
<field name="string">Confirm</field>
<field name="name">confirm</field>
<field name="model"
search="[('model', '=', 'farm.feed.provisional_inventory')]"/>
<field name="model" search="[('model', '=', 'farm.feed.provisional_inventory')]"/>
</record>
<record model="ir.model.button-res.group"
id="confirm_feed_provisional_inventory_button_group_farm_admin">
<field name="button"
ref="confirm_feed_provisional_inventory_button"/>
<record model="ir.model.button-res.group" id="confirm_feed_provisional_inventory_button_group_farm_admin">
<field name="button" ref="confirm_feed_provisional_inventory_button"/>
<field name="group" ref="group_farm_admin"/>
</record>
<record model="ir.model.button-res.group"
id="confirm_feed_provisional_inventory_button_group_farm_males">
<field name="button"
ref="confirm_feed_provisional_inventory_button"/>
<record model="ir.model.button-res.group" id="confirm_feed_provisional_inventory_button_group_farm_males">
<field name="button" ref="confirm_feed_provisional_inventory_button"/>
<field name="group" ref="group_farm_males"/>
</record>
<record model="ir.model.button-res.group"
id="confirm_feed_provisional_inventory_button_group_farm_females">
<field name="button"
ref="confirm_feed_provisional_inventory_button"/>
<record model="ir.model.button-res.group" id="confirm_feed_provisional_inventory_button_group_farm_females">
<field name="button" ref="confirm_feed_provisional_inventory_button"/>
<field name="group" ref="group_farm_females"/>
</record>
<record model="ir.model.button-res.group"
id="confirm_feed_provisional_inventory_button_group_farm_individuals">
<field name="button"
ref="confirm_feed_provisional_inventory_button"/>
<record model="ir.model.button-res.group" id="confirm_feed_provisional_inventory_button_group_farm_individuals">
<field name="button" ref="confirm_feed_provisional_inventory_button"/>
<field name="group" ref="group_farm_individuals"/>
</record>
<record model="ir.model.button-res.group"
id="confirm_feed_provisional_inventory_button_group_farm_groups">
<field name="button"
ref="confirm_feed_provisional_inventory_button"/>
<record model="ir.model.button-res.group" id="confirm_feed_provisional_inventory_button_group_farm_groups">
<field name="button" ref="confirm_feed_provisional_inventory_button"/>
<field name="group" ref="group_farm_groups"/>
</record>
<record model="ir.model.button"
id="cancel_feed_provisional_inventory_button">
<record model="ir.model.button" id="cancel_feed_provisional_inventory_button">
<field name="string">Cancel</field>
<field name="name">cancel</field>
<field name="model"
search="[('model', '=', 'farm.feed.provisional_inventory')]"/>
<field name="model" search="[('model', '=', 'farm.feed.provisional_inventory')]"/>
</record>
<record model="ir.model.button-res.group"
id="cancel_feed_provisional_inventory_button_group_farm_admin">
<field name="button"
ref="cancel_feed_provisional_inventory_button"/>
<record model="ir.model.button-res.group" id="cancel_feed_provisional_inventory_button_group_farm_admin">
<field name="button" ref="cancel_feed_provisional_inventory_button"/>
<field name="group" ref="group_farm_admin"/>
</record>
<record model="ir.model.button-res.group"
id="cancel_feed_provisional_inventory_button_group_farm_males">
<field name="button"
ref="cancel_feed_provisional_inventory_button"/>
<record model="ir.model.button-res.group" id="cancel_feed_provisional_inventory_button_group_farm_males">
<field name="button" ref="cancel_feed_provisional_inventory_button"/>
<field name="group" ref="group_farm_males"/>
</record>
<record model="ir.model.button-res.group"
id="cancel_feed_provisional_inventory_button_group_farm_females">
<field name="button"
ref="cancel_feed_provisional_inventory_button"/>
<record model="ir.model.button-res.group" id="cancel_feed_provisional_inventory_button_group_farm_females">
<field name="button" ref="cancel_feed_provisional_inventory_button"/>
<field name="group" ref="group_farm_females"/>
</record>
<record model="ir.model.button-res.group"
id="cancel_feed_provisional_inventory_button_group_farm_individuals">
<field name="button"
ref="cancel_feed_provisional_inventory_button"/>
<record model="ir.model.button-res.group" id="cancel_feed_provisional_inventory_button_group_farm_individuals">
<field name="button" ref="cancel_feed_provisional_inventory_button"/>
<field name="group" ref="group_farm_individuals"/>
</record>
<record model="ir.model.button-res.group"
id="cancel_feed_provisional_inventory_button_group_farm_groups">
<field name="button"
ref="cancel_feed_provisional_inventory_button"/>
<record model="ir.model.button-res.group" id="cancel_feed_provisional_inventory_button_group_farm_groups">
<field name="button" ref="cancel_feed_provisional_inventory_button"/>
<field name="group" ref="group_farm_groups"/>
</record>
<record model="ir.action.act_window"
id="act_farm_feed_provisional_inventory">
<record model="ir.action.act_window" id="act_farm_feed_provisional_inventory">
<field name="name">Provisional Inventory</field>
<field name="res_model">farm.feed.provisional_inventory</field>
<field name="search_value"></field>
</record>
<record model="ir.action.act_window.view"
id="act_farm_feed_provisional_inventory_view1">
<record model="ir.action.act_window.view" id="act_farm_feed_provisional_inventory_view1">
<field name="sequence" eval="10"/>
<field name="view"
ref="farm_feed_provisional_inventory_list_view"/>
<field name="act_window"
ref="act_farm_feed_provisional_inventory"/>
<field name="view" ref="farm_feed_provisional_inventory_list_view"/>
<field name="act_window" ref="act_farm_feed_provisional_inventory"/>
</record>
<record model="ir.action.act_window.view"
id="act_farm_feed_provisional_inventory_view2">
<record model="ir.action.act_window.view" id="act_farm_feed_provisional_inventory_view2">
<field name="sequence" eval="20"/>
<field name="view"
ref="farm_feed_provisional_inventory_form_view"/>
<field name="act_window"
ref="act_farm_feed_provisional_inventory"/>
<field name="view" ref="farm_feed_provisional_inventory_form_view"/>
<field name="act_window" ref="act_farm_feed_provisional_inventory"/>
</record>
<record model="ir.model.access" id="access_farm_feed_provisional_inventory">
@ -247,15 +202,13 @@
</record>
<!-- farm.feed.animal_location_date -->
<record model="ir.ui.view"
id="farm_feed_animal_location_date_form_view">
<record model="ir.ui.view" id="farm_feed_animal_location_date_form_view">
<field name="model">farm.feed.animal_location_date</field>
<field name="type">form</field>
<field name="name">farm_feed_animal_location_date_form</field>
</record>
<record model="ir.ui.view"
id="farm_feed_animal_location_date_list_view">
<record model="ir.ui.view" id="farm_feed_animal_location_date_list_view">
<field name="model">farm.feed.animal_location_date</field>
<field name="type">tree</field>
<field name="name">farm_feed_animal_location_date_list</field>
@ -283,40 +236,32 @@
<field name="res_model">farm.feed.animal_location_date</field>
<field name="domain" eval="[('animal', '=', Eval('active_id'))]" pyson="1"/>
</record>
<record model="ir.action.keyword"
id="act_farm_feed_animal_location_date_by_animal_keyword">
<record model="ir.action.keyword" id="act_farm_feed_animal_location_date_by_animal_keyword">
<field name="keyword">form_relate</field>
<field name="model">farm.animal,-1</field>
<field name="action"
ref="act_farm_feed_animal_location_date_by_animal"/>
<field name="action" ref="act_farm_feed_animal_location_date_by_animal"/>
</record>
<record model="ir.action.act_window"
id="act_farm_feed_animal_location_date_by_group">
<record model="ir.action.act_window" id="act_farm_feed_animal_location_date_by_group">
<field name="name">Feed consumption by Group</field>
<field name="res_model">farm.feed.animal_location_date</field>
<field name="domain" eval="[('animal_group', '=', Eval('active_id'))]" pyson="1"/>
</record>
<record model="ir.action.keyword"
id="act_farm_feed_animal_location_date_by_group_keyword">
<record model="ir.action.keyword" id="act_farm_feed_animal_location_date_by_group_keyword">
<field name="keyword">form_relate</field>
<field name="model">farm.animal.group,-1</field>
<field name="action"
ref="act_farm_feed_animal_location_date_by_group"/>
<field name="action" ref="act_farm_feed_animal_location_date_by_group"/>
</record>
<record model="ir.action.act_window"
id="act_farm_feed_animal_location_date_by_location">
<record model="ir.action.act_window" id="act_farm_feed_animal_location_date_by_location">
<field name="name">Feed consumption by Location</field>
<field name="res_model">farm.feed.animal_location_date</field>
<field name="domain" eval="[('location', '=', Eval('active_id'))]" pyson="1"/>
</record>
<record model="ir.action.keyword"
id="act_farm_feed_animal_location_date_by_location_keyword">
<record model="ir.action.keyword" id="act_farm_feed_animal_location_date_by_location_keyword">
<field name="keyword">form_relate</field>
<field name="model">stock.location,-1</field>
<field name="action"
ref="act_farm_feed_animal_location_date_by_location"/>
<field name="action" ref="act_farm_feed_animal_location_date_by_location"/>
</record>
</data>
</tryton>

View File

@ -26,6 +26,7 @@
</record>
<record model="ir.model.button" id="draft_foster_event_button">
<field name="string">Draft</field>
<field name="name">draft</field>
<field name="model" search="[('model', '=', 'farm.foster.event')]"/>
</record>
@ -39,8 +40,10 @@
</record>
<record model="ir.model.button" id="validate_foster_event_button">
<field name="string">Validate</field>
<field name="name">validate_event</field>
<field name="model" search="[('model', '=', 'farm.foster.event')]"/>
<field name="help">Are you sure to validate this event?</field>
</record>
<record model="ir.model.button-res.group" id="validate_foster_event_button_group_farm_admin">
<field name="button" ref="validate_foster_event_button"/>

View File

@ -26,6 +26,7 @@
</record>
<record model="ir.model.button" id="draft_insemination_event_button">
<field name="string">Draft</field>
<field name="name">draft</field>
<field name="model" search="[('model', '=', 'farm.insemination.event')]"/>
</record>
@ -39,8 +40,10 @@
</record>
<record model="ir.model.button" id="validate_insemination_event_button">
<field name="string">Validate</field>
<field name="name">validate_event</field>
<field name="model" search="[('model', '=', 'farm.insemination.event')]"/>
<field name="help">Are you sure to validate this event?</field>
</record>
<record model="ir.model.button-res.group" id="validate_insemination_event_button_group_farm_admin">
<field name="button" ref="validate_insemination_event_button"/>

View File

@ -26,6 +26,7 @@
</record>
<record model="ir.model.button" id="draft_medication_event_button">
<field name="string">Draft</field>
<field name="name">draft</field>
<field name="model" search="[('model', '=', 'farm.medication.event')]"/>
</record>
@ -51,8 +52,10 @@
</record>
<record model="ir.model.button" id="validate_medication_event_button">
<field name="string">Validate</field>
<field name="name">validate_event</field>
<field name="model" search="[('model', '=', 'farm.medication.event')]"/>
<field name="help">Are you sure to validate this event?</field>
</record>
<record model="ir.model.button-res.group" id="validate_medication_event_button_group_farm_admin">
<field name="button" ref="validate_medication_event_button"/>

View File

@ -19,6 +19,7 @@
</record>
<record model="ir.model.button" id="draft_move_event_button">
<field name="string">Draft</field>
<field name="name">draft</field>
<field name="model" search="[('model', '=', 'farm.move.event')]"/>
</record>
@ -44,8 +45,10 @@
</record>
<record model="ir.model.button" id="validate_move_event_button">
<field name="string">Validate</field>
<field name="name">validate_event</field>
<field name="model" search="[('model', '=', 'farm.move.event')]"/>
<field name="help">Are you sure to validate this event?</field>
</record>
<record model="ir.model.button-res.group" id="validate_move_event_button_group_farm_admin">
<field name="button" ref="validate_move_event_button"/>

View File

@ -26,6 +26,7 @@
</record>
<record model="ir.model.button" id="draft_pregnancy_diagnosis_event_button">
<field name="string">Draft</field>
<field name="name">draft</field>
<field name="model" search="[('model', '=', 'farm.pregnancy_diagnosis.event')]"/>
</record>
@ -39,8 +40,10 @@
</record>
<record model="ir.model.button" id="validate_pregnancy_diagnosis_event_button">
<field name="string">Validate</field>
<field name="name">validate_event</field>
<field name="model" search="[('model', '=', 'farm.pregnancy_diagnosis.event')]"/>
<field name="help">Are you sure to validate this event?</field>
</record>
<record model="ir.model.button-res.group" id="validate_pregnancy_diagnosis_event_button_group_farm_admin">
<field name="button" ref="validate_pregnancy_diagnosis_event_button"/>

View File

@ -173,6 +173,7 @@
</record>
<record model="ir.model.button" id="draft_removal_event_button">
<field name="string">Draft</field>
<field name="name">draft</field>
<field name="model" search="[('model', '=', 'farm.removal.event')]"/>
</record>
@ -198,8 +199,10 @@
</record>
<record model="ir.model.button" id="validate_removal_event_button">
<field name="string">Validate</field>
<field name="name">validate_event</field>
<field name="model" search="[('model', '=', 'farm.removal.event')]"/>
<field name="help">Are you sure to validate this event?</field>
</record>
<record model="ir.model.button-res.group" id="validate_removal_event_button_group_farm_admin">
<field name="button" ref="validate_removal_event_button"/>

View File

@ -19,6 +19,7 @@
</record>
<record model="ir.model.button" id="draft_semen_extraction_event_button">
<field name="string">Draft</field>
<field name="name">draft</field>
<field name="model" search="[('model', '=', 'farm.semen_extraction.event')]"/>
</record>
@ -32,8 +33,10 @@
</record>
<record model="ir.model.button" id="validate_semen_extraction_event_button">
<field name="string">Validate</field>
<field name="name">validate_event</field>
<field name="model" search="[('model', '=', 'farm.semen_extraction.event')]"/>
<field name="help">Are you sure to validate this event?</field>
</record>
<record model="ir.model.button-res.group" id="validate_semen_extraction_event_button_group_farm_admin">
<field name="button" ref="validate_semen_extraction_event_button"/>
@ -45,8 +48,8 @@
</record>
<record model="ir.model.button" id="calculate_doses_semen_extraction_event_button">
<field name="name">calculate_doses</field>
<field name="string">Calculate Doses</field>
<field name="name">calculate_doses</field>
<field name="model" search="[('model', '=', 'farm.semen_extraction.event')]"/>
</record>
<record model="ir.model.button-res.group"

View File

@ -19,6 +19,7 @@
</record>
<record model="ir.model.button" id="draft_transformation_event_button">
<field name="string">Draft</field>
<field name="name">draft</field>
<field name="model" search="[('model', '=', 'farm.transformation.event')]"/>
</record>
@ -44,8 +45,10 @@
</record>
<record model="ir.model.button" id="validate_transformation_event_button">
<field name="string">Validate</field>
<field name="name">validate_event</field>
<field name="model" search="[('model', '=', 'farm.transformation.event')]"/>
<field name="help">Are you sure to validate this event?</field>
</record>
<record model="ir.model.button-res.group" id="validate_transformation_event_button_group_farm_admin">
<field name="button" ref="validate_transformation_event_button"/>

View File

@ -26,6 +26,7 @@
</record>
<record model="ir.model.button" id="draft_weaning_event_button">
<field name="string">Draft</field>
<field name="name">draft</field>
<field name="model" search="[('model', '=', 'farm.weaning.event')]"/>
</record>
@ -39,8 +40,10 @@
</record>
<record model="ir.model.button" id="validate_weaning_event_button">
<field name="string">Validate</field>
<field name="name">validate_event</field>
<field name="model" search="[('model', '=', 'farm.weaning.event')]"/>
<field name="help">Are you sure to validate this event?</field>
</record>
<record model="ir.model.button-res.group" id="validate_weaning_event_button_group_farm_admin">
<field name="button" ref="validate_weaning_event_button"/>

View File

@ -25,8 +25,7 @@
<field name="string">Create Menu Entries</field>
<field name="model" search="[('model', '=', 'farm.specie')]"/>
</record>
<record model="ir.model.button-res.group"
id="farm_menu_entries_button_group_farm_admin">
<record model="ir.model.button-res.group" id="farm_menu_entries_button_group_farm_admin">
<field name="button" ref="create_menu_entries_button"/>
<field name="group" ref="group_farm_admin"/>
</record>

View File

@ -29,10 +29,7 @@
<group id="state_and_buttons" colspan="4" col="12">
<label name="state"/>
<field name="state"/>
<!--<button name="cancel" string="_Cancel" icon="tryton-cancel"
help="Are you sure to cancel this event?"/>-->
<button name="draft" string="_Draft" icon="tryton-go-previous"/>
<button name="validate_event" string="_Validate" icon="tryton-ok"
help="Are you sure to validate this event?"/>
<button name="draft"/>
<button name="validate_event"/>
</group>
</form>

View File

@ -67,7 +67,7 @@
<label name="last_produced_group"/>
<field name="last_produced_group"/>
</group>
<button name="change_observation" string="Change Cycle Observation"/>
<button name="change_observation"/>
</page>
<page string="Events" id="events">
<field name="events" colspan="4" widget="many2many"/>

View File

@ -28,7 +28,7 @@
<field name="weaning_events" colspan="4" view_ids="farm.farm_weaning_event_list_editable_view"/>
<group colspan="4" col="3" id="buttons">
<!--<button string="Cancel" name="cancel" icon="tryton-cancel" />-->
<button string="Confirm" name="confirm" icon="tryton-ok"/>
<button name="confirm" icon="tryton-ok"/>
<!--<button string="Draft" name="draft" icon="tryton-go-previous"/>-->
</group>
</form>

View File

@ -46,10 +46,7 @@
<group id="state_and_buttons" colspan="4" col="12">
<label name="state"/>
<field name="state"/>
<!--<button name="cancel" string="_Cancel" icon="tryton-cancel"
help="Are you sure to cancel this event?"/>-->
<button name="draft" string="_Draft" icon="tryton-go-previous"/>
<button name="validate_event" string="_Validate" icon="tryton-ok"
help="Are you sure to validate this event?"/>
<button name="draft"/>
<button name="validate_event"/>
</group>
</form>

View File

@ -55,10 +55,7 @@
<group id="state_and_buttons" colspan="4" col="12">
<label name="state"/>
<field name="state"/>
<!--<button name="cancel" string="_Cancel" icon="tryton-cancel"
help="Are you sure to cancel this event?"/>-->
<button name="draft" string="_Draft" icon="tryton-go-previous"/>
<button name="validate_event" string="_Validate" icon="tryton-ok"
help="Are you sure to validate this event?"/>
<button name="draft"/>
<button name="validate_event"/>
</group>
</form>

View File

@ -27,7 +27,7 @@ contains the full copyright notices and license terms. -->
<label name="state"/>
<field name="state"/>
<group colspan="2" col="3" id="buttons">
<button string="Confirm" name="confirm" icon="tryton-ok"/>
<button name="confirm" icon="tryton-ok"/>
</group>
</group>
</form>

View File

@ -32,9 +32,9 @@ contains the full copyright notices and license terms. -->
<label name="state"/>
<field name="state"/>
<group colspan="2" col="3" id="buttons">
<button string="Cancel" name="cancel" icon="tryton-cancel" />
<button string="Confirm" name="confirm" icon="tryton-ok"/>
<button string="Draft" name="draft" icon="tryton-go-previous"/>
<button name="cancel" icon="tryton-cancel" />
<button name="confirm" icon="tryton-ok"/>
<button name="draft" icon="tryton-go-previous"/>
</group>
</group>
</form>

View File

@ -40,10 +40,7 @@
<group id="state_and_buttons" colspan="4" col="12">
<label name="state"/>
<field name="state"/>
<!--<button name="cancel" string="_Cancel" icon="tryton-cancel"
help="Are you sure to cancel this event?"/>-->
<button name="draft" string="_Draft" icon="tryton-go-previous"/>
<button name="validate_event" string="_Validate" icon="tryton-ok"
help="Are you sure to validate this event?"/>
<button name="draft"/>
<button name="validate_event"/>
</group>
</form>

View File

@ -36,10 +36,7 @@
<group id="state_and_buttons" colspan="4" col="12">
<label name="state"/>
<field name="state"/>
<!--<button name="cancel" string="_Cancel" icon="tryton-cancel"
help="Are you sure to cancel this event?"/>-->
<button name="draft" string="_Draft" icon="tryton-go-previous"/>
<button name="validate_event" string="_Validate" icon="tryton-ok"
help="Are you sure to validate this event?"/>
<button name="draft"/>
<button name="validate_event"/>
</group>
</form>

View File

@ -51,10 +51,7 @@
<group id="state_and_buttons" colspan="4" col="12">
<label name="state"/>
<field name="state"/>
<!--<button name="cancel" string="_Cancel" icon="tryton-cancel"
help="Are you sure to cancel this event?"/>-->
<button name="draft" string="_Draft" icon="tryton-go-previous"/>
<button name="validate_event" string="_Validate" icon="tryton-ok"
help="Are you sure to validate this event?"/>
<button name="draft"/>
<button name="validate_event"/>
</group>
</form>

View File

@ -46,10 +46,7 @@
<group id="state_and_buttons" colspan="4" col="12">
<label name="state"/>
<field name="state"/>
<!--<button name="cancel" string="_Cancel" icon="tryton-cancel"
help="Are you sure to cancel this event?"/>-->
<button name="draft" string="_Draft" icon="tryton-go-previous"/>
<button name="validate_event" string="_Validate" icon="tryton-ok"
help="Are you sure to validate this event?"/>
<button name="draft"/>
<button name="validate_event"/>
</group>
</form>

View File

@ -31,10 +31,7 @@
<group id="state_and_buttons" colspan="4" col="12">
<label name="state"/>
<field name="state"/>
<!--<button name="cancel" string="_Cancel" icon="tryton-cancel"
help="Are you sure to cancel this event?"/>-->
<button name="draft" string="_Draft" icon="tryton-go-previous"/>
<button name="validate_event" string="_Validate" icon="tryton-ok"
help="Are you sure to validate this event?"/>
<button name="draft"/>
<button name="validate_event"/>
</group>
</form>

View File

@ -38,10 +38,7 @@
<group id="state_and_buttons" colspan="4" col="12">
<label name="state"/>
<field name="state"/>
<!--<button name="cancel" string="_Cancel" icon="tryton-cancel"
help="Are you sure to cancel this event?"/>-->
<button name="draft" string="_Draft" icon="tryton-go-previous"/>
<button name="validate_event" string="_Validate" icon="tryton-ok"
help="Are you sure to validate this event?"/>
<button name="draft"/>
<button name="validate_event"/>
</group>
</form>

View File

@ -79,10 +79,7 @@
<group id="state_and_buttons" colspan="4" col="12">
<label name="state"/>
<field name="state"/>
<!--<button name="cancel" string="_Cancel" icon="tryton-cancel"
help="Are you sure to cancel this event?"/>-->
<button name="draft" string="_Draft" icon="tryton-go-previous"/>
<button name="validate_event" string="_Validate" icon="tryton-ok"
help="Are you sure to validate this event?"/>
<button name="draft"/>
<button name="validate_event"/>
</group>
</form>

View File

@ -48,10 +48,7 @@
<group id="state_and_buttons" colspan="4" col="12">
<label name="state"/>
<field name="state"/>
<!--<button name="cancel" string="_Cancel" icon="tryton-cancel"
help="Are you sure to cancel this event?"/>-->
<button name="draft" string="_Draft" icon="tryton-go-previous"/>
<button name="validate_event" string="_Validate" icon="tryton-ok"
help="Are you sure to validate this event?"/>
<button name="draft"/>
<button name="validate_event"/>
</group>
</form>

View File

@ -55,10 +55,7 @@
<group id="state_and_buttons" colspan="4" col="12">
<label name="state"/>
<field name="state"/>
<!--<button name="cancel" string="_Cancel" icon="tryton-cancel"
help="Are you sure to cancel this event?"/>-->
<button name="draft" string="_Draft" icon="tryton-go-previous"/>
<button name="validate_event" string="_Validate" icon="tryton-ok"
help="Are you sure to validate this event?"/>
<button name="draft"/>
<button name="validate_event"/>
</group>
</form>