Set model and tab for Party Evaluation.

This commit is contained in:
Danny Barajas 2022-02-04 14:53:09 -05:00
parent 2ccb9058ac
commit 474665b438
3 changed files with 22 additions and 0 deletions

View File

@ -26,6 +26,8 @@ def register():
activity.Activity,
opportunity.Opportunity,
opportunity.CrmOpportunityLine,
opportunity.PartyEvaluationConcept,
opportunity.PartyEvaluation,
# opportunity.OpportunityEmployee,
# opportunity.OpportunityEmployeeContext,
# opportunity.OpportunityMonthly,

View File

@ -20,6 +20,21 @@ from trytond.ir.attachment import AttachmentCopyMixin
from trytond.ir.note import NoteCopyMixin
from trytond.modules.company.model import employee_field, set_employee
class PartyEvaluationConcept(ModelSQL, ModelView):
''' Model to create concepts to Party Evaluation '''
'Party Evaluation Concept'
__name__ = 'crm.party_evaluation_concept'
name = fields.Char('Concept Name', required=True)
class PartyEvaluation(ModelSQL, ModelView):
''' Model to make analisys of economic behavior of party'''
'Party Evaluation'
__name__ = 'crm.party_evaluation'
concept = fields.Many2One('crm.party_evaluation_concept', 'Concept', required=True )
opportunity = fields.Many2One('crm.opportunity', 'Opportunity', required=True )
date = fields.Date('Date', required=True)
observation = fields.Text('Observation')
approved = fields.Boolean('Approved')
class Opportunity(
Workflow, ModelSQL, ModelView,
@ -147,6 +162,8 @@ class Opportunity(
('salesman', 'Salesman'),
('client', 'Client'),
], "Source", required=True, select=True)
party_evaluations = fields.One2Many('crm.party_evaluation', 'opportunity', 'Party Evaluations')
# del _states_start, _depends_start
# del _states_stop, _depends_stop

View File

@ -60,6 +60,9 @@ this repository contains the full copyright notices and license terms. -->
<page string="Contracts" name="contracts">
<field name="contracts" colspan="4"/>
</page>
<page string="Party Evaluation" name="party_evaluation">
<field name="party_evaluations" colspan="4"/>
</page>
</notebook>
<label name="state"/>
<field name="state"/>