@ -0,0 +1,49 @@ |
|||||
|
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg |
||||
|
:target: https://www.gnu.org/licenses/agpl-3.0-standalone.html |
||||
|
:alt: License: AGPL-3 |
||||
|
|
||||
|
Unique Sequence Number In CRM Opportunity |
||||
|
========================================= |
||||
|
* Module helps to Setup sequence number for each crm opportunities |
||||
|
|
||||
|
Installation |
||||
|
============ |
||||
|
- Install our custom addon |
||||
|
|
||||
|
License |
||||
|
------- |
||||
|
GNU AFFERO GENERAL PUBLIC LICENSE, Version 3 (AGPLv3) |
||||
|
(https://www.gnu.org/licenses/agpl-3.0-standalone.html) |
||||
|
|
||||
|
Company |
||||
|
------- |
||||
|
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
||||
|
|
||||
|
Credits |
||||
|
------- |
||||
|
* Developers: (V16) Sonu Soman K P |
||||
|
(V17) Sabeel B, |
||||
|
(V18) Nivedhya T, |
||||
|
Contact: odoo@cybrosys.com |
||||
|
|
||||
|
Contacts |
||||
|
-------- |
||||
|
* Mail Contact : odoo@cybrosys.com |
||||
|
* Website : https://cybrosys.com |
||||
|
|
||||
|
Bug Tracker |
||||
|
----------- |
||||
|
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. |
||||
|
|
||||
|
Maintainer |
||||
|
========== |
||||
|
.. image:: https://cybrosys.com/images/logo.png |
||||
|
:target: https://cybrosys.com |
||||
|
|
||||
|
This module is maintained by Cybrosys Technologies. |
||||
|
|
||||
|
For support and more information, please visit `Our Website <https://cybrosys.com/>`__ |
||||
|
|
||||
|
Further information |
||||
|
=================== |
||||
|
HTML Description: `<static/description/index.html>`__ |
@ -0,0 +1,22 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU AFFERO |
||||
|
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
||||
|
# (AGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from . import models |
@ -0,0 +1,44 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU AFFERO |
||||
|
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
||||
|
# (AGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
{ |
||||
|
'name': 'Unique Sequence Number In CRM Opportunity', |
||||
|
'version': '18.0.1.0.0', |
||||
|
'category': 'Sales', |
||||
|
'summary': 'Sequence number for CRM opportunities', |
||||
|
'description': """Module helps to Setup sequence number of |
||||
|
each crm opportunities""", |
||||
|
'author': 'Cybrosys Techno Solutions', |
||||
|
'company': 'Cybrosys Techno Solutions', |
||||
|
'maintainer': 'Cybrosys Techno Solutions', |
||||
|
'website': 'https://www.cybrosys.com', |
||||
|
'depends': ['crm'], |
||||
|
'data': [ |
||||
|
'data/sequence_opportunity_crm_data.xml', |
||||
|
'views/res_config_settings_views.xml', |
||||
|
'views/crm_lead_views.xml' |
||||
|
], |
||||
|
'images': ['static/description/banner.jpg'], |
||||
|
'license': 'AGPL-3', |
||||
|
'installable': True, |
||||
|
'auto_install': False, |
||||
|
'application': False, |
||||
|
} |
@ -0,0 +1,15 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<odoo> |
||||
|
<!-- Add sequence number--> |
||||
|
<data noupdate="1"> |
||||
|
<record id="sequence_number_opportunity" model="ir.sequence"> |
||||
|
<field name="name">Opportunity Sequence</field> |
||||
|
<field name="code">code.opportunity.crm</field> |
||||
|
<field name="prefix">OPPO</field> |
||||
|
<field name="padding">5</field> |
||||
|
<field name="number_next">1</field> |
||||
|
<field name="number_increment">1</field> |
||||
|
<field name="company_id" eval="False"/> |
||||
|
</record> |
||||
|
</data> |
||||
|
</odoo> |
@ -0,0 +1,6 @@ |
|||||
|
## Module <sequence_opportunity_crm> |
||||
|
|
||||
|
#### 04.11.2024 |
||||
|
#### Version 18.0.1.0.0 |
||||
|
#### ADD |
||||
|
- Initial commit for Unique Sequence Number In CRM Opportunity |
@ -0,0 +1,23 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU AFFERO |
||||
|
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
||||
|
# (AGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from . import crm_lead |
||||
|
from . import res_config_settings |
@ -0,0 +1,56 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU AFFERO |
||||
|
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
||||
|
# (AGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import api, fields, models |
||||
|
|
||||
|
|
||||
|
class CrmLead(models.Model): |
||||
|
""" |
||||
|
CRM Lead |
||||
|
This class extends the base `crm.lead` model to add opportunity functionally |
||||
|
""" |
||||
|
_inherit = 'crm.lead' |
||||
|
_description = 'CRM Lead' |
||||
|
|
||||
|
oppo_code = fields.Char(string="Opportunity Sequence Code", |
||||
|
help='Unique code for each opportunity', |
||||
|
readonly=True) |
||||
|
sequence_create = fields.Boolean(compute="_compute_sequence_create", |
||||
|
string='Create Sequence', |
||||
|
help='Creates unique code for ' |
||||
|
'each opportunity') |
||||
|
|
||||
|
def _compute_sequence_create(self): |
||||
|
""" This method is used to compute the value of sequence_create field |
||||
|
""" |
||||
|
for rec in self: |
||||
|
rec.sequence_create = ( |
||||
|
self.env["ir.config_parameter"].sudo().get_param( |
||||
|
"sequence_opportunity_crm.sequence_create")) |
||||
|
|
||||
|
@api.model_create_multi |
||||
|
def create(self, vals): |
||||
|
""" This method is used to create sequence for each opportunity """ |
||||
|
oppo = super().create(vals) |
||||
|
if oppo.sequence_create: |
||||
|
oppo.oppo_code = (self.env["ir.sequence"].next_by_code |
||||
|
("code.opportunity.crm")) |
||||
|
return oppo |
@ -0,0 +1,37 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2024-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Cybrosys Techno Solutions(<https://www.cybrosys.com>) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU AFFERO |
||||
|
# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE |
||||
|
# (AGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import fields, models |
||||
|
|
||||
|
|
||||
|
class ResConfigSettings(models.TransientModel): |
||||
|
""" |
||||
|
This class extends the`res.config.settings` and add a boolean field |
||||
|
""" |
||||
|
_inherit = "res.config.settings" |
||||
|
|
||||
|
sequence_create = fields.Boolean("Creates Automatic Sequence " |
||||
|
"Numbers for CRM Opportunity", |
||||
|
config_parameter= |
||||
|
"sequence_opportunity_crm.sequence_create", |
||||
|
store=True, |
||||
|
default=False, help="Creates unique code " |
||||
|
"for each opportunity") |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 210 KiB |
After Width: | Height: | Size: 209 KiB |
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 495 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 624 B |
After Width: | Height: | Size: 136 KiB |
After Width: | Height: | Size: 214 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 929 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 542 B |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 165 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 911 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 600 B |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 462 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 926 B |
After Width: | Height: | Size: 9.0 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 800 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 189 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 988 B |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 875 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 92 KiB |
After Width: | Height: | Size: 131 KiB |
After Width: | Height: | Size: 88 KiB |
After Width: | Height: | Size: 90 KiB |
After Width: | Height: | Size: 80 KiB |
After Width: | Height: | Size: 89 KiB |
After Width: | Height: | Size: 117 KiB |
After Width: | Height: | Size: 143 KiB |
After Width: | Height: | Size: 89 KiB |
After Width: | Height: | Size: 81 KiB |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 767 KiB |
After Width: | Height: | Size: 42 KiB |
@ -0,0 +1,78 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<odoo> |
||||
|
<!-- Add sequence number on crm lead tree view --> |
||||
|
<record id="crm_case_tree_view_oppor" model="ir.ui.view"> |
||||
|
<field name="name">crm.lead.view.tree.inherit.sequence.opportunity.crm</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="//field[@name='name']" position="before"> |
||||
|
<field name="oppo_code"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<!-- Add sequence number on crm lead form view --> |
||||
|
<record id="crm_lead_view_form" model="ir.ui.view"> |
||||
|
<field name="name">crm.lead.view.form.inherit.sequence.opportunity.crm</field> |
||||
|
<field name="model">crm.lead</field> |
||||
|
<field name="inherit_id" ref="crm.crm_lead_view_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//field[@name='name']" position="before"> |
||||
|
<h2> |
||||
|
<field name="oppo_code"/> |
||||
|
</h2> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<!-- Add sequence number on crm lead kanban view --> |
||||
|
<record id="crm_case_kanban_view_leads" model="ir.ui.view"> |
||||
|
<field name="name">crm.lead.view.kanban.inherit.sequence.opportunity.crm</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="//field[@name='name']" position="before"> |
||||
|
<field name="oppo_code"/> |
||||
|
<br/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<!-- Add sequence number on crm lead calendar view --> |
||||
|
<record id="crm_case_calendar_view_leads" model="ir.ui.view"> |
||||
|
<field name="name">crm.lead.view.calendar.inherit.sequence.opportunity.crm</field> |
||||
|
<field name="model">crm.lead</field> |
||||
|
<field name="inherit_id" ref="crm.crm_case_calendar_view_leads"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//field[@name='expected_revenue']" position="before"> |
||||
|
<field name="oppo_code"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<!-- Add sequence number on crm lead pivot view --> |
||||
|
<record id="crm_lead_view_pivot" model="ir.ui.view"> |
||||
|
<field name="name">crm.lead.view.pivot.inherit.sequence.opportunity.crm</field> |
||||
|
<field name="model">crm.lead</field> |
||||
|
<field name="inherit_id" ref="crm.crm_lead_view_pivot"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//pivot" position="inside"> |
||||
|
<field name="oppo_code" type="col"/> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
|
||||
|
<!-- Add group filter for sequence number --> |
||||
|
<record id="view_crm_case_opportunities_filter" model="ir.ui.view"> |
||||
|
<field name="name">crm.lead.view.filter.inherit.sequence.opportunity.crm</field> |
||||
|
<field name="model">crm.lead</field> |
||||
|
<field name="inherit_id" ref="crm.view_crm_case_opportunities_filter"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<filter name="date_deadline" position="before"> |
||||
|
<filter string="Opportunity Sequence Number" name="opportunity_code" |
||||
|
context="{'group_by':'oppo_code'}"/> |
||||
|
</filter> |
||||
|
</field> |
||||
|
</record> |
||||
|
</odoo> |
@ -0,0 +1,29 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<odoo> |
||||
|
<!-- Add sequence selection to configuration view --> |
||||
|
<record id="res_config_settings_view_form" model="ir.ui.view"> |
||||
|
<field name="name">res.config.settings.view.form.inherit.sequence.opportunity.crm</field> |
||||
|
<field name="model">res.config.settings</field> |
||||
|
<field name="priority" eval="10"/> |
||||
|
<field name="inherit_id" ref="crm.res_config_settings_view_form"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//block[@name='generate_lead_setting_container']" |
||||
|
position="after"> |
||||
|
<h2>Sequence Generation</h2> |
||||
|
<div class="row mt16 o_settings_container" name="generate_lead_setting_container"> |
||||
|
<div class="col-lg-6 o_setting_box"> |
||||
|
<div class="o_setting_left_pane"> |
||||
|
<field name="sequence_create"/> |
||||
|
</div> |
||||
|
<div class="o_setting_right_pane" id="sequence_create_settings"> |
||||
|
<label string="Sequence Number" for="sequence_create"/> |
||||
|
<div class="text-muted"> |
||||
|
Sequence Number For Opportunities |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
</odoo> |