forked from Yaltik/golem
[IMP]GOLEM Resource reservation form : better organization, fields as invisible when not needed, buttons too
This commit is contained in:
parent
d1c178aa8c
commit
8c59738e3b
@ -38,12 +38,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
<field name="model">golem.resource.reservation</field>
|
<field name="model">golem.resource.reservation</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree>
|
<tree>
|
||||||
<field name="date_start" />
|
<field name="hour_start" />
|
||||||
<field name="date_stop" />
|
<field name="hour_stop" />
|
||||||
<field name="resource_id" />
|
<field name="resource_id" />
|
||||||
<field name="user_id" />
|
<field name="user_id" />
|
||||||
<field name="partner_id" />
|
<field name="partner_id" />
|
||||||
<field name="status" />
|
<field name="state" />
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
@ -55,27 +55,39 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form>
|
<form>
|
||||||
<header>
|
<header>
|
||||||
<button name="status_confirm" type="object"
|
<button name="state_confirm" type="object" string="Confirm" class="oe_highlight"
|
||||||
string="Confirm" status="draft"
|
attrs="{'invisible': ['|', ('state', 'not in', 'draft'), ('id', '=', False)]}" />
|
||||||
class="oe_highlight" />
|
<button name="state_canceled" type="object"
|
||||||
<button name="status_canceled" type="object"
|
string="Cancel" states="confirmed,validated" />
|
||||||
string="Cancel" status="confirmed" />
|
<button name="state_draft" type="object" string="Set to draft"
|
||||||
<button name="status_validated" type="object"
|
states="canceled,confirmed,validated,rejected" />
|
||||||
string="Validate" status="confirmed"
|
<button name="state_validated" type="object" string="Validate"
|
||||||
class="oe_highlight" />
|
states="confirmed" class="oe_highlight"
|
||||||
<button name="status_rejected" type="object"
|
groups="golem_base.group_golem_manager" />
|
||||||
string="Reject" status="confirmed"
|
<button name="state_rejected" type="object" string="Reject"
|
||||||
class="oe_highlight" />
|
states="confirmed" class="oe_highlight"
|
||||||
<field name="status" widget="statusbar" />
|
groups="golem_base.group_golem_manager" />
|
||||||
|
<field name="state" widget="statusbar" />
|
||||||
</header>
|
</header>
|
||||||
<sheet>
|
<sheet>
|
||||||
|
<group colspan="2">
|
||||||
|
<field name="id" invisible="1" />
|
||||||
|
<field name="resource_id" options="{'no_create': True}" />
|
||||||
|
</group>
|
||||||
<group>
|
<group>
|
||||||
<field name="date_start" />
|
<group>
|
||||||
<field name="date_stop" />
|
<field name="date" />
|
||||||
<field name="resource_id" />
|
<field name="hour_start" widget="float_time" />
|
||||||
<field name="user_id" />
|
<field name="hour_stop" widget="float_time" />
|
||||||
<field name="partner_id" />
|
</group>
|
||||||
<field name="rejection_reason" />
|
<group>
|
||||||
|
<field name="user_id" options="{'no_create': True}" />
|
||||||
|
<field name="partner_id" />
|
||||||
|
</group>
|
||||||
|
</group>
|
||||||
|
<group colspan="2">
|
||||||
|
<field name="rejection_reason"
|
||||||
|
attrs="{'invisible': [('state', '!=', 'rejected')]}"/>
|
||||||
</group>
|
</group>
|
||||||
</sheet>
|
</sheet>
|
||||||
</form>
|
</form>
|
||||||
@ -93,9 +105,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
<field name="resource_id" />
|
<field name="resource_id" />
|
||||||
<field name="user_id" />
|
<field name="user_id" />
|
||||||
<field name="partner_id" />
|
<field name="partner_id" />
|
||||||
<field name="status" />
|
<field name="state" />
|
||||||
<filter name="to_validate" string="Reservation to Validate"
|
<filter name="to_validate" string="Reservation to Validate"
|
||||||
domain="[('status', '=', 'confirmed')]" />
|
domain="[('state', '=', 'confirmed')]" />
|
||||||
</search>
|
</search>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user