Skip to content

Commit

Permalink
[IMP] crm_lead_product: pre-commit stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrià Pallejà committed Mar 1, 2024
1 parent 7d2b686 commit d78904a
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 22 deletions.
12 changes: 6 additions & 6 deletions crm_lead_product/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Lead Line Product
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:e329f5a385e7f3371baeccb7831a37fb163dd62362c2b8ad0d99b6a75a311fc6
!! source digest: sha256:b633f77ecc5743ac9ec2b765d721a2d982d1ebe2fc3c3f475f8744a2721b4570
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand All @@ -17,13 +17,13 @@ Lead Line Product
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
:alt: License: LGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcrm-lightgray.png?logo=github
:target: https://github.com/OCA/crm/tree/13.0/crm_lead_product
:target: https://github.com/OCA/crm/tree/16.0/crm_lead_product
:alt: OCA/crm
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/crm-13-0/crm-13-0-crm_lead_product
:target: https://translation.odoo-community.org/projects/crm-16-0/crm-16-0-crm_lead_product
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/crm&target_branch=13.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/crm&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand Down Expand Up @@ -63,7 +63,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/crm/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/crm/issues/new?body=module:%20crm_lead_product%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/crm/issues/new?body=module:%20crm_lead_product%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Expand Down Expand Up @@ -94,6 +94,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/crm <https://github.com/OCA/crm/tree/13.0/crm_lead_product>`_ project on GitHub.
This module is part of the `OCA/crm <https://github.com/OCA/crm/tree/16.0/crm_lead_product>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 1 addition & 1 deletion crm_lead_product/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{
"name": "Lead Line Product",
"version": "13.0.1.0.1",
"version": "16.0.1.0.1",
"category": "Customer Relationship Management",
"license": "LGPL-3",
"summary": "Adds a lead line in the lead/opportunity model " "in odoo",
Expand Down
2 changes: 1 addition & 1 deletion crm_lead_product/models/crm_lead_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def _compute_expected_revenue(self):
)
product_qty = fields.Integer(string="Product Quantity", default=1, required=True)
uom_id = fields.Many2one("uom.uom", string="Unit of Measure", readonly=True)
price_unit = fields.Float(string="Price Unit")
price_unit = fields.Float()
planned_revenue = fields.Float(
compute="_compute_planned_revenue",
string="Planned revenue",
Expand Down
15 changes: 7 additions & 8 deletions crm_lead_product/report/crm_product_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,37 @@


class ActivityReport(models.Model):
""" CRM Lead Analysis """
"""CRM Lead Analysis"""

_name = "crm.product.report"
_auto = False
_description = "CRM Pipeline by Product Analysis"
_rec_name = "id"

active = fields.Boolean("Active", readonly=True)
active = fields.Boolean(readonly=True)
campaign_id = fields.Many2one("utm.campaign", "Campaing", readonly=True)
country_id = fields.Many2one("res.country", "Country", readonly=True)
company_id = fields.Many2one("res.company", "Company", readonly=True)
create_date = fields.Datetime("Create Date", readonly=True)
create_date = fields.Datetime(readonly=True)
date_closed = fields.Datetime("Closed Date", readonly=True)
date_conversion = fields.Datetime("Conversion Date", readonly=True)
date_deadline = fields.Datetime("Deadline Date", readonly=True)
date_open = fields.Datetime("Open Date", readonly=True)
lost_reason = fields.Many2one("crm.lost.reason", "Lost Reason", readonly=True)
lost_reason = fields.Many2one("crm.lost.reason", readonly=True)
name = fields.Char("Lead Name", readonly=True)
partner_id = fields.Many2one("res.partner", "Partner/Customer", readonly=True)
partner_name = fields.Char("Contact Name", readonly=True)
probability = fields.Float("Probability", group_operator="avg", readonly=True)
probability = fields.Float(group_operator="avg", readonly=True)
stage_id = fields.Many2one("crm.stage", "Stage", readonly=True)
team_id = fields.Many2one("crm.team", "Sales Team", readonly=True)
type = fields.Char(
string="Type",
selection=[("lead", "Lead"), ("opportunity", "Opportunity")],
help="Type is used to separate Leads and Opportunities",
)
user_id = fields.Many2one("res.users", "Salesperson", readonly=True)
category_id = fields.Many2one("product.category", "Category", readonly=True)
expected_revenue = fields.Float("Expected Revenue", readonly=True)
planned_revenue = fields.Float("Planned Revenue", readonly=True)
expected_revenue = fields.Float(readonly=True)
planned_revenue = fields.Float(readonly=True)
product_id = fields.Many2one("product.product", "Product", readonly=True)
product_qty = fields.Integer("Product Quantity", readonly=True)
product_tmpl_id = fields.Many2one(
Expand Down
2 changes: 1 addition & 1 deletion crm_lead_product/report/crm_product_report_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<field name="name">crm.opportunity.report.list</field>
<field name="model">crm.product.report</field>
<field name="arch" type="xml">
<tree string="Pipeline Analysis">
<tree>
<field name="create_date" />
<field name="product_id" />
<field name="product_qty" />
Expand Down
8 changes: 4 additions & 4 deletions crm_lead_product/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,9 @@ <h1 class="title">Lead Line Product</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:e329f5a385e7f3371baeccb7831a37fb163dd62362c2b8ad0d99b6a75a311fc6
!! source digest: sha256:b633f77ecc5743ac9ec2b765d721a2d982d1ebe2fc3c3f475f8744a2721b4570
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/crm/tree/13.0/crm_lead_product"><img alt="OCA/crm" src="https://img.shields.io/badge/github-OCA%2Fcrm-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/crm-13-0/crm-13-0-crm_lead_product"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/crm&amp;target_branch=13.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/crm/tree/16.0/crm_lead_product"><img alt="OCA/crm" src="https://img.shields.io/badge/github-OCA%2Fcrm-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/crm-16-0/crm-16-0-crm_lead_product"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/crm&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module allows the user to link multiple products, product categories or product templates to a lead or an opportunity
in order to be able to do a product demand forecasting taking into account the leads and opportunities defined in odoo.
Included in the product line there are two computed fields, the planned revenue and expected revenue. On one hand, the
Expand Down Expand Up @@ -408,7 +408,7 @@ <h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/crm/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/crm/issues/new?body=module:%20crm_lead_product%0Aversion:%2013.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/crm/issues/new?body=module:%20crm_lead_product%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand All @@ -432,7 +432,7 @@ <h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/crm/tree/13.0/crm_lead_product">OCA/crm</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/crm/tree/16.0/crm_lead_product">OCA/crm</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion crm_lead_product/views/crm_lead_line_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<field name="name">crm.lead.form.lead</field>
<field name="model">crm.lead.line</field>
<field name="arch" type="xml">
<tree string="Products" editable="bottom">
<tree editable="bottom">
<field name="product_id" />
<field name="category_id" />
<field name="product_tmpl_id" />
Expand Down
1 change: 1 addition & 0 deletions setup/crm_lead_product/odoo/addons/crm_lead_product
6 changes: 6 additions & 0 deletions setup/crm_lead_product/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)

0 comments on commit d78904a

Please sign in to comment.