Add lead origin
This commit is contained in:
parent
90aa5b7e75
commit
d8309cf62f
|
@ -33,6 +33,7 @@ def register():
|
||||||
sale.Sale,
|
sale.Sale,
|
||||||
activity.Activity,
|
activity.Activity,
|
||||||
opportunity.Opportunity,
|
opportunity.Opportunity,
|
||||||
|
opportunity.LeadOrigin,
|
||||||
opportunity.CrmOpportunityLine,
|
opportunity.CrmOpportunityLine,
|
||||||
opportunity.CrmOpportunityFollowUp,
|
opportunity.CrmOpportunityFollowUp,
|
||||||
opportunity.OpportunityCancellReason,
|
opportunity.OpportunityCancellReason,
|
||||||
|
|
|
@ -1,11 +1,8 @@
|
||||||
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
# This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||||
# this repository contains the full copyright notices and license terms.
|
# this repository contains the full copyright notices and license terms.
|
||||||
"Sales extension for managing leads and opportunities"
|
"Sales extension for managing leads and opportunities"
|
||||||
# import datetime
|
|
||||||
from datetime import datetime, date
|
from datetime import datetime, date
|
||||||
from genericpath import exists
|
from sql import Literal
|
||||||
|
|
||||||
from sql import Literal, Null
|
|
||||||
from sql.aggregate import Max, Count, Sum
|
from sql.aggregate import Max, Count, Sum
|
||||||
from sql.conditionals import Case, Coalesce
|
from sql.conditionals import Case, Coalesce
|
||||||
from sql.functions import Extract
|
from sql.functions import Extract
|
||||||
|
@ -17,17 +14,20 @@ from trytond.model.exceptions import AccessError
|
||||||
from trytond.pyson import Eval, In, If, Get, Bool
|
from trytond.pyson import Eval, In, If, Get, Bool
|
||||||
from trytond.transaction import Transaction
|
from trytond.transaction import Transaction
|
||||||
from trytond.pool import Pool
|
from trytond.pool import Pool
|
||||||
|
|
||||||
from trytond.modules.company import CompanyReport
|
from trytond.modules.company import CompanyReport
|
||||||
|
|
||||||
# Manage errors
|
|
||||||
from trytond.exceptions import UserError
|
from trytond.exceptions import UserError
|
||||||
from .exceptions import IncompletePartyValidation, ChangeStateWarning
|
|
||||||
from trytond.ir.attachment import AttachmentCopyMixin
|
from trytond.ir.attachment import AttachmentCopyMixin
|
||||||
from trytond.ir.note import NoteCopyMixin
|
from trytond.ir.note import NoteCopyMixin
|
||||||
|
# from .exceptions import IncompletePartyValidation, ChangeStateWarning
|
||||||
# from trytond.modules.company.model import employee_field, set_employee
|
# from trytond.modules.company.model import employee_field, set_employee
|
||||||
|
|
||||||
|
|
||||||
|
class LeadOrigin(ModelSQL, ModelView):
|
||||||
|
'CRM Lead Origin'
|
||||||
|
__name__ = 'crm.lead_origin'
|
||||||
|
name = fields.Char("Lead Origin")
|
||||||
|
|
||||||
|
|
||||||
class Opportunity(
|
class Opportunity(
|
||||||
Workflow, ModelSQL, ModelView,
|
Workflow, ModelSQL, ModelView,
|
||||||
AttachmentCopyMixin, NoteCopyMixin):
|
AttachmentCopyMixin, NoteCopyMixin):
|
||||||
|
|
|
@ -323,7 +323,33 @@ this repository contains the full copyright notices and license terms. -->
|
||||||
<field name="action" ref="report_opportunity_large_format"/>
|
<field name="action" ref="report_opportunity_large_format"/>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<record model="ir.ui.view" id="crm_lead_origin_view_tree">
|
||||||
|
<field name="model">crm.lead_origin</field>
|
||||||
|
<field name="type">tree</field>
|
||||||
|
<field name="name">lead_origin_tree</field>
|
||||||
|
</record>
|
||||||
|
<record model="ir.ui.view" id="crm_lead_origin_view_form">
|
||||||
|
<field name="model">crm.lead_origin</field>
|
||||||
|
<field name="type">form</field>
|
||||||
|
<field name="name">lead_origin_form</field>
|
||||||
|
</record>
|
||||||
|
<record model="ir.action.act_window" id="act_lead_origin_form">
|
||||||
|
<field name="name">Lead Origin</field>
|
||||||
|
<field name="res_model">crm.lead_origin</field>
|
||||||
|
</record>
|
||||||
|
<record model="ir.action.act_window.view" id="act_lead_origin_form_view1">
|
||||||
|
<field name="sequence" eval="10"/>
|
||||||
|
<field name="view" ref="crm_lead_origin_view_tree"/>
|
||||||
|
<field name="act_window" ref="act_lead_origin_form"/>
|
||||||
|
</record>
|
||||||
|
<record model="ir.action.act_window.view" id="act_lead_origin_form_view2">
|
||||||
|
<field name="sequence" eval="20"/>
|
||||||
|
<field name="view" ref="crm_lead_origin_view_form"/>
|
||||||
|
<field name="act_window" ref="act_lead_origin_form"/>
|
||||||
|
</record>
|
||||||
|
<menuitem name="Lead Origin" parent="crm.menu_crm_configuration"
|
||||||
|
id="menu_crm_lead_origin" sequence="70"
|
||||||
|
action="act_lead_origin_form" />
|
||||||
|
|
||||||
<!-- <record model="ir.ui.view" id="opportunity_traceability_view_tree">
|
<!-- <record model="ir.ui.view" id="opportunity_traceability_view_tree">
|
||||||
<field name="model">crm.opportunity_traceability</field>
|
<field name="model">crm.opportunity_traceability</field>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[tryton]
|
[tryton]
|
||||||
version=6.0.4
|
version=6.0.5
|
||||||
depends:
|
depends:
|
||||||
party
|
party
|
||||||
sale
|
sale
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||||
|
this repository contains the full copyright notices and license terms. -->
|
||||||
|
<form>
|
||||||
|
<label name="name"/>
|
||||||
|
<field name="name"/>
|
||||||
|
</form>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
|
||||||
|
this repository contains the full copyright notices and license terms. -->
|
||||||
|
<tree>
|
||||||
|
<field name="name"/>
|
||||||
|
</tree>
|
Loading…
Reference in New Issue