19.0 vanilla

This commit is contained in:
Ernad Husremovic 2026-03-09 09:30:53 +01:00
parent dc68f80d3f
commit 7221b9ac46
610 changed files with 135477 additions and 161677 deletions

View file

@ -6,29 +6,29 @@
<field name="arch" type="xml">
<form>
<header>
<button name="action_submit" type="object" string="Submit" states="draft" class="oe_highlight" invisible="context.get('is_modal')"/>
<button name="action_submit" type="object" string="Retry" states="error" class="oe_highlight" invisible="context.get('is_modal')"/>
<button name="action_submit" type="object" string="Submit" class="oe_highlight" invisible="context.get('is_modal') or state != 'draft'"/>
<button name="action_submit" type="object" string="Retry" class="oe_highlight" invisible="context.get('is_modal') or state != 'error'"/>
<field name="state" widget="statusbar" statusbar_visible="draft,done" invisible="context.get('is_modal')"/>
</header>
<div class="alert alert-danger text-center my-0" role="alert" attrs="{'invisible': [('error_type', '=', False)]}">
<div class="alert alert-danger text-center" role="alert" invisible="not error_type">
<field name="error_type" invisible="1"/>
<field name="lead_type" invisible="1"/>
<span attrs="{'invisible': [('error_type', '!=', 'credits')]}">
<span invisible="error_type != 'credits'">
<span>You do not have enough credits to submit this request.
<button name="action_buy_credits" type="object" class="oe_inline p-0 border-0 align-top text-primary">Buy credits.</button>
</span>
</span>
<span attrs="{'invisible': [('error_type', '!=', 'no_result')]}">Your request did not return any result (no credits were used). Try removing some filters.</span>
<span invisible="error_type != 'no_result'">Your request did not return any result (no credits were used). Try removing some filters.</span>
</div>
<sheet>
<div class="oe_button_box" name="button_box">
<button name="action_get_opportunity_action" class="oe_stat_button" type="object" icon="fa-star" attrs="{'invisible': ['|', ('lead_type', '!=', 'opportunity'), ('state', '!=' , 'done')]}">
<button name="action_get_opportunity_action" class="oe_stat_button" type="object" icon="fa-star" context="{'create': False}" invisible="lead_type != 'opportunity' or state != 'done'">
<div class="o_stat_info">
<field name="lead_count"/>
<span class="o_stat_text">Opportunities</span>
</div>
</button>
<button name="action_get_lead_action" class="oe_stat_button" type="object" icon="fa-star" groups="crm.group_use_lead" attrs="{'invisible': ['|', ('lead_type', '!=', 'lead'), ('state', '!=' , 'done')]}">
<button name="action_get_lead_action" class="oe_stat_button" type="object" icon="fa-star" groups="crm.group_use_lead" context="{'create': False}" invisible="lead_type != 'lead' or state != 'done'">
<div class="o_stat_info">
<field name="lead_count"/>
<span class="o_stat_text">Leads</span>
@ -47,61 +47,62 @@
</div>
</span>
<h2>What do you need ?</h2>
<h2>How many leads would you like?</h2>
<group name="requests">
<group>
<div class="o_row py-3">
<field name="lead_number" attrs="{'readonly': [('state', '=', 'done')]}" nolabel="1" class="oe_inline pe-2 o_input_3ch"/>
<field name="search_type" widget="selection" attrs="{'readonly': [('state', '=', 'done')]}" nolabel="1" class="oe_inline"/>
<field name="lead_number" readonly="state == 'done'" nolabel="1" class="oe_inline pe-2 o_input_3ch o_field_highlight"/>
<field name="search_type" widget="selection" readonly="state == 'done'" nolabel="1" class="oe_inline o_field_highlight"/>
</div>
</group>
</group>
<group>
<group name="companies">
<field name="country_ids" widget="many2many_tags" attrs="{'readonly': [('state', '=', 'done')]}" required="True" options="{'no_create': True, 'no_open': True}"/>
<field name="country_ids" widget="many2many_tags" required="True" readonly="state == 'done'" options="{'no_create': True, 'no_open': True}"/>
<field name="available_state_ids" invisible="1"/>
<field name="state_ids" widget="many2many_tags"
attrs="{'invisible': ['|', ('country_ids', '=', []), ('available_state_ids', '=', [])], 'readonly': [('state', '=', 'done')]}"
<field name="state_ids" widget="many2many_tags" placeholder="Pick States..."
invisible="not country_ids or not available_state_ids"
readonly="state == 'done'"
domain="[('id', 'in', available_state_ids)]" options="{'no_create': True, 'no_open': True}"/>
<field name="industry_ids" widget="many2many_tags" attrs="{'readonly': [('state', '=', 'done')]}" options="{'no_create': True, 'no_open': True}" class="o_industry" required="1"/>
<field name="filter_on_size" attrs="{'readonly': [('state', '=', 'done')]}"/>
<label for="company_size_min" attrs="{'invisible': [('filter_on_size', '=', False)]}"/>
<div attrs="{'invisible': [('filter_on_size', '=', False)]}">
<field name="industry_ids" widget="many2many_tags" options="{'no_create': True, 'no_open': True}" class="o_industry o_field_highlight" required="1" readonly="state == 'done'"/>
<field name="filter_on_size" readonly="state == 'done'"/>
<label for="company_size_min" invisible="not filter_on_size"/>
<div invisible="not filter_on_size">
From
<field name="company_size_min" class="oe_inline px-2 o_input_5ch" attrs="{'required': [('filter_on_size', '=', True)], 'readonly': [('state', '=', 'done')]}"/>
<field name="company_size_min" class="oe_inline px-2 o_input_5ch" readonly="state == 'done'" required="filter_on_size"/>
to
<field name="company_size_max" class="oe_inline px-2 o_input_7ch" attrs="{'required': [('filter_on_size', '=', True)], 'readonly': [('state', '=', 'done')]}"/>
<field name="company_size_max" class="oe_inline px-2 o_input_7ch" readonly="state == 'done'" required="filter_on_size"/>
employees
</div>
</group>
<group name="lead_info">
<field name="lead_type" groups="crm.group_use_lead" invisible="context.get('is_modal')" attrs="{'readonly': [('state', '=', 'done')]}"/>
<field name="team_id" no_create="1" no_open="1" attrs="{'readonly': [('state', '=', 'done')]}" kanban_view_ref="%(sales_team.crm_team_view_kanban)s"/>
<field name="user_id" no_create="1" no_open="1" attrs="{'readonly': [('state', '=', 'done')]}"/>
<field name="tag_ids" string="Default Tags" widget="many2many_tags" attrs="{'readonly': [('state', '=', 'done')]}"/>
<field name="lead_type" groups="crm.group_use_lead" invisible="context.get('is_modal')" readonly="state == 'done'"/>
<field name="team_id" no_create="1" no_open="1" readonly="state == 'done'" context="{'kanban_view_ref': 'sales_team.crm_team_view_kanban'}"/>
<field name="user_id" no_create="1" no_open="1" readonly="state == 'done'" widget="many2one_avatar_user"/>
<field name="tag_ids" string="Default Tags" widget="many2many_tags" options="{'color_field': 'color', 'no_create_edit': True}" readonly="state == 'done'"/>
</group>
</group>
<group name="contacts" attrs="{'invisible': [('search_type', '!=', 'people')]}">
<group name="contacts" invisible="search_type != 'people'">
<div colspan="2" class="py-3">
<field name="contact_number" attrs="{'readonly': [('state', '=', 'done')], 'required': [('search_type', '=', 'people')]}" nolabel="1" class="oe_inline pe-2 col-md-1 o_input_2ch"/>
<field name="contact_number" readonly="state == 'done'" required="search_type == 'people'" nolabel="1" class="oe_inline pe-2 col-md-1 o_input_2ch"/>
<span class="col-md-6">Extra contacts per Company</span>
</div>
</group>
<group attrs="{'invisible': [('search_type', '!=', 'people')]}">
<group invisible="search_type != 'people'">
<group>
<field name="contact_filter_type" widget="radio" attrs="{'readonly': [('state', '=', 'done')]}" options="{'horizontal': true}"/>
<field name="preferred_role_id" options="{'no_create_edit': True, 'no_quick_create': True, 'no_open': True}" attrs="{'invisible': [('contact_filter_type','!=', 'role')], 'required': [('search_type', '=', 'people'), ('contact_filter_type', '=', 'role')], 'readonly': [('state', '=', 'done')]}"/>
<field name="role_ids" widget="many2many_tags" options="{'color_field': 'color', 'no_create_edit': True, 'no_quick_create': True}" attrs="{'invisible': ['|', ('preferred_role_id','=', False), ('contact_filter_type','!=', 'role')], 'readonly': [('state', '=', 'done')]}"/>
<field name="seniority_id" options="{'no_create_edit': True, 'no_quick_create': True, 'no_open': True}" attrs="{'invisible': [('contact_filter_type', '!=', 'seniority')], 'required': [('search_type', '=', 'people'), ('contact_filter_type', '=', 'seniority')], 'readonly': [('state', '=', 'done')]}"/>
<field name="contact_filter_type" widget="radio" readonly="state == 'done'" options="{'horizontal': true}"/>
<field name="preferred_role_id" options="{'no_create_edit': True, 'no_quick_create': True, 'no_open': True}" invisible="contact_filter_type != 'role'" readonly="state == 'done'" required="search_type == 'people' and contact_filter_type == 'role'"/>
<field name="role_ids" widget="many2many_tags" options="{'color_field': 'color', 'no_create_edit': True, 'no_quick_create': True}" invisible="not preferred_role_id or contact_filter_type != 'role'" readonly="state == 'done'"/>
<field name="seniority_id" options="{'no_create_edit': True, 'no_quick_create': True, 'no_open': True}" invisible="contact_filter_type != 'seniority'" readonly="state == 'done'" required="search_type == 'people' and contact_filter_type == 'seniority'"/>
</group>
</group>
<footer>
<button string="Generate Leads" name="action_submit" type="object" default_focus="1" class="btn-primary" invisible="not context.get('is_modal')" data-hotkey="q"/>
<button string="Cancel" class="btn-secondary" special="cancel" data-hotkey="z" invisible="not context.get('is_modal')"/>
<button string="Cancel" class="btn-secondary" special="cancel" data-hotkey="x" invisible="not context.get('is_modal')"/>
</footer>
</sheet>
</form>
@ -109,19 +110,20 @@
</record>
<record id="crm_iap_lead_mining_request_view_tree" model="ir.ui.view">
<field name="name">crm.iap.lead.mining.request.view.tree</field>
<field name="name">crm.iap.lead.mining.request.view.list</field>
<field name="model">crm.iap.lead.mining.request</field>
<field name="arch" type="xml">
<tree>
<list>
<field name="name" decoration-bf="1"/>
<field name="display_lead_label" string="Number of Leads"/>
<field name="lead_number" string="Number of Leads"/>
<field name="search_type"/>
<field name="country_ids" widget="many2many_tags"/>
<field name="team_id"/>
<field name="user_id"/>
<field name="tag_ids" widget="many2many_tags"/>
<field name="industry_ids" widget="many2many_tags"/>
<field name="team_id" optional="hide"/>
<field name="user_id" optional="hide" widget="many2one_avatar_user"/>
<field name="tag_ids" widget="many2many_tags" options="{'color_field': 'color'}" optional="hide"/>
<field name="state" readonly="1" decoration-info="state == 'draft'" decoration-success="state == 'done'" decoration-danger="state == 'error'" widget="badge"/>
</tree>
</list>
</field>
</record>
@ -131,6 +133,8 @@
<field name="arch" type="xml">
<search string="Lead Mining Request">
<field name="name"/>
<field name="industry_ids"/>
<field name="country_ids"/>
<field name="team_id"/>
<field name="user_id"/>
<field name="tag_ids"/>
@ -140,7 +144,7 @@
<separator/>
<filter name="type_is_lead" string="Leads" domain="[('lead_type', '=', 'lead')]"/>
<filter name="type_is_opportunity" string="Opportunities" domain="[('lead_type', '=', 'opportunity')]"/>
<group expand="0" string="Group By">
<group>
<filter string="Type" name="groupby_lead_type" domain="[]" context="{'group_by':'lead_type'}"/>
<filter string="Sales Team" name="groupby_team_id" domain="[]" context="{'group_by':'team_id'}"/>
<filter string="Salesperson" name="groupby_user_id" domain="[]" context="{'group_by':'user_id'}"/>
@ -152,6 +156,6 @@
<record id="crm_iap_lead_mining_request_action" model="ir.actions.act_window">
<field name="name">Lead Mining Requests</field>
<field name="res_model">crm.iap.lead.mining.request</field>
<field name="view_mode">tree,form</field>
<field name="view_mode">list,form</field>
</record>
</odoo>

View file

@ -2,23 +2,55 @@
<odoo>
<record id="crm_lead_view_tree_opportunity" model="ir.ui.view">
<field name="name">crm.lead.view.tree.opportunity.inherit.iap.mine</field>
<field name="name">crm.lead.view.list.opportunity.inherit.iap.mine</field>
<field name="model">crm.lead</field>
<field name="inherit_id" ref="crm.crm_case_tree_view_oppor" />
<field name="arch" type="xml">
<xpath expr="//tree" position="attributes">
<attribute name="js_class">crm_iap_lead_mining_request_tree</attribute>
<xpath expr="//header" position="inside">
<button name="action_generate_leads" type="object" class="o_button_generate_leads"
string="Generate Leads" groups="sales_team.group_sale_manager" display="always"
invisible="context.get('active_model', 'crm.lead') != 'crm.lead' or context.get('crm_lead_view_list_short')"/>
</xpath>
</field>
</record>
<record id="crm_lead_view_tree_lead" model="ir.ui.view">
<field name="name">crm.lead.view.tree.lead.inherit.iap.mine</field>
<field name="name">crm.lead.view.list.lead.inherit.iap.mine</field>
<field name="model">crm.lead</field>
<field name="inherit_id" ref="crm.crm_case_tree_view_leads" />
<field name="arch" type="xml">
<xpath expr="//tree" position="attributes">
<attribute name="js_class">crm_iap_lead_mining_request_tree</attribute>
<xpath expr="//header" position="inside">
<button name="action_generate_leads" type="object" class="o_button_generate_leads"
string="Generate Leads" groups="sales_team.group_sale_manager" display="always"
invisible="context.get('active_model', 'crm.lead') != 'crm.lead' or context.get('crm_lead_view_list_short')"/>
</xpath>
</field>
</record>
<record id="view_crm_lead_kanban" model="ir.ui.view">
<field name="name">crm.lead.kanban.inherit.iap.mine</field>
<field name="model">crm.lead</field>
<field name="inherit_id" ref="crm.view_crm_lead_kanban"/>
<field name="arch" type="xml">
<xpath expr="//kanban" position="inside">
<header>
<button name="action_generate_leads" type="object" class="o_button_generate_leads" string="Generate Leads"
groups="sales_team.group_sale_manager" display="always" invisible="context.get('active_model', 'crm.lead') != 'crm.lead'"/>
</header>
</xpath>
</field>
</record>
<record id="crm_case_kanban_view_leads" model="ir.ui.view">
<field name="name">crm.lead.kanban.lead.inherit.iap.mine</field>
<field name="model">crm.lead</field>
<field name="inherit_id" ref="crm.crm_case_kanban_view_leads"/>
<field name="arch" type="xml">
<xpath expr="//kanban" position="inside">
<header>
<button name="action_generate_leads" type="object" class="o_button_generate_leads" string="Generate Leads"
groups="sales_team.group_sale_manager" display="always" invisible="context.get('active_model', 'crm.lead') != 'crm.lead'"/>
</header>
</xpath>
</field>
</record>

View file

@ -3,6 +3,48 @@
<odoo>
<template id="enrich_company" inherit_id="iap_mail.enrich_company">
<xpath expr="//div[hasclass('o_partner_autocomplete_enrich_info')]" position="inside">
<div class="col-sm-12 row m-0 p-0">
<div t-if="vat" class="d-flex my-1 p-0 col-sm-3">
<i class="fa fa-fw me-2 fa-solid fa-id-card text-primary"/>
<b>Tax ID</b>
</div>
<div t-if="vat" class="my-1 col-sm-9" t-out="vat" />
<div t-if="country" class="d-flex my-1 p-0 col-sm-3">
<i class="fa fa-fw me-2 fa-address-book text-primary"/>
<b>Address</b>
</div>
<div class="my-1 col-sm-9">
<div class="o_address_format">
<div t-if="zip_code">
<div t-if="street" class="o_address_street" t-out="street"/>
<div t-if="street2" class="o_address_street" t-out="street2"/>
<div>
<span t-if="city" t-out="city"/>
<span t-if="zip_code" t-out="zip_code"/>
<span t-if="state" t-out="state"/>
<span t-if="state_name" t-out="state_name"/>
</div>
<div t-if="country" class="o_address_country" t-out="country"/>
</div>
</div>
</div>
<div t-if="website" class="d-flex my-1 p-0 col-sm-3">
<i class="fa fa-fw me-2 fa-globe text-primary"/>
<b>Website</b>
</div>
<div t-if="website" class="col-sm-9">
<a target="_blank" t-attf-href="https://{{website}}" t-out="website" style="font-weight:normal; padding: 2px 0px; margin: 1px 0px; border-radius: 13px; display: inline-block;"/>
</div>
<div t-if="unspsc_codes" class="d-flex my-1 p-0 col-sm-3">
<i class="fa fa-fw me-2 fa-cube text-primary"/>
<b>Industries</b>
</div>
<div t-if="unspsc_codes" class="col-sm-9">
<t t-foreach="unspsc_codes" t-as="tag_item">
<label t-out="tag_item[1]" class="o_tag o_tag_color_7" style="font-weight:normal; padding: 2px 10px; margin: 1px 0px; border-radius: 13px; display: inline-block;"/>
</t>
</div>
</div>
<t t-if="people_data">
<t t-set="hasPhoneNumbers" t-value="any([people['phone'] for people in people_data])"/>
<div style="font-size:16px; margin: 9px 0;">
@ -16,15 +58,15 @@
<thead>
<tr style="background-color: #eeeeee">
<th t-attf-style="padding: 5px; width: {{hasPhoneNumbers and '30%;' or '50%;'}}">
<img style="vertical-align: text-top;" src="web_editor/font_to_img/61447/rgb(102,102,102)/13"/>
<img style="vertical-align: text-top;" src="mail/font_to_img/61447/rgb(102,102,102)/13"/>
Name
</th>
<th t-attf-style="padding: 5px; width: {{hasPhoneNumbers and '40%;' or '50%;'}}">
<img style="vertical-align: text-top;" src="web_editor/font_to_img/61664/rgb(102,102,102)/13"/>
<img style="vertical-align: text-top;" src="mail/font_to_img/61664/rgb(102,102,102)/13"/>
Email
</th>
<th style="padding: 5px; width: 30%;" t-if="hasPhoneNumbers">
<img style="vertical-align: text-top;" src="web_editor/font_to_img/61589/rgb(102,102,102)/13"/>
<img style="vertical-align: text-top;" src="mail/font_to_img/61589/rgb(102,102,102)/13"/>
Phone
</th>
</tr>

View file

@ -5,9 +5,9 @@
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="crm.res_config_settings_view_form"/>
<field name="arch" type="xml">
<div id="crm_iap_mine_settings" position="inside">
<setting id="crm_iap_mine_settings" position="inside">
<widget name="iap_buy_more_credits" service_name="reveal"/>
</div>
</setting>
</field>
</record>
</odoo>