You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
163 lines
8.0 KiB
163 lines
8.0 KiB
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<odoo>
|
|
<!-- Kanban view for crop request model-->
|
|
<record id="crop_request_view_kanban" model="ir.ui.view">
|
|
<field name="name">crop.request.view.kanban</field>
|
|
<field name="model">crop.request</field>
|
|
<field name="arch" type="xml">
|
|
<kanban default_group_by="state"
|
|
class="o_kanban_small_column o_kanban_project_tasks"
|
|
default_order="state"
|
|
examples="project"
|
|
js_class="project_kanban" sample="1">
|
|
<field name="ref"/>
|
|
<field name="farmer_id"/>
|
|
<field name="request_date"/>
|
|
<field name="seed_id"/>
|
|
<field name="tag_ids" widget="many2many_tags"
|
|
options="{'color_field': 'color'}"/>
|
|
<progressbar field="state"
|
|
colors='{"draft": "warning","confirm": "info", "cancel": "danger", "ploughing": "muted", "harvest": "muted", "storage": "success", "manuring": "primary"}'/>
|
|
<templates>
|
|
<t t-name="kanban-box">
|
|
<div t-attf-class="oe_kanban_global_click">
|
|
<div class="oe_kanban_details">
|
|
<strong>
|
|
<field name="ref"/>
|
|
<br/>
|
|
<field name="farmer_id"/>
|
|
<br/>
|
|
<field name="request_date"/>
|
|
<br/>
|
|
<field name="seed_id"/>
|
|
<br/>
|
|
<field name="tag_ids"
|
|
widget="many2many_tags"
|
|
options="{'color_field': 'color'}"/>
|
|
<br/>
|
|
</strong>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
</templates>
|
|
</kanban>
|
|
</field>
|
|
</record>
|
|
<!-- Tree view for crop request model-->
|
|
<record id="crop_request_view_tree" model="ir.ui.view">
|
|
<field name="name">crop.request.view.tree</field>
|
|
<field name="model">crop.request</field>
|
|
<field name="arch" type="xml">
|
|
<tree>
|
|
<field name="ref"/>
|
|
<field name="seed_id"/>
|
|
<field name="farmer_id"/>
|
|
<field name="location_id"/>
|
|
<field name="company_id" groups="base.group_multi_company"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
<!-- Form view for crop request model-->
|
|
<record id="crop_request_view_form" model="ir.ui.view">
|
|
<field name="name">crop.request.view.form</field>
|
|
<field name="model">crop.request</field>
|
|
<field name="arch" type="xml">
|
|
<form>
|
|
<header>
|
|
<button id="button_draft" name="action_draft" string="Draft"
|
|
type="object" class="oe_highlight"
|
|
invisible="state!='cancel'"/>
|
|
<button id="button_confirm" name="action_confirm"
|
|
string="Submit" type="object" class="btn-primary"
|
|
invisible="state!='draft'"/>
|
|
<button id="button_ploughing" name="action_ploughing"
|
|
string="Ploughing"
|
|
class="btn-primary"
|
|
type="object" invisible="state!='confirm'"/>
|
|
<button id="button_sowing" name="action_sowing"
|
|
string="Sowing" class="btn-primary"
|
|
type="object" invisible="state!='ploughing'"/>
|
|
<button id="button_manuring" name="action_manuring"
|
|
string="Manure" class="btn-primary"
|
|
type="object" invisible="state!='sowing'"/>
|
|
<button id="button_irrigation" name="action_irrigation"
|
|
string="Irrigation" class="btn-primary"
|
|
type="object" invisible="state!='manuring'"/>
|
|
<button id="button_weeding" name="action_weeding"
|
|
string="Weeding" class="btn-primary"
|
|
type="object" invisible="state!='irrigation'"/>
|
|
<button id="button_harvest" name="action_harvest"
|
|
string="Harvest" class="btn-primary"
|
|
type="object" invisible="state!='weeding'"/>
|
|
<button id="button_storage" name="action_storage"
|
|
string="Storage" class="btn-primary"
|
|
type="object" invisible="state!='harvest'"/>
|
|
<button id="button_cancel" name="action_cancel"
|
|
string="Cancelled" class="btn-primary"
|
|
type="object"
|
|
invisible="state!='ploughing,sowing,manuring,irrigation,weeding,harvest,storage'"/>
|
|
<field name="state" widget="statusbar"
|
|
statusbar_visible="draft,confirm,ploughing,sowing,manuring,irrigation,weeding,harvest,storage,cancel"/>
|
|
</header>
|
|
<sheet>
|
|
<h1>
|
|
<field name="ref"/>
|
|
</h1>
|
|
<group>
|
|
<group>
|
|
<field name="farmer_id"/>
|
|
<field name="seed_id"/>
|
|
<field name="user_id"/>
|
|
</group>
|
|
<group>
|
|
<field name="company_id"/>
|
|
<field name="request_date"/>
|
|
<field name="location_id"/>
|
|
<field name="tag_ids" widget="many2many_tags"
|
|
options="{'color_field': 'color'}"/>
|
|
</group>
|
|
</group>
|
|
<notebook>
|
|
<page string="Machinery" name="used_machinery">
|
|
<field name="machinery_ids">
|
|
<tree editable="bottom">
|
|
<field name="vehicle_id"/>
|
|
<field name="qty"/>
|
|
</tree>
|
|
</field>
|
|
</page>
|
|
<page string="Animals" name="used_animals">
|
|
<field name="animal_ids">
|
|
<tree editable="bottom">
|
|
<field name="animal_id"/>
|
|
<field name="qty"/>
|
|
</tree>
|
|
</field>
|
|
</page>
|
|
<page string="Description" name="description">
|
|
<field name="note"
|
|
placeholder="Crop Description........"/>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
<div class="oe_chatter">
|
|
<field name="message_follower_ids"/>
|
|
<field name="activity_ids"/>
|
|
<field name="message_ids"/>
|
|
</div>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
<record id="crop_details_action" model="ir.actions.act_window">
|
|
<field name="name">Crops Details</field>
|
|
<field name="type">ir.actions.act_window</field>
|
|
<field name="res_model">crop.request</field>
|
|
<field name="view_mode">kanban,tree,form</field>
|
|
<field name="context">{'search_default_available':1}</field>
|
|
<field name="help" type="html">
|
|
<p class="o_view_nocontent_smiling_face">
|
|
Create Your First Crop Request
|
|
</p>
|
|
</field>
|
|
</record>
|
|
</odoo>
|
|
|