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
|
@ -13,6 +13,7 @@ from . import opportunity
|
||||||
from . import company
|
from . import company
|
||||||
from . import dash
|
from . import dash
|
||||||
from . import commission
|
from . import commission
|
||||||
|
from . import chart
|
||||||
|
|
||||||
|
|
||||||
def register():
|
def register():
|
||||||
|
@ -43,6 +44,7 @@ def register():
|
||||||
dash.AppCRMService,
|
dash.AppCRMService,
|
||||||
dash.AppCRMMarketing,
|
dash.AppCRMMarketing,
|
||||||
commission.Agent,
|
commission.Agent,
|
||||||
|
chart.CRMChart,
|
||||||
module='crm', type_='model')
|
module='crm', type_='model')
|
||||||
Pool.register(
|
Pool.register(
|
||||||
customer_service.CustomerServiceReport,
|
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>
|
<field name="app_name">crm_marketing</field>
|
||||||
</record>
|
</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>
|
</data>
|
||||||
|
|
||||||
</tryton>
|
</tryton>
|
||||||
|
|
|
@ -679,9 +679,7 @@ class CrmOpportunityLine(sequence_ordered(), ModelSQL, ModelView):
|
||||||
_history = True
|
_history = True
|
||||||
_states = {
|
_states = {
|
||||||
'readonly': Eval('opportunity_state').in_([
|
'readonly': Eval('opportunity_state').in_([
|
||||||
'lead',
|
'won',
|
||||||
'opportunity',
|
|
||||||
'accepted',
|
|
||||||
'lost',
|
'lost',
|
||||||
'cancelled']),
|
'cancelled']),
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[tryton]
|
[tryton]
|
||||||
version=6.0.12
|
version=6.0.13
|
||||||
depends:
|
depends:
|
||||||
party
|
party
|
||||||
sale
|
sale
|
||||||
|
|
|
@ -5,7 +5,7 @@ this repository contains the full copyright notices and license terms. -->
|
||||||
<label name="opportunity"/>
|
<label name="opportunity"/>
|
||||||
<field name="opportunity" colspan="3"/>
|
<field name="opportunity" colspan="3"/>
|
||||||
<label name="product"/>
|
<label name="product"/>
|
||||||
<field name="product"/>
|
<field name="product" widget="selection"/>
|
||||||
<label name="sequence"/>
|
<label name="sequence"/>
|
||||||
<field name="sequence"/>
|
<field name="sequence"/>
|
||||||
<label name="quantity"/>
|
<label name="quantity"/>
|
||||||
|
|
Loading…
Reference in a new issue