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.
95 lines
4.5 KiB
95 lines
4.5 KiB
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<odoo>
|
|
<!--Tree view of pest request model-->
|
|
<record id="pest_request_view_tree" model="ir.ui.view">
|
|
<field name="name">pest.request.view.tree</field>
|
|
<field name="model">pest.request</field>
|
|
<field name="arch" type="xml">
|
|
<tree>
|
|
<field name="reference"/>
|
|
<field name="farmer_id"/>
|
|
<field name="crop_id"/>
|
|
<field name="disease"/>
|
|
<field name="total_cost"/>
|
|
<field name="state"/>
|
|
<field name="company_id" groups="base.group_multi_company"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
<!--Form view of pest request model-->
|
|
<record id="pest_request_view_form" model="ir.ui.view">
|
|
<field name="name">pest.request.view.form</field>
|
|
<field name="model">pest.request</field>
|
|
<field name="arch" type="xml">
|
|
<form>
|
|
<header>
|
|
<button id="button_draft" name="action_draft" string="Draft"
|
|
type="object" class="oe_highlight" states="rejected,,approved"/>
|
|
<button id="button_pending" name="action_pending"
|
|
string="Submit" type="object" class="btn-primary" states="draft"/>
|
|
<button id="button_approved" name="action_approved"
|
|
string="Approved" states="pending"
|
|
class="btn-primary" type="object"
|
|
groups="agriculture_management_odoo.group_agriculture_admin"/>
|
|
<button id="action_create_invoice" name="action_create_invoice"
|
|
string="Create Invoice" class="btn-primary"
|
|
type="object" states="approve"/>
|
|
<button id="button_rejected" name="action_rejected"
|
|
string="Reject" states="pending"
|
|
class="btn-primary"
|
|
type="object"
|
|
groups="agriculture_management_odoo.group_agriculture_admin"/>
|
|
<field name="state" widget="statusbar"
|
|
statusbar_visible="draft, paid"/>
|
|
</header>
|
|
<sheet>
|
|
<widget name="web_ribbon" title="Paid"
|
|
bg_color="bg-success"
|
|
attrs="{'invisible': [('state', '!=', 'paid')]}"/>
|
|
<h1>
|
|
<field name="reference"/>
|
|
</h1>
|
|
<group>
|
|
<group>
|
|
<field name="farmer_id"/>
|
|
<field name="crop_id"/>
|
|
<field name="disease"/>
|
|
<field name="pest_id"/>
|
|
<field name="currency_id" invisible="1"/>
|
|
<field name="total_cost" widget='monetary'
|
|
options="{'currency_field': 'currency_id'}"
|
|
optional="show"/>
|
|
</group>
|
|
<group>
|
|
<field name="company_id"/>
|
|
<field name="request_date"/>
|
|
<field name="pest_quantity"/>
|
|
<field name="pest_cost" widget='monetary'
|
|
options="{'currency_field': 'currency_id'}"
|
|
optional="show"/>
|
|
</group>
|
|
</group>
|
|
<field name="note" placeholder="Pesticide Description"/>
|
|
</sheet>
|
|
<div class="oe_chatter">
|
|
<field name="message_follower_ids"/>
|
|
<field name="activity_ids"/>
|
|
<field name="message_ids"/>
|
|
</div>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
<!-- Action Menu under Disease & Pesticides-->
|
|
<record id="pest_request_action" model="ir.actions.act_window">
|
|
<field name="name">Pesticide Request</field>
|
|
<field name="type">ir.actions.act_window</field>
|
|
<field name="res_model">pest.request</field>
|
|
<field name="view_mode">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 Pest Request
|
|
</p>
|
|
</field>
|
|
</record>
|
|
</odoo>
|
|
|