12 changed files with 134 additions and 137 deletions
			
			
		@ -1,6 +1,6 @@ | 
				
			|||||
## Module <integration_whatsapp_chat_live> | 
					## Module <integration_whatsapp_chat_live> | 
				
			||||
 | 
					
 | 
				
			||||
#### 18.2.2023 | 
					#### 27.11.2023 | 
				
			||||
#### Version 15.0.1.0.0 | 
					#### Version 15.0.1.0.0 | 
				
			||||
##### ADD | 
					##### ADD | 
				
			||||
- Initial Commit for Whatsapp Chat Live Order | 
					- Initial Commit for Whatsapp Live Chat In Odoo | 
				
			||||
 | 
				
			|||||
| 
		 After Width: | Height: | Size: 81 KiB  | 
| 
		 Before Width: | Height: | Size: 61 KiB  | 
@ -0,0 +1,23 @@ | 
				
			|||||
 | 
					<?xml version="1.0" encoding="utf-8"?> | 
				
			||||
 | 
					<odoo> | 
				
			||||
 | 
					    <!--website_sale.product template view inherited--> | 
				
			||||
 | 
					    <template id="whatsapp_order" inherit_id="website_sale.product" | 
				
			||||
 | 
					              customize_show="True" name="Select Quantity"> | 
				
			||||
 | 
					        <xpath expr="//div[@id='add_to_cart_wrap']" position="after"> | 
				
			||||
 | 
					            <div id="wp_msg" class="d-inline_i"> | 
				
			||||
 | 
					                <t t-set="whatsapp_number" | 
				
			||||
 | 
					                   t-value="request.env['ir.config_parameter'].sudo().get_param('integration_whatsapp_chat_live.mobile_phone_no')"/> | 
				
			||||
 | 
					                <t t-set="whatsapp_message" | 
				
			||||
 | 
					                   t-value="request.env['ir.config_parameter'].sudo().get_param('integration_whatsapp_chat_live.custom_message')"/> | 
				
			||||
 | 
					                <t t-set="wp_product" t-value="product.name"/> | 
				
			||||
 | 
					                <t t-if="whatsapp_number and whatsapp_message"> | 
				
			||||
 | 
					                    <a role="button" id="wp_msgs" | 
				
			||||
 | 
					                       class="btn btn-success js_wp_mg" | 
				
			||||
 | 
					                       t-attf-href="https://api.whatsapp.com/send?phone=#{whatsapp_number}&text=#{whatsapp_message + ' ' + wp_product}"> | 
				
			||||
 | 
					                        <i class="fa fa-whatsapp mr-2"/>Whatsapp Order | 
				
			||||
 | 
					                    </a> | 
				
			||||
 | 
					                </t> | 
				
			||||
 | 
					            </div> | 
				
			||||
 | 
					        </xpath> | 
				
			||||
 | 
					    </template> | 
				
			||||
 | 
					</odoo> | 
				
			||||
@ -0,0 +1,40 @@ | 
				
			|||||
 | 
					<?xml version="1.0" encoding="UTF-8" ?> | 
				
			||||
 | 
					<odoo> | 
				
			||||
 | 
					    <!--Configuration settings form view inherited--> | 
				
			||||
 | 
					    <record id="res_config_settings_view_form" model="ir.ui.view"> | 
				
			||||
 | 
					        <field name="name"> | 
				
			||||
 | 
					            res.config.settings.view.form.inherit.integration.whatsapp.chat.live | 
				
			||||
 | 
					        </field> | 
				
			||||
 | 
					        <field name="model">res.config.settings</field> | 
				
			||||
 | 
					        <field name="priority" eval="0"/> | 
				
			||||
 | 
					        <field name="inherit_id" ref="website.res_config_settings_view_form"/> | 
				
			||||
 | 
					        <field name="arch" type="xml"> | 
				
			||||
 | 
					            <xpath expr="//div[@id='website_settings']" position="after"> | 
				
			||||
 | 
					                <div id="db_backup_settings"> | 
				
			||||
 | 
					                    <h2>Whatsapp Live Order</h2> | 
				
			||||
 | 
					                    <div class="row mt16 o_settings_container"> | 
				
			||||
 | 
					                        <div class="col-12 col-lg-6 o_setting_box"> | 
				
			||||
 | 
					                            <div class="o_setting_left_pane"/> | 
				
			||||
 | 
					                            <div class="o_setting_right_pane"> | 
				
			||||
 | 
					                                <div class="text-muted content-group mt16"> | 
				
			||||
 | 
					                                    <label string="Whatsapp Phone No:" | 
				
			||||
 | 
					                                           for="mobile_phone_no" id="whatsapp_1" | 
				
			||||
 | 
					                                           class="col-lg-3 o_light_label"/> | 
				
			||||
 | 
					                                    <field name="mobile_phone_no" | 
				
			||||
 | 
					                                           widget='phone'/> | 
				
			||||
 | 
					                                </div> | 
				
			||||
 | 
					                            </div> | 
				
			||||
 | 
					                            <div class="o_setting_left_pane"/> | 
				
			||||
 | 
					                            <div class="o_setting_right_pane"> | 
				
			||||
 | 
					                                <label string="Custom Message:" | 
				
			||||
 | 
					                                       for="custom_message" | 
				
			||||
 | 
					                                       class="col-lg-3 o_light_label"/> | 
				
			||||
 | 
					                                <field name="custom_message" widget="text"/> | 
				
			||||
 | 
					                            </div> | 
				
			||||
 | 
					                        </div> | 
				
			||||
 | 
					                    </div> | 
				
			||||
 | 
					                </div> | 
				
			||||
 | 
					            </xpath> | 
				
			||||
 | 
					        </field> | 
				
			||||
 | 
					    </record> | 
				
			||||
 | 
					</odoo> | 
				
			||||
@ -1,39 +0,0 @@ | 
				
			|||||
<?xml version="1.0" encoding="UTF-8" ?> | 
					 | 
				
			||||
<odoo> | 
					 | 
				
			||||
    <data> | 
					 | 
				
			||||
        <record id="res_config_settings_view_form" model="ir.ui.view"> | 
					 | 
				
			||||
            <field name="name">res.config.settings.view.form.inherit.base.setup</field> | 
					 | 
				
			||||
            <field name="model">res.config.settings</field> | 
					 | 
				
			||||
            <field name="priority" eval="0"/> | 
					 | 
				
			||||
            <field name="inherit_id" ref="website.res_config_settings_view_form"/> | 
					 | 
				
			||||
            <field name="arch" type="xml"> | 
					 | 
				
			||||
                <xpath expr="//div[@id='website_settings']" position="after">> | 
					 | 
				
			||||
                    <div id="db_backup_settings"> | 
					 | 
				
			||||
                        <h2>Whatsapp Live Order</h2> | 
					 | 
				
			||||
                         <div class="row mt16 o_settings_container"> | 
					 | 
				
			||||
                            <div class="col-12 col-lg-6 o_setting_box"> | 
					 | 
				
			||||
                                <div class="o_setting_left_pane"/> | 
					 | 
				
			||||
                                <div class="o_setting_right_pane"> | 
					 | 
				
			||||
                                    <div class="text-muted content-group mt16"> | 
					 | 
				
			||||
                                        <label string="Whatsapp Phone No:" for="mobile_phone_no" id="whatsapp_1" class="col-lg-3 o_light_label"/> | 
					 | 
				
			||||
                                        <field name="mobile_phone_no" widget='phone'/> | 
					 | 
				
			||||
                                    </div> | 
					 | 
				
			||||
                                </div> | 
					 | 
				
			||||
                            </div> | 
					 | 
				
			||||
                        </div><div class="row mt16 o_settings_container"> | 
					 | 
				
			||||
                            <div class="col-12 col-lg-6 o_setting_box"> | 
					 | 
				
			||||
                                <div class="o_setting_left_pane"/> | 
					 | 
				
			||||
                                <div class="o_setting_right_pane"> | 
					 | 
				
			||||
                                    <div class="text-muted content-group mt16"> | 
					 | 
				
			||||
                                        <label string="Custom Message:" for="custom_message" id="wp_message1" class="col-lg-3 o_light_label"/> | 
					 | 
				
			||||
                                        <field name="custom_message" /> | 
					 | 
				
			||||
                                    </div> | 
					 | 
				
			||||
                                </div> | 
					 | 
				
			||||
                            </div> | 
					 | 
				
			||||
                        </div> | 
					 | 
				
			||||
                    </div> | 
					 | 
				
			||||
                </xpath> | 
					 | 
				
			||||
            </field> | 
					 | 
				
			||||
        </record> | 
					 | 
				
			||||
    </data> | 
					 | 
				
			||||
</odoo> | 
					 | 
				
			||||
@ -1,22 +0,0 @@ | 
				
			|||||
<?xml version="1.0" encoding="utf-8"?> | 
					 | 
				
			||||
<odoo> | 
					 | 
				
			||||
    <data> | 
					 | 
				
			||||
        <template id="whatsapp_order" inherit_id="website_sale.product" | 
					 | 
				
			||||
                  customize_show="True" name="Select Quantity"> | 
					 | 
				
			||||
            <xpath expr="//div[@id='add_to_cart_wrap']" position="after"> | 
					 | 
				
			||||
                <div id="wp_msg" class="d-inline_i"> | 
					 | 
				
			||||
                    <t t-set="whatsapp_number" | 
					 | 
				
			||||
                       t-value="request.env['ir.config_parameter'].sudo().get_param('integration_whatsapp_chat_live.mobile_phone_no')"/> | 
					 | 
				
			||||
                    <t t-set="whatsapp_message" | 
					 | 
				
			||||
                       t-value="request.env['ir.config_parameter'].sudo().get_param('integration_whatsapp_chat_live.custom_message')"/> | 
					 | 
				
			||||
                    <t t-set="wp_product" t-value="product.name"/> | 
					 | 
				
			||||
                    <a role="button" id="wp_msgs" | 
					 | 
				
			||||
                       class="btn btn-success js_wp_mg" | 
					 | 
				
			||||
                       t-attf-href="https://api.whatsapp.com/send?phone=#{whatsapp_number}&text=#{whatsapp_message + ' ' + wp_product}"> | 
					 | 
				
			||||
                        <i class="fa fa-whatsapp mr-2"/>Whatsapp Order | 
					 | 
				
			||||
                    </a> | 
					 | 
				
			||||
                </div> | 
					 | 
				
			||||
            </xpath> | 
					 | 
				
			||||
        </template> | 
					 | 
				
			||||
    </data> | 
					 | 
				
			||||
</odoo> | 
					 | 
				
			||||
					Loading…
					
					
				
		Reference in new issue