| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<odoo> |
| 3 |
<record id="l10n_in_ewaybill_form_view" model="ir.ui.view"> |
| 4 |
<field name="name">l10n.in.ewaybill.form.view</field> |
| 5 |
<field name="model">l10n.in.ewaybill</field> |
| 6 |
<field name="arch" type="xml"> |
| 7 |
<form string="Ewaybill" create="false"> |
| 8 |
<header> |
| 9 |
<button name="action_generate_ewaybill" |
| 10 |
string="Generate e-Waybill" |
| 11 |
class="oe_highlight" |
| 12 |
type="object" |
| 13 |
invisible="state != 'pending'" |
| 14 |
data-hotkey="g"/> |
| 15 |
<button name="action_cancel_ewaybill" |
| 16 |
string="Cancel e-Waybill" |
| 17 |
type="object" |
| 18 |
invisible="state != 'generated'" |
| 19 |
data-hotkey="c"/> |
| 20 |
<button name="action_reset_to_pending" |
| 21 |
string="Reset to Pending" |
| 22 |
type="object" |
| 23 |
invisible="state in ['pending', 'generated']" |
| 24 |
data-hotkey="r" |
| 25 |
confirm="Are you sure you want to re-send the e-Waybill?"/> |
| 26 |
<button name="action_print" |
| 27 |
string="Print" |
| 28 |
class="oe_highlight" |
| 29 |
type="object" |
| 30 |
invisible="state != 'generated'" |
| 31 |
data-hotkey="f"/> |
| 32 |
<button name="action_export_content_json" |
| 33 |
string="Download Content JSON" |
| 34 |
type="object" |
| 35 |
class="oe_highlight" |
| 36 |
invisible="not error_message" |
| 37 |
groups="base.group_no_one"/> |
| 38 |
<field name="state" widget="statusbar" statusbar_visible="pending,generated"/> |
| 39 |
</header> |
| 40 |
<div class="alert alert-danger" |
| 41 |
role="alert" |
| 42 |
style="margin-bottom:0px;" |
| 43 |
invisible="not error_message or blocking_level == 'warning'"> |
| 44 |
<div class="o_row"> |
| 45 |
<field name="error_message"/> |
| 46 |
</div> |
| 47 |
</div> |
| 48 |
<div class="alert alert-warning" |
| 49 |
role="alert" |
| 50 |
style="margin-bottom:0px;" |
| 51 |
invisible="not error_message or blocking_level == 'error'"> |
| 52 |
<div class="o_row"> |
| 53 |
<field name="error_message"/> |
| 54 |
</div> |
| 55 |
</div> |
| 56 |
<sheet> |
| 57 |
<div class="oe_title"> |
| 58 |
<h1 invisible="not name"> |
| 59 |
<field name="name" readonly="1"/> |
| 60 |
</h1> |
| 61 |
</div> |
| 62 |
<group name="document_details" string="Document Details"> |
| 63 |
<group> |
| 64 |
<field name="type_id" |
| 65 |
widget="selection" |
| 66 |
readonly="state != 'pending'" |
| 67 |
domain="[('allowed_supply_type', 'in', (supply_type == 'I' and 'in' or 'out', 'both'))]" |
| 68 |
required="True"/> |
| 69 |
</group> |
| 70 |
<group> |
| 71 |
<field name="ewaybill_date" invisible="not ewaybill_date"/> |
| 72 |
<field name="document_number"/> |
| 73 |
<field name="document_date" readonly="1"/> |
| 74 |
</group> |
| 75 |
</group> |
| 76 |
<group name="partners" string="Address Details"> |
| 77 |
<field name="account_move_id" invisible="1"/> <!-- To compute the Billing and Shipping partners --> |
| 78 |
<group> |
| 79 |
<field name="partner_bill_from_id" |
| 80 |
force_save="1" |
| 81 |
readonly="state == 'pending' and not is_bill_from_editable or state != 'pending'"/> |
| 82 |
<field name="partner_bill_to_id" |
| 83 |
force_save="1" |
| 84 |
readonly="state == 'pending' and not is_bill_to_editable or state != 'pending'"/> |
| 85 |
</group> |
| 86 |
<group> |
| 87 |
<field name="partner_ship_from_id" |
| 88 |
force_save="1" |
| 89 |
readonly="state == 'pending' and not is_ship_from_editable or state != 'pending'"/> |
| 90 |
<field name="partner_ship_to_id" |
| 91 |
force_save="1" |
| 92 |
readonly="state == 'pending' and not is_ship_to_editable or state != 'pending'"/> |
| 93 |
</group> |
| 94 |
</group> |
| 95 |
<group name="transporter" string="Transporter Details"> |
| 96 |
<group> |
| 97 |
<field name="transporter_id" |
| 98 |
readonly="state != 'pending'" |
| 99 |
required="not mode"/> |
| 100 |
</group> |
| 101 |
<group/> |
| 102 |
</group> |
| 103 |
<group name="part_b" string="Transportation Details (Part B)"> |
| 104 |
<group> |
| 105 |
<field name="mode" readonly="state != 'pending'"/> |
| 106 |
<field name="vehicle_type" |
| 107 |
invisible="mode not in ('1','4')" |
| 108 |
required="mode == '1'" |
| 109 |
readonly="state != 'pending'"/> |
| 110 |
<field name="vehicle_no" |
| 111 |
invisible="mode not in ('1','4')" |
| 112 |
required="mode == '1' and not transportation_doc_no" |
| 113 |
readonly="state != 'pending'"/> |
| 114 |
<label for="distance" readonly="state != 'pending'"/> |
| 115 |
<div class="o_row" name="distance"> |
| 116 |
<field name="distance" readonly="state != 'pending'"/> |
| 117 |
<span>km</span> |
| 118 |
</div> |
| 119 |
</group> |
| 120 |
<group> |
| 121 |
<label for="transportation_doc_no" |
| 122 |
invisible="mode != '1'"/> |
| 123 |
<label for="transportation_doc_no" |
| 124 |
string="RR No" |
| 125 |
invisible="mode != '2'"/> |
| 126 |
<label for="transportation_doc_no" |
| 127 |
string="Airway Bill" |
| 128 |
invisible="mode != '3'"/> |
| 129 |
<label for="transportation_doc_no" |
| 130 |
invisible="mode != '4'" |
| 131 |
string="Bill of lading No"/> |
| 132 |
<div class="o_row"> |
| 133 |
<field name="transportation_doc_no" |
| 134 |
readonly="state != 'pending'" |
| 135 |
required="mode in ('2', '3', '4')" |
| 136 |
invisible="not mode"/> |
| 137 |
</div> |
| 138 |
|
| 139 |
|
| 140 |
<label for="transportation_doc_date" |
| 141 |
invisible="mode != '1'"/> |
| 142 |
<label for="transportation_doc_date" |
| 143 |
string="RR Date" |
| 144 |
invisible="mode != '2'"/> |
| 145 |
<label for="transportation_doc_date" |
| 146 |
string="Airway Bill Date" |
| 147 |
invisible="mode != '3'"/> |
| 148 |
<label for="transportation_doc_date" |
| 149 |
string="Bill of lading Date" |
| 150 |
invisible="mode != '4'"/> |
| 151 |
<div class="o_row"> |
| 152 |
<field name="transportation_doc_date" |
| 153 |
readonly="state != 'pending'" |
| 154 |
required="mode in ('2', '3', '4')" |
| 155 |
invisible="not mode"/> |
| 156 |
</div> |
| 157 |
</group> |
| 158 |
</group> |
| 159 |
<group name="cancel_ewaybill" |
| 160 |
string="Cancel details" |
| 161 |
invisible="state != 'cancel'"> |
| 162 |
<group> |
| 163 |
<field name="cancel_reason" readonly="state != 'generated'"/> |
| 164 |
<field name="cancel_remarks" readonly="state != 'generated'"/> |
| 165 |
</group> |
| 166 |
<group> |
| 167 |
</group> |
| 168 |
</group> |
| 169 |
</sheet> |
| 170 |
<!-- Chatter --> |
| 171 |
<chatter/> |
| 172 |
</form> |
| 173 |
</field> |
| 174 |
</record> |
| 175 |
|
| 176 |
<record id="l10n_in_ewaybill_form_action" model="ir.actions.act_window"> |
| 177 |
<field name="name">e-Waybill</field> |
| 178 |
<field name="res_model">l10n.in.ewaybill</field> |
| 179 |
<field name="view_mode">form</field> |
| 180 |
<field name="view_id" ref="l10n_in_ewaybill_form_view"/> |
| 181 |
</record> |
| 182 |
</odoo> |