feat: Se agrega tipificación del cliente, closed #70
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
72ae0cfa22
commit
5cc7ef011d
13
prospect.py
13
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'
|
||||
|
@ -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
|
||||
------------------------------------
|
||||
|
@ -22,13 +22,24 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<page string="Contact methods" id="contact_methods">
|
||||
<field name="contact_methods" colspan="2"/>
|
||||
</page>
|
||||
<page string="About prospect" id="contact_methods">
|
||||
<label name="rating"/>
|
||||
<field name="rating"/>
|
||||
<newline/>
|
||||
<label name="comments"/>
|
||||
<field name="comments"/>
|
||||
</page>
|
||||
</notebook>
|
||||
<newline/>
|
||||
|
||||
<group col="4" id="stated">
|
||||
<label name="assigned_operator"/>
|
||||
<field name="assigned_operator"/>
|
||||
<label name="state"/>
|
||||
<field name="state"/>
|
||||
<group col="6" colspan="5" id="footer" yalign="0">
|
||||
<label name="assigned_operator"/>
|
||||
<field name="assigned_operator"/>
|
||||
<label name="state"/>
|
||||
<field name="state"/>
|
||||
<group col="-1" colspan="1" id="checkboxes">
|
||||
<label name="active"/>
|
||||
<field name="active" xexpand="0" width="25"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
|
Loading…
Reference in New Issue
Block a user