mirror of
https://bitbucket.org/presik/trytonpsk-crm.git
synced 2023-12-14 05:22:56 +01:00
Fix
This commit is contained in:
parent
f149f414d4
commit
6e28e1ee69
6 changed files with 65 additions and 40 deletions
|
@ -13,6 +13,7 @@ from . import opportunity
|
|||
from . import company
|
||||
from . import dash
|
||||
from . import commission
|
||||
from . import chart
|
||||
|
||||
|
||||
def register():
|
||||
|
@ -43,6 +44,7 @@ def register():
|
|||
dash.AppCRMService,
|
||||
dash.AppCRMMarketing,
|
||||
commission.Agent,
|
||||
chart.CRMChart,
|
||||
module='crm', type_='model')
|
||||
Pool.register(
|
||||
customer_service.CustomerServiceReport,
|
||||
|
|
18
chart.py
Normal file
18
chart.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||
# this repository contains the full copyright notices and license terms.
|
||||
from trytond.pool import PoolMeta
|
||||
|
||||
|
||||
class CRMChart(metaclass=PoolMeta):
|
||||
__name__ = "crm.opportunity"
|
||||
|
||||
@classmethod
|
||||
def report_opportunity_by_agent(cls, args):
|
||||
# Dash Report
|
||||
value = cls._get_check_rooms('departure')
|
||||
today = date.today()
|
||||
res = {
|
||||
'value': value,
|
||||
'header_meta': str(today),
|
||||
}
|
||||
return res
|
7
dash.xml
7
dash.xml
|
@ -40,6 +40,13 @@ this repository contains the full copyright notices and license terms. -->
|
|||
<field name="app_name">crm_marketing</field>
|
||||
</record>
|
||||
|
||||
<record model="dash.report" id="dash_report_opportunity_by_agent">
|
||||
<field name="name">Opportunity By Agent</field>
|
||||
<field name="model">crm.opportunity</field>
|
||||
<field name="type">table</field>
|
||||
<field name="method">report_opportunity_by_agent</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
|
||||
</tryton>
|
||||
|
|
|
@ -679,9 +679,7 @@ class CrmOpportunityLine(sequence_ordered(), ModelSQL, ModelView):
|
|||
_history = True
|
||||
_states = {
|
||||
'readonly': Eval('opportunity_state').in_([
|
||||
'lead',
|
||||
'opportunity',
|
||||
'accepted',
|
||||
'won',
|
||||
'lost',
|
||||
'cancelled']),
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[tryton]
|
||||
version=6.0.12
|
||||
version=6.0.13
|
||||
depends:
|
||||
party
|
||||
sale
|
||||
|
|
|
@ -5,7 +5,7 @@ this repository contains the full copyright notices and license terms. -->
|
|||
<label name="opportunity"/>
|
||||
<field name="opportunity" colspan="3"/>
|
||||
<label name="product"/>
|
||||
<field name="product"/>
|
||||
<field name="product" widget="selection"/>
|
||||
<label name="sequence"/>
|
||||
<field name="sequence"/>
|
||||
<label name="quantity"/>
|
||||
|
|
Loading…
Reference in a new issue