1
0
forked from Mapan/odoo17e
odoo17e-kedaikipas58/addons/delivery_shiprocket/views/delivery_carrier_views.xml
2024-12-10 09:04:09 +07:00

89 lines
5.9 KiB
XML

<?xml version='1.0' encoding='utf-8'?>
<odoo>
<record id="view_delivery_carrier_form_inherit_delivery_shiprocket" model="ir.ui.view">
<field name="name">delivery.carrier.form.inherit.delivery.shiprocket</field>
<field name="model">delivery.carrier</field>
<field name="inherit_id" ref="delivery.view_delivery_carrier_form"/>
<field name="arch" type="xml">
<xpath expr="//div[@name='title']" position="after">
<div colspan="2" class="alert alert-warning" invisible="delivery_type != 'shiprocket' or prod_environment == True" role="status">
<p><i class="fa fa-exclamation-triangle"/> In test environment, to avoid charges, your shippings are automatically <b>cancelled</b> after the label creation. The amount of cancelled shipment will be returned in next 3-4 days.</p>
</div>
</xpath>
<xpath expr="//page[@name='destination']" position='before'>
<page string="Shiprocket Configuration" name="shiprocket_configuration" invisible="delivery_type != 'shiprocket'">
<group>
<group>
<field name="shiprocket_email" required="delivery_type == 'shiprocket'"/>
<field name="shiprocket_password" password="1" required="delivery_type == 'shiprocket'"/>
<div colspan='2'>
<button name="action_shiprocket_test_connection" string=" Test Connection" type="object" class="oe_inline fa fa-arrow-right oe_link"/>
</div>
<field name="shiprocket_pickup_request"/>
<field name="shiprocket_manifests_generate"/>
</group>
<group>
<field name="shiprocket_payment_method" required="delivery_type == 'shiprocket'"/>
<field name="shiprocket_default_package_type_id" context="{'default_package_carrier_type': 'shiprocket'}" domain="[('package_carrier_type', '=', 'shiprocket')]" required="delivery_type == 'shiprocket'"/>
<label for="shiprocket_courier_ids" />
<div>
<field name="shiprocket_courier_ids" widget="many2many_tags" readonly="0" class="oe_inline" options="{'no_create': True, 'no_quick_create': True, 'no_open': True}"/>
<button name="action_get_couriers" title="Sync Couriers from Shiprocket" class="fa fa-refresh oe_inline oe_link" type="object"/>
</div>
<label for="shiprocket_channel_id"/>
<div>
<field name="shiprocket_channel_id" class="oe_inline" options="{'no_create': True, 'no_quick_create': True, 'no_open': True}"/>
<button name="action_get_channels" title="Sync Channel from Shiprocket" class="fa fa-refresh oe_inline oe_link" type="object"/>
</div>
</group>
</group>
<group string="Shiprocket Tutorial" invisible="delivery_type != 'shiprocket'">
<ul>
<li>
<b>Go to
<a href="https://app.shiprocket.in/register" target="_blank">Shiprocket Website</a>
to create a new account:</b>
<br/>
<img src="/delivery_shiprocket/static/src/img/signup.png" alt="Sign up" title="Sign up"/>
</li>
<li>
<b>Once your account is created, go to Settings > API > Configure. </b>
<b>You can add new API User from the right side of the page.</b>
<br/>
<img src="/delivery_shiprocket/static/src/img/api.png" alt="Create API User" title="API User"/>
</li>
<li>
<b>Copy your API User's Email and Password and paste into Shipping method's configuration.</b>
</li>
</ul>
</group>
<group string="Shiprocket Tutorial for add channel" invisible="delivery_type != 'shiprocket'">
<ul>
<li>
<b>To Create a channel, Go to Shiprocket Channels</b>
</li>
<li>
<b>Click on Add a New Channel</b>
<img src="/delivery_shiprocket/static/src/img/button_add_new_channel.png" alt="Add New Channel" title="Add New Channel"/>
</li>
<li>
<b>Now click on Add for MANUAL</b>
<img src="/delivery_shiprocket/static/src/img/button_add_manual_channel.png" alt="Add Manual Channel" title="Add Manual Channel"/>
</li>
<li>
<b>Fill the details and Click on Save Channel &amp; Test Connection button.</b>
<img src="/delivery_shiprocket/static/src/img/button_save_manual_channel.png" alt="Save Manual Channel" title="Save Manual Channel"/>
</li>
<li>
<b>In Odoo configuration click on <i class="fa fa-refresh oe_inline"/> icon near Shiprocket Channel to sync newly created channels.</b>
</li>
</ul>
</group>
</page>
</xpath>
</field>
</record>
</odoo>