Skip to content

Commit

Permalink
[MIG] crm_phonecall: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
peluko00 committed Jul 8, 2024
1 parent 5081ff2 commit 0a15e47
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 44 deletions.
3 changes: 3 additions & 0 deletions crm_phonecall/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ Contributors
- Manuel Marquez <[email protected]>

- Ruchir Shukla <[email protected]>
- `APSL-Nagarro <https://apsl.tech>`__:

- Antoni Marroig <[email protected]>

Maintainers
-----------
Expand Down
2 changes: 1 addition & 1 deletion crm_phonecall/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{
"name": "CRM Phone Calls",
"version": "16.0.1.1.0",
"version": "17.0.1.0.0",
"category": "Customer Relationship Management",
"author": "Odoo S.A., Tecnativa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/crm",
Expand Down
6 changes: 4 additions & 2 deletions crm_phonecall/models/crm_phonecall.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,10 @@ def action_button_convert2opportunity(self):
return opportunity_id.redirect_lead_opportunity_view()

def _get_view(self, view_id=None, view_type="form", **options):
"""Inject group check to make the tree editable or not. Apparently it can't be done
by pure view inheritance and attribute overriding"""
"""
Inject group check to make the tree editable or not. Apparently it can't be done
by pure view inheritance and attribute overriding
"""
arch, view = super()._get_view(view_id, view_type, **options)
if view_type == "tree" and self.env.user.has_group(
"crm_phonecall.group_show_form_view"
Expand Down
2 changes: 2 additions & 0 deletions crm_phonecall/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@
- Iván Todorovich \<<[email protected]>\>
- Manuel Marquez \<<[email protected]>\>
- Ruchir Shukla \<<[email protected]>\>
- [APSL-Nagarro](https://apsl.tech):
- Antoni Marroig \<<[email protected]>\>
4 changes: 4 additions & 0 deletions crm_phonecall/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,10 @@ <h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
</ul>
</li>
<li>Ruchir Shukla &lt;<a class="reference external" href="mailto:ruchir&#64;bizzappdev.com">ruchir&#64;bizzappdev.com</a>&gt;</li>
<li><a class="reference external" href="https://apsl.tech">APSL-Nagarro</a>:<ul>
<li>Antoni Marroig &lt;<a class="reference external" href="mailto:amarroig&#64;apsl.net">amarroig&#64;apsl.net</a>&gt;</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="maintainers">
Expand Down
26 changes: 12 additions & 14 deletions crm_phonecall/views/crm_phonecall_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,22 @@
<button
icon="fa-calendar"
name="action_make_meeting"
states="open,pending"
invisible="state not in ['open', 'pending']"
string="Meeting"
type="object"
/>
<button
attrs="{'invisible':[('opportunity_id','!=',False)]}"
invisible="opportunity_id or state not in ['open', 'pending']"
icon="fa-hand-pointer-o"
name="action_button_convert2opportunity"
states="open,pending"
string="Convert to Opportunity"
type="object"
/>
<field name="partner_phone" />
<field name="user_id" />
<field invisible="1" name="tag_ids" />
<field invisible="1" name="create_date" />
<field invisible="1" name="opportunity_id" />
<field column_invisible="1" name="tag_ids" />
<field column_invisible="1" name="create_date" />
<field column_invisible="1" name="opportunity_id" />
<field name="state" />
</tree>
</field>
Expand All @@ -78,7 +77,7 @@
<sheet string="Phone Call">
<div class="oe_button_box" name="button_box">
<button
attrs="{'invisible':[ '|', ('opportunity_id','!=',False), ('state', 'not in', ('open', 'done'))]}"
invisible="opportunity_id or state not in ['open', 'done']"
class="oe_stat_button"
help="Convert To Opportunity"
icon="fa-star"
Expand Down Expand Up @@ -194,17 +193,17 @@
<field name="date" />
<field name="name" />
<field name="partner_id" />
<field invisible="1" name="partner_phone" />
<field invisible="1" name="partner_mobile" />
<field column_invisible="1" name="partner_phone" />
<field column_invisible="1" name="partner_mobile" />
<field
context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'sales_team.group_sale_salesman']}"
name="user_id"
/>
<field invisible="1" name="tag_ids" widget="many2many_tags" />
<field column_invisible="1" name="tag_ids" widget="many2many_tags" />
<field name="direction" />
<field name="state" />
<field invisible="1" name="create_date" />
<field invisible="1" name="opportunity_id" />
<field column_invisible="1" name="create_date" />
<field column_invisible="1" name="opportunity_id" />
<field groups="base.group_no_one" name="campaign_id" />
<field groups="base.group_no_one" name="source_id" />
<field groups="base.group_no_one" name="medium_id" />
Expand All @@ -221,10 +220,9 @@
type="object"
/>
<button
attrs="{'invisible':[('opportunity_id','!=',False)]}"
invisible="opportunity_id or state != 'open' or state != 'pending'"
icon="fa-hand-pointer-o"
name="action_button_convert2opportunity"
states="open,pending"
string="Convert to Opportunity"
type="object"
/>
Expand Down
32 changes: 9 additions & 23 deletions crm_phonecall/views/res_config_settings_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,15 @@
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="crm.res_config_settings_view_form" />
<field name="arch" type="xml">
<div data-string="CRM" position="inside">
<h2>Phonecalls</h2>
<div class="row mt16 o_settings_container">
<div class="col-lg-6 o_setting_box">
<div class="o_setting_left_pane">
<field name="group_show_form_view" />
</div>
<div
class="o_setting_right_pane"
id="crm_phonecall_show_form_settings"
>
<label
for="group_show_form_view"
string="Enable form view for phone calls"
/>
<div class="text-muted">
By default form view is disabled for calls, with this
setting it is enabled for all users.
</div>
</div>
</div>
</div>
</div>
<xpath expr="//app[@name='crm']" position="inside">
<block title="Phonecalls" name="o_settings_container">
<setting
help="By default form view is disabled for calls, with this setting it is enabled for all users."
>
<field name="group_show_form_view" />
</setting>
</block>
</xpath>
</field>
</record>
</odoo>
8 changes: 4 additions & 4 deletions crm_phonecall/wizard/crm_phonecall_to_phonecall_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
<group>
<group>
<field name="action" />
<field attrs="{'readonly': [(1,'=',1)]}" name="partner_id" />
<field readonly="1" name="partner_id" />
<field groups="sales_team.group_sale_salesman" name="team_id" />
</group>
<group>
<field name="name" />
<field
attrs="{'invisible': [('action','=','log')]}"
invisible="action == 'log'"
name="date"
string="Planned Date"
/>
Expand All @@ -27,14 +27,14 @@
</group>
<footer>
<button
attrs="{'invisible' : [('action', '!=', 'log')]}"
invisible="action != 'log'"
class="oe_highlight"
name="action_schedule"
string="Log Call"
type="object"
/>
<button
attrs="{'invisible' : [('action', '!=', 'schedule')]}"
invisible="action != 'schedule'"
class="oe_highlight"
name="action_schedule"
string="Schedule Call"
Expand Down

0 comments on commit 0a15e47

Please sign in to comment.