From 5cc7ef011d0ffd8f7fd875e79eb29c1975824e35 Mon Sep 17 00:00:00 2001 From: camilogs Date: Tue, 19 Sep 2023 17:10:13 -0500 Subject: [PATCH] =?UTF-8?q?feat:=20Se=20agrega=20tipificaci=C3=B3n=20del?= =?UTF-8?q?=20cliente,=20closed=20#70?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prospect.py | 13 ++++++++++-- .../scenario_sale_opportunity_management.rst | 4 ++++ view/prospect_form.xml | 21 ++++++++++++++----- 3 files changed, 31 insertions(+), 7 deletions(-) diff --git a/prospect.py b/prospect.py index 5321606..fd21488 100644 --- a/prospect.py +++ b/prospect.py @@ -1,12 +1,12 @@ # 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.wizard import Wizard, StateView, Button, StateTransition -from trytond.model import ModelSQL, ModelView, fields +from trytond.model import ModelSQL, ModelView, fields, DeactivableMixin from trytond.pyson import Eval, If from trytond.pool import Pool -class Prospect(ModelSQL, ModelView): +class Prospect(ModelSQL, ModelView, DeactivableMixin): 'Prospecto' __name__ = 'sale.prospect' _rec_name = 'name' @@ -38,6 +38,15 @@ class Prospect(ModelSQL, ModelView): prospect_trace = fields.Many2One('sale.prospect_trace', 'Prospect trace') + rating = fields.Selection( + [(None, None), + ('1', '1'), + ('2', '2'), + ('3', '3'), + ('4', '4'), + ('5', '5')], 'Rating') + comments = fields.Text('Comments') + @classmethod def default_state(cls): return 'unassigned' diff --git a/tests/scenario_sale_opportunity_management.rst b/tests/scenario_sale_opportunity_management.rst index 3db9f21..f83f8ce 100644 --- a/tests/scenario_sale_opportunity_management.rst +++ b/tests/scenario_sale_opportunity_management.rst @@ -95,6 +95,10 @@ Crear tercer prospecto:: >>> prospect3.business_unit = 'optics' >>> prospect3.save() +Asignar tipificación a un prospecto + >>> prospect3.rating = '1' + >>> prospect3.comments = 'Calificación al cliente' + ------------------------------------ Asignación de prospectos a operarios ------------------------------------ diff --git a/view/prospect_form.xml b/view/prospect_form.xml index 01b3739..e7ca14f 100644 --- a/view/prospect_form.xml +++ b/view/prospect_form.xml @@ -22,13 +22,24 @@ this repository contains the full copyright notices and license terms. --> + + - -